[kaffe] CVS kaffe (robilad): Resynced with GNU classpath: cleanup
Kaffe CVS
cvs-commits at kaffe.org
Wed Mar 2 14:44:44 PST 2005
PatchSet 5488
Date: 2005/03/02 22:35:25
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU classpath: cleanup
2005-03-02 Dalibor Topic <robilad at kaffe.org>
Resynced with GNU Classpath.
2005-02-27 Roman Kennke <roman at ontographics.com>
* javax/swing/plaf/basic/BasicListUI:
fixed modifiers of several fields, methods and inner
classes to match the 'spec'.
(getMaximumSize): removed. It's not in the spec and the
implementations was superfluous.
Members:
ChangeLog:1.3662->1.3663
libraries/javalib/javax/swing/plaf/basic/BasicListUI.java:1.6->1.7
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3662 kaffe/ChangeLog:1.3663
--- kaffe/ChangeLog:1.3662 Wed Mar 2 22:32:08 2005
+++ kaffe/ChangeLog Wed Mar 2 22:35:25 2005
@@ -2,6 +2,18 @@
Resynced with GNU Classpath.
+ 2005-02-27 Roman Kennke <roman at ontographics.com>
+
+ * javax/swing/plaf/basic/BasicListUI:
+ fixed modifiers of several fields, methods and inner
+ classes to match the 'spec'.
+ (getMaximumSize): removed. It's not in the spec and the
+ implementations was superfluous.
+
+2005-03-02 Dalibor Topic <robilad at kaffe.org>
+
+ Resynced with GNU Classpath.
+
2005-02-27 Chris Burdess <dog at gnu.org>
* gnu/xml/aelfred2/JAXPFactory.java,
Index: kaffe/libraries/javalib/javax/swing/plaf/basic/BasicListUI.java
diff -u kaffe/libraries/javalib/javax/swing/plaf/basic/BasicListUI.java:1.6 kaffe/libraries/javalib/javax/swing/plaf/basic/BasicListUI.java:1.7
--- kaffe/libraries/javalib/javax/swing/plaf/basic/BasicListUI.java:1.6 Wed Mar 2 22:29:54 2005
+++ kaffe/libraries/javalib/javax/swing/plaf/basic/BasicListUI.java Wed Mar 2 22:35:33 2005
@@ -79,7 +79,7 @@
* A helper class which listens for {@link ComponentEvent}s from
* the JList.
*/
- class ComponentHandler extends ComponentAdapter {
+ private class ComponentHandler extends ComponentAdapter {
/**
* Called when the component is hidden. Invalidates the internal
@@ -94,7 +94,7 @@
* A helper class which listens for {@link FocusEvents}
* from the JList.
*/
- class FocusHandler implements FocusListener
+ public class FocusHandler implements FocusListener
{
/**
* Called when the JList acquires focus.
@@ -131,7 +131,7 @@
*
* @see javax.swing.JList#model
*/
- class ListDataHandler implements ListDataListener
+ public class ListDataHandler implements ListDataListener
{
/**
* Called when a general change has happened in the model which cannot
@@ -169,7 +169,7 @@
* A helper class which listens for {@link ListSelectionEvent}s
* from the {@link JList}'s {@link ListSelectionModel}.
*/
- class ListSelectionHandler implements ListSelectionListener
+ public class ListSelectionHandler implements ListSelectionListener
{
/**
* Called when the list selection changes.
@@ -185,7 +185,7 @@
* A helper class which listens for {@link MouseEvent}s
* from the {@link JList}.
*/
- class MouseInputHandler implements MouseInputListener
+ public class MouseInputHandler implements MouseInputListener
{
/**
* Called when a mouse button press/release cycle completes
@@ -268,7 +268,7 @@
* Helper class which listens to {@link PropertyChangeEvent}s
* from the {@link JList}.
*/
- class PropertyChangeHandler implements PropertyChangeListener
+ public class PropertyChangeHandler implements PropertyChangeListener
{
/**
* Called when the {@link JList} changes one of its bound properties.
@@ -302,45 +302,45 @@
}
/** The current focus listener. */
- FocusHandler focusListener;
+ protected FocusHandler focusListener;
/** The data listener listening to the model. */
- ListDataHandler listDataListener;
+ protected ListDataHandler listDataListener;
/** The selection listener listening to the selection model. */
- ListSelectionHandler listSelectionListener;
+ protected ListSelectionHandler listSelectionListener;
/** The mouse listener listening to the list. */
- MouseInputHandler mouseInputListener;
+ protected MouseInputHandler mouseInputListener;
/** The property change listener listening to the list. */
- PropertyChangeHandler propertyChangeListener;
+ protected PropertyChangeHandler propertyChangeListener;
/** The component listener that receives notification for resizing the
* JList component.*/
- ComponentListener componentListener;
+ private ComponentListener componentListener;
/** Saved reference to the list this UI was created for. */
- JList list;
+ protected JList list;
/** The height of a single cell in the list. */
- int cellHeight;
+ protected int cellHeight;
/** The width of a single cell in the list. */
- int cellWidth;
+ protected int cellWidth;
/**
* An array of varying heights of cells in the list, in cases where each
* cell might have a different height.
*/
- int[] cellHeights;
+ protected int[] cellHeights;
/**
* A simple counter. When nonzero, indicates that the UI class is out of
* date with respect to the underlying list, and must recalculate the
* list layout before painting or performing size calculations.
*/
- int updateLayoutStateNeeded;
+ protected int updateLayoutStateNeeded;
/**
* Calculate the height of a particular row. If there is a fixed {@link
@@ -352,7 +352,7 @@
*
* @return The height, in pixels, of the specified row
*/
- int getRowHeight(int row)
+ protected int getRowHeight(int row)
{
if (row < 0 || row >= cellHeights.length)
return -1;
@@ -402,7 +402,7 @@
* @return The Y coordinate of the specified row, or <code>-1</code> if
* the specified row number is invalid
*/
- int convertRowToY(int row)
+ protected int convertRowToY(int row)
{
int y = 0;
for (int i = 0; i < row; ++i)
@@ -425,7 +425,7 @@
* @return The row number containing the specified Y value, or <code>-1</code>
* if the specified Y coordinate is invalid
*/
- int convertYToRow(int y0)
+ protected int convertYToRow(int y0)
{
for (int row = 0; row < cellHeights.length; ++row)
{
@@ -443,7 +443,7 @@
* #cellWidth} properties by examining the variouis properties of the
* {@link JList}.
*/
- void updateLayoutState()
+ protected void updateLayoutState()
{
int nrows = list.getModel().getSize();
cellHeight = -1;
@@ -482,7 +482,7 @@
*
* @see #updateLayoutStateNeeded
*/
- void damageLayout()
+ private void damageLayout()
{
updateLayoutStateNeeded = 1;
list.revalidate();
@@ -492,7 +492,7 @@
* Calls {@link #updateLayoutState} if {@link #updateLayoutStateNeeded}
* is nonzero, then resets {@link #updateLayoutStateNeeded} to zero.
*/
- void maybeUpdateLayoutState()
+ protected void maybeUpdateLayoutState()
{
if (updateLayoutStateNeeded != 0)
{
@@ -521,7 +521,7 @@
*
* @see #uninstallDefaults
*/
- void installDefaults()
+ protected void installDefaults()
{
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
list.setForeground(defaults.getColor("List.foreground"));
@@ -535,7 +535,7 @@
* Resets to <code>null</code> those defaults which were installed in
* {@link #installDefaults}
*/
- void uninstallDefaults()
+ protected void uninstallDefaults()
{
UIDefaults defaults = UIManager.getLookAndFeelDefaults();
list.setForeground(null);
@@ -550,7 +550,7 @@
*
* @see #uninstallListeners
*/
- void installListeners()
+ protected void installListeners()
{
list.addFocusListener(focusListener);
list.getModel().addListDataListener(listDataListener);
@@ -564,7 +564,7 @@
/**
* Detaches all the listeners we attached in {@link #installListeners}.
*/
- void uninstallListeners()
+ protected void uninstallListeners()
{
list.removeFocusListener(focusListener);
list.getModel().removeListDataListener(listDataListener);
@@ -577,14 +577,14 @@
/**
* Installs keyboard actions for this UI in the {@link JList}.
*/
- void installKeyboardActions()
+ protected void installKeyboardActions()
{
}
/**
* Uninstalls keyboard actions for this UI in the {@link JList}.
*/
- void uninstallKeyboardActions()
+ protected void uninstallKeyboardActions()
{
}
@@ -623,18 +623,6 @@
}
/**
- * Gets the maximum size this list can assume.
- *
- * @param c The component to measure the size of
- *
- * @return A new Dimension representing the component's maximum size
- */
- public Dimension getMaximumSize(JComponent c)
- {
- return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
- }
-
- /**
* Gets the size this list would prefer to assume. This is calculated by
* calling {@link #getCellBounds} over the entire list.
*
@@ -657,7 +645,7 @@
* @param g The graphics context to paint in
* @param c The component to paint the background of
*/
- public void paintBackground(Graphics g, JComponent c)
+ private void paintBackground(Graphics g, JComponent c)
{
Dimension size = getPreferredSize(c);
Color save = g.getColor();
@@ -679,8 +667,9 @@
* @param sel A selection model to provide to the cell renderer
* @param lead The lead selection index of the list
*/
- void paintCell(Graphics g, int row, Rectangle bounds, ListCellRenderer rend,
- ListModel data, ListSelectionModel sel, int lead)
+ protected void paintCell(Graphics g, int row, Rectangle bounds,
+ ListCellRenderer rend, ListModel data,
+ ListSelectionModel sel, int lead)
{
boolean is_sel = list.isSelectedIndex(row);
boolean has_focus = false;
More information about the kaffe
mailing list