|
Quick Lists
|
|
Bug ID:
|
4134077
|
|
Votes
|
10
|
|
Synopsis
|
Metal,Window:If JInternalFrame's title text is long last must be ellipsis
|
|
Category
|
java:classes_swing
|
|
Reported Against
|
1.2
, 1.2rc2
, 1.2beta4
, swing1.0.2
, kestrel-rc1
, kestrel-beta
|
|
Release Fixed
|
1.4(merlin-beta)
|
|
State
|
10-Fix Delivered,
Verified,
bug
|
|
Priority:
|
3-Medium
|
|
Related Bugs
|
4192537
,
4242045
,
4281667
|
|
Submit Date
|
30-APR-1998
|
|
Description
|
JInternalFrame:
If title text is longer than the frame's width, title text's last part should be ellipsis. However title text is drawn until the end of frame width and control buttons like close, minimize button are overlayed on top of frame title text only in Metal and Window looks.
1) Run SwingSet in WindowNT.
2) Select 'Internal Frame' tab.
3) Make title very long for example 30 characters.
4) Create one.
5) Title text is drawn under control buttons.
bae- xxxxx@xxxxx 1998-04-30
java version "1.3.0rc1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-T)
Java HotSpot(TM) Client VM (build 1.3.0rc1-S, mixed mode)
The title text shown on a JInternalFrame needs to be clipped, or more correctly
be adjusted to use the "..." suffix like JLabel does, when there isn't enough
room for all the text. This is how native Windows MDI sessions behave. This
results in the title text showing through behind the frame control buttons(ie
minimize, maximize and close) which appears very unprofessional. The problem can
be seen in both the Metal and Windows LFs (I didn't check Motif). You'll only
see the problem w/ Metal for frames that aren't iconified, but for Windows
you'll see it all the time. By adjusting the width of the frame you can see
varying amounts of the title text behind the control buttons.
Use the following test app to see the problem:
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class JDesktopPanePaintBug extends JFrame {
public static void main(String[] args) {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
} catch (Exception x) {}
new JDesktopPanePaintBug();
}
public JDesktopPanePaintBug() {
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}}
);
JDesktopPane desktop = new JDesktopPane();
desktop.putClientProperty("JDesktopPane.dragMode", "outline");
desktop.setBorder(BorderFactory.createLineBorder(Color.red, 3));
setContentPane(desktop);
JInternalFrame iframe = new JInternalFrame("This is a test frame long title", true, false, true, true);
iframe.setOpaque(true);
iframe.setBackground(Color.white);
iframe.setBounds(10,10,200,200);
iframe.setVisible(true);
desktop.add(iframe);
iframe = new JInternalFrame("Short title", true, false, true, true);
iframe.setOpaque(true);
iframe.setBackground(Color.white);
iframe.setBounds(30,30,200,200);
iframe.setVisible(true);
desktop.add(iframe);
pack();
setBounds(300, 300, 500, 300);
setVisible(true);
}
}
(Review ID: 102442)
======================================================================
|
|
Work Around
|
N/A
|
|
Evaluation
|
this is the case indeed. need to verify with Metal L&F proper behaviour, since motif just clips, Windows uses ellipsis but what does Metal want to do?
xxxxx@xxxxx 1998-05-27
btw, yes windows L&F is also incorrect. . .
xxxxx@xxxxx 1998-05-27
Metal should behave like Windows, not like Motif in this case.
xxxxx@xxxxx 2000-02-09
We should get a clipped string for internal frame title before its
title paints if its width less than text length before we paint its
title. (BasicInternalFrameUI.java)
Also in real Windows applications the width of the window can never
be smoller than the width of the first two letters of the title plus
"...". So in BasicInternalFrameUI.installUI the minimum width of the
frame should be calculated. When we add/remove buttons for closing,
iconifying and maximizing the frame this minimum width should be
recalculated. It applicable for Metal and Windows LAF.
For correct recalculating of internal frame's minimum width the
property "iconable" for internal Frame should be bound property.
xxxxx@xxxxx 2000-03-16
|
|
Comments
|
Submitted On 24-NOV-1998
LarsBB
The largest problem with a bug like this is that, although it doesn't crash the
language or make anything unusable it does something that is often equally bad.
It makes the environment look cheep and unprofessional. Either consciously or
unconsciously a user looks at such a thing and think, "what else is
broken." It's all about public perception. If metal doesn't look as good
as Windows then it will not be perceived as, as good as Windows.
Although bug 4014323 is really an incredibly horrible !BUG!.
Submitted On 10-OCT-1999
kuhse
Metal desperately wants to display "...".
And Metal wants to do so in 1.3!
Submitted On 28-AUG-2000
KCheung551
I am still seeing this bug in J2SE build 1.3.0-C. When will the fix be released in Windows platform?
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |