Marked some functions as unimplemented.
Implemented missing functions.
Fixed several comments and TODO/FIXMEs.
2006-07-04 Lillian Angel <[EMAIL PROTECTED]>
* javax/swing/plaf/basic/BasicOptionPaneUI.java:
Fixed name of constant.
(getIconWidth): Changed name of constant returned.
(getIconHeight): Likewise.
(paint): Likewise.
(createSeparator): Marked as unimplemented.
* javax/swing/plaf/basic/BasicTableUI.java
(focusGained): Marked as unimplemented.
(focusLost): Marked as unimplemented.
(mouseEntered): Likewise.
(mouseMoved): Likewise.
(uninstallDefaults): Likewise.
* javax/swing/plaf/basic/BasicToolBarUI.java
(mouseClicked): Changed comment.
(mouseEntered): Likewise.
(mouseExited): Likewise.
(mouseMoved): Likewise.
(setOrientation): Implemented.
(ToolBarFocusListener): Marked as unimplemented.
(focusGained): Marked as unimplemented.
(focusLost): Marked as unimplemented.
Index: javax/swing/plaf/basic/BasicOptionPaneUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java,v
retrieving revision 1.31
diff -u -r1.31 BasicOptionPaneUI.java
--- javax/swing/plaf/basic/BasicOptionPaneUI.java 13 Jun 2006 09:28:57 -0000 1.31
+++ javax/swing/plaf/basic/BasicOptionPaneUI.java 4 Jul 2006 17:42:24 -0000
@@ -460,8 +460,7 @@
protected JOptionPane optionPane;
/** The size of the icons. */
- // FIXME: wrong name for a constant.
- private static final int iconSize = 36;
+ private static final int ICON_SIZE = 36;
/** The foreground color for the message area. */
private transient Color messageForeground;
@@ -505,7 +504,7 @@
*/
public int getIconWidth()
{
- return iconSize;
+ return ICON_SIZE;
}
/**
@@ -515,7 +514,7 @@
*/
public int getIconHeight()
{
- return iconSize;
+ return ICON_SIZE;
}
/**
@@ -566,7 +565,7 @@
// Should be purple.
g.setColor(Color.RED);
- g.fillOval(0, 0, iconSize, iconSize);
+ g.fillOval(0, 0, ICON_SIZE, ICON_SIZE);
g.setColor(Color.BLACK);
g.drawOval(16, 6, 4, 4);
@@ -615,7 +614,7 @@
Color saved = g.getColor();
g.setColor(Color.GREEN);
- g.fillRect(0, 0, iconSize, iconSize);
+ g.fillRect(0, 0, ICON_SIZE, ICON_SIZE);
g.setColor(Color.BLACK);
@@ -623,7 +622,7 @@
g.drawOval(14, 5, 10, 10);
g.setColor(Color.GREEN);
- g.fillRect(0, 10, iconSize, iconSize - 10);
+ g.fillRect(0, 10, ICON_SIZE, ICON_SIZE - 10);
g.setColor(Color.BLACK);
@@ -640,10 +639,6 @@
}
};
- // FIXME: Uncomment when the ImageIcons are fixed.
-
- /* IconUIResource warningIcon, questionIcon, infoIcon, errorIcon;*/
-
/**
* Creates a new BasicOptionPaneUI object.
*/
@@ -940,6 +935,7 @@
* @return A Container that will separate the message and button areas.
*/
protected Container createSeparator()
+ throws NotImplementedException
{
// FIXME: Figure out what this method is supposed to return and where
// this should be added to the OptionPane.
Index: javax/swing/plaf/basic/BasicTableUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTableUI.java,v
retrieving revision 1.54
diff -u -r1.54 BasicTableUI.java
--- javax/swing/plaf/basic/BasicTableUI.java 13 Jun 2006 09:28:57 -0000 1.54
+++ javax/swing/plaf/basic/BasicTableUI.java 4 Jul 2006 17:42:24 -0000
@@ -164,12 +164,12 @@
public class FocusHandler implements FocusListener
{
- public void focusGained(FocusEvent e)
+ public void focusGained(FocusEvent e) throws NotImplementedException
{
// TODO: Implement this properly.
}
- public void focusLost(FocusEvent e)
+ public void focusLost(FocusEvent e) throws NotImplementedException
{
// TODO: Implement this properly.
}
@@ -243,16 +243,17 @@
}
public void mouseEntered(MouseEvent e)
+ throws NotImplementedException
{
// TODO: What should be done here, if anything?
}
- public void mouseExited(MouseEvent e)
+ public void mouseExited(MouseEvent e) throws NotImplementedException
{
// TODO: What should be done here, if anything?
}
- public void mouseMoved(MouseEvent e)
+ public void mouseMoved(MouseEvent e) throws NotImplementedException
{
// TODO: What should be done here, if anything?
}
@@ -1167,7 +1168,7 @@
table.addPropertyChangeListener(propertyChangeListener);
}
- protected void uninstallDefaults()
+ protected void uninstallDefaults() throws NotImplementedException
{
// TODO: this method used to do the following which is not
// quite right (at least it breaks apps that run fine with the
@@ -1187,8 +1188,7 @@
// though. / Roman Kennke
}
- protected void uninstallKeyboardActions()
- throws NotImplementedException
+ protected void uninstallKeyboardActions() throws NotImplementedException
{
// TODO: Implement this properly.
}
Index: javax/swing/plaf/basic/BasicToolBarUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicToolBarUI.java,v
retrieving revision 1.25
diff -u -r1.25 BasicToolBarUI.java
--- javax/swing/plaf/basic/BasicToolBarUI.java 13 Jun 2006 09:28:57 -0000 1.25
+++ javax/swing/plaf/basic/BasicToolBarUI.java 4 Jul 2006 17:42:24 -0000
@@ -998,7 +998,7 @@
*/
public void mouseClicked(MouseEvent e)
{
- // Don't care.
+ // Nothing to do here.
}
/**
@@ -1020,7 +1020,7 @@
*/
public void mouseEntered(MouseEvent e)
{
- // Don't care (yet).
+ // Nothing to do here.
}
/**
@@ -1030,7 +1030,7 @@
*/
public void mouseExited(MouseEvent e)
{
- // Don't care (yet).
+ // Nothing to do here.
}
/**
@@ -1040,7 +1040,7 @@
*/
public void mouseMoved(MouseEvent e)
{
- // TODO: What should be done here, if anything?
+ // Nothing to do here.
}
/**
@@ -1203,13 +1203,17 @@
}
/**
- * FIXME: Do something.
+ * Sets the orientation of the toolbar and the
+ * drag window.
*
- * @param o DOCUMENT ME!
+ * @param o - the new orientation of the toolbar and drag
+ * window.
*/
public void setOrientation(int o)
{
- // FIXME: implement.
+ toolBar.setOrientation(o);
+ if (dragWindow != null)
+ dragWindow.setOrientation(o);
}
}
@@ -1330,27 +1334,27 @@
/**
* Creates a new ToolBarFocusListener object.
*/
- protected ToolBarFocusListener()
+ protected ToolBarFocusListener() throws NotImplementedException
{
// FIXME: implement.
}
/**
* DOCUMENT ME!
- *
+ *
* @param e DOCUMENT ME!
*/
- public void focusGained(FocusEvent e)
+ public void focusGained(FocusEvent e) throws NotImplementedException
{
// FIXME: implement.
}
/**
* DOCUMENT ME!
- *
+ *
* @param e DOCUMENT ME!
*/
- public void focusLost(FocusEvent e)
+ public void focusLost(FocusEvent e) throws NotImplementedException
{
// FIXME: implement.
}