summaryrefslogtreecommitdiff
path: root/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2005-11-02 00:43:13 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2005-11-02 00:43:13 +0000
commit46f26ceba116c0116f67188287e37b96cfd8c05a (patch)
tree73d89c51b5f2d50ec4f24fb34b67f91b2567dd51 /javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
parent899a8a3151264e11d3582d1e57052d85123b03da (diff)
downloadclasspath-46f26ceba116c0116f67188287e37b96cfd8c05a.tar.gz
2005-11-01 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge from HEAD --> generics for 2005/09/20 - 2005/11/01.
Diffstat (limited to 'javax/swing/plaf/metal/MetalInternalFrameTitlePane.java')
-rw-r--r--javax/swing/plaf/metal/MetalInternalFrameTitlePane.java24
1 files changed, 17 insertions, 7 deletions
diff --git a/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java b/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
index efae78417..33eb3491a 100644
--- a/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
+++ b/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
@@ -61,9 +61,10 @@ import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
/**
- * The title pane for a {@link JInternalFrame}. This can be displayed in two
- * styles: one for regular internal frames, and the other for "palette" style
- * internal frames.
+ * The title pane for a {@link JInternalFrame} (see
+ * {@link MetalInternalFrameUI#createNorthPane(JInternalFrame)}). This can
+ * be displayed in two styles: one for regular internal frames, and the other
+ * for "palette" style internal frames.
*/
public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
{
@@ -86,7 +87,7 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
/**
* Handles <code>JInternalFrame.isPalette</code> property changes, with all
- * other propert changes being passed to the superclass.
+ * other property changes being passed to the superclass.
*
* @param e the event.
*/
@@ -214,6 +215,7 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
*/
public void removeLayoutComponent(Component c)
{
+ // Nothing to do here.
}
}
@@ -234,7 +236,7 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
protected int paletteTitleHeight;
/** The label used to display the title for the internal frame. */
- private JLabel title;
+ JLabel title;
/**
* Creates a new title pane for the specified frame.
@@ -315,6 +317,9 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
// do nothing
}
+ /**
+ * Adds the sub components of the title pane.
+ */
protected void addSubComponents()
{
// FIXME: this method is probably overridden to only add the required
@@ -348,7 +353,7 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
Rectangle b = SwingUtilities.getLocalBounds(this);
g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
g.fillRect(b.x, b.y, b.width, b.height);
- MetalUtils.fillMetalPattern(g, b.x + 4, b.y + 2, b.width
+ MetalUtils.fillMetalPattern(this, g, b.x + 4, b.y + 2, b.width
- paletteCloseIcon.getIconWidth() - 13, b.height - 5,
MetalLookAndFeel.getPrimaryControlHighlight(),
MetalLookAndFeel.getBlack());
@@ -399,7 +404,7 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
endX = Math.max(closeButton.getX(), endX);
endX -= 7;
if (endX > startX)
- MetalUtils.fillMetalPattern(g, startX, 3, endX - startX, getHeight() - 6, Color.white, Color.gray);
+ MetalUtils.fillMetalPattern(this, g, startX, 3, endX - startX, getHeight() - 6, Color.white, Color.gray);
}
g.setColor(savedColor);
}
@@ -422,6 +427,11 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
closeButton.setIcon(closeIcon);
}
+ /**
+ * Creates and returns a property change handler for the title pane.
+ *
+ * @return The property change handler.
+ */
protected PropertyChangeListener createPropertyChangeListener()
{
return new MetalInternalFrameTitlePanePropertyChangeHandler();