From dc6715320db92089b3c1b046157b56b5680738a5 Mon Sep 17 00:00:00 2001
From: Andrew John Hughes The various behavioral aspects of these properties follows: Returns the action command string for this button's model. This method also configures several of the button's properties from
* the Action, by calling {@link #configurePropertiesFromAction}, and
* subscribes the button to the Action as a PropertyChangeListener.
- * Subsequent changes to the Action will thus reconfigure the button
+ * Subsequent changes to the Action will thus reconfigure the button
* automatically.null
permitted).
@@ -123,12 +123,12 @@ public abstract class AbstractAction
/**
* Returns the value associated with the specified key.
- *
+ *
* @param key the key (not null
).
- *
- * @return The value associated with the specified key, or
+ *
+ * @return The value associated with the specified key, or
* null
if the key is not found.
- *
+ *
* @see #putValue(String, Object)
*/
public Object getValue(String key)
@@ -137,20 +137,20 @@ public abstract class AbstractAction
}
/**
- * Sets the value associated with the specified key and sends a
- * {@link java.beans.PropertyChangeEvent} to all registered listeners.
- * The standard keys are:
+ * Sets the value associated with the specified key and sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners.
+ * The standard keys are:
*
*
* Any existing value associated with the key will be overwritten.
- *
+ *
* @param key the key (not null
).
* @param value the value (null
permitted).
*/
@@ -168,7 +168,7 @@ public abstract class AbstractAction
* Returns the flag that indicates whether or not the action is enabled.
*
* @return The flag.
- *
+ *
* @see #setEnabled(boolean)
*/
public boolean isEnabled()
@@ -178,12 +178,12 @@ public abstract class AbstractAction
/**
* Sets the flag that indicates whether or not the action is enabled and, if
- * the value of the flag changed from the previous setting, sends a
- * {@link java.beans.PropertyChangeEvent} to all registered listeners (using
+ * the value of the flag changed from the previous setting, sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners (using
* the property name 'enabled').
*
* @param enabled the new flag value.
- *
+ *
* @see #isEnabled()
*/
public void setEnabled(boolean enabled)
@@ -196,10 +196,10 @@ public abstract class AbstractAction
}
/**
- * Returns an array of the keys for the property values that have been
+ * Returns an array of the keys for the property values that have been
* defined via the {@link #putValue(String, Object)} method (or the class
* constructor).
- *
+ *
* @return An array of keys.
*/
public Object[] getKeys()
@@ -208,7 +208,7 @@ public abstract class AbstractAction
}
/**
- * Sends a {@link PropertyChangeEvent} for the named property to all
+ * Sends a {@link PropertyChangeEvent} for the named property to all
* registered listeners.
*
* @param propertyName the property name.
@@ -220,17 +220,17 @@ public abstract class AbstractAction
{
changeSupport.firePropertyChange(propertyName, oldValue, newValue);
}
-
+
/**
* Sends a {@link PropertyChangeEvent} for the named property to all
- * registered listeners. This private method is called by the
+ * registered listeners. This private method is called by the
* {@link #setEnabled(boolean)} method.
*
* @param propertyName the property name.
* @param oldValue the old value of the property.
* @param newValue the new value of the property.
*/
- private void firePropertyChange(String propertyName, boolean oldValue,
+ private void firePropertyChange(String propertyName, boolean oldValue,
boolean newValue)
{
changeSupport.firePropertyChange(propertyName, oldValue, newValue);
@@ -241,7 +241,7 @@ public abstract class AbstractAction
* from this action.
*
* @param listener the listener.
- *
+ *
* @see #removePropertyChangeListener(PropertyChangeListener)
*/
public void addPropertyChangeListener(PropertyChangeListener listener)
@@ -250,11 +250,11 @@ public abstract class AbstractAction
}
/**
- * Deregisters a listener so that it no longer receives
+ * Deregisters a listener so that it no longer receives
* {@link PropertyChangeEvent} notifications from this action.
*
* @param listener the listener.
- *
+ *
* @see #addPropertyChangeListener(PropertyChangeListener)
*/
public void removePropertyChangeListener(PropertyChangeListener listener)
@@ -266,7 +266,7 @@ public abstract class AbstractAction
* Returns all registered listeners.
*
* @return An array of listeners.
- *
+ *
* @since 1.4
*/
public PropertyChangeListener[] getPropertyChangeListeners()
diff --git a/libjava/classpath/javax/swing/AbstractButton.java b/libjava/classpath/javax/swing/AbstractButton.java
index 8764f6f..6cbc775 100644
--- a/libjava/classpath/javax/swing/AbstractButton.java
+++ b/libjava/classpath/javax/swing/AbstractButton.java
@@ -129,11 +129,11 @@ import javax.swing.text.View;
*
*
+ *
*
*
ActionEvent
.
*/
long multiClickThreshhold;
-
+
/**
* Listener the button uses to receive PropertyChangeEvents from its
* Action.
*/
PropertyChangeListener actionPropertyChangeListener;
-
- /** ChangeEvent that is fired to button's ChangeEventListeners */
+
+ /** ChangeEvent that is fired to button's ChangeEventListeners */
protected ChangeEvent changeEvent = new ChangeEvent(this);
-
+
/**
* Indicates if the borderPainted property has been set by a client
* program or by the UI.
@@ -367,26 +367,26 @@ public abstract class AbstractButton extends JComponent
* Fired in a PropertyChangeEvent when the "borderPainted" property changes.
*/
public static final String BORDER_PAINTED_CHANGED_PROPERTY = "borderPainted";
-
+
/**
* Fired in a PropertyChangeEvent when the "contentAreaFilled" property
* changes.
*/
public static final String CONTENT_AREA_FILLED_CHANGED_PROPERTY =
"contentAreaFilled";
-
+
/**
* Fired in a PropertyChangeEvent when the "disabledIcon" property changes.
*/
public static final String DISABLED_ICON_CHANGED_PROPERTY = "disabledIcon";
-
+
/**
* Fired in a PropertyChangeEvent when the "disabledSelectedIcon" property
* changes.
*/
public static final String DISABLED_SELECTED_ICON_CHANGED_PROPERTY =
"disabledSelectedIcon";
-
+
/**
* Fired in a PropertyChangeEvent when the "focusPainted" property changes.
*/
@@ -433,14 +433,14 @@ public abstract class AbstractButton extends JComponent
* Fired in a PropertyChangeEvent when the "rolloverIcon" property changes.
*/
public static final String ROLLOVER_ICON_CHANGED_PROPERTY = "rolloverIcon";
-
+
/**
* Fired in a PropertyChangeEvent when the "rolloverSelectedIcon" property
* changes.
*/
public static final String ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY =
"rolloverSelectedIcon";
-
+
/**
* Fired in a PropertyChangeEvent when the "selectedIcon" property changes.
*/
@@ -471,7 +471,7 @@ public abstract class AbstractButton extends JComponent
AccessibleText
{
private static final long serialVersionUID = -5673062525319836790L;
-
+
protected AccessibleAbstractButton()
{
// Nothing to do here yet.
@@ -553,7 +553,7 @@ public abstract class AbstractButton extends JComponent
{
Object[] target = new Object[group.getButtonCount()];
Enumeration els = group.getElements();
-
+
for (int index = 0; els.hasMoreElements(); ++index)
{
target[index] = els.nextElement();
@@ -663,7 +663,7 @@ public abstract class AbstractButton extends JComponent
}
/**
- * Sets the current accessible value as object. If the specified number
+ * Sets the current accessible value as object. If the specified number
* is 0 the button will be deselected, otherwise the button will
* be selected.
*
@@ -942,7 +942,7 @@ public abstract class AbstractButton extends JComponent
public AttributeSet getCharacterAttribute(int i)
{
AttributeSet atts = null;
- View view = (View) getClientProperty(BasicHTML.propertyKey);
+ View view = (View) getClientProperty(BasicHTML.propertyKey);
if (view != null)
{
Document doc = view.getDocument();
@@ -1019,8 +1019,8 @@ public abstract class AbstractButton extends JComponent
setDisplayedMnemonicIndex(-1);
setOpaque(true);
text = "";
- // testing on JRE1.5 shows that the iconTextGap default value is
- // hard-coded here and the 'Button.iconTextGap' setting in the
+ // testing on JRE1.5 shows that the iconTextGap default value is
+ // hard-coded here and the 'Button.iconTextGap' setting in the
// UI defaults is ignored, at least by the MetalLookAndFeel
iconTextGap = 4;
}
@@ -1036,7 +1036,7 @@ public abstract class AbstractButton extends JComponent
}
/**
- * Set the model the button is currently using. This un-registers all
+ * Set the model the button is currently using. This un-registers all
* listeners associated with the current model, and re-registers them
* with the new model.
*
@@ -1072,7 +1072,7 @@ public abstract class AbstractButton extends JComponent
repaint();
}
- protected void init(String text, Icon icon)
+ protected void init(String text, Icon icon)
{
// If text is null, we fall back to the empty
// string (which is set using AbstractButton's
@@ -1083,10 +1083,10 @@ public abstract class AbstractButton extends JComponent
if (icon != null)
default_icon = icon;
-
+
updateUI();
}
-
+
/**
* ActionListener
objects.
- *
+ *
* @return an array of listeners
- *
+ *
* @since 1.4
*/
public ActionListener[] getActionListeners()
@@ -1175,9 +1175,9 @@ public abstract class AbstractButton extends JComponent
/**
* Returns all added ItemListener
objects.
- *
+ *
* @return an array of listeners
- *
+ *
* @since 1.4
*/
public ItemListener[] getItemListeners()
@@ -1188,7 +1188,7 @@ public abstract class AbstractButton extends JComponent
/**
* Adds a ChangeListener to the button's listener list. When the button's
* model changes any of its (non-bound) properties, these listeners will be
- * called.
+ * called.
*
* @param l The new listener to add
*/
@@ -1209,9 +1209,9 @@ public abstract class AbstractButton extends JComponent
/**
* Returns all added ChangeListener
objects.
- *
+ *
* @return an array of listeners
- *
+ *
* @since 1.4
*/
public ChangeListener[] getChangeListeners()
@@ -1229,7 +1229,7 @@ public abstract class AbstractButton extends JComponent
{
e.setSource(this);
ItemListener[] listeners = getItemListeners();
-
+
for (int i = 0; i < listeners.length; i++)
listeners[i].itemStateChanged(e);
}
@@ -1242,8 +1242,8 @@ public abstract class AbstractButton extends JComponent
*/
protected void fireActionPerformed(ActionEvent e)
{
- // Dispatch a copy of the given ActionEvent in order to
- // set the source and action command correctly.
+ // Dispatch a copy of the given ActionEvent in order to
+ // set the source and action command correctly.
ActionEvent ae = new ActionEvent(
this,
e.getID(),
@@ -1252,7 +1252,7 @@ public abstract class AbstractButton extends JComponent
e.getModifiers());
ActionListener[] listeners = getActionListeners();
-
+
for (int i = 0; i < listeners.length; i++)
listeners[i].actionPerformed(ae);
}
@@ -1338,12 +1338,12 @@ public abstract class AbstractButton extends JComponent
}
}
- /**
+ /**
* Sets the button's mnemonic index. The mnemonic index is a hint to the
* look and feel class, suggesting which character in the button's label
* should be underlined when drawing the label. If the mnemonic index is
- * -1, no mnemonic will be displayed.
- *
+ * -1, no mnemonic will be displayed.
+ *
* If no mnemonic index is set, the button will choose a mnemonic index
* by default, which will be the first occurrence of the mnemonic
* character in the button's text.
@@ -1358,11 +1358,11 @@ public abstract class AbstractButton extends JComponent
{
if (index < -1 || (text != null && index >= text.length()))
throw new IllegalArgumentException();
-
+
mnemonicIndex = index;
}
-
- /**
+
+ /**
* Get the button's mnemonic index, which is an offset into the button's
* "text" property. The character specified by this offset should be
* underlined when the look and feel class draws this button.
@@ -1373,7 +1373,7 @@ public abstract class AbstractButton extends JComponent
{
return mnemonicIndex;
}
-
+
/**
* Set the "rolloverEnabled" property. When rollover is enabled, and the
@@ -1450,15 +1450,15 @@ public abstract class AbstractButton extends JComponent
mod.setEnabled(b);
}
- /**
+ /**
* Set the horizontal alignment of the button's text and icon. The
* alignment is a numeric constant from {@link SwingConstants}. It must
* be one of: RIGHT
, LEFT
, CENTER
,
* LEADING
or TRAILING
. The default is
* CENTER
.
- *
+ *
* @return The current horizontal alignment
- *
+ *
* @see #setHorizontalAlignment(int)
*/
public int getHorizontalAlignment()
@@ -1476,14 +1476,14 @@ public abstract class AbstractButton extends JComponent
* @param a The new horizontal alignment
* @throws IllegalArgumentException If alignment is not one of the legal
* constants.
- *
+ *
* @see #getHorizontalAlignment()
*/
public void setHorizontalAlignment(int a)
{
if (horizontalAlignment == a)
return;
- if (a != LEFT && a != CENTER && a != RIGHT && a != LEADING
+ if (a != LEFT && a != CENTER && a != RIGHT && a != LEADING
&& a != TRAILING)
throw new IllegalArgumentException("Invalid alignment.");
int old = horizontalAlignment;
@@ -1522,7 +1522,7 @@ public abstract class AbstractButton extends JComponent
{
if (horizontalTextPosition == t)
return;
- if (t != LEFT && t != CENTER && t != RIGHT && t != LEADING
+ if (t != LEFT && t != CENTER && t != RIGHT && t != LEADING
&& t != TRAILING)
throw new IllegalArgumentException("Invalid alignment.");
@@ -1540,7 +1540,7 @@ public abstract class AbstractButton extends JComponent
* BOTTOM
. The default is CENTER
.
*
* @return The current vertical alignment
- *
+ *
* @see #setVerticalAlignment(int)
*/
public int getVerticalAlignment()
@@ -1557,7 +1557,7 @@ public abstract class AbstractButton extends JComponent
* @param a The new vertical alignment
* @throws IllegalArgumentException If alignment is not one of the legal
* constants.
- *
+ *
* @see #getVerticalAlignment()
*/
public void setVerticalAlignment(int a)
@@ -1605,7 +1605,7 @@ public abstract class AbstractButton extends JComponent
return;
if (t != TOP && t != CENTER && t != BOTTOM)
throw new IllegalArgumentException("Invalid alignment.");
-
+
int old = verticalTextPosition;
verticalTextPosition = t;
firePropertyChange(VERTICAL_TEXT_POSITION_CHANGED_PROPERTY, old, t);
@@ -1645,7 +1645,7 @@ public abstract class AbstractButton extends JComponent
}
/**
- * Get the value of the "action" property.
+ * Get the value of the "action" property.
*
* @return The current value of the "action" property
*/
@@ -1664,7 +1664,7 @@ public abstract class AbstractButton extends JComponent
*
rolloverEnabled
property to true
. The look and
- * feel class should paint this icon when the "rolloverEnabled" property of
- * the button is true
, the "selected" property of the button's
+ * Set the button's rollover selected icon and sets the
+ * rolloverEnabled
property to true
. The look and
+ * feel class should paint this icon when the "rolloverEnabled" property of
+ * the button is true
, the "selected" property of the button's
* model is true
, and the mouse rolls over the button.
*
* @param r The new rollover selected icon.
@@ -2305,7 +2305,7 @@ public abstract class AbstractButton extends JComponent
{
if (rolloverSelectedIcon == r)
return;
-
+
Icon old = rolloverSelectedIcon;
rolloverSelectedIcon = r;
firePropertyChange(ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, old, r);
@@ -2341,7 +2341,7 @@ public abstract class AbstractButton extends JComponent
{
if (selectedIcon == s)
return;
-
+
Icon old = selectedIcon;
selectedIcon = s;
firePropertyChange(SELECTED_ICON_CHANGED_PROPERTY, old, s);
@@ -2418,7 +2418,7 @@ public abstract class AbstractButton extends JComponent
clientContentAreaFilledSet = true;
if (contentAreaFilled == b)
return;
-
+
// The JDK sets the opaque property to the value of the contentAreaFilled
// property, so should we do.
setOpaque(b);
@@ -2492,7 +2492,7 @@ public abstract class AbstractButton extends JComponent
{
super.setUI(ui);
}
-
+
/**
* Set the "UI" property of the button, which is a look and feel class
* responsible for handling the button's input events and painting it.
@@ -2503,7 +2503,7 @@ public abstract class AbstractButton extends JComponent
{
return (ButtonUI) ui;
}
-
+
/**
* Set the "UI" property to a class constructed, via the {@link
* UIManager}, from the current look and feel. This should be overridden
@@ -2520,7 +2520,7 @@ public abstract class AbstractButton extends JComponent
* into a single ActionEvent
.
*
* @return the time in milliseconds
- *
+ *
* @since 1.4
*/
public long getMultiClickThreshhold()
@@ -2533,7 +2533,7 @@ public abstract class AbstractButton extends JComponent
* ActionEvent
.
*
* @param threshhold the time in milliseconds
- *
+ *
* @since 1.4
*/
public void setMultiClickThreshhold(long threshhold)
@@ -2586,7 +2586,7 @@ public abstract class AbstractButton extends JComponent
/**
* Helper method for
* {@link LookAndFeel#installProperty(JComponent, String, Object)}.
- *
+ *
* @param propertyName the name of the property
* @param value the value of the property
*
diff --git a/libjava/classpath/javax/swing/AbstractCellEditor.java b/libjava/classpath/javax/swing/AbstractCellEditor.java
index e993df5..eade00c 100644
--- a/libjava/classpath/javax/swing/AbstractCellEditor.java
+++ b/libjava/classpath/javax/swing/AbstractCellEditor.java
@@ -69,7 +69,7 @@ public abstract class AbstractCellEditor
/**
* Creates a new instance of AbstractCellEditor.
*/
- public AbstractCellEditor()
+ public AbstractCellEditor()
{
listenerList = new EventListenerList();
changeEvent = new ChangeEvent(this);
@@ -85,10 +85,10 @@ public abstract class AbstractCellEditor
* @return true
if the cell is editable using
* event
, false
if it's not
*/
- public boolean isCellEditable(EventObject event)
+ public boolean isCellEditable(EventObject event)
{
return true;
- }
+ }
/**
* Returns true
if the editing cell should be selected,
@@ -101,7 +101,7 @@ public abstract class AbstractCellEditor
* @return true
if the editing cell should be selected,
* false
otherwise
*/
- public boolean shouldSelectCell(EventObject event)
+ public boolean shouldSelectCell(EventObject event)
{
return true;
}
@@ -113,7 +113,7 @@ public abstract class AbstractCellEditor
* @return true
if editing has been stopped successfully,
* false
otherwise
*/
- public boolean stopCellEditing()
+ public boolean stopCellEditing()
{
fireEditingStopped();
return true;
@@ -123,10 +123,10 @@ public abstract class AbstractCellEditor
* Stop editing the cell and do not accept any partial value that has
* been entered into the cell.
*/
- public void cancelCellEditing()
+ public void cancelCellEditing()
{
fireEditingCanceled();
- }
+ }
/**
* Adds a CellEditorListener to the list of CellEditorListeners of this
@@ -149,7 +149,7 @@ public abstract class AbstractCellEditor
{
listenerList.remove(CellEditorListener.class, listener);
}
-
+
/**
* Returns the list of CellEditorListeners that have been registered
* in this CellEditor.
diff --git a/libjava/classpath/javax/swing/AbstractListModel.java b/libjava/classpath/javax/swing/AbstractListModel.java
index 7d4b2bb..72aefbc 100644
--- a/libjava/classpath/javax/swing/AbstractListModel.java
+++ b/libjava/classpath/javax/swing/AbstractListModel.java
@@ -125,7 +125,7 @@ public abstract class AbstractListModel implements ListModel, Serializable
{
ListDataEvent event =
new ListDataEvent(source, ListDataEvent.INTERVAL_ADDED,
- startIndex, endIndex);
+ startIndex, endIndex);
ListDataListener[] listeners = getListDataListeners();
for (int index = 0; index < listeners.length; index++)
@@ -148,7 +148,7 @@ public abstract class AbstractListModel implements ListModel, Serializable
{
ListDataEvent event =
new ListDataEvent(source, ListDataEvent.INTERVAL_REMOVED,
- startIndex, endIndex);
+ startIndex, endIndex);
ListDataListener[] listeners = getListDataListeners();
for (int index = 0; index < listeners.length; index++)
diff --git a/libjava/classpath/javax/swing/AbstractSpinnerModel.java b/libjava/classpath/javax/swing/AbstractSpinnerModel.java
index d247a33..984e52a 100644
--- a/libjava/classpath/javax/swing/AbstractSpinnerModel.java
+++ b/libjava/classpath/javax/swing/AbstractSpinnerModel.java
@@ -47,7 +47,7 @@ import javax.swing.event.EventListenerList;
/**
* Provides standard implementations for some of the methods in
* {@link SpinnerModel}.
- *
+ *
* @since 1.4
*
* @author Ka-Hing Cheung
@@ -55,7 +55,7 @@ import javax.swing.event.EventListenerList;
public abstract class AbstractSpinnerModel implements SpinnerModel
{
private ChangeEvent changeEvent = new ChangeEvent(this);
-
+
/** Stores the listeners registered with the model. */
protected EventListenerList listenerList = new EventListenerList();
diff --git a/libjava/classpath/javax/swing/Action.java b/libjava/classpath/javax/swing/Action.java
index 3dd6353..fa1925f 100644
--- a/libjava/classpath/javax/swing/Action.java
+++ b/libjava/classpath/javax/swing/Action.java
@@ -44,9 +44,9 @@ import java.beans.PropertyChangeListener;
* Provides a convenient central point of control for some task
* that can be triggered by more than one control in a Swing user interface
* (for example, a menu item and a toolbar button).
- *
+ *
* @see AbstractButton#setAction(Action)
- *
+ *
* @author Ronald Veldema (rveldema@cs.vu.nl)
* @author Andrew Selkirk
*/
@@ -96,23 +96,23 @@ public interface Action extends ActionListener {
/**
* Returns the value associated with the specified key.
- *
+ *
* @param key the key (not null
).
- *
- * @return The value associated with the specified key, or
+ *
+ * @return The value associated with the specified key, or
* null
if the key is not found.
*/
Object getValue(String key);
/**
- * Sets the value associated with the specified key and sends a
- * {@link java.beans.PropertyChangeEvent} to all registered listeners.
- * The standard keys are defined in this interface: {@link #NAME},
- * {@link #SHORT_DESCRIPTION}, {@link #LONG_DESCRIPTION},
- * {@link #SMALL_ICON}, {@link #ACTION_COMMAND_KEY},
- * {@link #ACCELERATOR_KEY} and {@link #MNEMONIC_KEY}. Any existing value
- * associated with the key will be overwritten.
- *
+ * Sets the value associated with the specified key and sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners.
+ * The standard keys are defined in this interface: {@link #NAME},
+ * {@link #SHORT_DESCRIPTION}, {@link #LONG_DESCRIPTION},
+ * {@link #SMALL_ICON}, {@link #ACTION_COMMAND_KEY},
+ * {@link #ACCELERATOR_KEY} and {@link #MNEMONIC_KEY}. Any existing value
+ * associated with the key will be overwritten.
+ *
* @param key the key (not null
).
* @param value the value (null
permitted).
*/
@@ -120,16 +120,16 @@ public interface Action extends ActionListener {
/**
* Returns the flag that indicates whether or not this action is enabled.
- *
+ *
* @return The flag.
*/
boolean isEnabled();
/**
* Sets the flag that indicates whether or not this action is enabled. If
- * the value changes, a {@link java.beans.PropertyChangeEvent} is sent to
+ * the value changes, a {@link java.beans.PropertyChangeEvent} is sent to
* all registered listeners.
- *
+ *
* @param b the new value of the flag.
*/
void setEnabled(boolean b);
@@ -137,15 +137,15 @@ public interface Action extends ActionListener {
/**
* Registers a listener to receive notification whenever one of the
* action's properties is modified.
- *
+ *
* @param listener the listener.
*/
void addPropertyChangeListener(PropertyChangeListener listener);
/**
* Deregisters a listener so that it no longer receives notification of
- * changes to the action's properties.
- *
+ * changes to the action's properties.
+ *
* @param listener the listener.
*/
void removePropertyChangeListener(PropertyChangeListener listener);
diff --git a/libjava/classpath/javax/swing/BorderFactory.java b/libjava/classpath/javax/swing/BorderFactory.java
index ca78deb..f5c4cbb 100644
--- a/libjava/classpath/javax/swing/BorderFactory.java
+++ b/libjava/classpath/javax/swing/BorderFactory.java
@@ -413,7 +413,7 @@ public class BorderFactory
* Create a matte-look border using a solid color. (The difference between
* this border and a line border is that you can specify the individual border
* dimensions.)
- *
+ *
* @param top
* An int specifying the width of the top in pixels
* @param left
diff --git a/libjava/classpath/javax/swing/BoundedRangeModel.java b/libjava/classpath/javax/swing/BoundedRangeModel.java
index 54446ac..87fec5f 100644
--- a/libjava/classpath/javax/swing/BoundedRangeModel.java
+++ b/libjava/classpath/javax/swing/BoundedRangeModel.java
@@ -42,11 +42,11 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
/**
- * The data model that represents a range that is constrained to fit
- * within specified bounds. The range is defined as value
- * to value + extent
, where both value
and
+ * The data model that represents a range that is constrained to fit
+ * within specified bounds. The range is defined as value
+ * to value + extent
, where both value
and
* extent
are integers, and extent >= 0
. The bounds
- * are defined by integers minimum
and maximum
.
+ * are defined by integers minimum
and maximum
.
*
* This type of model is used in components that display a range of values,
* like {@link JProgressBar} and {@link JSlider}.
@@ -57,7 +57,7 @@ public interface BoundedRangeModel
{
/**
* Returns the current value for the model.
- *
+ *
* @return The current value for the model.
*
* @see #setValue(int)
@@ -68,7 +68,7 @@ public interface BoundedRangeModel
* Sets the value for the model and sends a {@link ChangeEvent} to
* all registered listeners. The new value must satisfy the constraint
* min <= value <= value + extent <= max
.
- *
+ *
* @param value the value
*
* @see #getValue()
@@ -76,9 +76,9 @@ public interface BoundedRangeModel
void setValue(int value);
/**
- * Returns the lower bound for the model. The start of the model's range
+ * Returns the lower bound for the model. The start of the model's range
* (see {@link #getValue()}) cannot be less than this lower bound.
- *
+ *
* @return The lower bound for the model.
*
* @see #setMinimum(int)
@@ -90,7 +90,7 @@ public interface BoundedRangeModel
* Sets the lower bound for the model and sends a {@link ChangeEvent} to all
* registered listeners. The new minimum must be less than or equal to the
* start value of the model's range (as returned by {@link #getValue()}).
- *
+ *
* @param minimum the minimum value
*
* @see #getMinimum()
@@ -99,9 +99,9 @@ public interface BoundedRangeModel
/**
* Returns the upper bound for the model. This sets an upper limit for the
- * end value of the model's range ({@link #getValue()} +
+ * end value of the model's range ({@link #getValue()} +
* {@link #getExtent()}).
- *
+ *
* @return The upper bound for the model.
*
* @see #setMaximum(int)
@@ -112,9 +112,9 @@ public interface BoundedRangeModel
/**
* Sets the upper bound for the model and sends a {@link ChangeEvent} to all
* registered listeners. The new maximum must be greater than or equal to the
- * end value of the model's range (as returned by {@link #getValue()} +
+ * end value of the model's range (as returned by {@link #getValue()} +
* {@link #getExtent()}).
- *
+ *
* @param maximum the maximum value
*
* @see #getMaximum()
@@ -123,7 +123,7 @@ public interface BoundedRangeModel
/**
* Returns the value of the valueIsAdjusting
property.
- *
+ *
* @return true
if value is adjusting,
* otherwise false
*
@@ -133,7 +133,7 @@ public interface BoundedRangeModel
/**
* Sets the valueIsAdjusting
property.
- *
+ *
* @param adjusting true
if adjusting,
* false
otherwise
*
@@ -153,7 +153,7 @@ public interface BoundedRangeModel
/**
* Sets the extent, which is the length of the model's range, and sends a
* {@link ChangeEvent} to all registered listeners.
- *
+ *
* @param extent the extent
*
* @see #getExtent()
@@ -162,12 +162,12 @@ public interface BoundedRangeModel
/**
* Sets all the properties for the model in a single call.
- *
+ *
* @param value the value
* @param extent the extent
* @param minimum the minimum value
* @param maximum the maximum value
- * @param adjusting a flag that indicates the model is being adjusted
+ * @param adjusting a flag that indicates the model is being adjusted
* continuously.
*/
void setRangeProperties(int value, int extent, int minimum, int maximum,
@@ -175,16 +175,16 @@ public interface BoundedRangeModel
/**
* Adds a ChangeListener
to this object.
- *
+ *
* @param listener the listener to add
- *
+ *
* @see #removeChangeListener(ChangeListener)
*/
void addChangeListener(ChangeListener listener);
/**
* Removes a ChangeListener
from this object.
- *
+ *
* @param listener the listener to remove
*
* @see #addChangeListener(ChangeListener)
diff --git a/libjava/classpath/javax/swing/Box.java b/libjava/classpath/javax/swing/Box.java
index 0f984a9..ce9cb8f 100644
--- a/libjava/classpath/javax/swing/Box.java
+++ b/libjava/classpath/javax/swing/Box.java
@@ -60,19 +60,19 @@ import javax.accessibility.AccessibleRole;
public class Box extends JComponent implements Accessible
{
private static final long serialVersionUID = 1525417495883046342L;
-
+
/**
* Provides accessibility support for Box
es.
*/
protected class AccessibleBox extends Container.AccessibleAWTContainer
{
private static final long serialVersionUID = -7775079816389931944L;
-
+
protected AccessibleBox()
{
// Nothing to do here.
}
-
+
public AccessibleRole getAccessibleRole()
{
return null;
@@ -85,7 +85,7 @@ public class Box extends JComponent implements Accessible
public static class Filler extends JComponent implements Accessible
{
private static final long serialVersionUID = -1204263191910183998L;
-
+
/**
* Provides accessibility support for Box.Filler
.
*/
@@ -93,20 +93,20 @@ public class Box extends JComponent implements Accessible
extends Component.AccessibleAWTComponent
{
private static final long serialVersionUID = 164963348357479321L;
-
+
protected AccessibleBoxFiller()
{
// Nothing to do here.
}
-
+
public AccessibleRole getAccessibleRole()
{
return null;
}
}
-
+
private transient Dimension min, pref, max;
-
+
/**
* Creates a new instance of Filler.
*
@@ -118,7 +118,7 @@ public class Box extends JComponent implements Accessible
{
changeShape(min, pref, max);
}
-
+
/**
* Changes the dimensions of this Filler.
*
@@ -130,16 +130,16 @@ public class Box extends JComponent implements Accessible
{
this.min = min;
this.pref = pref;
- this.max = max;
+ this.max = max;
}
-
+
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
accessibleContext = new AccessibleBoxFiller();
return accessibleContext;
}
-
+
/**
* Returns the maximum size of this Filler.
*
@@ -149,7 +149,7 @@ public class Box extends JComponent implements Accessible
{
return max;
}
-
+
/**
* Returns the minimum size of this Filler.
*
@@ -159,7 +159,7 @@ public class Box extends JComponent implements Accessible
{
return min;
}
-
+
/**
* Returns the preferred size of this Filler.
*
@@ -170,7 +170,7 @@ public class Box extends JComponent implements Accessible
return pref;
}
}
-
+
/**
* Creates a new Box component, that lays out its children according
* to the axis
parameter.
@@ -184,9 +184,9 @@ public class Box extends JComponent implements Accessible
*/
public Box(int axis)
{
- super.setLayout(new BoxLayout(this, axis));
+ super.setLayout(new BoxLayout(this, axis));
}
-
+
/**
* Creates a filler component which acts as glue between components.
* It does not take space unless some extra space is available. If extra
@@ -200,12 +200,12 @@ public class Box extends JComponent implements Accessible
new Dimension(Short.MAX_VALUE, Short.MAX_VALUE));
return glue;
}
-
+
public static Box createHorizontalBox()
{
return new Box(BoxLayout.X_AXIS);
}
-
+
/**
* Creates a filler component which acts as glue between components.
* It does not take space unless some extra space is available. If extra
@@ -219,7 +219,7 @@ public class Box extends JComponent implements Accessible
new Dimension(Short.MAX_VALUE, 0));
return glue;
}
-
+
/**
* Creates a filler component which acts as strut between components.
* It will fill exactly the specified horizontal size.
@@ -235,17 +235,17 @@ public class Box extends JComponent implements Accessible
new Dimension(width, Integer.MAX_VALUE));
return strut;
}
-
+
public static Component createRigidArea(Dimension d)
{
return new Filler(d, d, d);
}
-
+
public static Box createVerticalBox()
{
return new Box(BoxLayout.Y_AXIS);
}
-
+
/**
* Creates a filler component which acts as glue between components.
* It does not take space unless some extra space is available. If extra
@@ -257,7 +257,7 @@ public class Box extends JComponent implements Accessible
{
return createGlue();
}
-
+
/**
* Creates a filler component which acts as strut between components.
* It will fill exactly the specified vertical size.
@@ -273,18 +273,18 @@ public class Box extends JComponent implements Accessible
new Dimension(Integer.MAX_VALUE, height));
return strut;
}
-
+
public void setLayout(LayoutManager l)
{
throw new AWTError("Not allowed to set layout managers for boxes.");
}
-
+
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
accessibleContext = new AccessibleBox();
return accessibleContext;
}
-
-
+
+
}
diff --git a/libjava/classpath/javax/swing/BoxLayout.java b/libjava/classpath/javax/swing/BoxLayout.java
index a7f9dd6..55c489e 100644
--- a/libjava/classpath/javax/swing/BoxLayout.java
+++ b/libjava/classpath/javax/swing/BoxLayout.java
@@ -85,7 +85,7 @@ public class BoxLayout implements LayoutManager2, Serializable
* The container given to the constructor.
*/
private Container container;
-
+
/**
* Current type of component layouting. Defaults to X_AXIS.
*/
@@ -174,14 +174,14 @@ public class BoxLayout implements LayoutManager2, Serializable
private boolean isHorizontalIn(Container parent)
{
ComponentOrientation orientation = parent.getComponentOrientation();
- return this.way == X_AXIS
- || (this.way == LINE_AXIS
+ return this.way == X_AXIS
+ || (this.way == LINE_AXIS
&& orientation.isHorizontal())
|| (this.way == PAGE_AXIS
&& (!orientation.isHorizontal()));
}
-
+
/**
* Returns the preferred size of the layout.
@@ -236,7 +236,7 @@ public class BoxLayout implements LayoutManager2, Serializable
{
if (container != parent)
throw new AWTError("BoxLayout can't be shared");
-
+
checkLayout();
Component[] children = container.getComponents();
Insets in = container.getInsets();
@@ -337,7 +337,7 @@ public class BoxLayout implements LayoutManager2, Serializable
Insets i = container.getInsets();
int xDim = xTotal.maximum + i.left + i.right;
int yDim = yTotal.maximum + i.top + i.bottom;
-
+
// Check for overflow
if (xDim < xTotal.maximum)
xDim = Integer.MAX_VALUE;
diff --git a/libjava/classpath/javax/swing/ButtonGroup.java b/libjava/classpath/javax/swing/ButtonGroup.java
index 6a474f9..d4168bb 100644
--- a/libjava/classpath/javax/swing/ButtonGroup.java
+++ b/libjava/classpath/javax/swing/ButtonGroup.java
@@ -84,7 +84,7 @@ public class ButtonGroup implements Serializable
/**
* Adds a button to this group. If the button is in the selected state, then:
*
null
.
- * The group for the removed button's model is set to null
.
+ * Removes the specified button from this group. If the button is the
+ * selected button, the current selection is set to null
.
+ * The group for the removed button's model is set to null
.
*
* @param b the button to remove (null
is ignored).
*/
@@ -180,13 +180,13 @@ public class ButtonGroup implements Serializable
{
ButtonModel old = sel;
sel = m;
-
+
if (old != null)
old.setSelected(false);
-
+
if (m != null)
sel.setSelected(true);
-
+
AbstractButton button = findButton(old);
if (button != null)
button.repaint();
diff --git a/libjava/classpath/javax/swing/ButtonModel.java b/libjava/classpath/javax/swing/ButtonModel.java
index 03fac13..d48eb1e 100644
--- a/libjava/classpath/javax/swing/ButtonModel.java
+++ b/libjava/classpath/javax/swing/ButtonModel.java
@@ -48,7 +48,7 @@ import javax.swing.event.ChangeListener;
* The data model that is used in all kinds of buttons.
*/
public interface ButtonModel extends ItemSelectable
-{
+{
/**
* Returns true
if the button is armed, false
@@ -56,7 +56,7 @@ public interface ButtonModel extends ItemSelectable
*
* A button is armed, when the user has pressed the mouse over it, but has
* not yet released the mouse.
- *
+ *
* @return true
if the button is armed, false
* otherwise
*
@@ -145,7 +145,7 @@ public interface ButtonModel extends ItemSelectable
*
* An ActionEvent
is usually fired when the user clicks on a
* button.
- *
+ *
* @param l the action listener to add
*
* @see #removeActionListener(ActionListener)
@@ -225,7 +225,7 @@ public interface ButtonModel extends ItemSelectable
/**
* Returns the keyboard mnemonic for the button. This specifies a shortcut
* or accelerator key that can be used to activate the button.
- *
+ *
* @return the keyboard mnemonic for the button
*
* @see #setMnemonic(int)
@@ -235,7 +235,7 @@ public interface ButtonModel extends ItemSelectable
/**
* Sets the keyboard mnemonic for the button. This specifies a shortcut
* or accelerator key that can be used to activate the button.
- *
+ *
* @param key the keyboard mnemonic for the button
*
* @see #getMnemonic()
@@ -276,7 +276,7 @@ public interface ButtonModel extends ItemSelectable
* Some kinds of buttons (e.g. toggle buttons, check boxes, radio buttons)
* can be in one of two states: selected or unselected. The selected state
* is usually toggled by clicking on the button.
- *
+ *
* @param b true
if the button is selected, false
* otherwise
*
@@ -291,7 +291,7 @@ public interface ButtonModel extends ItemSelectable
* Some kinds of buttons (e.g. toggle buttons, check boxes, radio buttons)
* can be in one of two states: selected or unselected. The selected state
* is usually toggled by clicking on the button.
- *
+ *
* @return true
if the button is selected, false
* otherwise
*
diff --git a/libjava/classpath/javax/swing/CellEditor.java b/libjava/classpath/javax/swing/CellEditor.java
index 9eb083a..134c316 100644
--- a/libjava/classpath/javax/swing/CellEditor.java
+++ b/libjava/classpath/javax/swing/CellEditor.java
@@ -53,17 +53,17 @@ public interface CellEditor
{
/**
* Returns the current value for the CellEditor
.
- *
+ *
* @return The value.
*/
Object getCellEditorValue();
/**
- * Returns true
if the specified event makes the editor
+ * Returns true
if the specified event makes the editor
* editable, and false
otherwise.
- *
+ *
* @param event the event.
- *
+ *
* @return A boolean.
*/
boolean isCellEditable(EventObject event);
@@ -76,10 +76,10 @@ public interface CellEditor
boolean shouldSelectCell(EventObject event);
/**
- * Signals to the CellEditor
that it should stop editing,
+ * Signals to the CellEditor
that it should stop editing,
* accepting the current cell value, and returns true
if the
* editor actually stops editing, and false
otherwise.
- *
+ *
* @return A boolean.
*/
boolean stopCellEditing();
@@ -90,17 +90,17 @@ public interface CellEditor
void cancelCellEditing();
/**
- * Registers a listener to receive {@link ChangeEvent} notifications from the
+ * Registers a listener to receive {@link ChangeEvent} notifications from the
* CellEditor
.
- *
+ *
* @param listener the listener.
*/
void addCellEditorListener(CellEditorListener listener);
/**
- * Deregisters a listener so that it no longer receives {@link ChangeEvent}
+ * Deregisters a listener so that it no longer receives {@link ChangeEvent}
* notifications from the CellEditor
.
- *
+ *
* @param listener the listener.
*/
void removeCellEditorListener(CellEditorListener listener);
diff --git a/libjava/classpath/javax/swing/CellRendererPane.java b/libjava/classpath/javax/swing/CellRendererPane.java
index 764a4c5..0140b4c 100644
--- a/libjava/classpath/javax/swing/CellRendererPane.java
+++ b/libjava/classpath/javax/swing/CellRendererPane.java
@@ -162,7 +162,7 @@ public class CellRendererPane extends Container implements Accessible
* painting
*/
public void paintComponent(Graphics graphics, Component c,
- Container p, int x, int y, int w, int h,
+ Container p, int x, int y, int w, int h,
boolean shouldValidate)
{
// reparent c
diff --git a/libjava/classpath/javax/swing/ComboBoxModel.java b/libjava/classpath/javax/swing/ComboBoxModel.java
index 6105275..ce252fa 100644
--- a/libjava/classpath/javax/swing/ComboBoxModel.java
+++ b/libjava/classpath/javax/swing/ComboBoxModel.java
@@ -41,9 +41,9 @@ import javax.swing.event.ListDataEvent;
import javax.swing.event.ListDataListener;
/**
- * The data model for a {@link JComboBox}. This model keeps track of elements
+ * The data model for a {@link JComboBox}. This model keeps track of elements
* contained in the JComboBox
as well as the current
- * combo box selection. Whenever the selection in the JComboBox
+ * combo box selection. Whenever the selection in the JComboBox
* changes, the ComboBoxModel
should fire a {@link ListDataEvent}
* to the model's {@link ListDataListener}s.
*
@@ -52,8 +52,8 @@ import javax.swing.event.ListDataListener;
public interface ComboBoxModel extends ListModel
{
/**
- * Sets the selected item in the combo box. Classes implementing this
- * interface should fire a {@link ListDataEvent} to all registered
+ * Sets the selected item in the combo box. Classes implementing this
+ * interface should fire a {@link ListDataEvent} to all registered
* {@link ListDataListener}s to indicate that the selection has changed.
*
* @param item the selected item (null
permitted).
diff --git a/libjava/classpath/javax/swing/ComponentInputMap.java b/libjava/classpath/javax/swing/ComponentInputMap.java
index 28aa8e2..dc4d0bf 100644
--- a/libjava/classpath/javax/swing/ComponentInputMap.java
+++ b/libjava/classpath/javax/swing/ComponentInputMap.java
@@ -64,7 +64,7 @@ public class ComponentInputMap extends InputMap
{
if (comp == null)
throw new IllegalArgumentException();
-
+
this.component = comp;
}
@@ -117,13 +117,13 @@ public class ComponentInputMap extends InputMap
if (parentMap != null && !(parentMap instanceof ComponentInputMap))
throw new IllegalArgumentException("ComponentInputMaps can only have " +
"ComponentInputMaps for parents");
-
- if (parentMap != null &&
+
+ if (parentMap != null &&
((ComponentInputMap) parentMap).getComponent() != component)
- throw new
+ throw new
IllegalArgumentException("ComponentInputMaps' parents must " +
"be associated with the same JComponents");
-
+
super.setParent(parentMap);
if (component != null)
component.updateComponentInputMap(this);
diff --git a/libjava/classpath/javax/swing/DebugGraphics.java b/libjava/classpath/javax/swing/DebugGraphics.java
index 126309a..d96de4a 100644
--- a/libjava/classpath/javax/swing/DebugGraphics.java
+++ b/libjava/classpath/javax/swing/DebugGraphics.java
@@ -153,7 +153,7 @@ public class DebugGraphics extends Graphics
/**
* Sets the color to draw stuff with.
- *
+ *
* @param color The color
*/
public void setColor(Color color)
@@ -301,7 +301,7 @@ public class DebugGraphics extends Graphics
/**
* Returns the color used for drawing.
- *
+ *
* @return The color.
*/
public Color getColor()
@@ -454,7 +454,7 @@ public class DebugGraphics extends Graphics
// Ignore this.
}
}
-
+
/**
* Draws a rectangle.
*
@@ -552,8 +552,8 @@ public class DebugGraphics extends Graphics
* @param arcWidth TODO
* @param arcHeight TODO
*/
- public void drawRoundRect(int x, int y, int width, int height,
- int arcWidth, int arcHeight)
+ public void drawRoundRect(int x, int y, int width, int height,
+ int arcWidth, int arcHeight)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -576,8 +576,8 @@ public class DebugGraphics extends Graphics
* @param arcWidth TODO
* @param arcHeight TODO
*/
- public void fillRoundRect(int x, int y, int width, int height,
- int arcWidth, int arcHeight)
+ public void fillRoundRect(int x, int y, int width, int height,
+ int arcWidth, int arcHeight)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -593,7 +593,7 @@ public class DebugGraphics extends Graphics
/**
* drawLine
*
- * @param x1 The x-position of the start
+ * @param x1 The x-position of the start
* @param y1 The y-position of the start
* @param x2 The x-position of the end
* @param y2 The y-position of the end
@@ -699,8 +699,8 @@ public class DebugGraphics extends Graphics
* @param startAngle TODO
* @param arcAngle TODO
*/
- public void drawArc(int x, int y, int width, int height,
- int startAngle, int arcAngle)
+ public void drawArc(int x, int y, int width, int height,
+ int startAngle, int arcAngle)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -723,8 +723,8 @@ public class DebugGraphics extends Graphics
* @param startAngle TODO
* @param arcAngle TODO
*/
- public void fillArc(int x, int y, int width, int height,
- int startAngle, int arcAngle)
+ public void fillArc(int x, int y, int width, int height,
+ int startAngle, int arcAngle)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -817,7 +817,7 @@ public class DebugGraphics extends Graphics
* @param y the y coordinate
*/
public void drawString(AttributedCharacterIterator iterator,
- int x, int y)
+ int x, int y)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -830,7 +830,7 @@ public class DebugGraphics extends Graphics
/**
* drawBytes
- *
+ *
* @param data TODO
* @param offset TODO
* @param length TODO
@@ -838,7 +838,7 @@ public class DebugGraphics extends Graphics
* @param y the y coordinate
*/
public void drawBytes(byte[] data, int offset, int length,
- int x, int y)
+ int x, int y)
{
if ((debugOptions & LOG_OPTION) != 0)
logStream().println(prefix() + " Drawing bytes at: " + new Point(x, y));
@@ -848,15 +848,15 @@ public class DebugGraphics extends Graphics
/**
* drawChars
- *
+ *
* @param data array of characters to draw
* @param offset offset in array
* @param length number of characters in array to draw
* @param x x-position
* @param y y-position
*/
- public void drawChars(char[] data, int offset, int length,
- int x, int y)
+ public void drawChars(char[] data, int offset, int length,
+ int x, int y)
{
if ((debugOptions & LOG_OPTION) != 0)
logStream().println(prefix() + " Drawing chars at: " + new Point(x, y));
@@ -889,7 +889,7 @@ public class DebugGraphics extends Graphics
* @return boolean
*/
public boolean drawImage(Image image, int x, int y,
- ImageObserver observer)
+ ImageObserver observer)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -902,7 +902,7 @@ public class DebugGraphics extends Graphics
/**
* drawImage
- *
+ *
* @param image The image to draw
* @param x The x position
* @param y The y position
@@ -912,8 +912,8 @@ public class DebugGraphics extends Graphics
*
* @return boolean
*/
- public boolean drawImage(Image image, int x, int y, int width,
- int height, ImageObserver observer)
+ public boolean drawImage(Image image, int x, int y, int width,
+ int height, ImageObserver observer)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -926,7 +926,7 @@ public class DebugGraphics extends Graphics
/**
* drawImage
- *
+ *
* @param image The image to draw
* @param x The x position
* @param y The y position
@@ -936,8 +936,8 @@ public class DebugGraphics extends Graphics
*
* @return boolean
*/
- public boolean drawImage(Image image, int x, int y,
- Color background, ImageObserver observer)
+ public boolean drawImage(Image image, int x, int y,
+ Color background, ImageObserver observer)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -951,7 +951,7 @@ public class DebugGraphics extends Graphics
/**
* drawImage
- *
+ *
* @param image The image to draw
* @param x The x position
* @param y The y position
@@ -963,8 +963,8 @@ public class DebugGraphics extends Graphics
*
* @return boolean
*/
- public boolean drawImage(Image image, int x, int y, int width, int height,
- Color background, ImageObserver observer)
+ public boolean drawImage(Image image, int x, int y, int width, int height,
+ Color background, ImageObserver observer)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -978,7 +978,7 @@ public class DebugGraphics extends Graphics
/**
* drawImage
- *
+ *
* @param image The image to draw
* @param dx1 TODO
* @param dy1 TODO
@@ -989,12 +989,12 @@ public class DebugGraphics extends Graphics
* @param sx2 TODO
* @param sy2 TODO
* @param observer The image observer
- *
+ *
* @return boolean
*/
public boolean drawImage(Image image, int dx1, int dy1,
- int dx2, int dy2, int sx1, int sy1, int sx2, int sy2,
- ImageObserver observer)
+ int dx2, int dy2, int sx1, int sy1, int sx2, int sy2,
+ ImageObserver observer)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -1025,8 +1025,8 @@ public class DebugGraphics extends Graphics
* @return boolean
*/
public boolean drawImage(Image image, int dx1, int dy1,
- int dx2, int dy2, int sx1, int sy1, int sx2, int sy2,
- Color background, ImageObserver observer)
+ int dx2, int dy2, int sx1, int sy1, int sx2, int sy2,
+ Color background, ImageObserver observer)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -1049,8 +1049,8 @@ public class DebugGraphics extends Graphics
* @param destx The x position of the destination area
* @param desty The y posiiton of the destination area
*/
- public void copyArea(int x, int y, int width, int height,
- int destx, int desty)
+ public void copyArea(int x, int y, int width, int height,
+ int destx, int desty)
{
if ((debugOptions & LOG_OPTION) != 0)
{
@@ -1109,7 +1109,7 @@ public class DebugGraphics extends Graphics
/**
* Creates and returns the prefix that should be prepended to all logging
* messages. The prefix is made up like this:
- *
+ *
* Graphics(-1)
where counter is an integer number
* saying how many DebugGraphics objects have been created so far. The second
* number always seem to be 1 on Sun's JDK, this has to be investigated a
diff --git a/libjava/classpath/javax/swing/DefaultBoundedRangeModel.java b/libjava/classpath/javax/swing/DefaultBoundedRangeModel.java
index 786e4ee..c1d0fe7 100644
--- a/libjava/classpath/javax/swing/DefaultBoundedRangeModel.java
+++ b/libjava/classpath/javax/swing/DefaultBoundedRangeModel.java
@@ -371,7 +371,7 @@ public class DefaultBoundedRangeModel
this.minimum = minimum;
this.maximum = maximum;
this.isAdjusting = isAdjusting;
-
+
fireStateChanged();
}
@@ -405,7 +405,7 @@ public class DefaultBoundedRangeModel
protected void fireStateChanged()
{
ChangeListener[] listeners = getChangeListeners();
-
+
if (changeEvent == null)
changeEvent = new ChangeEvent(this);
@@ -443,7 +443,7 @@ public class DefaultBoundedRangeModel
{
return (ChangeListener[]) getListeners(ChangeListener.class);
}
-
+
/**
* Provides serialization support.
*
@@ -451,8 +451,8 @@ public class DefaultBoundedRangeModel
*
* @throws IOException if there is an I/O error.
*/
- private void writeObject(ObjectOutputStream stream)
- throws IOException
+ private void writeObject(ObjectOutputStream stream)
+ throws IOException
{
stream.defaultWriteObject();
}
diff --git a/libjava/classpath/javax/swing/DefaultButtonModel.java b/libjava/classpath/javax/swing/DefaultButtonModel.java
index c0eaea2..d29a23e 100644
--- a/libjava/classpath/javax/swing/DefaultButtonModel.java
+++ b/libjava/classpath/javax/swing/DefaultButtonModel.java
@@ -331,7 +331,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable
// if this call does not represent a CHANGE in state, then return
if ((a && isArmed()) || (!a && !isArmed()))
return;
-
+
// cannot change ARMED state unless button is enabled
if (!isEnabled())
return;
@@ -427,7 +427,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable
// if this call does not represent a CHANGE in state, then return
if (r == isRollover())
return;
-
+
// cannot set ROLLOVER property unless button is enabled
if (!isEnabled())
return;
@@ -452,7 +452,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable
// if this call does not represent a CHANGE in state, then return
if ((s && isSelected()) || (!s && !isSelected()))
return;
-
+
// make the change
if (s)
stateMask = stateMask | SELECTED;
@@ -556,7 +556,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable
* true
at a time.
*
* @param g The new "group" property (null
permitted).
- *
+ *
* @see #getGroup()
*/
public void setGroup(ButtonGroup g)
@@ -568,7 +568,7 @@ public class DefaultButtonModel implements ButtonModel, Serializable
* Returns the current value of the model's "group" property.
*
* @return The value of the "group" property
- *
+ *
* @see #setGroup(ButtonGroup)
*/
public ButtonGroup getGroup()
diff --git a/libjava/classpath/javax/swing/DefaultCellEditor.java b/libjava/classpath/javax/swing/DefaultCellEditor.java
index 16ed1ec..46f6370 100644
--- a/libjava/classpath/javax/swing/DefaultCellEditor.java
+++ b/libjava/classpath/javax/swing/DefaultCellEditor.java
@@ -57,7 +57,7 @@ import javax.swing.tree.TreeCellEditor;
* The default implementation of {@link TableCellEditor} and
* {@link TreeCellEditor}. It provides editor components for
* some standard object types.
- *
+ *
* @author Andrew Selkirk
* @author Audrius Meskauskas
*/
@@ -69,12 +69,12 @@ public class DefaultCellEditor
/**
* This changeable module access the editor component in the component
- * specific way. For instance, to set the value for JTextField, we need to
- * call setText(String), and for JCheckBox we need to call
+ * specific way. For instance, to set the value for JTextField, we need to
+ * call setText(String), and for JCheckBox we need to call
* setSelected(boolean). Each default editor has the component specific
* derivative of this class. These derivatives are private inner classes of
* the DefaultCellEditor.
- *
+ *
* The editor delegate is also set for the editor component as the action
* listener. It listens for the events that indicate that editing has stopped.
*/
@@ -98,7 +98,7 @@ public class DefaultCellEditor
{
// Nothing to do here.
}
-
+
/**
* Set the value for the editor component. This method is normally
* overridden to set the value in the way, specific for the text
@@ -121,12 +121,12 @@ public class DefaultCellEditor
public Object getCellEditorValue()
{
return value;
- }
+ }
/**
- * The default method returns true for the {@link MouseEvent} and false
+ * The default method returns true for the {@link MouseEvent} and false
* for any other events.
- *
+ *
* @param event the event to check
*
* @return true if the passed event is the mouse event and false otherwise.
@@ -141,10 +141,10 @@ public class DefaultCellEditor
/**
* Returns true to indicate that the editing cell can be selected.
- *
+ *
* The default method returns true without action but may be overridden
* in derived classes for more specific behavior.
- *
+ *
* @param event unused in default method
*
* @return true always
@@ -158,8 +158,8 @@ public class DefaultCellEditor
/**
* Finish the cell editing session. This method notifies the registered
* cell editor listeners (including the table) that the editing has been
- * stopped.
- *
+ * stopped.
+ *
* @return boolean
*/
public boolean stopCellEditing()
@@ -182,9 +182,9 @@ public class DefaultCellEditor
* Start editing session and returns true to indicate the editing has begun.
* The default method returns true without action but may be overridden
* in derived classes for more specific behavior.
- *
+ *
* @param event the event.
- *
+ *
* @return true, always
*/
public boolean startCellEditing(EventObject event)
@@ -196,8 +196,8 @@ public class DefaultCellEditor
/**
* This event is fired by the editor component (for instance, by pressing
* ENTER in the {@link JTextField}. The default method delegates call to
- * the {@link #stopCellEditing}, finishing the editing session.
- *
+ * the {@link #stopCellEditing}, finishing the editing session.
+ *
* @param event unused in default method
*/
public void actionPerformed(ActionEvent event)
@@ -207,8 +207,8 @@ public class DefaultCellEditor
/**
* This event is fired by the editor component.The default method delegates
- * call to the {@link #stopCellEditing}, finishing the editing session.
- *
+ * call to the {@link #stopCellEditing}, finishing the editing session.
+ *
* @param event unused in default method
*/
public void itemStateChanged(ItemEvent event)
@@ -225,9 +225,9 @@ public class DefaultCellEditor
CellEditorListener[] listeners = getCellEditorListeners();
for (int index = 0; index < listeners.length; index++)
listeners[index].editingStopped(changeEvent);
-
+
}
-
+
/**
* Notify the registered listeners (including the table) that the editing
* has been canceled.
@@ -239,10 +239,10 @@ public class DefaultCellEditor
listeners[index].editingCanceled(changeEvent);
}
} // EditorDelegate
-
+
/**
* Provides getter and setter methods to work with the text component.
- *
+ *
* @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
private class JTextFieldDelegate extends EditorDelegate
@@ -251,7 +251,7 @@ public class DefaultCellEditor
* Use the serial version UID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* Set the value for the editor component.
*
@@ -268,21 +268,21 @@ public class DefaultCellEditor
}
/**
- * Get the value for the editor component.
+ * Get the value for the editor component.
*
* @return value the value of the component (String)
*/
public Object getCellEditorValue()
{
JTextField f = (JTextField) editorComponent;
- return value = f.getText();
- }
+ return value = f.getText();
+ }
}
/**
* Provides getter and setter methods to work with the combo box.
- *
- * @author Audrius Meskauskas (audriusa@Bioinformatics.org)
+ *
+ * @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
private class JComboBoxDelegate extends EditorDelegate
{
@@ -290,7 +290,7 @@ public class DefaultCellEditor
* Use the serial version UID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* Set the value for the editor component.
*
@@ -298,14 +298,14 @@ public class DefaultCellEditor
*/
public void setValue(Object aValue)
{
- value = aValue;
+ value = aValue;
JComboBox c = (JComboBox) editorComponent;
if (value != null)
c.setSelectedItem(value);
}
/**
- * Get the value for the editor component.
+ * Get the value for the editor component.
*
* @return value the value of the component (as String)
*/
@@ -313,13 +313,13 @@ public class DefaultCellEditor
{
JComboBox c = (JComboBox) editorComponent;
return value = c.getSelectedItem();
- }
-
+ }
+
/**
* Returns true to indicate that the editing cell can be selected. If the
* check box is not editable, expands it. If it is editable, brings
* focus to the editor field.
- *
+ *
* @param event unused in default method
*
* @return true always
@@ -330,13 +330,13 @@ public class DefaultCellEditor
if (!c.isEditable)
c.showPopup();
return true;
- }
+ }
}
/**
* Provides getter and setter methods to work with the check box.
- *
- * @author Audrius Meskauskas (audriusa@Bioinformatics.org)
+ *
+ * @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
private class JCheckBoxDelegate extends EditorDelegate
{
@@ -344,7 +344,7 @@ public class DefaultCellEditor
* Use the serial version UID for interoperability.
*/
private static final long serialVersionUID = 1;
-
+
/**
* Set the value for the editor component.
*
@@ -353,7 +353,7 @@ public class DefaultCellEditor
public void setValue(Object value)
{
JCheckBox c = (JCheckBox) editorComponent;
-
+
if (value == null)
c.setSelected(false);
else
@@ -361,7 +361,7 @@ public class DefaultCellEditor
}
/**
- * Get the value for the editor component.
+ * Get the value for the editor component.
*
* @return value the value of the component (must be CharSequence)
*/
@@ -370,9 +370,9 @@ public class DefaultCellEditor
JCheckBox c = (JCheckBox) editorComponent;
value = c.isSelected() ? Boolean.TRUE : Boolean.FALSE;
return value;
- }
+ }
}
-
+
/**
* The Swing JComponent, performing the editing session.
*/
@@ -392,7 +392,7 @@ public class DefaultCellEditor
/**
* Create the DefaultCellEditor that uses the text field as its editor
* component (appropriate for the text content)
- *
+ *
* @param textfield the text field as will be used as the editor component
*/
public DefaultCellEditor(JTextField textfield)
@@ -406,7 +406,7 @@ public class DefaultCellEditor
/**
* Constructor DefaultCellEditor that uses the checkbox (appropriate
* for boolean values)
- *
+ *
* @param checkbox the checkbox that will be used with this editor.
*/
public DefaultCellEditor(JCheckBox checkbox)
@@ -419,7 +419,7 @@ public class DefaultCellEditor
/**
* Constructor DefaultCellEditor that uses the combo box.
- *
+ *
* @param combobox the combo box that will be used with this editor.
*/
public DefaultCellEditor(JComboBox combobox)
@@ -431,19 +431,19 @@ public class DefaultCellEditor
} // DefaultCellEditor()
/**
- * Get the component that performs the editing sessions. It is the same
+ * Get the component that performs the editing sessions. It is the same
* component that was passed in constructor.
- *
- * @return the component, performing the editing sessions.
+ *
+ * @return the component, performing the editing sessions.
*/
public Component getComponent()
{
- return editorComponent;
+ return editorComponent;
} // getComponent()
/**
* Get the number of mouse clicks, required to start the editing session.
- *
+ *
* @return int the number of mouse clicks, required to start the session
*/
public int getClickCountToStart()
@@ -453,7 +453,7 @@ public class DefaultCellEditor
/**
* Set the number of mouse clicks, required to start the editing session.
- *
+ *
* @param count the number of clicks, required to start the session
*/
public void setClickCountToStart(int count)
@@ -462,9 +462,9 @@ public class DefaultCellEditor
} // setClickCountToStart()
/**
- * Get the value, currently being displayed by the editor component. The
+ * Get the value, currently being displayed by the editor component. The
* call is forwarded to the {@link #delegate}.
- *
+ *
* @return Object the value (class depends on the editor component)
*/
public Object getCellEditorValue()
@@ -474,7 +474,7 @@ public class DefaultCellEditor
/**
* Forwards call to the {@link #delegate}.
- *
+ *
* @param event forwarded to the delegate.
*
* @return boolean returned by delegate
@@ -486,7 +486,7 @@ public class DefaultCellEditor
/**
* Forwards call to the {@link #delegate}.
- *
+ *
* @param event forwarded to the delegate.
*
* @return boolean returned by delegate
@@ -498,7 +498,7 @@ public class DefaultCellEditor
/**
* Forwards call to the {@link #delegate}.
- *
+ *
* @return boolean returned by delegate
*/
public boolean stopCellEditing()
@@ -515,14 +515,14 @@ public class DefaultCellEditor
} // cancelCellEditing()
/**
- * Sets an initial value for the editor.
- * This will cause the editor to stopEditing and lose any partially
+ * Sets an initial value for the editor.
+ * This will cause the editor to stopEditing and lose any partially
* edited value if the editor is editing when this method is called.
- * Returns the component that should be added to the client's Component
- * hierarchy. Once installed in the client's hierarchy this component will
- * then be able to draw and receive user input.
- *
- * @param tree - the JTree that is asking the editor to edit; this
+ * Returns the component that should be added to the client's Component
+ * hierarchy. Once installed in the client's hierarchy this component will
+ * then be able to draw and receive user input.
+ *
+ * @param tree - the JTree that is asking the editor to edit; this
* parameter can be null
* @param value - the value of the cell to be edited
* @param isSelected - true is the cell is to be renderer with selection
@@ -546,21 +546,21 @@ public class DefaultCellEditor
* Get the cell editor component that will perform the editing session. If
* returned once, the same component is also returned on the repetetive calls
* again (reused).
- *
+ *
* @param table the table where the editing is performed
- * @param value the current value of the table. It is set as the initial
+ * @param value the current value of the table. It is set as the initial
* component value.
* @param isSelected if true, the cell is currently selected
* @param row the row of the cell being edited
* @param column the column of the cell being edited
- *
+ *
* @return Component the component that will perform the editing session
*/
public Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected, int row,
int column)
{
- // NOTE: as specified by Sun, we don't call new() everytime, we return
+ // NOTE: as specified by Sun, we don't call new() everytime, we return
// editorComponent on each call to getTableCellEditorComponent or
// getTreeCellEditorComponent.
delegate.setValue(value);
diff --git a/libjava/classpath/javax/swing/DefaultComboBoxModel.java b/libjava/classpath/javax/swing/DefaultComboBoxModel.java
index 9b5bdb6..a90b89d 100644
--- a/libjava/classpath/javax/swing/DefaultComboBoxModel.java
+++ b/libjava/classpath/javax/swing/DefaultComboBoxModel.java
@@ -78,13 +78,13 @@ public class DefaultComboBoxModel extends AbstractListModel
}
/**
- * Creates a new model and initializes its item list to the values in the
- * given array. The selected item is set to the first item in the array, or
+ * Creates a new model and initializes its item list to the values in the
+ * given array. The selected item is set to the first item in the array, or
* null
if the array length is zero.
*
* @param items an array containing items for the model (null
* not permitted).
- *
+ *
* @throws NullPointerException if items
is null
.
*/
public DefaultComboBoxModel(Object[] items)
@@ -95,13 +95,13 @@ public class DefaultComboBoxModel extends AbstractListModel
}
/**
- * Creates a new model and initializes its item list to the values in the
- * given vector. The selected item is set to the first item in the vector,
+ * Creates a new model and initializes its item list to the values in the
+ * given vector. The selected item is set to the first item in the vector,
* or null
if the vector length is zero.
*
* @param vector a vector containing items for the model (null
* not permitted).
- *
+ *
* @throws NullPointerException if vector
is null
.
*/
public DefaultComboBoxModel(Vector> vector)
@@ -114,7 +114,7 @@ public class DefaultComboBoxModel extends AbstractListModel
/**
* Adds an element to the model's item list and sends a {@link ListDataEvent}
* to all registered listeners. If the new element is the first item added
- * to the list, and the selected item is null
, the new element
+ * to the list, and the selected item is null
, the new element
* is set as the selected item.
*
* @param object item to add to the model's item list.
@@ -131,12 +131,12 @@ public class DefaultComboBoxModel extends AbstractListModel
/**
* Removes the element at the specified index from the model's item list
* and sends a {@link ListDataEvent} to all registered listeners. If the
- * element removed was the selected item, then the preceding element becomes
- * the new selected item (or the next element, if there is no preceding
+ * element removed was the selected item, then the preceding element becomes
+ * the new selected item (or the next element, if there is no preceding
* element).
*
* @param index the index of the item to remove.
- *
+ *
* @throws ArrayIndexOutOfBoundsException if index
is out of
* bounds.
*/
@@ -147,7 +147,7 @@ public class DefaultComboBoxModel extends AbstractListModel
{
if (selected > 0)
setSelectedItem(getElementAt(selected - 1));
- else
+ else
setSelectedItem(getElementAt(selected + 1));
}
list.removeElementAt(index);
@@ -161,10 +161,10 @@ public class DefaultComboBoxModel extends AbstractListModel
* @param object element to insert
* @param index index specifing position in the list where given element
* should be inserted.
- *
- * @throws ArrayIndexOutOfBoundsException if index
is out of
+ *
+ * @throws ArrayIndexOutOfBoundsException if index
is out of
* bounds.
- *
+ *
* @see #addElement(Object)
*/
public void insertElementAt(Object object, int index)
@@ -174,7 +174,7 @@ public class DefaultComboBoxModel extends AbstractListModel
}
/**
- * Removes an element from the model's item list and sends a
+ * Removes an element from the model's item list and sends a
* {@link ListDataEvent} to all registered listeners. If the item to be
* removed is the current selected item, a new selected item will be set.
* If the element is not found in the model's item list, this method does
@@ -191,7 +191,7 @@ public class DefaultComboBoxModel extends AbstractListModel
/**
* Removes all the items from the model's item list, resets and selected item
- * to null
, and sends a {@link ListDataEvent} to all registered
+ * to null
, and sends a {@link ListDataEvent} to all registered
* listeners.
*/
public void removeAllElements()
@@ -217,7 +217,7 @@ public class DefaultComboBoxModel extends AbstractListModel
/**
* Sets the selected item for the model and sends a {@link ListDataEvent} to
- * all registered listeners. The start and end index of the event is set to
+ * all registered listeners. The start and end index of the event is set to
* -1 to indicate the model's selection has changed, and not its contents.
*
* @param object the new selected item (null
permitted).
diff --git a/libjava/classpath/javax/swing/DefaultDesktopManager.java b/libjava/classpath/javax/swing/DefaultDesktopManager.java
index cad8818..9613449 100644
--- a/libjava/classpath/javax/swing/DefaultDesktopManager.java
+++ b/libjava/classpath/javax/swing/DefaultDesktopManager.java
@@ -126,11 +126,11 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
Container c = frame.getParent();
if (c != null)
{
- if (frame.isIcon())
- c.remove(frame.getDesktopIcon());
- else
- c.remove(frame);
- c.repaint();
+ if (frame.isIcon())
+ c.remove(frame.getDesktopIcon());
+ else
+ c.remove(frame);
+ c.repaint();
}
}
@@ -151,25 +151,25 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
Container p = frame.getParent();
if (p != null)
{
- Rectangle pBounds = p.getBounds();
- Insets insets = p.getInsets();
- pBounds.width -= insets.left + insets.right;
- pBounds.height -= insets.top + insets.bottom;
+ Rectangle pBounds = p.getBounds();
+ Insets insets = p.getInsets();
+ pBounds.width -= insets.left + insets.right;
+ pBounds.height -= insets.top + insets.bottom;
- setBoundsForFrame(frame, 0, 0, pBounds.width, pBounds.height);
+ setBoundsForFrame(frame, 0, 0, pBounds.width, pBounds.height);
}
if (p instanceof JDesktopPane)
((JDesktopPane) p).setSelectedFrame(frame);
else
{
- try
- {
- frame.setSelected(true);
- }
- catch (PropertyVetoException e)
- {
- // Do nothing.
- }
+ try
+ {
+ frame.setSelected(true);
+ }
+ catch (PropertyVetoException e)
+ {
+ // Do nothing.
+ }
}
}
@@ -320,7 +320,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
{
p.setSelectedFrame(frame);
}
-
+
}
frame.toFront();
}
@@ -414,7 +414,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
dragCache.width, dragCache.height);
pane = null;
dragCache = null;
- component.repaint();
+ component.repaint();
}
}
@@ -477,7 +477,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
dragCache.width, dragCache.height);
pane = null;
dragCache = null;
- component.repaint();
+ component.repaint();
}
}
@@ -527,9 +527,9 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
protected Rectangle getBoundsForIconOf(JInternalFrame frame)
{
// IconRects has no order to it.
- // The icon _must_ be placed in the first free slot (working from
+ // The icon _must_ be placed in the first free slot (working from
// the bottom left corner)
- // The icon also must not be placed where another icon is placed
+ // The icon also must not be placed where another icon is placed
// (regardless whether that frame is an icon currently or not)
JDesktopPane desktopPane = frame.getDesktopPane();
@@ -547,7 +547,7 @@ public class DefaultDesktopManager implements DesktopManager, Serializable
if (frames[i] instanceof JDesktopIcon
|| frames[i] instanceof JInternalFrame
&& ((JInternalFrame) frames[i]).getWasIcon() && frames[i] != frame)
- count++;
+ count++;
iconRects = new Rectangle[count];
for (int i = 0, j = 0; i < frames.length; i++)
if (frames[i] instanceof JDesktopIcon)
diff --git a/libjava/classpath/javax/swing/DefaultFocusManager.java b/libjava/classpath/javax/swing/DefaultFocusManager.java
index 103a7f3..3c5daa0 100644
--- a/libjava/classpath/javax/swing/DefaultFocusManager.java
+++ b/libjava/classpath/javax/swing/DefaultFocusManager.java
@@ -49,7 +49,7 @@ import java.util.Stack;
*
* @author Andrew Selkirk
*/
-public class DefaultFocusManager extends FocusManager
+public class DefaultFocusManager extends FocusManager
{
/**
@@ -65,9 +65,9 @@ public class DefaultFocusManager extends FocusManager
// TODO
} // DefaultFocusManager()
- /**
+ /**
* processKeyEvent
- *
+ *
* @param component
* TODO
* @param event
@@ -80,7 +80,7 @@ public class DefaultFocusManager extends FocusManager
/**
* focusNextComponent
- *
+ *
* @param component
* TODO
*/
@@ -91,7 +91,7 @@ public class DefaultFocusManager extends FocusManager
/**
* focusPreviousComponent
- *
+ *
* @param component
* TODO
*/
@@ -102,7 +102,7 @@ public class DefaultFocusManager extends FocusManager
/**
* getFirstComponent
- *
+ *
* @param container
* TODO
* @return Component
@@ -114,7 +114,7 @@ public class DefaultFocusManager extends FocusManager
/**
* getLastComponent
- *
+ *
* @param container
* TODO
* @return Component
@@ -126,7 +126,7 @@ public class DefaultFocusManager extends FocusManager
/**
* getComponentBefore
- *
+ *
* @param container
* TODO
* @param component
@@ -140,7 +140,7 @@ public class DefaultFocusManager extends FocusManager
/**
* getComponentAfter
- *
+ *
* @param container
* TODO
* @param component
@@ -154,7 +154,7 @@ public class DefaultFocusManager extends FocusManager
/**
* compareTabOrder
- *
+ *
* @param component1
* TODO
* @param component2
diff --git a/libjava/classpath/javax/swing/DefaultListModel.java b/libjava/classpath/javax/swing/DefaultListModel.java
index 674864c..aa26007 100644
--- a/libjava/classpath/javax/swing/DefaultListModel.java
+++ b/libjava/classpath/javax/swing/DefaultListModel.java
@@ -166,7 +166,7 @@ public class DefaultListModel extends AbstractListModel
/**
* Sets the list element at a particular index.
*
- * @param index The list index at which to set a value
+ * @param index The list index at which to set a value
* @param element The value to set at the specified index
*
* @return The value previously held at the specified index
@@ -253,7 +253,7 @@ public class DefaultListModel extends AbstractListModel
* least as large as the list.
*
* @param array The array to copy the list into
- *
+ *
* @throws IndexOutOfBoundsException if the array is too small to hold the
* elements of the list
*/
@@ -317,7 +317,7 @@ public class DefaultListModel extends AbstractListModel
/**
* Sets the capacity of the list to be equal to its size. The list's capacity
* is the number of elements it can hold before it needs to be reallocated.
- * The list's size is the number of elements it currently holds.
+ * The list's size is the number of elements it currently holds.
*/
public void trimToSize()
{
@@ -360,7 +360,7 @@ public class DefaultListModel extends AbstractListModel
/**
* Gets the capacity of the list. The list's capacity is the number of
- * elements it can hold before it needs to be reallocated.
+ * elements it can hold before it needs to be reallocated.
*
* @return The capacity of the list
*/
@@ -393,7 +393,7 @@ public class DefaultListModel extends AbstractListModel
* Sets the list element at a particular index.
*
* @param element The value to set at the specified index
- * @param index The list index at which to set a value
+ * @param index The list index at which to set a value
*
* @throws ArrayIndexOutOfBoundsException If the provided index is
* outside the bounds of the list [0, size())
diff --git a/libjava/classpath/javax/swing/DefaultListSelectionModel.java b/libjava/classpath/javax/swing/DefaultListSelectionModel.java
index d1e2da8..273ca0d 100644
--- a/libjava/classpath/javax/swing/DefaultListSelectionModel.java
+++ b/libjava/classpath/javax/swing/DefaultListSelectionModel.java
@@ -69,7 +69,7 @@ public class DefaultListSelectionModel implements Cloneable,
protected EventListenerList listenerList = new EventListenerList();
- /**
+ /**
* The current list selection mode. Must be one of the numeric constants
* SINGLE_SELECTION
, SINGLE_INTERVAL_SELECTION
* or MULTIPLE_INTERVAL_SELECTION
from {@link
@@ -129,7 +129,7 @@ public class DefaultListSelectionModel implements Cloneable,
boolean valueIsAdjusting = false;
- /**
+ /**
* The current set of "intervals", represented simply by a {@link
* java.util.BitSet}. A set bit indicates a selected index, whereas a
* cleared bit indicates a non-selected index.
@@ -150,13 +150,13 @@ public class DefaultListSelectionModel implements Cloneable,
boolean setLeadCalledFromAdd = false;
/**
- * Returns the selection mode, which is one of {@link #SINGLE_SELECTION},
- * {@link #SINGLE_INTERVAL_SELECTION} and
+ * Returns the selection mode, which is one of {@link #SINGLE_SELECTION},
+ * {@link #SINGLE_INTERVAL_SELECTION} and
* {@link #MULTIPLE_INTERVAL_SELECTION}. The default value is
* {@link #MULTIPLE_INTERVAL_SELECTION}.
- *
+ *
* @return The selection mode.
- *
+ *
* @see #setSelectionMode(int)
*/
public int getSelectionMode()
@@ -171,7 +171,7 @@ public class DefaultListSelectionModel implements Cloneable,
*/
public void setSelectionMode(int mode)
{
- if (mode < ListSelectionModel.SINGLE_SELECTION
+ if (mode < ListSelectionModel.SINGLE_SELECTION
|| mode > ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
throw new IllegalArgumentException("Unrecognised mode: " + mode);
selectionMode = mode;
@@ -179,7 +179,7 @@ public class DefaultListSelectionModel implements Cloneable,
/**
* Gets the value of the {@link #anchorSelectionIndex} property.
- *
+ *
* @return The current property value
*
* @see #setAnchorSelectionIndex
@@ -191,7 +191,7 @@ public class DefaultListSelectionModel implements Cloneable,
/**
* Sets the value of the {@link #anchorSelectionIndex} property.
- *
+ *
* @param index The new property value
*
* @see #getAnchorSelectionIndex
@@ -206,10 +206,10 @@ public class DefaultListSelectionModel implements Cloneable,
fireValueChanged(index, old);
}
}
-
+
/**
* Gets the value of the {@link #leadSelectionIndex} property.
- *
+ *
* @return The current property value
*
* @see #setLeadSelectionIndex
@@ -245,7 +245,7 @@ public class DefaultListSelectionModel implements Cloneable,
* {@link ListSelectionEvent} includes only the minimum range of values
* which changed selection status between the beginning and end of the
* method.
- *
+ *
* @param leadIndex The new property value
*
* @see #getAnchorSelectionIndex
@@ -267,7 +267,7 @@ public class DefaultListSelectionModel implements Cloneable,
if (selectionMode == SINGLE_SELECTION)
setSelectionInterval (leadIndex, leadIndex);
-
+
int oldLeadIndex = leadSelectionIndex;
if (oldLeadIndex == -1)
oldLeadIndex = leadIndex;
@@ -276,8 +276,8 @@ public class DefaultListSelectionModel implements Cloneable,
leadSelectionIndex = leadIndex;
if (anchorSelectionIndex == -1)
- return;
-
+ return;
+
int R1 = Math.min(anchorSelectionIndex, oldLeadIndex);
int R2 = Math.max(anchorSelectionIndex, oldLeadIndex);
int S1 = Math.min(anchorSelectionIndex, leadIndex);
@@ -295,28 +295,28 @@ public class DefaultListSelectionModel implements Cloneable,
{
sel.set(R1, R2+1);
sel.clear(S1, S2+1);
- }
+ }
int beg = sel.nextSetBit(0), end = -1;
- for(int i=beg; i >= 0; i=sel.nextSetBit(i+1))
+ for(int i=beg; i >= 0; i=sel.nextSetBit(i+1))
end = i;
-
+
BitSet old = (BitSet) oldSel;
-
+
// The new and previous lead location requires repainting.
old.set(oldLeadIndex, !sel.get(oldLeadIndex));
old.set(leadSelectionIndex, !sel.get(leadSelectionIndex));
-
+
fireDifference(sel, old);
}
/**
- * Moves the lead selection index to leadIndex
without
+ * Moves the lead selection index to leadIndex
without
* changing the selection values.
- *
+ *
* If leadAnchorNotificationEnabled is true, send a notification covering the
* old and new lead cells.
- *
+ *
* @param leadIndex the new lead selection index
* @since 1.5
*/
@@ -324,16 +324,16 @@ public class DefaultListSelectionModel implements Cloneable,
{
if (leadSelectionIndex == leadIndex)
return;
-
+
leadSelectionIndex = leadIndex;
if (isLeadAnchorNotificationEnabled())
fireValueChanged(Math.min(leadSelectionIndex, leadIndex),
Math.max(leadSelectionIndex, leadIndex));
}
-
+
/**
* Gets the value of the {@link #leadAnchorNotificationEnabled} property.
- *
+ *
* @return The current property value
*
* @see #setLeadAnchorNotificationEnabled
@@ -345,7 +345,7 @@ public class DefaultListSelectionModel implements Cloneable,
/**
* Sets the value of the {@link #leadAnchorNotificationEnabled} property.
- *
+ *
* @param l The new property value
*
* @see #isLeadAnchorNotificationEnabled
@@ -404,7 +404,7 @@ public class DefaultListSelectionModel implements Cloneable,
{
if (isSelectionEmpty())
return -1;
-
+
return sel.nextSetBit(0);
}
@@ -424,8 +424,8 @@ public class DefaultListSelectionModel implements Cloneable,
return -1;
int mx = -1;
- for(int i=sel.nextSetBit(0); i >= 0; i=sel.nextSetBit(i+1))
- {
+ for(int i=sel.nextSetBit(0); i >= 0; i=sel.nextSetBit(i+1))
+ {
mx = i;
}
return mx;
@@ -451,12 +451,12 @@ public class DefaultListSelectionModel implements Cloneable,
/**
* If the {@link #selectionMode} property is equal to
* SINGLE_SELECTION
equivalent to calling
- * setSelectionInterval(index1, index2)
;
- * If the {@link #selectionMode} property is equal to
+ * setSelectionInterval(index1, index2)
;
+ * If the {@link #selectionMode} property is equal to
* SINGLE_INTERVAL_SELECTION
and the interval being
* added is not adjacent to an already selected interval,
* equivalent to setSelectionInterval(index1, index2)
.
- * Otherwise adds the range [index0, index1]
+ * Otherwise adds the range [index0, index1]
* to the selection interval set.
*
* @param index0 The beginning of the range of indices to select
@@ -465,11 +465,11 @@ public class DefaultListSelectionModel implements Cloneable,
* @see #setSelectionInterval
* @see #removeSelectionInterval
*/
- public void addSelectionInterval(int index0, int index1)
+ public void addSelectionInterval(int index0, int index1)
{
if (index0 == -1 || index1 == -1)
return;
-
+
if (selectionMode == SINGLE_SELECTION)
setSelectionInterval(index0, index1);
else
@@ -479,27 +479,27 @@ public class DefaultListSelectionModel implements Cloneable,
oldSel = sel.clone();
- // COMPAT: Like Sun (but not like IBM), we allow calls to
+ // COMPAT: Like Sun (but not like IBM), we allow calls to
// addSelectionInterval when selectionMode is
// SINGLE_SELECTION_INTERVAL iff the interval being added
// is adjacent to an already selected interval
if (selectionMode == SINGLE_INTERVAL_SELECTION)
- if (!(isSelectedIndex(index0) ||
- isSelectedIndex(index1) ||
- isSelectedIndex(Math.max(lo-1,0)) ||
+ if (!(isSelectedIndex(index0) ||
+ isSelectedIndex(index1) ||
+ isSelectedIndex(Math.max(lo-1,0)) ||
isSelectedIndex(Math.min(hi+1,sel.size()))))
- sel.clear();
+ sel.clear();
// We have to update the anchorSelectionIndex and leadSelectionIndex
// variables
-
+
// The next if statements breaks down to "if this selection is adjacent
// to the previous selection and going in the same direction"
- if ((isSelectedIndex(leadSelectionIndex))
- && ((index0 - 1 == leadSelectionIndex
- && (index1 >= index0)
+ if ((isSelectedIndex(leadSelectionIndex))
+ && ((index0 - 1 == leadSelectionIndex
+ && (index1 >= index0)
&& (leadSelectionIndex >= anchorSelectionIndex))
- || (index0 + 1 == leadSelectionIndex && (index1 <= index0)
+ || (index0 + 1 == leadSelectionIndex && (index1 <= index0)
&& (leadSelectionIndex <= anchorSelectionIndex)))
&& (anchorSelectionIndex != -1 || leadSelectionIndex != -1))
{
@@ -535,24 +535,24 @@ public class DefaultListSelectionModel implements Cloneable,
{
if (index0 == -1 || index1 == -1)
return;
-
+
oldSel = sel.clone();
int lo = Math.min(index0, index1);
int hi = Math.max(index0, index1);
-
+
// if selectionMode is SINGLE_INTERVAL_SELECTION and removing the interval
// (index0,index1) would leave two disjoint selection intervals, remove all
// selected indices from lo to the last selected index
- if (getMinSelectionIndex() > 0 && getMinSelectionIndex() < lo &&
+ if (getMinSelectionIndex() > 0 && getMinSelectionIndex() < lo &&
selectionMode == SINGLE_INTERVAL_SELECTION)
hi = sel.size() - 1;
- sel.clear(lo, hi+1);
+ sel.clear(lo, hi+1);
//update anchorSelectionIndex and leadSelectionIndex variables
//TODO: will probably need MouseDragged to test properly and know if this works
setAnchorSelectionIndex(index0);
leadSelectionIndex = index1;
-
+
fireDifference(sel, (BitSet) oldSel);
}
@@ -566,19 +566,19 @@ public class DefaultListSelectionModel implements Cloneable,
if (from < 0)
return; // Empty selection - nothing to do.
int to = from;
-
+
int i;
for (i = from; i>=0; i=sel.nextSetBit(i+1))
to = i;
-
+
sel.clear();
fireValueChanged(from, to, valueIsAdjusting);
}
-
+
/**
* Fire the change event, covering the difference between the two sets.
- *
+ *
* @param current the current set
* @param x the previous set, the object will be reused.
*/
@@ -596,12 +596,12 @@ public class DefaultListSelectionModel implements Cloneable,
fireValueChanged(from, to, valueIsAdjusting);
}
-
+
/**
* Clears the current selection and marks a given interval as "selected". If
* the current selection mode is SINGLE_SELECTION
only the
* index index2
is selected.
- *
+ *
* @param anchor the anchor selection index.
* @param lead the lead selection index.
*/
@@ -639,7 +639,7 @@ public class DefaultListSelectionModel implements Cloneable,
int last = first;
if (first >= 0)
last += (sel.cardinality() - 1);
-
+
// update the selection
int lo = Math.min(anchor, lead);
int hi = Math.max(anchor, lead);
@@ -647,7 +647,7 @@ public class DefaultListSelectionModel implements Cloneable,
return; // selected interval is not being changed
sel.clear();
sel.set(lo, hi + 1);
-
+
// include the old selection in the event range
if (first >= 0)
lo = Math.min(lo, first);
@@ -661,7 +661,7 @@ public class DefaultListSelectionModel implements Cloneable,
anchorSelectionIndex = anchor;
leadSelectionIndex = lead;
fireValueChanged(lo, hi);
- }
+ }
else
{
BitSet oldSel = (BitSet) sel.clone();
@@ -675,7 +675,7 @@ public class DefaultListSelectionModel implements Cloneable,
// update the anchorSelectionIndex and leadSelectionIndex variables
setAnchorSelectionIndex(anchor);
leadSelectionIndex = lead;
-
+
fireDifference(sel, oldSel);
}
}
@@ -697,7 +697,7 @@ public class DefaultListSelectionModel implements Cloneable,
boolean before)
{
if (!before)
- {
+ {
index++;
length--;
}
@@ -759,7 +759,7 @@ public class DefaultListSelectionModel implements Cloneable,
{
fireValueChanged(firstIndex, lastIndex, getValueIsAdjusting());
}
-
+
/**
* Fires a {@link ListSelectionEvent} to all the listeners of type {@link
* ListSelectionListener} registered with this selection model.
@@ -770,7 +770,7 @@ public class DefaultListSelectionModel implements Cloneable,
* made to the selection, such as during interactive scrolling
*/
protected void fireValueChanged(int firstIndex, int lastIndex,
- boolean isAdjusting)
+ boolean isAdjusting)
{
ListSelectionEvent evt = new ListSelectionEvent(this, firstIndex,
lastIndex, isAdjusting);
diff --git a/libjava/classpath/javax/swing/DefaultSingleSelectionModel.java b/libjava/classpath/javax/swing/DefaultSingleSelectionModel.java
index 3f79f0d..93d129e 100644
--- a/libjava/classpath/javax/swing/DefaultSingleSelectionModel.java
+++ b/libjava/classpath/javax/swing/DefaultSingleSelectionModel.java
@@ -82,9 +82,9 @@ public class DefaultSingleSelectionModel
/**
* Returns the selected index or -1
if there is no selection.
- *
+ *
* @return The selected index.
- *
+ *
* @see #setSelectedIndex(int)
*/
public int getSelectedIndex()
@@ -93,11 +93,11 @@ public class DefaultSingleSelectionModel
}
/**
- * Sets the selected index and, if this is different to the previous
+ * Sets the selected index and, if this is different to the previous
* selection, sends a {@link ChangeEvent} to all registered listeners.
- *
+ *
* @param index the index (use -1
to represent no selection).
- *
+ *
* @see #getSelectedIndex()
* @see #clearSelection
*/
@@ -113,7 +113,7 @@ public class DefaultSingleSelectionModel
/**
* Clears the selection by setting the selected index to -1
and
* sends a {@link ChangeEvent} to all registered listeners. If the selected
- * index is already -1
, this method does nothing.
+ * index is already -1
, this method does nothing.
*/
public void clearSelection()
{
@@ -122,8 +122,8 @@ public class DefaultSingleSelectionModel
/**
* Returns true
if there is a selection, and false
- * otherwise.
- *
+ * otherwise.
+ *
* @return A boolean.
*/
public boolean isSelected()
diff --git a/libjava/classpath/javax/swing/FocusManager.java b/libjava/classpath/javax/swing/FocusManager.java
index 21e4482..b8459d4 100644
--- a/libjava/classpath/javax/swing/FocusManager.java
+++ b/libjava/classpath/javax/swing/FocusManager.java
@@ -199,7 +199,7 @@ public abstract class FocusManager
{
wrapped.addKeyEventPostProcessor(p);
}
-
+
/**
* Wraps {@link KeyboardFocusManager#addPropertyChangeListener(PropertyChangeListener)}.
*
@@ -366,7 +366,7 @@ public abstract class FocusManager
return wrapped.getVetoableChangeListeners(n);
}
-
+
/**
* Wraps
* {@link KeyboardFocusManager#removeKeyEventDispatcher(KeyEventDispatcher)}.
@@ -490,7 +490,7 @@ public abstract class FocusManager
public static FocusManager getCurrentManager()
{
KeyboardFocusManager m =
- KeyboardFocusManager.getCurrentKeyboardFocusManager();
+ KeyboardFocusManager.getCurrentKeyboardFocusManager();
return new WrappingFocusManager(m);
}
diff --git a/libjava/classpath/javax/swing/GrayFilter.java b/libjava/classpath/javax/swing/GrayFilter.java
index ef0d147..a7f9693 100644
--- a/libjava/classpath/javax/swing/GrayFilter.java
+++ b/libjava/classpath/javax/swing/GrayFilter.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -57,7 +57,7 @@ public class GrayFilter extends RGBImageFilter
/**
* Create a GrayFilter. If b is true then brighten. Also, indicate how much
* gray.
- *
+ *
* @param b if brighten
* @param p percent of gray, 0 - 100
*/
@@ -79,7 +79,7 @@ public class GrayFilter extends RGBImageFilter
return (Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(
src.getSource(), new GrayFilter(true, 0))));
}
-
+
/**
* Filter RGB to gray
*/
diff --git a/libjava/classpath/javax/swing/Icon.java b/libjava/classpath/javax/swing/Icon.java
index c73ad2d..ed7f94f 100644
--- a/libjava/classpath/javax/swing/Icon.java
+++ b/libjava/classpath/javax/swing/Icon.java
@@ -1,4 +1,4 @@
-/* Icon.java --
+/* Icon.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,21 +48,21 @@ public interface Icon
{
/**
* Returns the height of the icon.
- *
+ *
* @return The height of the icon.
*/
int getIconHeight();
-
+
/**
* Returns the width of the icon.
- *
+ *
* @return The width of the icon.
*/
int getIconWidth();
-
+
/**
* Draws the icon at the location (x, y) on the specified graphics device.
- *
+ *
* @param c a component related to the icon in some way (can be ignored by
some implementing classes).
* @param g the graphics device.
diff --git a/libjava/classpath/javax/swing/ImageIcon.java b/libjava/classpath/javax/swing/ImageIcon.java
index cedf4be..c78d04c 100644
--- a/libjava/classpath/javax/swing/ImageIcon.java
+++ b/libjava/classpath/javax/swing/ImageIcon.java
@@ -90,7 +90,7 @@ public class ImageIcon
/**
* Returns the accessible state for the ImageIcon
. To
- * match the reference implementation, this method always returns
+ * match the reference implementation, this method always returns
* null
.
*
* @return null
.
@@ -138,7 +138,7 @@ public class ImageIcon
/**
* Returns the accessible child at index i
, which is
- * null
in this case because an {@link ImageIcon} has no
+ * null
in this case because an {@link ImageIcon} has no
* children.
*
* @param i the index of the child to be fetched
@@ -151,12 +151,12 @@ public class ImageIcon
}
/**
- * Returns the locale of this object. To match the reference
+ * Returns the locale of this object. To match the reference
* implementation, this method always returns null
.
*
* @return null
.
*/
- public Locale getLocale()
+ public Locale getLocale()
throws IllegalComponentStateException
{
// refer to Sun's bug report 4269253
@@ -168,7 +168,7 @@ public class ImageIcon
* description
property of the underlying {@link ImageIcon}.
*
* @return The description (possibly null
).
- *
+ *
* @see #setAccessibleIconDescription(String)
*/
public String getAccessibleIconDescription()
@@ -177,11 +177,11 @@ public class ImageIcon
}
/**
- * Sets the accessible icon description. This sets the
+ * Sets the accessible icon description. This sets the
* description
property of the underlying {@link ImageIcon}.
*
* @param newDescr the description (null
permitted).
- *
+ *
* @see #getAccessibleIconDescription()
*/
public void setAccessibleIconDescription(String newDescr)
@@ -190,7 +190,7 @@ public class ImageIcon
}
/**
- * Returns the icon height. This returns the iconHeight
+ * Returns the icon height. This returns the iconHeight
* property of the underlying {@link ImageIcon}.
*
* @return The icon height.
@@ -199,9 +199,9 @@ public class ImageIcon
{
return getIconHeight();
}
-
+
/**
- * Returns the icon width. This returns the iconWidth
property
+ * Returns the icon width. This returns the iconWidth
property
* of the underlying {@link ImageIcon}.
*
* @return The icon width.
@@ -217,7 +217,7 @@ public class ImageIcon
/** A dummy Component that is used in the MediaTracker. */
protected static final Component component = new Component()
{
- // No need to implement this.
+ // No need to implement this.
};
/** The MediaTracker used to monitor the loading of images. */
@@ -243,7 +243,7 @@ public class ImageIcon
{
// Nothing to do here.
}
-
+
/**
* Constructs an ImageIcon given a filename. The icon's description
* is initially set to the filename itself. A filename of "" means
@@ -277,7 +277,7 @@ public class ImageIcon
{
this(imageData, null);
}
-
+
/**
* Creates an ImageIcon from the given byte array and sets the given
* description.
@@ -332,7 +332,7 @@ public class ImageIcon
{
return observer;
}
-
+
/**
* Sets the ImageObserver that will be used for all Image
* operations. Can be set to null (the default) when no observer is
@@ -459,7 +459,7 @@ public class ImageIcon
* Returns the object that provides accessibility features for this
* ImageIcon
instance.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleImageIcon}).
*/
public AccessibleContext getAccessibleContext()
diff --git a/libjava/classpath/javax/swing/InputMap.java b/libjava/classpath/javax/swing/InputMap.java
index 19a75f4..40c43da 100644
--- a/libjava/classpath/javax/swing/InputMap.java
+++ b/libjava/classpath/javax/swing/InputMap.java
@@ -87,7 +87,7 @@ public class InputMap
*
* @param keystroke the key of the entry (null
is ignored).
*
- * @return The binding associated with the specified keystroke (or
+ * @return The binding associated with the specified keystroke (or
* null
).
*/
public Object get(KeyStroke keystroke)
@@ -102,11 +102,11 @@ public class InputMap
}
/**
- * Puts a new entry into the InputMap
. If
- * actionMapKey
is null
any existing entry will be
+ * Puts a new entry into the InputMap
. If
+ * actionMapKey
is null
any existing entry will be
* removed.
*
- * @param keystroke the keystroke for the entry (null
is
+ * @param keystroke the keystroke for the entry (null
is
* ignored).
* @param actionMapKey the action (null
permitted).
*/
@@ -126,7 +126,7 @@ public class InputMap
* Removes an entry from this InputMap
. Note that this will
* not remove any entry from the parent map, if there is one.
*
- * @param keystroke the key of the entry to remove (null
is
+ * @param keystroke the key of the entry to remove (null
is
* ignored).
*/
public void remove(KeyStroke keystroke)
@@ -140,7 +140,7 @@ public class InputMap
* is null
.
*
* @return The parent map (possibly null
).
- *
+ *
* @see #setParent(InputMap)
*/
public InputMap getParent()
@@ -154,7 +154,7 @@ public class InputMap
* find an entry in this map.
*
* @param parentMap the new parent (null
permitted).
- *
+ *
* @see #getParent()
*/
public void setParent(InputMap parentMap)
@@ -163,7 +163,7 @@ public class InputMap
}
/**
- * Returns the number of entries in this InputMap
. This count
+ * Returns the number of entries in this InputMap
. This count
* does not include any entries from the parent map, if there is one.
*
* @return The number of entries.
@@ -188,12 +188,12 @@ public class InputMap
/**
* Returns all keys of entries in this InputMap
. This does not
- * include keys defined in the parent, if there is one (use the
+ * include keys defined in the parent, if there is one (use the
* {@link #allKeys()} method for that case).
* null
when no entries have been added to the map,
- * and a zero length array if entries have been added but subsequently
+ * return null
when no entries have been added to the map,
+ * and a zero length array if entries have been added but subsequently
* removed (or cleared) from the map.
*
* @return An array of keys (may be null
or have zero length).
@@ -209,7 +209,7 @@ public class InputMap
}
/**
- * Returns all keys of entries in this InputMap
and all its
+ * Returns all keys of entries in this InputMap
and all its
* parents.
*
* @return An array of keys (may be null
or have zero length).
@@ -227,7 +227,7 @@ public class InputMap
if (inputMap != null)
set.addAll(inputMap.keySet());
if (set.size() == 0)
- return null;
+ return null;
KeyStroke[] array = new KeyStroke[set.size()];
return (KeyStroke[]) set.toArray(array);
}
diff --git a/libjava/classpath/javax/swing/InternalFrameFocusTraversalPolicy.java b/libjava/classpath/javax/swing/InternalFrameFocusTraversalPolicy.java
index 4780a67..9187f29 100644
--- a/libjava/classpath/javax/swing/InternalFrameFocusTraversalPolicy.java
+++ b/libjava/classpath/javax/swing/InternalFrameFocusTraversalPolicy.java
@@ -47,7 +47,7 @@ import java.awt.FocusTraversalPolicy;
* when it is selected.
*
* @author Michael Koch
- *
+ *
* @since 1.4
*/
public abstract class InternalFrameFocusTraversalPolicy
diff --git a/libjava/classpath/javax/swing/JApplet.java b/libjava/classpath/javax/swing/JApplet.java
index 68eb983..d725131 100644
--- a/libjava/classpath/javax/swing/JApplet.java
+++ b/libjava/classpath/javax/swing/JApplet.java
@@ -79,7 +79,7 @@ public class JApplet extends Applet
protected AccessibleContext accessibleContext;
private static final long serialVersionUID = 7269359214497372587L;
-
+
protected JRootPane rootPane;
/**
@@ -196,7 +196,7 @@ public class JApplet extends Applet
{
super.processKeyEvent(e);
}
-
+
public void remove(Component comp)
{
// If we're removing the root pane, use super.remove. Otherwise
diff --git a/libjava/classpath/javax/swing/JButton.java b/libjava/classpath/javax/swing/JButton.java
index 705a863..40c1041 100644
--- a/libjava/classpath/javax/swing/JButton.java
+++ b/libjava/classpath/javax/swing/JButton.java
@@ -91,9 +91,9 @@ public class JButton extends AbstractButton
/**
* Creates a new button from the specified action.
- *
+ *
* @param a the action (null
permitted).
- *
+ *
* @see AbstractButton#setAction(Action)
*/
public JButton(Action a)
@@ -105,7 +105,7 @@ public class JButton extends AbstractButton
/**
* Creates a new button with the specified icon (and an empty string for
* the button text).
- *
+ *
* @param icon the icon (null
permitted).
*/
public JButton(Icon icon)
@@ -115,7 +115,7 @@ public class JButton extends AbstractButton
/**
* Creates a new button with the specified text and no icon.
- *
+ *
* @param text the button text (null
permitted, will be
* substituted by an empty string).
*/
@@ -126,7 +126,7 @@ public class JButton extends AbstractButton
/**
* Creates a new button with the specified text and icon.
- *
+ *
* @param text the button text (null
permitted, will be
* substituted by an empty string).
* @param icon the icon (null
permitted).
@@ -140,7 +140,7 @@ public class JButton extends AbstractButton
}
protected void configurePropertiesFromAction(Action a)
- {
+ {
super.configurePropertiesFromAction(a);
}
@@ -158,8 +158,8 @@ public class JButton extends AbstractButton
}
/**
- * Returns the suffix ("ButtonUI"
in this case) used to
- * determine the class name for a UI delegate that can provide the look and
+ * Returns the suffix ("ButtonUI"
in this case) used to
+ * determine the class name for a UI delegate that can provide the look and
* feel for a JButton
.
*
* @return "ButtonUI"
.
@@ -167,7 +167,7 @@ public class JButton extends AbstractButton
public String getUIClassID()
{
// Returns a string that specifies the name of the L&F class that renders
- // this component.
+ // this component.
return "ButtonUI";
}
@@ -211,7 +211,7 @@ public class JButton extends AbstractButton
public boolean isDefaultCapable()
{
// Returns whether or not this button is capable of being the default
- // button on the RootPane.
+ // button on the RootPane.
return defaultCapable;
}
diff --git a/libjava/classpath/javax/swing/JCheckBox.java b/libjava/classpath/javax/swing/JCheckBox.java
index 26f9f6c..0bf871a 100644
--- a/libjava/classpath/javax/swing/JCheckBox.java
+++ b/libjava/classpath/javax/swing/JCheckBox.java
@@ -1,4 +1,4 @@
-/* JCheckBox.java --
+/* JCheckBox.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -74,7 +74,7 @@ public class JCheckBox extends JToggleButton implements Accessible
/**
* Returns the accessble role of JCheckBox
,
- * {@link AccessibleRole#CHECK_BOX}.
+ * {@link AccessibleRole#CHECK_BOX}.
*/
public AccessibleRole getAccessibleRole()
{
@@ -86,7 +86,7 @@ public class JCheckBox extends JToggleButton implements Accessible
public static final String BORDER_PAINTED_FLAT_CHANGED_PROPERTY =
"borderPaintedFlat";
-
+
private boolean borderPaintedFlat;
private void init()
@@ -94,7 +94,7 @@ public class JCheckBox extends JToggleButton implements Accessible
borderPainted = false;
contentAreaFilled = false;
}
-
+
public JCheckBox()
{
this(null, null, false);
@@ -106,25 +106,25 @@ public class JCheckBox extends JToggleButton implements Accessible
}
public JCheckBox(Icon icon)
- {
+ {
this(null, icon, false);
- }
-
+ }
+
public JCheckBox(Icon icon, boolean selected)
- {
+ {
this(null, icon, selected);
- }
-
+ }
+
public JCheckBox(String text)
{
this(text, null, false);
}
-
+
public JCheckBox(String text, boolean selected)
{
this(text, null, selected);
}
-
+
public JCheckBox(String text, Icon icon)
{
this(text, icon, false);
@@ -145,7 +145,7 @@ public class JCheckBox extends JToggleButton implements Accessible
{
return "CheckBoxUI";
}
-
+
protected String paramString()
{
return super.paramString() + ",borderPaintedFlat=" + borderPaintedFlat;
diff --git a/libjava/classpath/javax/swing/JCheckBoxMenuItem.java b/libjava/classpath/javax/swing/JCheckBoxMenuItem.java
index 51634c9..b3045be 100644
--- a/libjava/classpath/javax/swing/JCheckBoxMenuItem.java
+++ b/libjava/classpath/javax/swing/JCheckBoxMenuItem.java
@@ -49,7 +49,7 @@ import javax.accessibility.AccessibleRole;
* {@link AbstractButton#setSelected} and {@link #setState} can be use used for
* the same purpose. JCheckBoxMenuItem
uses
* ToggleButtonModel
to keep track of its selection.
- *
+ *
* @author original author unknown
*/
public class JCheckBoxMenuItem
@@ -80,7 +80,7 @@ public class JCheckBoxMenuItem
/**
* Creates a new JCheckBoxMenuItem with given icon
- *
+ *
* @param icon Icon for this menu item
*/
public JCheckBoxMenuItem(Icon icon)
@@ -90,7 +90,7 @@ public class JCheckBoxMenuItem
/**
* Creates a new JCheckBoxMenuItem with given label
- *
+ *
* @param text Label for this menu item
*/
public JCheckBoxMenuItem(String text)
@@ -100,7 +100,7 @@ public class JCheckBoxMenuItem
/**
* Creates a new JCheckBoxMenuItem using given action
- *
+ *
* @param action Action for this menu item.
*/
public JCheckBoxMenuItem(Action action)
@@ -111,7 +111,7 @@ public class JCheckBoxMenuItem
/**
* Creates a new JCheckBoxMenuItem object with given label and icon
- *
+ *
* @param text Label for this menu item
* @param icon Icon for this menu item
*/
@@ -123,7 +123,7 @@ public class JCheckBoxMenuItem
/**
* Creates a new JCheckBoxMenuItem object using specified label and marked as
* checked if given 'state' is true.
- *
+ *
* @param text Label for this menu item
* @param state true
if this item should be in checked state
* and false
otherwise
@@ -136,7 +136,7 @@ public class JCheckBoxMenuItem
/**
* Creates a new JCheckBoxMenuItem object with given label, icon, and marked
* as checked if given 'state' is true.
- *
+ *
* @param text Label for this menu item
* @param icon icon for this menu item
* @param state true
if this item should be in checked state
@@ -155,7 +155,7 @@ public class JCheckBoxMenuItem
/**
* This method returns a name to identify which look and feel class will be
* the UI delegate for the menuItem.
- *
+ *
* @return The Look and Feel classID. "JCheckBoxMenuItemUI"
*/
public String getUIClassID()
@@ -165,7 +165,7 @@ public class JCheckBoxMenuItem
/**
* Returns checked state for this check box menu item.
- *
+ *
* @return Returns true if this menu item is in checked state and false
* otherwise.
*/
@@ -177,7 +177,7 @@ public class JCheckBoxMenuItem
/**
* Sets state for this check box menu item. If given 'state' is true, then
* mark menu item as checked, and uncheck this menu item otherwise.
- *
+ *
* @param state new state for this menu item
*/
public synchronized void setState(boolean state)
@@ -188,7 +188,7 @@ public class JCheckBoxMenuItem
/**
* This method returns array containing label of this menu item if it is
* selected and null otherwise.
- *
+ *
* @return Array containing label of this menu item if this menu item is
* selected or null otherwise.
*/
@@ -216,7 +216,7 @@ public class JCheckBoxMenuItem
* JCheckBoxMenuItem
component, for use in debugging. The
* return value is guaranteed to be non-null
, but the format
* of the string may vary between implementations.
- *
+ *
* @return A string describing the attributes of the
* JCheckBoxMenuItem
.
*/
@@ -230,7 +230,7 @@ public class JCheckBoxMenuItem
/**
* Returns the object that provides accessibility features for this
* JCheckBoxMenuItem
component.
- *
+ *
* @return The accessible context (an instance of
* {@link AccessibleJCheckBoxMenuItem}).
*/
@@ -245,7 +245,7 @@ public class JCheckBoxMenuItem
/**
* Provides the accessibility features for the JCheckBoxMenuItem
* component.
- *
+ *
* @see JCheckBoxMenuItem#getAccessibleContext()
*/
protected class AccessibleJCheckBoxMenuItem
@@ -264,7 +264,7 @@ public class JCheckBoxMenuItem
/**
* Returns the accessible role for the JCheckBoxMenuItem
* component.
- *
+ *
* @return {@link AccessibleRole#CHECK_BOX}.
*/
public AccessibleRole getAccessibleRole()
diff --git a/libjava/classpath/javax/swing/JComboBox.java b/libjava/classpath/javax/swing/JComboBox.java
index 74ff315..0d2be0c 100644
--- a/libjava/classpath/javax/swing/JComboBox.java
+++ b/libjava/classpath/javax/swing/JComboBox.java
@@ -188,8 +188,8 @@ public class JComboBox extends JComponent implements ItemSelectable,
public JComboBox(Object[] itemArray)
{
this(new DefaultComboBoxModel(itemArray));
-
- if (itemArray.length > 0)
+
+ if (itemArray.length > 0)
setSelectedIndex(0);
}
@@ -298,7 +298,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
// Removes itself (as DataListener) from the to-be-replaced model.
dataModel.removeListDataListener(this);
}
-
+
/* Adds itself as a DataListener to the new model.
* It is intentioned that this operation will fail with a NullPointerException if the
* caller delivered a null argument.
@@ -309,7 +309,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
ComboBoxModel oldDataModel = dataModel;
dataModel = newDataModel;
selectedItemReminder = newDataModel.getSelectedItem();
-
+
// Notifies the listeners of the model change.
firePropertyChange("model", oldDataModel, dataModel);
}
@@ -500,7 +500,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void setSelectedIndex(int index)
{
- if (index < -1 || index >= dataModel.getSize())
+ if (index < -1 || index >= dataModel.getSize())
// Fails because index is out of bounds.
throw new IllegalArgumentException("illegal index: " + index);
else
@@ -518,7 +518,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
* DefaultComboBoxModel
the complexity is O(n) where n is the
* number of elements in the combo box.
*
- *
+ *
* @return int Index specifying location of the currently selected item in the
* combo box or -1 if nothing is selected in the combo box.
*/
@@ -552,12 +552,12 @@ public class JComboBox extends JComponent implements ItemSelectable,
}
/**
- * Returns an object that is used as the display value when calculating the
- * preferred size for the combo box. This value is, of course, never
+ * Returns an object that is used as the display value when calculating the
+ * preferred size for the combo box. This value is, of course, never
* displayed anywhere.
- *
+ *
* @return The prototype display value (possibly null
).
- *
+ *
* @since 1.4
* @see #setPrototypeDisplayValue(Object)
*/
@@ -569,11 +569,11 @@ public class JComboBox extends JComponent implements ItemSelectable,
/**
* Sets the object that is assumed to be the displayed item when calculating
* the preferred size for the combo box. A {@link PropertyChangeEvent} (with
- * the name prototypeDisplayValue
) is sent to all registered
- * listeners.
- *
+ * the name prototypeDisplayValue
) is sent to all registered
+ * listeners.
+ *
* @param value the new value (null
permitted).
- *
+ *
* @since 1.4
* @see #getPrototypeDisplayValue()
*/
@@ -593,7 +593,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void addItem(Object element)
{
- if (dataModel instanceof MutableComboBoxModel)
+ if (dataModel instanceof MutableComboBoxModel)
((MutableComboBoxModel) dataModel).addElement(element);
else
throw new RuntimeException("Unable to add the item because the data "
@@ -611,7 +611,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void insertItemAt(Object element, int index)
{
- if (dataModel instanceof MutableComboBoxModel)
+ if (dataModel instanceof MutableComboBoxModel)
((MutableComboBoxModel) dataModel).insertElementAt(element, index);
else
throw new RuntimeException("Unable to insert the item because the data "
@@ -628,7 +628,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
*/
public void removeItem(Object element)
{
- if (dataModel instanceof MutableComboBoxModel)
+ if (dataModel instanceof MutableComboBoxModel)
((MutableComboBoxModel) dataModel).removeElement(element);
else
throw new RuntimeException("Unable to remove the item because the data "
@@ -753,7 +753,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
action = a;
configurePropertiesFromAction(action);
if (action != null)
- // FIXME: remove from old action and add to new action
+ // FIXME: remove from old action and add to new action
// PropertyChangeListener to listen to changes in the action
addActionListener(action);
}
@@ -856,7 +856,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
}
/**
- * Fires a popupMenuWillBecomeInvisible() event to all
+ * Fires a popupMenuWillBecomeInvisible() event to all
* PopupMenuListeners
.
*
* Note: This method is intended for use by plaf classes only.
@@ -870,7 +870,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
}
/**
- * Fires a popupMenuWillBecomeVisible() event to all
+ * Fires a popupMenuWillBecomeVisible() event to all
* PopupMenuListeners
.
*
* Note: This method is intended for use by plaf classes only.
@@ -892,19 +892,19 @@ public class JComboBox extends JComponent implements ItemSelectable,
protected void selectedItemChanged()
{
// Fire ItemEvent to indicated that previously selected item is now
- // deselected
+ // deselected
if (selectedItemReminder != null)
fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED,
selectedItemReminder,
ItemEvent.DESELECTED));
- // Fire ItemEvent to indicate that new item is selected
+ // Fire ItemEvent to indicate that new item is selected
Object newSelection = getSelectedItem();
if (newSelection != null)
fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED,
newSelection, ItemEvent.SELECTED));
- // Fire Action Event to JComboBox's registered listeners
+ // Fire Action Event to JComboBox's registered listeners
fireActionEvent();
selectedItemReminder = newSelection;
@@ -997,7 +997,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
{
// if first and last index of the given ListDataEvent are both -1,
// then it indicates that selected item in the combo box data model
- // have changed.
+ // have changed.
if (event.getIndex0() == -1 && event.getIndex1() == -1)
selectedItemChanged();
}
@@ -1110,7 +1110,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
sb.append(",isEditable=").append(isEditable());
sb.append(",lightWeightPopupEnabled=").append(isLightWeightPopupEnabled());
sb.append(",maximumRowCount=").append(getMaximumRowCount());
-
+
sb.append(",selectedItemReminder=");
if (selectedItemReminder != null)
sb.append(selectedItemReminder);
@@ -1121,7 +1121,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
* Returns the object that provides accessibility features for this
* JComboBox
component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJComboBox}).
*/
public AccessibleContext getAccessibleContext()
@@ -1466,7 +1466,7 @@ public class JComboBox extends JComponent implements ItemSelectable,
// Nothing to do here.
}
}
-
+
private class DefaultKeySelectionManager
implements KeySelectionManager
{
diff --git a/libjava/classpath/javax/swing/JComponent.java b/libjava/classpath/javax/swing/JComponent.java
index f712178..365f62a 100644
--- a/libjava/classpath/javax/swing/JComponent.java
+++ b/libjava/classpath/javax/swing/JComponent.java
@@ -105,7 +105,7 @@ public abstract class JComponent extends Container implements Serializable
{
private static final long serialVersionUID = -7908749299918704233L;
- /**
+ /**
* The accessible context of this JComponent
.
*/
protected AccessibleContext accessibleContext;
@@ -114,7 +114,7 @@ public abstract class JComponent extends Container implements Serializable
* Basic accessibility support for JComponent
derived
* widgets.
*/
- public abstract class AccessibleJComponent
+ public abstract class AccessibleJComponent
extends AccessibleAWTContainer
implements AccessibleExtendedComponent
{
@@ -123,7 +123,7 @@ public abstract class JComponent extends Container implements Serializable
* fires appropriate PropertyChangeEvents to listeners registered with
* the AccessibleJComponent.
*/
- protected class AccessibleFocusHandler
+ protected class AccessibleFocusHandler
implements FocusListener
{
/**
@@ -168,7 +168,7 @@ public abstract class JComponent extends Container implements Serializable
* from the JComponent and fires appropriate PropertyChangeEvents to
* interested listeners on the AccessibleJComponent.
*/
- protected class AccessibleContainerHandler
+ protected class AccessibleContainerHandler
implements ContainerListener
{
/**
@@ -464,7 +464,7 @@ public abstract class JComponent extends Container implements Serializable
else if (border instanceof TitledBorder)
{
TitledBorder titled = (TitledBorder) border;
- title = titled.getTitle();
+ title = titled.getTitle();
}
return title;
}
@@ -489,7 +489,7 @@ public abstract class JComponent extends Container implements Serializable
*/
public String getTitledBorderText()
{
- return getBorderTitle(getBorder());
+ return getBorderTitle(getBorder());
}
/**
@@ -536,29 +536,29 @@ public abstract class JComponent extends Container implements Serializable
*/
float alignmentY = -1.0F;
- /**
+ /**
* The border painted around this component.
- *
+ *
* @see #paintBorder
*/
Border border;
/**
* The popup menu for the component.
- *
+ *
* @see #getComponentPopupMenu()
* @see #setComponentPopupMenu(JPopupMenu)
*/
JPopupMenu componentPopupMenu;
-
+
/**
* A flag that controls whether the {@link #getComponentPopupMenu()} method
* looks to the component's parent when the componentPopupMenu
* field is null
.
*/
boolean inheritsPopupMenu;
-
- /**
+
+ /**
* Whether to double buffer this component when painting. This flag
* should generally be true
, to ensure good painting
* performance.
This property controls two independent behaviors simultaneously.
* *First, it controls whether to fill the background of this widget
@@ -616,9 +616,9 @@ public abstract class JComponent extends Container implements Serializable
*/
boolean opaque = false;
- /**
+ /**
* The user interface delegate for this component. Event delivery and
- * repainting of the component are usually delegated to this object.
+ * repainting of the component are usually delegated to this object.
*
* @see #setUI
* @see #getUIClassID
@@ -630,7 +630,7 @@ public abstract class JComponent extends Container implements Serializable
* A hint to the focus system that this component should or should not
* get focus. If this is
- * If there is a To change the layer of a component that is already a child of
- * a The purpose of this class is to translate this view of "layers" into a
@@ -94,9 +94,9 @@ import javax.accessibility.AccessibleRole;
*
* There is a precise set of words we will use to refer to numbers within
* this class:false
, swing will not try to
* request focus on this component; if true
, swing might
- * try to request focus, but the request might fail. Thus it is only
+ * try to request focus, but the request might fail. Thus it is only
* a hint guiding swing's behavior.
*
* @see #requestFocus()
@@ -653,7 +653,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Indicates whether the current paint call is already double buffered or
- * not.
+ * not.
*/
static boolean paintingDoubleBuffered = false;
@@ -675,14 +675,14 @@ public abstract class JComponent extends Container implements Serializable
*/
private VetoableChangeSupport vetoableChangeSupport;
- /**
+ /**
* Storage for "client properties", which are key/value pairs associated
* with this component by a "client", such as a user application or a
* layout manager. This is lazily constructed when the component gets its
* first client property.
*/
private Hashtable clientProperties;
-
+
private InputMap inputMap_whenFocused;
private InputMap inputMap_whenAncestorOfFocused;
private ComponentInputMap inputMap_whenInFocusedWindow;
@@ -717,12 +717,12 @@ public abstract class JComponent extends Container implements Serializable
/**
* The default locale of the component.
- *
+ *
* @see #getDefaultLocale
* @see #setDefaultLocale
*/
private static Locale defaultLocale;
-
+
public static final String TOOL_TIP_TEXT_KEY = "ToolTipText";
/**
@@ -734,7 +734,7 @@ public abstract class JComponent extends Container implements Serializable
public static final int UNDEFINED_CONDITION = -1;
/**
- * Constant used to indicate that an action should be performed only when
+ * Constant used to indicate that an action should be performed only when
* the component has focus.
*
* @see #registerKeyboardAction(ActionListener, KeyStroke, int)
@@ -742,7 +742,7 @@ public abstract class JComponent extends Container implements Serializable
public static final int WHEN_FOCUSED = 0;
/**
- * Constant used to indicate that an action should be performed only when
+ * Constant used to indicate that an action should be performed only when
* the component is an ancestor of the component which has focus.
*
* @see #registerKeyboardAction(ActionListener, KeyStroke, int)
@@ -750,7 +750,7 @@ public abstract class JComponent extends Container implements Serializable
public static final int WHEN_ANCESTOR_OF_FOCUSED_COMPONENT = 1;
/**
- * Constant used to indicate that an action should be performed only when
+ * Constant used to indicate that an action should be performed only when
* the component is in the window which has focus.
*
* @see #registerKeyboardAction(ActionListener, KeyStroke, int)
@@ -796,7 +796,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Helper to lazily construct and return the client properties table.
- *
+ *
* @return The current client properties table
*
* @see #clientProperties
@@ -861,7 +861,7 @@ public abstract class JComponent extends Container implements Serializable
* Unregister an AncestorListener
.
*
* @param listener The listener to unregister
- *
+ *
* @see #addAncestorListener
*/
public void removeAncestorListener(AncestorListener listener)
@@ -911,22 +911,22 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Returns all registered {@link EventListener}s of the given
+ * Returns all registered {@link EventListener}s of the given
* listenerType
.
*
- * @param listenerType the class of listeners to filter (null
+ * @param listenerType the class of listeners to filter (null
* not permitted).
- *
+ *
* @return An array of registered listeners.
- *
+ *
* @throws ClassCastException if listenerType
does not implement
* the {@link EventListener} interface.
- * @throws NullPointerException if listenerType
is
+ * @throws NullPointerException if listenerType
is
* null
.
- *
+ *
* @see #getAncestorListeners()
* @see #listenerList
- *
+ *
* @since 1.3
*/
public VetoableChangeListener
objects.
*
- * @return An array of the VetoableChangeListener
objects
- * registered with this component (possibly empty but never
+ * @return An array of the VetoableChangeListener
objects
+ * registered with this component (possibly empty but never
* null
).
- *
+ *
* @since 1.4
*/
public VetoableChangeListener[] getVetoableChangeListeners()
- {
+ {
return vetoableChangeSupport == null ? new VetoableChangeListener[0]
: vetoableChangeSupport.getVetoableChangeListeners();
}
@@ -1004,7 +1004,7 @@ public abstract class JComponent extends Container implements Serializable
{
super.firePropertyChange(property, oldValue, newValue);
}
-
+
/**
* Fires a property change for a primitive boolean property.
*
@@ -1081,7 +1081,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Set the value of the {@link #border} property.
- *
+ *
* @param newBorder The new value of the property
*
* @see #getBorder
@@ -1257,7 +1257,7 @@ public abstract class JComponent extends Container implements Serializable
*/
public Dimension getMaximumSize()
{
- Dimension size = null;
+ Dimension size = null;
if (isMaximumSizeSet())
size = super.getMaximumSize();
else
@@ -1287,7 +1287,7 @@ public abstract class JComponent extends Container implements Serializable
*/
public Dimension getMinimumSize()
{
- Dimension size = null;
+ Dimension size = null;
if (isMinimumSizeSet())
size = super.getMinimumSize();
else
@@ -1317,7 +1317,7 @@ public abstract class JComponent extends Container implements Serializable
*/
public Dimension getPreferredSize()
{
- Dimension size = null;
+ Dimension size = null;
if (isPreferredSizeSet())
size = super.getPreferredSize();
else
@@ -1335,7 +1335,7 @@ public abstract class JComponent extends Container implements Serializable
*
* @return The current value of the property, or null
* if none has been set.
- *
+ *
* @deprecated See {@link java.awt.FocusTraversalPolicy}
*/
public Component getNextFocusableComponent()
@@ -1362,11 +1362,11 @@ public abstract class JComponent extends Container implements Serializable
KeyStroke[] ks2;
if (inputMap_whenFocused != null)
ks0 = inputMap_whenFocused.keys();
- else
+ else
ks0 = new KeyStroke[0];
if (inputMap_whenAncestorOfFocused != null)
ks1 = inputMap_whenAncestorOfFocused.keys();
- else
+ else
ks1 = new KeyStroke[0];
if (inputMap_whenInFocusedWindow != null)
ks2 = inputMap_whenInFocusedWindow.keys();
@@ -1428,7 +1428,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Return the location at which the toolTipText
property should
- * be displayed, when triggered by a particular mouse event.
+ * be displayed, when triggered by a particular mouse event.
*
* @param event The event the tooltip is being presented in response to
*
@@ -1496,31 +1496,31 @@ public abstract class JComponent extends Container implements Serializable
{
return getToolTipText();
}
-
+
/**
* Returns the flag that controls whether or not the component inherits its
* parent's popup menu when no popup menu is specified for this component.
- *
+ *
* @return A boolean.
- *
+ *
* @since 1.5
- *
+ *
* @see #setInheritsPopupMenu(boolean)
*/
public boolean getInheritsPopupMenu()
{
- return inheritsPopupMenu;
+ return inheritsPopupMenu;
}
-
+
/**
* Sets the flag that controls whether or not the component inherits its
* parent's popup menu when no popup menu is specified for this component.
* This is a bound property with the property name 'inheritsPopupMenu'.
- *
+ *
* @param inherit the new flag value.
- *
+ *
* @since 1.5
- *
+ *
* @see #getInheritsPopupMenu()
*/
public void setInheritsPopupMenu(boolean inherit)
@@ -1531,17 +1531,17 @@ public abstract class JComponent extends Container implements Serializable
this.firePropertyChange("inheritsPopupMenu", ! inherit, inherit);
}
}
-
+
/**
- * Returns the popup menu for this component. If the popup menu is
+ * Returns the popup menu for this component. If the popup menu is
* null
AND the {@link #getInheritsPopupMenu()} method returns
* true
, this method will return the parent's popup menu (if it
* has one).
- *
+ *
* @return The popup menu (possibly null
.
- *
+ *
* @since 1.5
- *
+ *
* @see #setComponentPopupMenu(JPopupMenu)
* @see #getInheritsPopupMenu()
*/
@@ -1549,7 +1549,7 @@ public abstract class JComponent extends Container implements Serializable
{
if (componentPopupMenu == null && getInheritsPopupMenu())
{
- Container parent = getParent();
+ Container parent = getParent();
if (parent instanceof JComponent)
return ((JComponent) parent).getComponentPopupMenu();
else
@@ -1560,13 +1560,13 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Sets the popup menu for this component (this is a bound property with
+ * Sets the popup menu for this component (this is a bound property with
* the property name 'componentPopupMenu').
- *
+ *
* @param popup the popup menu (null
permitted).
*
* @since 1.5
- *
+ *
* @see #getComponentPopupMenu()
*/
public void setComponentPopupMenu(JPopupMenu popup)
@@ -1578,7 +1578,7 @@ public abstract class JComponent extends Container implements Serializable
firePropertyChange("componentPopupMenu", old, popup);
}
}
-
+
/**
* Return the top level ancestral container (usually a {@link
* java.awt.Window} or {@link java.applet.Applet}) which this component is
@@ -1689,7 +1689,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Return the current value of the {@link #opaque} property.
+ * Return the current value of the {@link #opaque} property.
*
* @return The current property value
*/
@@ -2149,7 +2149,7 @@ public abstract class JComponent extends Container implements Serializable
// The component that is finally triggered for painting.
JComponent paintRoot = this;
-
+
// Stores the component and all its parents. This will be used to limit
// the actually painted components in paintChildren by setting
// the field paintChild.
@@ -2200,7 +2200,7 @@ public abstract class JComponent extends Container implements Serializable
else if (jc.isPartiallyObscured(i, paintX, paintY, paintW,
paintH))
updatePaintRoot = true;
-
+
}
}
if (updatePaintRoot)
@@ -2430,27 +2430,27 @@ public abstract class JComponent extends Container implements Serializable
* A variant of {@link
* #registerKeyboardAction(ActionListener,String,KeyStroke,int)} which
* provides null
for the command name.
- *
+ *
* @param act the action listener to notify when the keystroke occurs.
* @param stroke the key stroke.
- * @param cond the condition (one of {@link #WHEN_FOCUSED},
- * {@link #WHEN_IN_FOCUSED_WINDOW} and
+ * @param cond the condition (one of {@link #WHEN_FOCUSED},
+ * {@link #WHEN_IN_FOCUSED_WINDOW} and
* {@link #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT}).
*/
public void registerKeyboardAction(ActionListener act,
- KeyStroke stroke,
+ KeyStroke stroke,
int cond)
{
registerKeyboardAction(act, null, stroke, cond);
}
- /*
+ /*
* There is some charmingly undocumented behavior sun seems to be using
* to simulate the old register/unregister keyboard binding API. It's not
* clear to me why this matters, but we shall endeavour to follow suit.
*
* Two main thing seem to be happening when you do registerKeyboardAction():
- *
+ *
* - no actionMap() entry gets created, just an entry in inputMap()
*
* - the inputMap() entry is a proxy class which invokes the the
@@ -2470,7 +2470,7 @@ public abstract class JComponent extends Container implements Serializable
ActionListener target;
String bindingCommandName;
- public ActionListenerProxy(ActionListener li,
+ public ActionListenerProxy(ActionListener li,
String cmd)
{
target = li;
@@ -2487,7 +2487,7 @@ public abstract class JComponent extends Container implements Serializable
}
}
-
+
/**
* An obsolete method to register a keyboard action on this component.
* You should use getInputMap
and getActionMap
@@ -2507,9 +2507,9 @@ public abstract class JComponent extends Container implements Serializable
* @see #getConditionForKeyStroke
* @see #resetKeyboardActions
*/
- public void registerKeyboardAction(ActionListener act,
+ public void registerKeyboardAction(ActionListener act,
String cmd,
- KeyStroke stroke,
+ KeyStroke stroke,
int cond)
{
ActionListenerProxy proxy = new ActionListenerProxy(act, cmd);
@@ -2519,12 +2519,12 @@ public abstract class JComponent extends Container implements Serializable
/**
* Sets the input map for the given condition.
- *
- * @param condition the condition (one of {@link #WHEN_FOCUSED},
- * {@link #WHEN_IN_FOCUSED_WINDOW} and
+ *
+ * @param condition the condition (one of {@link #WHEN_FOCUSED},
+ * {@link #WHEN_IN_FOCUSED_WINDOW} and
* {@link #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT}).
* @param map the map.
- *
+ *
* @throws IllegalArgumentException if condition
is not one of
* the specified values.
*/
@@ -2543,12 +2543,12 @@ public abstract class JComponent extends Container implements Serializable
case WHEN_IN_FOCUSED_WINDOW:
if (map != null && !(map instanceof ComponentInputMap))
- throw new
- IllegalArgumentException("WHEN_IN_FOCUSED_WINDOW " +
+ throw new
+ IllegalArgumentException("WHEN_IN_FOCUSED_WINDOW " +
"InputMap must be a ComponentInputMap");
inputMap_whenInFocusedWindow = (ComponentInputMap)map;
break;
-
+
case UNDEFINED_CONDITION:
default:
throw new IllegalArgumentException();
@@ -2558,13 +2558,13 @@ public abstract class JComponent extends Container implements Serializable
/**
* Returns the input map associated with this component for the given
* state/condition.
- *
- * @param condition the state (one of {@link #WHEN_FOCUSED},
- * {@link #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT} and
+ *
+ * @param condition the state (one of {@link #WHEN_FOCUSED},
+ * {@link #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT} and
* {@link #WHEN_IN_FOCUSED_WINDOW}).
- *
+ *
* @return The input map.
- * @throws IllegalArgumentException if condition
is not one of
+ * @throws IllegalArgumentException if condition
is not one of
* the specified values.
* @since 1.3
*/
@@ -2590,17 +2590,17 @@ public abstract class JComponent extends Container implements Serializable
case UNDEFINED_CONDITION:
default:
- throw new IllegalArgumentException("Invalid 'condition' argument: "
+ throw new IllegalArgumentException("Invalid 'condition' argument: "
+ condition);
}
}
/**
- * Returns the input map associated with this component for the
+ * Returns the input map associated with this component for the
* {@link #WHEN_FOCUSED} state.
- *
+ *
* @return The input map.
- *
+ *
* @since 1.3
* @see #getInputMap(int)
*/
@@ -2634,19 +2634,19 @@ public abstract class JComponent extends Container implements Serializable
* #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT}, {@link #WHEN_FOCUSED}, or {@link
* #WHEN_IN_FOCUSED_WINDOW}
*
- * @see #registerKeyboardAction(ActionListener, KeyStroke, int)
- * @see #unregisterKeyboardAction
+ * @see #registerKeyboardAction(ActionListener, KeyStroke, int)
+ * @see #unregisterKeyboardAction
* @see #resetKeyboardActions
*/
public int getConditionForKeyStroke(KeyStroke ks)
{
- if (inputMap_whenFocused != null
+ if (inputMap_whenFocused != null
&& inputMap_whenFocused.get(ks) != null)
return WHEN_FOCUSED;
- else if (inputMap_whenAncestorOfFocused != null
+ else if (inputMap_whenAncestorOfFocused != null
&& inputMap_whenAncestorOfFocused.get(ks) != null)
return WHEN_ANCESTOR_OF_FOCUSED_COMPONENT;
- else if (inputMap_whenInFocusedWindow != null
+ else if (inputMap_whenInFocusedWindow != null
&& inputMap_whenInFocusedWindow.get(ks) != null)
return WHEN_IN_FOCUSED_WINDOW;
else
@@ -2655,7 +2655,7 @@ public abstract class JComponent extends Container implements Serializable
/**
* Get the ActionListener (typically an {@link Action} object) which is
- * associated with a particular keystroke.
+ * associated with a particular keystroke.
*
* @param ks The keystroke to retrieve the action of
*
@@ -2711,10 +2711,10 @@ public abstract class JComponent extends Container implements Serializable
// Note: Input maps for disabled components are skipped.
// 4. The WHEN_IN_FOCUSED_WINDOW maps of all the enabled components in
// the focused window are searched.
-
+
KeyStroke keyStroke = KeyStroke.getKeyStrokeForEvent(e);
boolean pressed = e.getID() == KeyEvent.KEY_PRESSED;
-
+
if (processKeyBinding(keyStroke, e, WHEN_FOCUSED, pressed))
{
// This is step 1 from above comment.
@@ -2728,37 +2728,37 @@ public abstract class JComponent extends Container implements Serializable
e.consume();
return;
}
-
+
// This is step 3 from above comment.
- Container current = getParent();
+ Container current = getParent();
while (current != null)
- {
+ {
// If current is a JComponent, see if it handles the event in its
// WHEN_ANCESTOR_OF_FOCUSED_COMPONENT maps.
- if ((current instanceof JComponent) &&
- ((JComponent)current).processKeyBinding
+ if ((current instanceof JComponent) &&
+ ((JComponent)current).processKeyBinding
(keyStroke, e,WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, pressed))
{
e.consume();
return;
- }
-
+ }
+
// Stop when we've tried a top-level container and it didn't handle it
if (current instanceof Window || current instanceof Applet)
- break;
-
+ break;
+
// Move up the hierarchy
current = current.getParent();
}
-
+
// Current being null means the JComponent does not currently have a
- // top-level ancestor, in which case we don't need to check
+ // top-level ancestor, in which case we don't need to check
// WHEN_IN_FOCUSED_WINDOW bindings.
if (current == null || e.isConsumed())
return;
-
+
// This is step 4 from above comment. KeyboardManager maintains mappings
- // related to WHEN_IN_FOCUSED_WINDOW bindings so that we don't have to
+ // related to WHEN_IN_FOCUSED_WINDOW bindings so that we don't have to
// traverse the containment hierarchy each time.
if (KeyboardManager.getManager().processKeyStroke(current, keyStroke, e))
e.consume();
@@ -2781,7 +2781,7 @@ public abstract class JComponent extends Container implements Serializable
{
if (cmd instanceof ActionListenerProxy)
act = (Action) cmd;
- else
+ else
act = getActionMap().get(cmd);
}
}
@@ -2806,7 +2806,7 @@ public abstract class JComponent extends Container implements Serializable
}
return false;
}
-
+
/**
* Remove a keyboard action registry.
*
@@ -2899,7 +2899,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Queue a an invalidation and revalidation of this component, using
+ * Queue a an invalidation and revalidation of this component, using
* {@link RepaintManager#addInvalidComponent}.
*/
public void revalidate()
@@ -2925,7 +2925,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Calls scrollRectToVisible
on the component's parent.
+ * Calls scrollRectToVisible
on the component's parent.
* Components which can service this call should override.
*
* @param r The rectangle to make visible
@@ -3069,7 +3069,7 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Set the specified component to be the next component in the
+ * Set the specified component to be the next component in the
* focus cycle, overriding the {@link FocusTraversalPolicy} for
* this component.
*
@@ -3151,7 +3151,7 @@ public abstract class JComponent extends Container implements Serializable
* background.
*
* @param isOpaque if true, paint all pixels. If false, expect the clean
- * background.
+ * background.
*
* @see ComponentUI#update
*/
@@ -3192,8 +3192,8 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Call {@link #paint}.
- *
+ * Call {@link #paint}.
+ *
* @param g The graphics context to paint into
*/
public void update(Graphics g)
@@ -3258,12 +3258,12 @@ public abstract class JComponent extends Container implements Serializable
}
/**
- * Returns the locale used as the default for all new components. The
+ * Returns the locale used as the default for all new components. The
* default value is {@link Locale#getDefault()} (that is, the platform
* default locale).
- *
+ *
* @return The locale (never null
).
- *
+ *
* @see #setDefaultLocale(Locale)
*/
public static Locale getDefaultLocale()
@@ -3272,19 +3272,19 @@ public abstract class JComponent extends Container implements Serializable
defaultLocale = Locale.getDefault();
return defaultLocale;
}
-
+
/**
* Sets the locale to be used as the default for all new components. If this
* is set to null
, the {@link #getDefaultLocale()} method will
* return the platform default locale.
- *
+ *
* @param l the locale (null
permitted).
*/
public static void setDefaultLocale(Locale l)
{
defaultLocale = l;
}
-
+
/**
* Returns the currently set input verifier for this component.
*
@@ -3357,7 +3357,7 @@ public abstract class JComponent extends Container implements Serializable
* by look and feel implementations.
*
* You should not use this method directly. Instead you are strongly
- * encouraged to call {@link #requestFocus()} or
+ * encouraged to call {@link #requestFocus()} or
* {@link #requestFocusInWindow()} instead.
*
* @param temporary if the focus change is temporary
@@ -3406,7 +3406,7 @@ public abstract class JComponent extends Container implements Serializable
* by look and feel implementations.
*
* You should not use this method directly. Instead you are strongly
- * encouraged to call {@link #requestFocus()} or
+ * encouraged to call {@link #requestFocus()} or
* {@link #requestFocusInWindow()} instead.
*
* @param temporary if the focus change is temporary
@@ -3470,7 +3470,7 @@ public abstract class JComponent extends Container implements Serializable
* has changed.
*
* This method is called before the component is actually removed from
- * its parent, so the parent is still visible through
+ * its parent, so the parent is still visible through
* {@link Component#getParent}.
*/
public void removeNotify()
@@ -3478,7 +3478,7 @@ public abstract class JComponent extends Container implements Serializable
super.removeNotify();
KeyboardManager.getManager().clearBindingsForComp(this);
-
+
// Notify ancestor listeners.
fireAncestorEvent(this, AncestorEvent.ANCESTOR_REMOVED);
@@ -3727,7 +3727,7 @@ public abstract class JComponent extends Container implements Serializable
jc.fireAncestorEvent(ancestor, id);
}
}
-
+
/**
* This is the method that gets called when the WHEN_IN_FOCUSED_WINDOW map
* is changed.
@@ -3743,26 +3743,26 @@ public abstract class JComponent extends Container implements Serializable
InputMap curr = getInputMap(WHEN_IN_FOCUSED_WINDOW);
while (curr != null && curr != changed)
curr = curr.getParent();
-
+
// If curr is null then changed is not in the hierarchy
if (curr == null)
return;
-
+
// Now we have to update the keyboard manager's hashtable
KeyboardManager km = KeyboardManager.getManager();
-
- // This is a poor strategy, should be improved. We currently
+
+ // This is a poor strategy, should be improved. We currently
// delete all the old bindings for the component and then register
// the current bindings.
km.clearBindingsForComp(changed.getComponent());
- km.registerEntireMap((ComponentInputMap)
+ km.registerEntireMap((ComponentInputMap)
getInputMap(WHEN_IN_FOCUSED_WINDOW));
}
/**
* Helper method for
* {@link LookAndFeel#installProperty(JComponent, String, Object)}.
- *
+ *
* @param propertyName the name of the property
* @param value the value of the property
*
diff --git a/libjava/classpath/javax/swing/JDesktopPane.java b/libjava/classpath/javax/swing/JDesktopPane.java
index b068a29..6d8b212 100644
--- a/libjava/classpath/javax/swing/JDesktopPane.java
+++ b/libjava/classpath/javax/swing/JDesktopPane.java
@@ -329,13 +329,13 @@ public class JDesktopPane extends JLayeredPane implements Accessible
int count = 0;
for (int i = 0; i < components.length; i++)
- if (components[i] instanceof JInternalFrame)
- count++;
-
+ if (components[i] instanceof JInternalFrame)
+ count++;
+
JInternalFrame[] value = new JInternalFrame[count];
for (int i = 0, j = 0; i < components.length && j != count; i++)
if (components[i] instanceof JInternalFrame)
- value[j++] = (JInternalFrame) components[i];
+ value[j++] = (JInternalFrame) components[i];
return value;
}
@@ -343,7 +343,7 @@ public class JDesktopPane extends JLayeredPane implements Accessible
* Returns the object that provides accessibility features for this
* JDesktopPane
component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJDesktopPane}).
*/
public AccessibleContext getAccessibleContext()
@@ -357,7 +357,7 @@ public class JDesktopPane extends JLayeredPane implements Accessible
/**
* Helper method for
* {@link LookAndFeel#installProperty(JComponent, String, Object)}.
- *
+ *
* @param propertyName the name of the property
* @param value the value of the property
*
diff --git a/libjava/classpath/javax/swing/JDialog.java b/libjava/classpath/javax/swing/JDialog.java
index 495c9c7..04ec825 100644
--- a/libjava/classpath/javax/swing/JDialog.java
+++ b/libjava/classpath/javax/swing/JDialog.java
@@ -61,7 +61,7 @@ import javax.accessibility.AccessibleContext;
*
* Also, unlike java.awt.Dialog
s, JDialogs support the
* Swing Pluggable Look & Feel architecture.
- *
+ *
* @author Ronald Veldema (rveldema@cs.vu.nl)
*/
public class JDialog extends Dialog implements Accessible, WindowConstants,
@@ -94,16 +94,16 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
* Whether checking is enabled on the RootPane.
*
* @specnote Should be false to comply with J2SE 5.0
- */
+ */
protected boolean rootPaneCheckingEnabled = false;
/** The default action taken when closed. */
private int closeAction = HIDE_ON_CLOSE;
-
+
/** Whether JDialogs are decorated by the Look and Feel. */
private static boolean decorated;
- /* Creates a new non-modal JDialog with no title
+ /* Creates a new non-modal JDialog with no title
* using a shared Frame as the owner.
*/
public JDialog()
@@ -135,7 +135,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * Creates a new non-modal JDialog using the
+ * Creates a new non-modal JDialog using the
* given title and owner.
*
* @param owner The owner of the JDialog.
@@ -147,7 +147,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * Creates a new JDialog using the given modal
+ * Creates a new JDialog using the given modal
* settings, title, and owner.
*
* @param owner The owner of the JDialog.
@@ -160,7 +160,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * Creates a new JDialog using the given modal
+ * Creates a new JDialog using the given modal
* settings, title, owner and graphics configuration.
*
* @param owner The owner of the JDialog.
@@ -199,7 +199,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * Creates a new non-modal JDialog using the
+ * Creates a new non-modal JDialog using the
* given title and owner.
*
* @param owner The owner of the JDialog.
@@ -211,7 +211,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * Creates a new JDialog using the given modal
+ * Creates a new JDialog using the given modal
* settings, title, and owner.
*
* @param owner The owner of the JDialog.
@@ -224,7 +224,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * Creates a new JDialog using the given modal
+ * Creates a new JDialog using the given modal
* settings, title, owner and graphics configuration.
*
* @param owner The owner of the JDialog.
@@ -240,8 +240,8 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * This method is called to initialize the
- * JDialog. It sets the layout used, the locale,
+ * This method is called to initialize the
+ * JDialog. It sets the layout used, the locale,
* and creates the RootPane.
*/
protected void dialogInit()
@@ -283,7 +283,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * This method returns the preferred size of
+ * This method returns the preferred size of
* the JDialog.
*
* @return The preferred size.
@@ -306,7 +306,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * This method sets the JMenuBar used
+ * This method sets the JMenuBar used
* in this JDialog.
*
* @param menubar The JMenuBar to use.
@@ -318,7 +318,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
/**
* This method sets the LayoutManager used in the JDialog.
- * This method will throw an Error if rootPaneChecking is
+ * This method will throw an Error if rootPaneChecking is
* enabled.
*
* @param manager The LayoutManager to use.
@@ -440,7 +440,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
}
/**
- * This method is called when a component is added to the
+ * This method is called when a component is added to the
* the JDialog. Calling this method with rootPaneCheckingEnabled
* will cause an Error to be thrown.
*
@@ -469,7 +469,7 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
// pass it on to the content pane instead.
if (comp == rootPane)
super.remove(rootPane);
- else
+ else
getContentPane().remove(comp);
}
@@ -502,8 +502,8 @@ public class JDialog extends Dialog implements Accessible, WindowConstants,
{
paint(g);
}
-
-
+
+
/**
* This method handles window events. This allows the JDialog
* to honour its default close operation.
diff --git a/libjava/classpath/javax/swing/JEditorPane.java b/libjava/classpath/javax/swing/JEditorPane.java
index d6b8776..8ad1095 100644
--- a/libjava/classpath/javax/swing/JEditorPane.java
+++ b/libjava/classpath/javax/swing/JEditorPane.java
@@ -125,7 +125,7 @@ public class JEditorPane extends JTextComponent
*/
public String getAccessibleDescription()
{
- String descr = super.getAccessibleDescription();
+ String descr = super.getAccessibleDescription();
if (descr == null)
return getContentType();
else
@@ -183,9 +183,9 @@ public class JEditorPane extends JTextComponent
{
super();
}
-
+
/**
- * The accessible representation of a HTML link.
+ * The accessible representation of a HTML link.
*
* @author Roman Kennke (kennke@aicas.com)
*/
@@ -230,7 +230,7 @@ public class JEditorPane extends JTextComponent
* general, link have 1 AccessibleAction associated with them. There are
* special cases where links can have multiple actions associated, like
* in image maps.
- *
+ *
* @return the number of AccessibleActions in this link object
*/
public int getAccessibleActionCount()
@@ -352,7 +352,7 @@ public class JEditorPane extends JTextComponent
{
return element.getEndOffset();
}
-
+
}
/**
@@ -503,7 +503,7 @@ public class JEditorPane extends JTextComponent
/**
* Creates a new EditorKitMapping object.
- *
+ *
* @param cn the classname
* @param cl the classloader
*/
@@ -655,11 +655,11 @@ public class JEditorPane extends JTextComponent
}
private static final long serialVersionUID = 3140472492599046285L;
-
+
private EditorKit editorKit;
-
+
boolean focus_root;
-
+
/**
* Maps content-types to editor kit instances.
*/
@@ -684,7 +684,7 @@ public class JEditorPane extends JTextComponent
}
// A mapping between content types and used EditorKits
- HashMap editorMap;
+ HashMap editorMap;
/**
* The currently loading stream, if any.
@@ -715,9 +715,9 @@ public class JEditorPane extends JTextComponent
setEditorKit(createEditorKitForContentType("text/html"));
setPage(url);
}
-
+
/**
- * Called by the constructors to set up the default bindings for content
+ * Called by the constructors to set up the default bindings for content
* types and EditorKits.
*/
void init()
@@ -731,10 +731,10 @@ public class JEditorPane extends JTextComponent
}
/**
- * Creates and returns an EditorKit that is appropriate for the given
+ * Creates and returns an EditorKit that is appropriate for the given
* content type. This is created using the default recognized types
* plus any EditorKit types that have been registered.
- *
+ *
* @see #registerEditorKitForContentType(String, String)
* @see #registerEditorKitForContentType(String, String, ClassLoader)
* @param type the content type
@@ -756,7 +756,7 @@ public class JEditorPane extends JTextComponent
e = (EditorKit) loader.loadClass(className).newInstance();
}
catch (Exception e2)
- {
+ {
// The reference implementation returns null when class is not
// loadable or instantiatable.
}
@@ -817,7 +817,7 @@ public class JEditorPane extends JTextComponent
/**
* Returns the class name of the EditorKit associated with the given
* content type.
- *
+ *
* @since 1.3
* @param type the content type
* @return the class name of the EditorKit associated with this content type
@@ -831,13 +831,13 @@ public class JEditorPane extends JTextComponent
/**
* Returns the EditorKit to use for the given content type. If an
- * EditorKit has been explicitly set via
+ * EditorKit has been explicitly set via
* setEditorKitForContentType
* then it will be returned. Otherwise an attempt will be made to create
* an EditorKit from the default recognzied content types or any
* EditorKits that have been registered. If none can be created, a
* PlainEditorKit is created.
- *
+ *
* @see #registerEditorKitForContentType(String, String)
* @see #registerEditorKitForContentType(String, String, ClassLoader)
* @param type the content type
@@ -975,7 +975,7 @@ public class JEditorPane extends JTextComponent
}
/**
- * This method initializes from a stream.
+ * This method initializes from a stream.
*/
public void read(InputStream in, Object desc) throws IOException
{
@@ -1004,9 +1004,9 @@ public class JEditorPane extends JTextComponent
/**
* Establishes a binding between type and classname. This enables
* us to create an EditorKit later for the given content type.
- *
+ *
* @param type the content type
- * @param classname the name of the class that is associated with this
+ * @param classname the name of the class that is associated with this
* content type
*/
public static void registerEditorKitForContentType(String type,
@@ -1055,11 +1055,11 @@ public class JEditorPane extends JTextComponent
type = type.substring(0, paramIndex).trim();
}
if (editorKit != null
- && editorKit.getContentType().equals(type))
+ && editorKit.getContentType().equals(type))
return;
-
+
EditorKit kit = getEditorKitForContentType(type);
-
+
if (kit != null)
setEditorKit(kit);
}
@@ -1068,19 +1068,19 @@ public class JEditorPane extends JTextComponent
{
if (editorKit == newValue)
return;
-
+
if (editorKit != null)
editorKit.deinstall(this);
-
+
EditorKit oldValue = editorKit;
editorKit = newValue;
-
+
if (editorKit != null)
{
- editorKit.install(this);
- setDocument(editorKit.createDefaultDocument());
+ editorKit.install(this);
+ setDocument(editorKit.createDefaultDocument());
}
-
+
firePropertyChange("editorKit", oldValue, newValue);
invalidate();
repaint();
@@ -1099,7 +1099,7 @@ public class JEditorPane extends JTextComponent
}
/**
- * Sets the current URL being displayed.
+ * Sets the current URL being displayed.
*/
public void setPage(String url) throws IOException
{
@@ -1107,7 +1107,7 @@ public class JEditorPane extends JTextComponent
}
/**
- * Sets the current URL being displayed.
+ * Sets the current URL being displayed.
*/
public void setPage(URL page) throws IOException
{
@@ -1162,7 +1162,7 @@ public class JEditorPane extends JTextComponent
* the content of the current document and uses the EditorKit to read in the
* new text. This allows the EditorKit to handle the String rather than just
* inserting in plain text.
- *
+ *
* @param t the text to display in this JEditorPane
*/
public void setText(String t)
@@ -1174,7 +1174,7 @@ public class JEditorPane extends JTextComponent
doc.remove(0, doc.getLength());
if (t == null || t.equals(""))
return;
-
+
// Let the EditorKit read the text into the Document.
getEditorKit().read(new StringReader(t), doc, 0);
}
diff --git a/libjava/classpath/javax/swing/JFileChooser.java b/libjava/classpath/javax/swing/JFileChooser.java
index b7615a5..61b2fde 100644
--- a/libjava/classpath/javax/swing/JFileChooser.java
+++ b/libjava/classpath/javax/swing/JFileChooser.java
@@ -77,72 +77,72 @@ public class JFileChooser extends JComponent implements Accessible
{
private static final long serialVersionUID = 3162921138695327837L;
- /**
- * A dialog type for selecting a file to open.
+ /**
+ * A dialog type for selecting a file to open.
* @see #setDialogType(int)
*/
public static final int OPEN_DIALOG = 0;
- /**
- * A dialog type for selecting a file to save.
+ /**
+ * A dialog type for selecting a file to save.
* @see #setDialogType(int)
*/
public static final int SAVE_DIALOG = 1;
- /**
+ /**
* A dialog type for some custom purpose.
* @see #setDialogType(int)
*/
public static final int CUSTOM_DIALOG = 2;
- /**
+ /**
* A return value indicating the file chooser has been closed by cancelling.
- *
+ *
* @see #showOpenDialog(Component)
- * @see #showSaveDialog(Component)
+ * @see #showSaveDialog(Component)
*/
public static final int CANCEL_OPTION = 1;
- /**
+ /**
* A return value indicating the file chooser has been closed by approving
* the selection.
* @see #showOpenDialog(Component)
- * @see #showSaveDialog(Component)
+ * @see #showSaveDialog(Component)
*/
public static final int APPROVE_OPTION = 0;
- /**
+ /**
* A return value indicating the file chooser has been closed by some error.
* @see #showOpenDialog(Component)
- * @see #showSaveDialog(Component)
+ * @see #showSaveDialog(Component)
*/
public static final int ERROR_OPTION = -1;
- /**
+ /**
* A selection mode constant indicating acceptance of files only.
* @see #setFileSelectionMode(int)
*/
public static final int FILES_ONLY = 0;
- /**
- * A selection mode constant indicating acceptance of directories only.
+ /**
+ * A selection mode constant indicating acceptance of directories only.
* @see #setFileSelectionMode(int)
*/
public static final int DIRECTORIES_ONLY = 1;
- /**
+ /**
* A selection mode constant indicating acceptance of files and directories.
* @see #setFileSelectionMode(int)
*/
public static final int FILES_AND_DIRECTORIES = 2;
- /**
+ /**
* Action command string for cancelling the current selection.
* @see #cancelSelection()
*/
public static final String CANCEL_SELECTION = "CancelSelection";
- /**
+ /**
* Action command string for approving the current selection.
* @see #cancelSelection()
*/
@@ -150,7 +150,7 @@ public class JFileChooser extends JComponent implements Accessible
/**
* The name of the property for the approve button text.
- * @see #setApproveButtonText(String)
+ * @see #setApproveButtonText(String)
*/
public static final String APPROVE_BUTTON_TEXT_CHANGED_PROPERTY =
"ApproveButtonTextChangedProperty";
@@ -178,7 +178,7 @@ public class JFileChooser extends JComponent implements Accessible
/**
* The name of the property for the current directory.
- * @see #setCurrentDirectory(File)
+ * @see #setCurrentDirectory(File)
*/
public static final String DIRECTORY_CHANGED_PROPERTY = "directoryChanged";
@@ -196,23 +196,23 @@ public class JFileChooser extends JComponent implements Accessible
public static final String SELECTED_FILES_CHANGED_PROPERTY =
"SelectedFilesChangedProperty";
- /**
+ /**
* The name of the property for multi-selection.
- * @see #setMultiSelectionEnabled(boolean)
+ * @see #setMultiSelectionEnabled(boolean)
*/
public static final String MULTI_SELECTION_ENABLED_CHANGED_PROPERTY =
"MultiSelectionEnabledChangedProperty";
/**
* The name of the 'file system view' property.
- * @see #setFileSystemView(FileSystemView)
+ * @see #setFileSystemView(FileSystemView)
*/
public static final String FILE_SYSTEM_VIEW_CHANGED_PROPERTY =
"FileSystemViewChanged";
/**
* The name of the 'file view' property.
- * @see #setFileView(FileView)
+ * @see #setFileView(FileView)
*/
public static final String FILE_VIEW_CHANGED_PROPERTY = "fileViewChanged";
@@ -272,13 +272,13 @@ public class JFileChooser extends JComponent implements Accessible
public static final String CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY =
"ChoosableFileFilterChangedProperty";
- /**
- * The accessible context.
+ /**
+ * The accessible context.
* @see #getAccessibleContext()
*/
protected AccessibleContext accessibleContext;
- /**
+ /**
* The file system view.
* @see #setFileSystemView(FileSystemView)
*/
@@ -353,46 +353,46 @@ public class JFileChooser extends JComponent implements Accessible
/**
* The file selection mode.
- * @see #setFileSelectionMode(int)
+ * @see #setFileSelectionMode(int)
*/
private int fileSelectionMode = FILES_ONLY;
- /**
+ /**
* The file view.
* @see #setFileView(FileView)
*/
private FileView fv = null;
- /**
- * A flag controlling whether or not the control buttons are visible.
- * @see #setControlButtonsAreShown(boolean)
+ /**
+ * A flag controlling whether or not the control buttons are visible.
+ * @see #setControlButtonsAreShown(boolean)
*/
private boolean controlButtonsShown = true;
- /**
- * The current directory.
+ /**
+ * The current directory.
* @see #setCurrentDirectory(File)
*/
private File currentDir = null;
- /**
+ /**
* The current file filter.
* @see #setFileFilter(FileFilter)
*/
private FileFilter currentFilter = null;
- /**
+ /**
* An array of selected files.
- * @see #setSelectedFiles(File[])
+ * @see #setSelectedFiles(File[])
*/
private File[] selectedFiles;
- /**
- * The selected file.
+ /**
+ * The selected file.
* @see #setSelectedFile(File)
*/
private File selectedFile;
-
+
/**
* The drag enabled property.
* @see #setDragEnabled(boolean)
@@ -413,7 +413,7 @@ public class JFileChooser extends JComponent implements Accessible
* Creates a new JFileChooser
object.
*
* @param currentDirectoryPath the directory that should initially be
- * shown in the filechooser (if null
, the user's home
+ * shown in the filechooser (if null
, the user's home
* directory is used).
*/
public JFileChooser(String currentDirectoryPath)
@@ -422,11 +422,11 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Creates a new JFileChooser
object with the specified
+ * Creates a new JFileChooser
object with the specified
* directory and {@link FileSystemView}.
*
* @param currentDirectoryPath the directory that should initially be
- * shown in the filechooser (if null
, the user's home
+ * shown in the filechooser (if null
, the user's home
* directory is used).
* @param fsv the file system view (if null
, the default file
* system view is used).
@@ -444,7 +444,7 @@ public class JFileChooser extends JComponent implements Accessible
* Creates a new JFileChooser
object.
*
* @param currentDirectory the directory that should initially be
- * shown in the filechooser (if null
, the user's home
+ * shown in the filechooser (if null
, the user's home
* directory is used).
*/
public JFileChooser(File currentDirectory)
@@ -469,7 +469,7 @@ public class JFileChooser extends JComponent implements Accessible
* Creates a new JFileChooser
object.
*
* @param currentDirectory the directory that should initially be
- * shown in the filechooser (if null
, the user's home
+ * shown in the filechooser (if null
, the user's home
* directory is used).
* @param fsv the file system view (if null
, the default file
* system view is used).
@@ -485,7 +485,7 @@ public class JFileChooser extends JComponent implements Accessible
*
* @param view the file system view (if null
, the default file
* system view is used).
- *
+ *
* @see FileSystemView#getFileSystemView()
*/
protected void setup(FileSystemView view)
@@ -499,18 +499,18 @@ public class JFileChooser extends JComponent implements Accessible
/**
* Sets the dragEnabled property, this disables/enables automatic drag
* handling (drag and drop) on this component. The default value of the
- * dragEnabled property is false.
- *
+ * dragEnabled property is false.
+ *
* Some look and feels might not support automatic drag and drop; they
* will ignore this property.
- *
+ *
* @param b - the new dragEnabled value
*/
public void setDragEnabled(boolean b)
{
if (b && GraphicsEnvironment.isHeadless())
throw new HeadlessException();
-
+
dragEnabled = b;
}
@@ -528,7 +528,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the selected file, if there is one.
*
* @return The selected file (possibly null
).
- *
+ *
* @see #setSelectedFile(File)
*/
public File getSelectedFile()
@@ -538,7 +538,7 @@ public class JFileChooser extends JComponent implements Accessible
/**
* Sets the selected file and sends a {@link PropertyChangeEvent} to all
- * registered listeners. The property name is
+ * registered listeners. The property name is
* {@link #SELECTED_FILE_CHANGED_PROPERTY}.
*
* @param file the file (null
permitted).
@@ -547,9 +547,9 @@ public class JFileChooser extends JComponent implements Accessible
{
if (selectedFile == null || !selectedFile.equals(file))
{
- File old = selectedFile;
- selectedFile = file;
- firePropertyChange(SELECTED_FILE_CHANGED_PROPERTY, old, selectedFile);
+ File old = selectedFile;
+ selectedFile = file;
+ firePropertyChange(SELECTED_FILE_CHANGED_PROPERTY, old, selectedFile);
}
}
@@ -569,9 +569,9 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the selected files and sends a {@link PropertyChangeEvent} (with the
- * name {@link #SELECTED_FILES_CHANGED_PROPERTY}) to all registered
- * listeners.
+ * Sets the selected files and sends a {@link PropertyChangeEvent} (with the
+ * name {@link #SELECTED_FILES_CHANGED_PROPERTY}) to all registered
+ * listeners.
*
* @param selectedFiles the selected files (null
permitted).
*/
@@ -585,9 +585,9 @@ public class JFileChooser extends JComponent implements Accessible
setSelectedFile(null);
if (this.selectedFiles != selectedFiles)
{
- File[] old = this.selectedFiles;
- this.selectedFiles = selectedFiles;
- firePropertyChange(SELECTED_FILES_CHANGED_PROPERTY, old, selectedFiles);
+ File[] old = this.selectedFiles;
+ this.selectedFiles = selectedFiles;
+ firePropertyChange(SELECTED_FILES_CHANGED_PROPERTY, old, selectedFiles);
}
}
@@ -603,26 +603,26 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the current directory and fires a {@link PropertyChangeEvent} (with
- * the property name {@link #DIRECTORY_CHANGED_PROPERTY}) to all registered
- * listeners. If dir
is null
, the current
+ * Sets the current directory and fires a {@link PropertyChangeEvent} (with
+ * the property name {@link #DIRECTORY_CHANGED_PROPERTY}) to all registered
+ * listeners. If dir
is null
, the current
* directory is set to the default directory returned by the file system
* view.
*
* @param dir the new directory (null
permitted).
- *
+ *
* @see FileSystemView#getDefaultDirectory()
*/
public void setCurrentDirectory(File dir)
{
if (currentDir != dir || dir == null)
{
- if (dir == null)
- dir = fsv.getDefaultDirectory();
+ if (dir == null)
+ dir = fsv.getDefaultDirectory();
- File old = currentDir;
- currentDir = dir;
- firePropertyChange(DIRECTORY_CHANGED_PROPERTY, old, currentDir);
+ File old = currentDir;
+ currentDir = dir;
+ firePropertyChange(DIRECTORY_CHANGED_PROPERTY, old, currentDir);
}
}
@@ -643,7 +643,7 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Ensures the the specified file is visible (this is handled by the
+ * Ensures the the specified file is visible (this is handled by the
* UI delegate).
*
* @param f the file.
@@ -654,13 +654,13 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Displays the file chooser in a modal dialog using the
+ * Displays the file chooser in a modal dialog using the
* {@link #OPEN_DIALOG} type.
*
* @param parent the parent component.
*
- * @return A return value indicating how the dialog was closed (one of
- * {@link #APPROVE_OPTION}, {@link #CANCEL_OPTION} and
+ * @return A return value indicating how the dialog was closed (one of
+ * {@link #APPROVE_OPTION}, {@link #CANCEL_OPTION} and
* {@link #ERROR_OPTION}).
*
* @throws HeadlessException DOCUMENT ME!
@@ -681,13 +681,13 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Displays the file chooser in a modal dialog using the
+ * Displays the file chooser in a modal dialog using the
* {@link #SAVE_DIALOG} type.
*
* @param parent the parent component.
*
- * @return A return value indicating how the dialog was closed (one of
- * {@link #APPROVE_OPTION}, {@link #CANCEL_OPTION} and
+ * @return A return value indicating how the dialog was closed (one of
+ * {@link #APPROVE_OPTION}, {@link #CANCEL_OPTION} and
* {@link #ERROR_OPTION}).
*
* @throws HeadlessException DOCUMENT ME!
@@ -705,13 +705,13 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Displays the file chooser in a modal dialog using the
+ * Displays the file chooser in a modal dialog using the
* {@link #CUSTOM_DIALOG} type.
*
* @param parent the parent component.
*
- * @return A return value indicating how the dialog was closed (one of
- * {@link #APPROVE_OPTION}, {@link #CANCEL_OPTION} and
+ * @return A return value indicating how the dialog was closed (one of
+ * {@link #APPROVE_OPTION}, {@link #CANCEL_OPTION} and
* {@link #ERROR_OPTION}).
*
* @throws HeadlessException DOCUMENT ME!
@@ -750,10 +750,10 @@ public class JFileChooser extends JComponent implements Accessible
dialog.getContentPane().add(this);
dialog.addWindowListener( new WindowAdapter()
{
- public void windowClosing(WindowEvent e)
- {
- cancelSelection();
- }
+ public void windowClosing(WindowEvent e)
+ {
+ cancelSelection();
+ }
});
dialog.setModal(true);
dialog.invalidate();
@@ -766,7 +766,7 @@ public class JFileChooser extends JComponent implements Accessible
* shown on the file chooser.
*
* @return A boolean.
- *
+ *
* @see #setControlButtonsAreShown(boolean)
*/
public boolean getControlButtonsAreShown()
@@ -786,18 +786,18 @@ public class JFileChooser extends JComponent implements Accessible
{
if (controlButtonsShown != b)
{
- controlButtonsShown = b;
- firePropertyChange(CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY,
- ! controlButtonsShown, controlButtonsShown);
+ controlButtonsShown = b;
+ firePropertyChange(CONTROL_BUTTONS_ARE_SHOWN_CHANGED_PROPERTY,
+ ! controlButtonsShown, controlButtonsShown);
}
}
/**
* Returns the type of file chooser.
*
- * @return {@link #OPEN_DIALOG}, {@link #SAVE_DIALOG} or
+ * @return {@link #OPEN_DIALOG}, {@link #SAVE_DIALOG} or
* {@link #CUSTOM_DIALOG}.
- *
+ *
* @see #setDialogType(int)
*/
public int getDialogType()
@@ -807,12 +807,12 @@ public class JFileChooser extends JComponent implements Accessible
/**
* Sets the dialog type and fires a {@link PropertyChangeEvent} (with the
- * property name {@link #DIALOG_TYPE_CHANGED_PROPERTY}) to all
+ * property name {@link #DIALOG_TYPE_CHANGED_PROPERTY}) to all
* registered listeners.
*
* @param dialogType the dialog type (one of: {@link #OPEN_DIALOG},
* {@link #SAVE_DIALOG}, {@link #CUSTOM_DIALOG}).
- *
+ *
* @throws IllegalArgumentException if dialogType
is not valid.
*/
public void setDialogType(int dialogType)
@@ -823,28 +823,28 @@ public class JFileChooser extends JComponent implements Accessible
if (this.dialogType != dialogType)
{
- int old = this.dialogType;
- this.dialogType = dialogType;
- firePropertyChange(DIALOG_TYPE_CHANGED_PROPERTY, old, this.dialogType);
+ int old = this.dialogType;
+ this.dialogType = dialogType;
+ firePropertyChange(DIALOG_TYPE_CHANGED_PROPERTY, old, this.dialogType);
}
}
/**
- * Sets the dialog title and sends a {@link PropertyChangeEvent} (with the
- * property name {@link #DIALOG_TITLE_CHANGED_PROPERTY}) to all
+ * Sets the dialog title and sends a {@link PropertyChangeEvent} (with the
+ * property name {@link #DIALOG_TITLE_CHANGED_PROPERTY}) to all
* registered listeners.
*
* @param dialogTitle the dialog title (null
permitted).
- *
+ *
* @see #getDialogTitle()
*/
public void setDialogTitle(String dialogTitle)
{
if (this.dialogTitle != dialogTitle)
{
- String old = this.dialogTitle;
- this.dialogTitle = dialogTitle;
- firePropertyChange(DIALOG_TITLE_CHANGED_PROPERTY, old, this.dialogTitle);
+ String old = this.dialogTitle;
+ this.dialogTitle = dialogTitle;
+ firePropertyChange(DIALOG_TITLE_CHANGED_PROPERTY, old, this.dialogTitle);
}
}
@@ -852,7 +852,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the dialog title.
*
* @return The dialog title (possibly null
).
- *
+ *
* @see #setDialogTitle(String)
*/
public String getDialogTitle()
@@ -861,9 +861,9 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the tool tip text for the approve button and sends a
+ * Sets the tool tip text for the approve button and sends a
* {@link PropertyChangeEvent} (with the property name
- * {@link #APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY}) to all
+ * {@link #APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY}) to all
* registered listeners.
*
* @param toolTipText the text.
@@ -872,10 +872,10 @@ public class JFileChooser extends JComponent implements Accessible
{
if (approveButtonToolTipText != toolTipText)
{
- String oldText = approveButtonToolTipText;
- approveButtonToolTipText = toolTipText;
- firePropertyChange(APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY,
- oldText, approveButtonToolTipText);
+ String oldText = approveButtonToolTipText;
+ approveButtonToolTipText = toolTipText;
+ firePropertyChange(APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY,
+ oldText, approveButtonToolTipText);
}
}
@@ -883,7 +883,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the tool tip text for the approve button.
*
* @return The tool tip text for the approve button.
- *
+ *
* @see #setApproveButtonToolTipText(String)
*/
public String getApproveButtonToolTipText()
@@ -895,7 +895,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the approve button mnemonic, or zero if no mnemonic has been set.
*
* @return The approve button mnemonic.
- *
+ *
* @see #setApproveButtonMnemonic(int)
*/
public int getApproveButtonMnemonic()
@@ -904,34 +904,34 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the mnemonic for the approve button and sends a
- * {@link PropertyChangeEvent} (with the property name
- * {@link #APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY}) to all registered
+ * Sets the mnemonic for the approve button and sends a
+ * {@link PropertyChangeEvent} (with the property name
+ * {@link #APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY}) to all registered
* listeners.
*
* @param mnemonic the mnemonic.
- *
+ *
* @see #setApproveButtonMnemonic(char)
*/
public void setApproveButtonMnemonic(int mnemonic)
{
if (approveButtonMnemonic != mnemonic)
{
- int oldMnemonic = approveButtonMnemonic;
- approveButtonMnemonic = mnemonic;
- firePropertyChange(APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY,
- oldMnemonic, approveButtonMnemonic);
+ int oldMnemonic = approveButtonMnemonic;
+ approveButtonMnemonic = mnemonic;
+ firePropertyChange(APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY,
+ oldMnemonic, approveButtonMnemonic);
}
}
/**
- * Sets the mnemonic for the approve button and sends a
- * {@link PropertyChangeEvent} (with the property name
- * {@link #APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY}) to all registered
+ * Sets the mnemonic for the approve button and sends a
+ * {@link PropertyChangeEvent} (with the property name
+ * {@link #APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY}) to all registered
* listeners.
*
* @param mnemonic the mnemonic.
- *
+ *
* @see #setApproveButtonMnemonic(int)
*/
public void setApproveButtonMnemonic(char mnemonic)
@@ -940,22 +940,22 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the approve button text and fires a {@link PropertyChangeEvent}
- * (with the property name {@link #APPROVE_BUTTON_TEXT_CHANGED_PROPERTY}) to
+ * Sets the approve button text and fires a {@link PropertyChangeEvent}
+ * (with the property name {@link #APPROVE_BUTTON_TEXT_CHANGED_PROPERTY}) to
* all registered listeners.
*
* @param approveButtonText the text (null
permitted).
- *
+ *
* @see #getApproveButtonText()
*/
public void setApproveButtonText(String approveButtonText)
{
if (this.approveButtonText != approveButtonText)
{
- String oldText = this.approveButtonText;
- this.approveButtonText = approveButtonText;
- firePropertyChange(APPROVE_BUTTON_TEXT_CHANGED_PROPERTY, oldText,
- this.approveButtonText);
+ String oldText = this.approveButtonText;
+ this.approveButtonText = approveButtonText;
+ firePropertyChange(APPROVE_BUTTON_TEXT_CHANGED_PROPERTY, oldText,
+ this.approveButtonText);
}
}
@@ -963,7 +963,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the approve button text.
*
* @return The approve button text (possibly null
).
- *
+ *
* @see #setApproveButtonText(String)
*/
public String getApproveButtonText()
@@ -982,9 +982,9 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Adds a file filter to the list of available filters and sends a
- * {@link PropertyChangeEvent} (with the property name
- * {@link #CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY}) to all registered
+ * Adds a file filter to the list of available filters and sends a
+ * {@link PropertyChangeEvent} (with the property name
+ * {@link #CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY}) to all registered
* listeners.
*
* @param filter the filter (null
permitted).
@@ -996,21 +996,21 @@ public class JFileChooser extends JComponent implements Accessible
FileFilter[] old = getChoosableFileFilters();
choosableFilters.add(filter);
FileFilter[] newFilters = getChoosableFileFilters();
- firePropertyChange(CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY, old,
+ firePropertyChange(CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY, old,
newFilters);
}
setFileFilter(filter);
}
/**
- * Removes a file filter from the list of available filters and sends a
- * {@link PropertyChangeEvent} (with the property name
- * {@link #CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY}) to all registered
+ * Removes a file filter from the list of available filters and sends a
+ * {@link PropertyChangeEvent} (with the property name
+ * {@link #CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY}) to all registered
* listeners.
*
* @param f the file filter.
*
- * @return true
if the filter was removed and
+ * @return true
if the filter was removed and
* false
otherwise.
*/
public boolean removeChoosableFileFilter(FileFilter f)
@@ -1047,11 +1047,11 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns the flag that controls whether or not the 'accept all' file
+ * Returns the flag that controls whether or not the 'accept all' file
* filter is included in the list of filters.
*
* @return A boolean.
- *
+ *
* @see #setAcceptAllFileFilterUsed(boolean)
*/
public boolean isAcceptAllFileFilterUsed()
@@ -1061,9 +1061,9 @@ public class JFileChooser extends JComponent implements Accessible
/**
* Sets the flag that controls whether or not the 'accept all' file filter
- * is included in the list of filters, and sends a
- * {@link PropertyChangeEvent} (with the property name
- * {@link #ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY}) to all registered
+ * is included in the list of filters, and sends a
+ * {@link PropertyChangeEvent} (with the property name
+ * {@link #ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY}) to all registered
* listeners.
*
* @param b the new value of the flag.
@@ -1072,13 +1072,13 @@ public class JFileChooser extends JComponent implements Accessible
{
if (isAcceptAll != b)
{
- isAcceptAll = b;
+ isAcceptAll = b;
if (b)
addChoosableFileFilter(getAcceptAllFileFilter());
- else
+ else
removeChoosableFileFilter(getAcceptAllFileFilter());
- firePropertyChange(ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY,
- ! isAcceptAll, isAcceptAll);
+ firePropertyChange(ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY,
+ ! isAcceptAll, isAcceptAll);
}
}
@@ -1087,7 +1087,7 @@ public class JFileChooser extends JComponent implements Accessible
* value is null
.
*
* @return The accessory component (possibly null
).
- *
+ *
* @see #setAccessory(JComponent)
*/
public JComponent getAccessory()
@@ -1096,7 +1096,7 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the accessory component for the file chooser and sends a
+ * Sets the accessory component for the file chooser and sends a
* {@link PropertyChangeEvent} to all registered listeners. The property
* name is {@link #ACCESSORY_CHANGED_PROPERTY}.
*
@@ -1106,20 +1106,20 @@ public class JFileChooser extends JComponent implements Accessible
{
if (accessory != newAccessory)
{
- JComponent old = accessory;
- accessory = newAccessory;
- firePropertyChange(ACCESSORY_CHANGED_PROPERTY, old, accessory);
+ JComponent old = accessory;
+ accessory = newAccessory;
+ firePropertyChange(ACCESSORY_CHANGED_PROPERTY, old, accessory);
}
}
/**
* Sets the file selection mode and sends a {@link PropertyChangeEvent}
- * to all registered listeners. The property name is
+ * to all registered listeners. The property name is
* {@link #FILE_SELECTION_MODE_CHANGED_PROPERTY}.
*
* @param mode the mode ({@link #FILES_ONLY}, {@link #DIRECTORIES_ONLY} or
* {@link #FILES_AND_DIRECTORIES}).
- *
+ *
* @throws IllegalArgumentException if the mode is invalid.
*/
public void setFileSelectionMode(int mode)
@@ -1129,20 +1129,20 @@ public class JFileChooser extends JComponent implements Accessible
throw new IllegalArgumentException("Choose a correct file selection mode.");
if (fileSelectionMode != mode)
{
- int old = fileSelectionMode;
- fileSelectionMode = mode;
- firePropertyChange(FILE_SELECTION_MODE_CHANGED_PROPERTY, old,
- fileSelectionMode);
+ int old = fileSelectionMode;
+ fileSelectionMode = mode;
+ firePropertyChange(FILE_SELECTION_MODE_CHANGED_PROPERTY, old,
+ fileSelectionMode);
}
}
/**
- * Returns the file selection mode, one of: {@link #FILES_ONLY},
+ * Returns the file selection mode, one of: {@link #FILES_ONLY},
* {@link #DIRECTORIES_ONLY} or {@link #FILES_AND_DIRECTORIES}. The
* default is {@link #FILES_ONLY}.
*
* @return The file selection mode.
- *
+ *
* @see #setFileSelectionMode(int)
*/
public int getFileSelectionMode()
@@ -1151,13 +1151,13 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns true
if file selection is enabled, and
+ * Returns true
if file selection is enabled, and
* false
otherwise. File selection is enabled when the
- * file selection mode is {@link #FILES_ONLY} or
+ * file selection mode is {@link #FILES_ONLY} or
* {@link #FILES_AND_DIRECTORIES}.
*
* @return true
if file selection is enabled.
- *
+ *
* @see #getFileSelectionMode()
*/
public boolean isFileSelectionEnabled()
@@ -1167,13 +1167,13 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns true
if directory selection is enabled, and
+ * Returns true
if directory selection is enabled, and
* false
otherwise. Directory selection is enabled when the
- * file selection mode is {@link #DIRECTORIES_ONLY} or
+ * file selection mode is {@link #DIRECTORIES_ONLY} or
* {@link #FILES_AND_DIRECTORIES}.
*
* @return true
if file selection is enabled.
- *
+ *
* @see #getFileSelectionMode()
*/
public boolean isDirectorySelectionEnabled()
@@ -1183,9 +1183,9 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets the flag that controls whether multiple selections are allowed in
- * this filechooser and sends a {@link PropertyChangeEvent} (with the
- * property name {@link #MULTI_SELECTION_ENABLED_CHANGED_PROPERTY}) to all
+ * Sets the flag that controls whether multiple selections are allowed in
+ * this filechooser and sends a {@link PropertyChangeEvent} (with the
+ * property name {@link #MULTI_SELECTION_ENABLED_CHANGED_PROPERTY}) to all
* registered listeners.
*
* @param b the new value of the flag.
@@ -1194,9 +1194,9 @@ public class JFileChooser extends JComponent implements Accessible
{
if (multiSelection != b)
{
- multiSelection = b;
- firePropertyChange(MULTI_SELECTION_ENABLED_CHANGED_PROPERTY,
- ! multiSelection, multiSelection);
+ multiSelection = b;
+ firePropertyChange(MULTI_SELECTION_ENABLED_CHANGED_PROPERTY,
+ ! multiSelection, multiSelection);
}
}
@@ -1205,7 +1205,7 @@ public class JFileChooser extends JComponent implements Accessible
* file chooser, and false
otherwise.
*
* @return A boolean.
- *
+ *
* @see #setMultiSelectionEnabled(boolean)
*/
public boolean isMultiSelectionEnabled()
@@ -1214,11 +1214,11 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns true
if hidden files are to be hidden, and
+ * Returns true
if hidden files are to be hidden, and
* false
otherwise.
*
* @return A boolean.
- *
+ *
* @see #setFileHidingEnabled(boolean)
*/
public boolean isFileHidingEnabled()
@@ -1237,15 +1237,15 @@ public class JFileChooser extends JComponent implements Accessible
{
if (fileHiding != b)
{
- fileHiding = b;
- firePropertyChange(FILE_HIDING_CHANGED_PROPERTY, ! fileHiding,
- fileHiding);
+ fileHiding = b;
+ firePropertyChange(FILE_HIDING_CHANGED_PROPERTY, ! fileHiding,
+ fileHiding);
}
}
/**
* Sets the file filter and sends a {@link PropertyChangeEvent} (with the
- * property name {@link #FILE_FILTER_CHANGED_PROPERTY}) to all registered
+ * property name {@link #FILE_FILTER_CHANGED_PROPERTY}) to all registered
* listeners.
*
* @param filter the filter (null
permitted).
@@ -1266,7 +1266,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the file filter.
*
* @return The file filter.
- *
+ *
* @see #setFileFilter(FileFilter)
*/
public FileFilter getFileFilter()
@@ -1275,7 +1275,7 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Sets a custom {@link FileView} for the file chooser and sends a
+ * Sets a custom {@link FileView} for the file chooser and sends a
* {@link PropertyChangeEvent} to all registered listeners. The property
* name is {@link #FILE_VIEW_CHANGED_PROPERTY}.
*
@@ -1287,9 +1287,9 @@ public class JFileChooser extends JComponent implements Accessible
{
if (fv != fileView)
{
- FileView old = fv;
- fv = fileView;
- firePropertyChange(FILE_VIEW_CHANGED_PROPERTY, old, fv);
+ FileView old = fv;
+ fv = fileView;
+ firePropertyChange(FILE_VIEW_CHANGED_PROPERTY, old, fv);
}
}
@@ -1340,7 +1340,7 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns the type description for the file, generated by the current (or
+ * Returns the type description for the file, generated by the current (or
* default) {@link FileView}.
*
* @param f the file.
@@ -1375,7 +1375,7 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns true
if the file is traversable, and
+ * Returns true
if the file is traversable, and
* false
otherwise.
*
* @param f the file or directory.
@@ -1400,14 +1400,14 @@ public class JFileChooser extends JComponent implements Accessible
if (f == null)
return true;
FileFilter ff = getFileFilter();
- if (ff != null)
+ if (ff != null)
return ff.accept(f);
else
return true;
}
/**
- * Sets the file system view for the file chooser and sends a
+ * Sets the file system view for the file chooser and sends a
* {@link PropertyChangeEvent} to all registered listeners.
*
* @param fsv the file system view.
@@ -1416,9 +1416,9 @@ public class JFileChooser extends JComponent implements Accessible
{
if (this.fsv != fsv)
{
- FileSystemView old = this.fsv;
- this.fsv = fsv;
- firePropertyChange(FILE_SYSTEM_VIEW_CHANGED_PROPERTY, old, this.fsv);
+ FileSystemView old = this.fsv;
+ this.fsv = fsv;
+ firePropertyChange(FILE_SYSTEM_VIEW_CHANGED_PROPERTY, old, this.fsv);
}
}
@@ -1426,7 +1426,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the file system view being used by this file chooser.
*
* @return The file system view.
- *
+ *
* @see #setFileSystemView(FileSystemView)
*/
public FileSystemView getFileSystemView()
@@ -1473,11 +1473,11 @@ public class JFileChooser extends JComponent implements Accessible
{
try
{
- listenerList.remove(ActionListener.class, l);
+ listenerList.remove(ActionListener.class, l);
}
catch (IllegalArgumentException e)
{
- e.printStackTrace();
+ e.printStackTrace();
}
}
@@ -1535,12 +1535,12 @@ public class JFileChooser extends JComponent implements Accessible
}
/**
- * Returns a string describing the attributes for the
- * JFileChooser
component, for use in debugging. The return
- * value is guaranteed to be non-null
, but the format of the
+ * Returns a string describing the attributes for the
+ * JFileChooser
component, for use in debugging. The return
+ * value is guaranteed to be non-null
, but the format of the
* string may vary between implementations.
*
- * @return A string describing the attributes of the
+ * @return A string describing the attributes of the
* JFileChooser
.
*/
protected String paramString()
@@ -1587,7 +1587,7 @@ public class JFileChooser extends JComponent implements Accessible
* Returns the object that provides accessibility features for this
* JFileChooser
component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJFileChooser}).
*/
public AccessibleContext getAccessibleContext()
@@ -1601,7 +1601,7 @@ public class JFileChooser extends JComponent implements Accessible
* Provides the accessibility features for the JFileChooser
* component.
*/
- protected class AccessibleJFileChooser
+ protected class AccessibleJFileChooser
extends JComponent.AccessibleJComponent
{
/**
@@ -1611,9 +1611,9 @@ public class JFileChooser extends JComponent implements Accessible
{
// Nothing to do here.
}
-
+
/**
- * Returns the accessible role for the JFileChooser
+ * Returns the accessible role for the JFileChooser
* component.
*
* @return {@link AccessibleRole#FILE_CHOOSER}.
diff --git a/libjava/classpath/javax/swing/JFormattedTextField.java b/libjava/classpath/javax/swing/JFormattedTextField.java
index 3655485..e4b6fec 100644
--- a/libjava/classpath/javax/swing/JFormattedTextField.java
+++ b/libjava/classpath/javax/swing/JFormattedTextField.java
@@ -84,18 +84,18 @@ public class JFormattedTextField extends JTextField
public abstract static class AbstractFormatter implements Serializable
{
private static final long serialVersionUID = -5193212041738979680L;
-
+
private JFormattedTextField textField;
-
+
public AbstractFormatter ()
{
//Do nothing here.
}
/**
- * Clones the AbstractFormatter and removes the association to any
+ * Clones the AbstractFormatter and removes the association to any
* particular JFormattedTextField.
- *
+ *
* @return a clone of this formatter with no association to any particular
* JFormattedTextField
* @throws CloneNotSupportedException if the Object's class doesn't support
@@ -106,7 +106,7 @@ public class JFormattedTextField extends JTextField
{
// Clone this formatter.
AbstractFormatter newFormatter = (AbstractFormatter) super.clone();
-
+
// And remove the association to the JFormattedTextField.
newFormatter.textField = null;
return newFormatter;
@@ -115,7 +115,7 @@ public class JFormattedTextField extends JTextField
/**
* Returns a custom set of Actions that this formatter supports. Should
* be subclassed by formatters that have a custom set of Actions.
- *
+ *
* @return null
. Should be subclassed by formatters that want
* to install custom Actions on the JFormattedTextField.
*/
@@ -128,13 +128,13 @@ public class JFormattedTextField extends JTextField
* Gets the DocumentFilter for this formatter. Should be subclassed
* by formatters wishing to install a filter that oversees Document
* mutations.
- *
+ *
* @return null
. Should be subclassed by formatters
* that want to restrict Document mutations.
*/
protected DocumentFilter getDocumentFilter()
{
- // Subclasses should override this if they want to install a
+ // Subclasses should override this if they want to install a
// DocumentFilter.
return null;
}
@@ -142,7 +142,7 @@ public class JFormattedTextField extends JTextField
/**
* Returns the JFormattedTextField on which this formatter is
* currently installed.
- *
+ *
* @return the JFormattedTextField on which this formatter is currently
* installed
*/
@@ -153,29 +153,29 @@ public class JFormattedTextField extends JTextField
/**
* Gets the NavigationFilter for this formatter. Should be subclassed
- * by formatters (such as {@link DefaultFormatter}) that wish to
+ * by formatters (such as {@link DefaultFormatter}) that wish to
* restrict where the cursor can be placed within the text field.
- *
+ *
* @return null
. Subclassed by formatters that want to restrict
* cursor location within the JFormattedTextField.
*/
protected NavigationFilter getNavigationFilter()
{
- // This should be subclassed if the formatter wants to install
+ // This should be subclassed if the formatter wants to install
// a NavigationFilter on the JFormattedTextField.
return null;
}
/**
- * Installs this formatter on the specified JFormattedTextField. This
- * converts the current value to a displayable String and displays it,
+ * Installs this formatter on the specified JFormattedTextField. This
+ * converts the current value to a displayable String and displays it,
* and installs formatter specific Actions from getActions
.
- * It also installs a DocumentFilter and NavigationFilter on the
- * JFormattedTextField.
+ * It also installs a DocumentFilter and NavigationFilter on the
+ * JFormattedTextField.
* ParseException
this sets the text to an
+ * If there is a ParseException
this sets the text to an
* empty String and marks the text field in an invalid state.
- *
+ *
* @param textField the JFormattedTextField on which to install this
* formatter
*/
@@ -184,10 +184,10 @@ public class JFormattedTextField extends JTextField
// Uninstall the current textfield.
if (this.textField != null)
uninstall();
-
+
this.textField = textField;
-
- // Install some state on the text field, including display text,
+
+ // Install some state on the text field, including display text,
// DocumentFilter, NavigationFilter, and formatter specific Actions.
if (textField != null)
{
@@ -196,16 +196,16 @@ public class JFormattedTextField extends JTextField
// Set the text of the field.
textField.setText(valueToString(textField.getValue()));
Document doc = textField.getDocument();
-
+
// Set the DocumentFilter for the field's Document.
if (doc instanceof AbstractDocument)
((AbstractDocument) doc).setDocumentFilter(getDocumentFilter());
-
+
// Set the NavigationFilter.
textField.setNavigationFilter(getNavigationFilter());
-
+
// Set the Formatter Actions
- // FIXME: Have to add the actions from getActions()
+ // FIXME: Have to add the actions from getActions()
}
catch (ParseException pe)
{
@@ -218,8 +218,8 @@ public class JFormattedTextField extends JTextField
/**
* Clears the state installed on the JFormattedTextField by the formatter.
- * This resets the DocumentFilter, NavigationFilter, and any additional
- * Actions (returned by getActions()
).
+ * This resets the DocumentFilter, NavigationFilter, and any additional
+ * Actions (returned by getActions()
).
*/
public void uninstall()
{
@@ -234,7 +234,7 @@ public class JFormattedTextField extends JTextField
/**
* Invoke this method when invalid values are entered. This forwards the
- * call to the JFormattedTextField.
+ * call to the JFormattedTextField.
*/
protected void invalidEdit()
{
@@ -242,9 +242,9 @@ public class JFormattedTextField extends JTextField
}
/**
- * This method updates the editValid
property of
+ * This method updates the editValid
property of
* JFormattedTextField.
- *
+ *
* @param valid the new state for the editValid
property
*/
protected void setEditValid(boolean valid)
@@ -254,7 +254,7 @@ public class JFormattedTextField extends JTextField
/**
* Parses text
to return a corresponding Object.
- *
+ *
* @param text the String to parse
* @return an Object that text
represented
* @throws ParseException if there is an error in the conversion
@@ -265,7 +265,7 @@ public class JFormattedTextField extends JTextField
/**
* Returns a String to be displayed, based on the Object
* value
.
- *
+ *
* @param value the Object from which to generate a String
* @return a String to be displayed
* @throws ParseException if there is an error in the conversion
@@ -276,7 +276,7 @@ public class JFormattedTextField extends JTextField
/**
* Delivers instances of an {@link AbstractFormatter} for
- * a specific value type for a JFormattedTextField.
+ * a specific value type for a JFormattedTextField.
*/
public abstract static class AbstractFormatterFactory
{
@@ -296,22 +296,22 @@ public class JFormattedTextField extends JTextField
/** The most recent valid and committed value **/
private Object value;
-
+
/** The behaviour for when this text field loses focus **/
private int focusLostBehavior = COMMIT_OR_REVERT;
-
+
/** The formatter factory currently being used **/
private AbstractFormatterFactory formatterFactory;
-
+
/** The formatter currently being used **/
private AbstractFormatter formatter;
-
+
// Package-private to avoid an accessor method.
boolean editValid = true;
-
+
/**
- * Creates a JFormattedTextField with no formatter factory.
- * setValue
or setFormatterFactory
will
+ * Creates a JFormattedTextField with no formatter factory.
+ * setValue
or setFormatterFactory
will
* properly configure this text field to edit a particular type
* of value.
*/
@@ -321,10 +321,10 @@ public class JFormattedTextField extends JTextField
}
/**
- * Creates a JFormattedTextField that can handle the specified Format.
- * An appopriate AbstractFormatter and AbstractFormatterFactory will
+ * Creates a JFormattedTextField that can handle the specified Format.
+ * An appopriate AbstractFormatter and AbstractFormatterFactory will
* be created for the specified Format.
- *
+ *
* @param format the Format that this JFormattedTextField should be able
* to handle
*/
@@ -335,10 +335,10 @@ public class JFormattedTextField extends JTextField
}
/**
- * Creates a JFormattedTextField with the specified formatter. This will
+ * Creates a JFormattedTextField with the specified formatter. This will
* create a {@link DefaultFormatterFactory} with this formatter as the default
* formatter.
- *
+ *
* @param formatter the formatter to use for this JFormattedTextField
*/
public JFormattedTextField(AbstractFormatter formatter)
@@ -348,7 +348,7 @@ public class JFormattedTextField extends JTextField
/**
* Creates a JFormattedTextField with the specified formatter factory.
- *
+ *
* @param factory the formatter factory to use for this JFormattedTextField
*/
public JFormattedTextField(AbstractFormatterFactory factory)
@@ -359,12 +359,12 @@ public class JFormattedTextField extends JTextField
/**
* Creates a JFormattedTextField with the specified formatter factory and
* initial value.
- *
+ *
* @param factory the initial formatter factory for this JFormattedTextField
* @param value the initial value for the text field
*/
public JFormattedTextField(AbstractFormatterFactory factory, Object value)
- {
+ {
setFormatterFactory(factory);
setValue(value);
}
@@ -372,14 +372,14 @@ public class JFormattedTextField extends JTextField
/**
* Creates a JFormattedTextField with the specified value. This creates a
* formatter and formatterFactory that are appropriate for the value.
- *
+ *
* @param value the initial value for this JFormattedTextField
*/
public JFormattedTextField(Object value)
{
setValue(value);
}
-
+
/**
* Returns an AbstractFormatterFactory that will give an appropriate
* AbstractFormatter for the given Format.
@@ -396,14 +396,14 @@ public class JFormattedTextField extends JTextField
newFormatter = new NumberFormatter ((NumberFormat) format);
else
newFormatter = new InternationalFormatter(format);
-
+
return new DefaultFormatterFactory(newFormatter);
}
/**
* Forces the current value from the editor to be set as the current
* value. If there is no current formatted this has no effect.
- *
+ *
* @throws ParseException if the formatter cannot format the current value
*/
public void commitEdit()
@@ -414,17 +414,17 @@ public class JFormattedTextField extends JTextField
// Note: this code is a lot like setValue except that we don't want
// to create a new formatter.
Object oldValue = this.value;
-
+
this.value = formatter.stringToValue(getText());
editValid = true;
-
- firePropertyChange("value", oldValue, this.value);
+
+ firePropertyChange("value", oldValue, this.value);
}
/**
* Gets the command list supplied by the UI augmented by the specific
* Actions for JFormattedTextField.
- *
+ *
* @return an array of Actions that this text field supports
*/
public Action[] getActions()
@@ -436,8 +436,8 @@ public class JFormattedTextField extends JTextField
/**
* Returns the behaviour of this JFormattedTextField upon losing focus. This
- * is one of COMMIT
, COMMIT_OR_REVERT
,
- * PERSIST
, or REVERT
.
+ * is one of COMMIT
, COMMIT_OR_REVERT
,
+ * PERSIST
, or REVERT
.
* @return the behaviour upon losing focus
*/
public int getFocusLostBehavior()
@@ -453,7 +453,7 @@ public class JFormattedTextField extends JTextField
{
return formatter;
}
-
+
/**
* Returns the factory currently used to generate formatters for this
* JFormattedTextField.
@@ -470,9 +470,9 @@ public class JFormattedTextField extends JTextField
}
/**
- * Returns the last valid value. This may not be the value currently shown
- * in the text field depending on whether or not the formatter commits on
- * valid edits and allows invalid input to be temporarily displayed.
+ * Returns the last valid value. This may not be the value currently shown
+ * in the text field depending on whether or not the formatter commits on
+ * valid edits and allows invalid input to be temporarily displayed.
* @return the last committed valid value
*/
public Object getValue()
@@ -482,7 +482,7 @@ public class JFormattedTextField extends JTextField
/**
* This method is used to provide feedback to the user when an invalid value
- * is input during editing.
+ * is input during editing.
*/
protected void invalidEdit()
{
@@ -500,10 +500,10 @@ public class JFormattedTextField extends JTextField
}
/**
- * Processes focus events. This is overridden because we may want to
- * change the formatted depending on whether or not this field has
+ * Processes focus events. This is overridden because we may want to
+ * change the formatted depending on whether or not this field has
* focus.
- *
+ *
* @param evt the FocusEvent
*/
protected void processFocusEvent(FocusEvent evt)
@@ -513,11 +513,11 @@ public class JFormattedTextField extends JTextField
// based on whether or not it has focus.
setFormatter (formatterFactory.getFormatter(this));
}
-
+
/**
* Associates this JFormattedTextField with a Document and propagates
* a PropertyChange event to each listener.
- *
+ *
* @param newDocument the Document to associate with this text field
*/
public void setDocument(Document newDocument)
@@ -528,26 +528,26 @@ public class JFormattedTextField extends JTextField
if (oldDocument == newDocument)
return;
-
+
super.setDocument(newDocument);
}
/**
* Sets the behaviour of this JFormattedTextField upon losing focus.
- * This must be COMMIT
, COMMIT_OR_REVERT
,
- * PERSIST
, or REVERT
or an
+ * This must be COMMIT
, COMMIT_OR_REVERT
,
+ * PERSIST
, or REVERT
or an
* IllegalArgumentException will be thrown.
- *
+ *
* @param behavior
- * @throws IllegalArgumentException if behaviour
is not
+ * @throws IllegalArgumentException if behaviour
is not
* one of the above
*/
public void setFocusLostBehavior(int behavior)
{
if (behavior != COMMIT
- && behavior != COMMIT_OR_REVERT
- && behavior != PERSIST
- && behavior != REVERT)
+ && behavior != COMMIT_OR_REVERT
+ && behavior != PERSIST
+ && behavior != REVERT)
throw new IllegalArgumentException("invalid behavior");
this.focusLostBehavior = behavior;
@@ -556,22 +556,22 @@ public class JFormattedTextField extends JTextField
/**
* Sets the formatter for this JFormattedTextField. Normally the formatter
* factory will take care of this, or calls to setValue will also make sure
- * that the formatter is set appropriately.
- *
+ * that the formatter is set appropriately.
+ *
* @param formatter the AbstractFormatter to use for formatting the value for
* this JFormattedTextField
*/
protected void setFormatter(AbstractFormatter formatter)
{
AbstractFormatter oldFormatter = null;
-
+
oldFormatter = this.formatter;
if (oldFormatter != null)
oldFormatter.uninstall();
-
+
this.formatter = formatter;
-
+
if (formatter != null)
formatter.install(this);
@@ -579,9 +579,9 @@ public class JFormattedTextField extends JTextField
}
/**
- * Sets the factory from which this JFormattedTextField should obtain
- * its formatters.
- *
+ * Sets the factory from which this JFormattedTextField should obtain
+ * its formatters.
+ *
* @param factory the AbstractFormatterFactory that will be used to generate
* formatters for this JFormattedTextField
*/
@@ -589,11 +589,11 @@ public class JFormattedTextField extends JTextField
{
if (formatterFactory == factory)
return;
-
+
AbstractFormatterFactory oldFactory = formatterFactory;
formatterFactory = factory;
firePropertyChange("formatterFactory", oldFactory, factory);
-
+
// Now set the formatter according to our new factory.
if (formatterFactory != null)
setFormatter(formatterFactory.getFormatter(this));
@@ -603,7 +603,7 @@ public class JFormattedTextField extends JTextField
/**
* Sets the value that will be formatted and displayed.
- *
+ *
* @param newValue the value to be formatted and displayed
*/
public void setValue(Object newValue)
@@ -613,11 +613,11 @@ public class JFormattedTextField extends JTextField
Object oldValue = value;
value = newValue;
-
+
// If there is no formatterFactory then make one.
if (formatterFactory == null)
setFormatterFactory(createFormatterFactory(newValue));
-
+
// Set the formatter appropriately. This is because there may be a new
// formatterFactory from the line above, or we may want a new formatter
// depending on the type of newValue (or if newValue is null).
@@ -626,7 +626,7 @@ public class JFormattedTextField extends JTextField
}
/**
- * A helper method that attempts to create a formatter factory that is
+ * A helper method that attempts to create a formatter factory that is
* suitable to format objects of the type like value
.
*
* @param value an object which should be formatted by the formatter factory.
@@ -642,7 +642,7 @@ public class JFormattedTextField extends JTextField
else if (value instanceof Number)
formatter = new NumberFormatter();
else
- formatter = new DefaultFormatter();
+ formatter = new DefaultFormatter();
return new DefaultFormatterFactory(formatter);
}
}
diff --git a/libjava/classpath/javax/swing/JFrame.java b/libjava/classpath/javax/swing/JFrame.java
index 0c956b3..074d1c7 100644
--- a/libjava/classpath/javax/swing/JFrame.java
+++ b/libjava/classpath/javax/swing/JFrame.java
@@ -64,7 +64,7 @@ import javax.accessibility.AccessibleContext;
*
* Also, unlike java.awt.Frame
s, JFrames support the
* Swing Pluggable Look & Feel architecture.
- *
+ *
* @author Ronald Veldema (rveldema@cs.vu.nl)
*/
public class JFrame extends Frame
@@ -100,7 +100,7 @@ public class JFrame extends Frame
private int closeAction = HIDE_ON_CLOSE;
protected AccessibleContext accessibleContext;
protected JRootPane rootPane;
-
+
/**
* @specnote rootPaneCheckingEnabled is false to comply with J2SE 5.0
*/
@@ -117,7 +117,7 @@ public class JFrame extends Frame
/**
* Creates a new JFrame
with the specified title.
- *
+ *
* @param title the frame title (null
permitted).
*/
public JFrame(String title)
@@ -307,7 +307,7 @@ public class JFrame extends Frame
}
/**
- * Returns the object that provides accessibility features for this
+ * Returns the object that provides accessibility features for this
* JFrame
.
*
* @return The accessible context (an instance of {@link AccessibleJFrame}).
@@ -322,11 +322,11 @@ public class JFrame extends Frame
/**
* Returns a code for the default operation when the frame is closed. The
* default value is {@link WindowConstants#HIDE_ON_CLOSE}.
- *
+ *
* @return One of: {@link WindowConstants#DO_NOTHING_ON_CLOSE},
- * {@link WindowConstants#HIDE_ON_CLOSE},
+ * {@link WindowConstants#HIDE_ON_CLOSE},
* {@link WindowConstants#DISPOSE_ON_CLOSE}, {@link #EXIT_ON_CLOSE}.
- *
+ *
* @see #setDefaultCloseOperation(int)
*/
public int getDefaultCloseOperation()
@@ -336,9 +336,9 @@ public class JFrame extends Frame
/**
* Returns a string describing the attributes for the JFrame
,
- * for use in debugging. The return value is guaranteed to be
+ * for use in debugging. The return value is guaranteed to be
* non-null
, but the format may vary between implementations.
- *
+ *
* @return A string describing the attributes of the JFrame
.
*/
protected String paramString()
@@ -360,38 +360,38 @@ public class JFrame extends Frame
if (e.getID() == WindowEvent.WINDOW_CLOSING)
{
switch (closeAction)
- {
- case EXIT_ON_CLOSE:
- System.exit(0);
- break;
- case DISPOSE_ON_CLOSE:
- dispose();
- break;
- case HIDE_ON_CLOSE:
- setVisible(false);
- break;
- case DO_NOTHING_ON_CLOSE:
- break;
- }
+ {
+ case EXIT_ON_CLOSE:
+ System.exit(0);
+ break;
+ case DISPOSE_ON_CLOSE:
+ dispose();
+ break;
+ case HIDE_ON_CLOSE:
+ setVisible(false);
+ break;
+ case DO_NOTHING_ON_CLOSE:
+ break;
+ }
}
}
/**
* Sets the default operation that is performed when this frame is closed.
- * The default is HIDE_ON_CLOSE
. When
+ * The default is HIDE_ON_CLOSE
. When
* EXIT_ON_CLOSE
is specified this method calls
* SecurityManager.checkExit(0)
which might throw a
* SecurityException
.
- *
- * @param operation a code for the operation (one of:
- * {@link WindowConstants#DO_NOTHING_ON_CLOSE},
- * {@link WindowConstants#HIDE_ON_CLOSE},
- * {@link WindowConstants#DISPOSE_ON_CLOSE} and
+ *
+ * @param operation a code for the operation (one of:
+ * {@link WindowConstants#DO_NOTHING_ON_CLOSE},
+ * {@link WindowConstants#HIDE_ON_CLOSE},
+ * {@link WindowConstants#DISPOSE_ON_CLOSE} and
* {@link WindowConstants#EXIT_ON_CLOSE}).
- *
+ *
* @throws IllegalArgumentException if operation
is not one of
* the specified codes.
- *
+ *
* @see #getDefaultCloseOperation()
*/
public void setDefaultCloseOperation(int operation)
@@ -402,7 +402,7 @@ public class JFrame extends Frame
if (operation != EXIT_ON_CLOSE && operation != DISPOSE_ON_CLOSE
&& operation != HIDE_ON_CLOSE && operation != DO_NOTHING_ON_CLOSE)
- throw new IllegalArgumentException("operation must be EXIT_ON_CLOSE, "
+ throw new IllegalArgumentException("operation must be EXIT_ON_CLOSE, "
+ "HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or DO_NOTHING_ON_CLOSE");
closeAction = operation;
diff --git a/libjava/classpath/javax/swing/JInternalFrame.java b/libjava/classpath/javax/swing/JInternalFrame.java
index ff3ae1f..511bc6e 100644
--- a/libjava/classpath/javax/swing/JInternalFrame.java
+++ b/libjava/classpath/javax/swing/JInternalFrame.java
@@ -101,7 +101,7 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns the accessible role for the JInternalFrame
+ * Returns the accessible role for the JInternalFrame
* component.
*
* @return {@link AccessibleRole#INTERNAL_FRAME}.
@@ -112,8 +112,8 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns an object that provides access to the current, minimum and
- * maximum values for the {@link JInternalFrame}. Since this class
+ * Returns an object that provides access to the current, minimum and
+ * maximum values for the {@link JInternalFrame}. Since this class
* implements {@link AccessibleValue}, it returns itself.
*
* @return The accessible value.
@@ -124,7 +124,7 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns the current layer for the {@link JInternalFrame} component,
+ * Returns the current layer for the {@link JInternalFrame} component,
* as an {@link Integer}.
*
* @return The layer for the {@link JInternalFrame} component.
@@ -194,7 +194,7 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns the accessible role for the JDesktopIcon
+ * Returns the accessible role for the JDesktopIcon
* component.
*
* @return {@link AccessibleRole#DESKTOP_ICON}.
@@ -205,8 +205,8 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns an object that provides access to the current, minimum and
- * maximum values for the {@link JDesktopIcon}. Since this class
+ * Returns an object that provides access to the current, minimum and
+ * maximum values for the {@link JDesktopIcon}. Since this class
* implements {@link AccessibleValue}, it returns itself.
*
* @return The accessible value.
@@ -248,10 +248,10 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Sets the layer for the internal frame represented by this
+ * Sets the layer for the internal frame represented by this
* JDesktopIcon
component.
*
- * @param n the layer (see the constants defined in
+ * @param n the layer (see the constants defined in
* {@link JLayeredPane}).
*
* @return true
if the value is set, and false
@@ -286,7 +286,7 @@ public class JInternalFrame extends JComponent implements Accessible,
* Returns the object that provides accessibility features for this
* JDesktopIcon
component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJDesktopIcon}).
*/
public AccessibleContext getAccessibleContext()
@@ -496,8 +496,8 @@ public class JInternalFrame extends JComponent implements Accessible,
private transient boolean wasIcon = false;
/**
- * Creates a new JInternalFrame object that has an empty string for its
- * title, and is non-resizable, non-maximizable, non-iconifiable, and
+ * Creates a new JInternalFrame object that has an empty string for its
+ * title, and is non-resizable, non-maximizable, non-iconifiable, and
* non-closable.
*/
public JInternalFrame()
@@ -672,11 +672,11 @@ public class JInternalFrame extends JComponent implements Accessible,
switch (getDefaultCloseOperation())
{
case HIDE_ON_CLOSE:
- setVisible(false);
- break;
+ setVisible(false);
+ break;
case DISPOSE_ON_CLOSE:
- dispose();
- break;
+ dispose();
+ break;
}
}
@@ -692,59 +692,59 @@ public class JInternalFrame extends JComponent implements Accessible,
switch (id)
{
case InternalFrameEvent.INTERNAL_FRAME_CLOSING:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1])
- .internalFrameClosing(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1])
+ .internalFrameClosing(evt);
+ }
+ break;
case InternalFrameEvent.INTERNAL_FRAME_ACTIVATED:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1])
- .internalFrameActivated(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1])
+ .internalFrameActivated(evt);
+ }
+ break;
case InternalFrameEvent.INTERNAL_FRAME_CLOSED:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1]).internalFrameClosed(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1]).internalFrameClosed(evt);
+ }
+ break;
case InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1])
- .internalFrameDeactivated(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1])
+ .internalFrameDeactivated(evt);
+ }
+ break;
case InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1])
- .internalFrameDeiconified(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1])
+ .internalFrameDeiconified(evt);
+ }
+ break;
case InternalFrameEvent.INTERNAL_FRAME_ICONIFIED:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1])
- .internalFrameIconified(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1])
+ .internalFrameIconified(evt);
+ }
+ break;
case InternalFrameEvent.INTERNAL_FRAME_OPENED:
- for (int i = ifListeners.length - 2; i >= 0; i -= 2)
- {
- if (ifListeners[i] == InternalFrameListener.class)
- ((InternalFrameListener) ifListeners[i + 1]).internalFrameOpened(evt);
- }
- break;
+ for (int i = ifListeners.length - 2; i >= 0; i -= 2)
+ {
+ if (ifListeners[i] == InternalFrameListener.class)
+ ((InternalFrameListener) ifListeners[i + 1]).internalFrameOpened(evt);
+ }
+ break;
}
}
@@ -752,7 +752,7 @@ public class JInternalFrame extends JComponent implements Accessible,
* Returns the object that provides accessibility features for this
* JInternalFrame
component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJInternalFrame}).
*/
public AccessibleContext getAccessibleContext()
@@ -773,14 +773,14 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns a code for the default action taken when this
+ * Returns a code for the default action taken when this
* JInternalFrame
is closed.
*
- * @return The action code (usually one of
- * {@link WindowConstants#DO_NOTHING_ON_CLOSE},
- * {@link WindowConstants#HIDE_ON_CLOSE}, or
+ * @return The action code (usually one of
+ * {@link WindowConstants#DO_NOTHING_ON_CLOSE},
+ * {@link WindowConstants#HIDE_ON_CLOSE}, or
* {@link WindowConstants#DISPOSE_ON_CLOSE}).
- *
+ *
* @see #setDefaultCloseOperation(int)
* @see #doDefaultCloseAction()
*/
@@ -790,7 +790,7 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Returns the JDesktopIcon
that represents this
+ * Returns the JDesktopIcon
that represents this
* JInternalFrame
while it is iconified.
*
* @return The desktop icon component.
@@ -840,12 +840,12 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (isSelected())
{
- Component focus = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
- if (SwingUtilities.isDescendingFrom(focus, this))
- {
- defaultFocus = focus;
- return focus;
- }
+ Component focus = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
+ if (SwingUtilities.isDescendingFrom(focus, this))
+ {
+ defaultFocus = focus;
+ return focus;
+ }
}
return null;
}
@@ -975,7 +975,7 @@ public class JInternalFrame extends JComponent implements Accessible,
* Returns the frame's title.
*
* @return The frame's title (can be null
).
- *
+ *
* @see #setTitle(String)
*/
public String getTitle()
@@ -1161,14 +1161,14 @@ public class JInternalFrame extends JComponent implements Accessible,
{
try
{
- if (isIcon())
- setIcon(false);
- else if (isMaximum())
- setMaximum(false);
+ if (isIcon())
+ setIcon(false);
+ else if (isMaximum())
+ setMaximum(false);
}
catch (PropertyVetoException e)
{
- // Do nothing if they don't want to be restored first.
+ // Do nothing if they don't want to be restored first.
}
setSize(getPreferredSize());
validate();
@@ -1186,10 +1186,10 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * An implementation dependent string describing the current state of this
+ * An implementation dependent string describing the current state of this
* JInternalFrame
instance.
*
- * @return A string describing the current state of this
+ * @return A string describing the current state of this
* JInternalFrame
instance.
*/
protected String paramString()
@@ -1300,22 +1300,22 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (c != getContentPane())
{
- Container old = getContentPane();
- getRootPane().setContentPane(c);
- firePropertyChange(CONTENT_PANE_PROPERTY, old, c);
+ Container old = getContentPane();
+ getRootPane().setContentPane(c);
+ firePropertyChange(CONTENT_PANE_PROPERTY, old, c);
}
}
/**
- * Sets a code for the action to be taken when this
- * JInternalFrame
is closed. Note that no validation is
- * performed on the operation
code, any integer will be
+ * Sets a code for the action to be taken when this
+ * JInternalFrame
is closed. Note that no validation is
+ * performed on the operation
code, any integer will be
* accepted (nevertheless, you should pass in one of the listed values).
*
- * @param operation one of {@link WindowConstants#DO_NOTHING_ON_CLOSE},
- * {@link WindowConstants#HIDE_ON_CLOSE} or
+ * @param operation one of {@link WindowConstants#DO_NOTHING_ON_CLOSE},
+ * {@link WindowConstants#HIDE_ON_CLOSE} or
* {@link WindowConstants#DISPOSE_ON_CLOSE}.
- *
+ *
* @see #getDefaultCloseOperation()
* @see #doDefaultCloseAction()
*/
@@ -1329,14 +1329,14 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Sets the JDesktopIcon
instance that represents this
+ * Sets the JDesktopIcon
instance that represents this
* JInternalFrame
while it is iconified and, if the new icon is
- * not the same instance as the existing icon, sends a
- * {@link PropertyChangeEvent} (with the property name
+ * not the same instance as the existing icon, sends a
+ * {@link PropertyChangeEvent} (with the property name
* "desktopIcon"
) to all registered listeners..
*
* @param d the icon.
- *
+ *
* @see #getDesktopIcon()
*/
public void setDesktopIcon(JDesktopIcon d)
@@ -1374,9 +1374,9 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (icon != frameIcon)
{
- Icon old = frameIcon;
- frameIcon = icon;
- firePropertyChange(FRAME_ICON_PROPERTY, old, frameIcon);
+ Icon old = frameIcon;
+ frameIcon = icon;
+ firePropertyChange(FRAME_ICON_PROPERTY, old, frameIcon);
}
}
@@ -1389,9 +1389,9 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (glass != getGlassPane())
{
- Component old = getGlassPane();
- getRootPane().setGlassPane(glass);
- firePropertyChange(GLASS_PANE_PROPERTY, old, glass);
+ Component old = getGlassPane();
+ getRootPane().setGlassPane(glass);
+ firePropertyChange(GLASS_PANE_PROPERTY, old, glass);
}
}
@@ -1409,15 +1409,15 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (b != isIcon())
{
- fireVetoableChange(IS_ICON_PROPERTY, b, isIcon);
+ fireVetoableChange(IS_ICON_PROPERTY, b, isIcon);
- isIcon = b;
+ isIcon = b;
- firePropertyChange(IS_ICON_PROPERTY, ! isIcon, isIcon);
- if (b)
- fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_ICONIFIED);
- else
- fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED);
+ firePropertyChange(IS_ICON_PROPERTY, ! isIcon, isIcon);
+ if (b)
+ fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_ICONIFIED);
+ else
+ fireInternalFrameEvent(InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED);
}
}
@@ -1496,9 +1496,9 @@ public class JInternalFrame extends JComponent implements Accessible,
if (layered != getLayeredPane())
{
- JLayeredPane old = getLayeredPane();
- getRootPane().setLayeredPane(layered);
- firePropertyChange(LAYERED_PANE_PROPERTY, old, layered);
+ JLayeredPane old = getLayeredPane();
+ getRootPane().setLayeredPane(layered);
+ firePropertyChange(LAYERED_PANE_PROPERTY, old, layered);
}
}
@@ -1549,9 +1549,9 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (b != isMaximum)
{
- fireVetoableChange(IS_MAXIMUM_PROPERTY, isMaximum, b);
- isMaximum = b;
- firePropertyChange(IS_MAXIMUM_PROPERTY, ! isMaximum, isMaximum);
+ fireVetoableChange(IS_MAXIMUM_PROPERTY, isMaximum, b);
+ isMaximum = b;
+ firePropertyChange(IS_MAXIMUM_PROPERTY, ! isMaximum, isMaximum);
}
}
@@ -1673,12 +1673,12 @@ public class JInternalFrame extends JComponent implements Accessible,
}
/**
- * Sets the title for the JInternalFrame
and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * Sets the title for the JInternalFrame
and sends a
+ * {@link PropertyChangeEvent} (with the property name
* {@link #TITLE_PROPERTY}) to all registered listeners.
*
* @param title the new title (null
permitted).
- *
+ *
* @see #getTitle()
*/
public void setTitle(String title)
@@ -1767,7 +1767,7 @@ public class JInternalFrame extends JComponent implements Accessible,
// We must go into the init stage when updating the UI, so the UI can
// set layout and components directly on the internal frame, not its
// content pane.
- boolean old = isRootPaneCheckingEnabled();
+ boolean old = isRootPaneCheckingEnabled();
setRootPaneCheckingEnabled(false);
setUI((InternalFrameUI) UIManager.getUI(this));
setRootPaneCheckingEnabled(old);
@@ -1785,8 +1785,8 @@ public class JInternalFrame extends JComponent implements Accessible,
{
if (b && ! wasIcon)
{
- wasIcon = b;
- firePropertyChange(ID, ! b, b);
+ wasIcon = b;
+ firePropertyChange(ID, ! b, b);
}
}
diff --git a/libjava/classpath/javax/swing/JLabel.java b/libjava/classpath/javax/swing/JLabel.java
index 2bbd1ee..72354c5 100644
--- a/libjava/classpath/javax/swing/JLabel.java
+++ b/libjava/classpath/javax/swing/JLabel.java
@@ -78,10 +78,10 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
extends JComponent.AccessibleJComponent
implements AccessibleText, AccessibleExtendedComponent
{
-
+
/**
* Returns the accessible name.
- *
+ *
* @return The accessible name.
*/
public String getAccessibleName()
@@ -93,7 +93,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
else
return super.getAccessibleName();
}
-
+
/**
* Returns the accessible role for the JLabel
component.
*
@@ -103,7 +103,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
{
return AccessibleRole.LABEL;
}
-
+
/**
* Returns the selected text. This is null since JLabels
* are not selectable.
@@ -456,7 +456,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Creates a new horizontally leading and vertically centered JLabel
+ * Creates a new horizontally leading and vertically centered JLabel
* object with no icon and the given text.
*
* @param text The text to use with the label, null
permitted.
@@ -492,13 +492,13 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
public JLabel(String text, Icon icon, int horizontalAlignment)
{
- if (horizontalAlignment != SwingConstants.LEFT
- && horizontalAlignment != SwingConstants.RIGHT
- && horizontalAlignment != SwingConstants.CENTER
- && horizontalAlignment != SwingConstants.LEADING
+ if (horizontalAlignment != SwingConstants.LEFT
+ && horizontalAlignment != SwingConstants.RIGHT
+ && horizontalAlignment != SwingConstants.CENTER
+ && horizontalAlignment != SwingConstants.LEADING
&& horizontalAlignment != SwingConstants.TRAILING)
throw new IllegalArgumentException();
-
+
this.text = text;
this.icon = icon;
this.horizontalAlignment = horizontalAlignment;
@@ -528,7 +528,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Resets the label's UI delegate to the default UI for the current look and
+ * Resets the label's UI delegate to the default UI for the current look and
* feel.
*/
public void updateUI()
@@ -549,7 +549,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Returns a string describing the attributes for the JLabel
- * component, for use in debugging. The return value is guaranteed to be
+ * component, for use in debugging. The return value is guaranteed to be
* non-null
, but the format of the string may vary between
* implementations.
*
@@ -590,7 +590,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* Returns the text displayed by the label.
*
* @return The label text (possibly null
).
- *
+ *
* @see #setText(String)
*/
public String getText()
@@ -600,11 +600,11 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the text for the label and sends a {@link PropertyChangeEvent} (with
- * the name 'text') to all registered listeners. This method will also
+ * the name 'text') to all registered listeners. This method will also
* update the displayedMnemonicIndex
, if necessary.
*
* @param newText The text (null
permitted).
- *
+ *
* @see #getText()
* @see #getDisplayedMnemonicIndex()
*/
@@ -628,11 +628,11 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Returns the active icon. The active icon is painted when the label is
+ * Returns the active icon. The active icon is painted when the label is
* enabled.
*
* @return The active icon.
- *
+ *
* @see #setIcon(Icon)
* @see #getDisabledIcon()
*/
@@ -642,11 +642,11 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Sets the icon for the label (this is a bound property with the name
+ * Sets the icon for the label (this is a bound property with the name
* 'icon'). This icon will be displayed when the label is enabled.
*
* @param newIcon The icon (null
permitted).
- *
+ *
* @see #getIcon()
* @see #setDisabledIcon(Icon)
*/
@@ -662,13 +662,13 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Returns the disabled icon. The disabled icon is painted when the label is
+ * Returns the disabled icon. The disabled icon is painted when the label is
* disabled. If the disabled icon is null
and the active icon
- * is an {@link ImageIcon}, this method returns a grayed version of the icon.
+ * is an {@link ImageIcon}, this method returns a grayed version of the icon.
* The grayed version of the icon becomes the disabledIcon
.
*
* @return The disabled icon.
- *
+ *
* @see #setDisabledIcon(Icon)
*/
public Icon getDisabledIcon()
@@ -685,7 +685,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* property with the name 'disabledIcon').
*
* @param newIcon The disabled icon (null
permitted).
- *
+ *
* @see #getDisabledIcon()
*/
public void setDisabledIcon(Icon newIcon)
@@ -700,12 +700,12 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the keycode that will be the label's mnemonic (this is a bound
- * property with the name 'displayedMnemonic'). If the label is used as a
- * label for another component, the label will give focus to that component
+ * property with the name 'displayedMnemonic'). If the label is used as a
+ * label for another component, the label will give focus to that component
* when the mnemonic is activated.
*
* @param mnemonic The keycode to use for the mnemonic.
- *
+ *
* @see #getDisplayedMnemonic()
*/
public void setDisplayedMnemonic(int mnemonic)
@@ -727,7 +727,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*
* @param mnemonic The character to use for the mnemonic (this will be
* converted to the equivalent upper case character).
- *
+ *
* @see #getDisplayedMnemonic()
*/
public void setDisplayedMnemonic(char mnemonic)
@@ -739,7 +739,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* Returns the keycode that is used for the label's mnemonic.
*
* @return The keycode that is used for the label's mnemonic.
- *
+ *
* @see #setDisplayedMnemonic(int)
*/
public int getDisplayedMnemonic()
@@ -755,7 +755,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* character 'n', you might wish to underline the second occurrence of 'n'
* rather than the first (which is the default).
*
- * Note that this method does not validate the character at the specified
+ * Note that this method does not validate the character at the specified
* index to ensure that it matches the key code returned by
* {@link #getDisplayedMnemonic()}.
*
@@ -763,7 +763,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*
* @throws IllegalArgumentException If index less than -1 or index is greater
* than or equal to the label length.
- *
+ *
* @see #getDisplayedMnemonicIndex()
* @since 1.4
*/
@@ -790,7 +790,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* character is to be underlined.
*
* @return The index of the character that will be underlined.
- *
+ *
* @see #setDisplayedMnemonicIndex(int)
* @since 1.4
*/
@@ -800,9 +800,9 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Checks the specified key to ensure that it is valid as a horizontal
+ * Checks the specified key to ensure that it is valid as a horizontal
* alignment, throwing an {@link IllegalArgumentException} if the key is
- * invalid. Valid keys are {@link #LEFT}, {@link #CENTER}, {@link #RIGHT},
+ * invalid. Valid keys are {@link #LEFT}, {@link #CENTER}, {@link #RIGHT},
* {@link #LEADING} and {@link #TRAILING}.
*
* @param key The key to check.
@@ -823,7 +823,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Checks the specified key to ensure that it is valid as a vertical
+ * Checks the specified key to ensure that it is valid as a vertical
* alignment, throwing an {@link IllegalArgumentException} if the key is
* invalid. Valid keys are {@link #TOP}, {@link #CENTER} and {@link #BOTTOM}.
*
@@ -847,7 +847,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* Returns the gap between the icon and the text.
*
* @return The gap between the icon and the text.
- *
+ *
* @see #setIconTextGap(int)
*/
public int getIconTextGap()
@@ -856,19 +856,19 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Sets the gap between the icon and the text, in the case that both are
- * visible (this is a bound property with the name 'iconTextGap').
+ * Sets the gap between the icon and the text, in the case that both are
+ * visible (this is a bound property with the name 'iconTextGap').
*
* @param newGap The gap (in pixels).
- *
+ *
* @see #getIconTextGap()
*/
public void setIconTextGap(int newGap)
{
if (iconTextGap != newGap)
{
- firePropertyChange("iconTextGap", iconTextGap, newGap);
- iconTextGap = newGap;
+ firePropertyChange("iconTextGap", iconTextGap, newGap);
+ iconTextGap = newGap;
}
}
@@ -878,7 +878,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* depends on the installed look and feel, but is usually {@link #CENTER}.
*
* @return The vertical alignment.
- *
+ *
* @see #setVerticalAlignment(int)
*/
public int getVerticalAlignment()
@@ -888,16 +888,16 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the vertical alignment for the label (this is a bound property with
- * the name 'verticalAlignment'). The vertical alignment determines where
- * the label (icon and text) will be placed vertically within the component
- * bounds. Valid alignment codes are {@link #TOP}, {@link #CENTER} and
+ * the name 'verticalAlignment'). The vertical alignment determines where
+ * the label (icon and text) will be placed vertically within the component
+ * bounds. Valid alignment codes are {@link #TOP}, {@link #CENTER} and
* {@link #BOTTOM}.
*
* @param alignment The vertical alignment of the label.
- *
- * @throws IllegalArgumentException if alignment
is not one of
+ *
+ * @throws IllegalArgumentException if alignment
is not one of
* the specified values.
- *
+ *
* @see #getVerticalAlignment()
*/
public void setVerticalAlignment(int alignment)
@@ -911,13 +911,13 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Returns the horizontal alignment of the label (one of {@link #LEFT},
+ * Returns the horizontal alignment of the label (one of {@link #LEFT},
* {@link #CENTER}, {@link #RIGHT}, {@link #LEADING} and {@link #TRAILING}).
- * The default value depends on the installed look and feel, but is usually
+ * The default value depends on the installed look and feel, but is usually
* {@link #LEFT}.
*
* @return The horizontal alignment.
- *
+ *
* @see #setHorizontalAlignment(int)
*/
public int getHorizontalAlignment()
@@ -927,23 +927,23 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the horizontal alignment for the label (this is a bound property with
- * the name 'horizontalAlignment'). The horizontal alignment determines where
- * the label (icon and text) will be placed horizontally within the
- * component bounds. Valid alignment codes are {@link #LEFT},
+ * the name 'horizontalAlignment'). The horizontal alignment determines where
+ * the label (icon and text) will be placed horizontally within the
+ * component bounds. Valid alignment codes are {@link #LEFT},
* {@link #CENTER}, {@link #RIGHT}, {@link #LEADING} and {@link #TRAILING}.
*
* @param alignment The horizontal alignment of the label.
- *
- * @throws IllegalArgumentException if alignment
is not one of
+ *
+ * @throws IllegalArgumentException if alignment
is not one of
* the specified values.
- *
+ *
* @see #getHorizontalAlignment()
*/
public void setHorizontalAlignment(int alignment)
{
if (horizontalAlignment == alignment)
return;
-
+
int oldAlignment = horizontalAlignment;
horizontalAlignment = checkHorizontalKey(alignment, "horizontalAlignment");
firePropertyChange("horizontalAlignment", oldAlignment,
@@ -951,11 +951,11 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
}
/**
- * Returns the vertical position of the label's text relative to the icon.
+ * Returns the vertical position of the label's text relative to the icon.
* This will be one of {@link #TOP}, {@link #CENTER} and {@link #BOTTOM}.
- *
+ *
* @return The vertical position of the label's text relative to the icon.
- *
+ *
* @see #setVerticalTextPosition(int)
*/
public int getVerticalTextPosition()
@@ -965,11 +965,11 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the vertical position of the label's text relative to the icon (this
- * is a bound property with the name 'verticalTextPosition'). Valid
+ * is a bound property with the name 'verticalTextPosition'). Valid
* positions are {@link #TOP}, {@link #CENTER} and {@link #BOTTOM}.
*
* @param textPosition The vertical text position.
- *
+ *
* @throws IllegalArgumentException if textPosition
is not one
* of the specified values.
*/
@@ -979,19 +979,19 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
{
int oldPos = verticalTextPosition;
verticalTextPosition = checkVerticalKey(textPosition,
- "verticalTextPosition");
- firePropertyChange("verticalTextPosition", oldPos,
+ "verticalTextPosition");
+ firePropertyChange("verticalTextPosition", oldPos,
verticalTextPosition);
}
}
/**
- * Returns the horizontal position of the label's text relative to the icon.
- * This will be one of {@link #LEFT}, {@link #CENTER}, {@link #RIGHT},
+ * Returns the horizontal position of the label's text relative to the icon.
+ * This will be one of {@link #LEFT}, {@link #CENTER}, {@link #RIGHT},
* {@link #LEADING} and {@link #TRAILING}.
- *
+ *
* @return The horizontal position of the label's text relative to the icon.
- *
+ *
* @see #setHorizontalTextPosition(int)
*/
public int getHorizontalTextPosition()
@@ -1001,12 +1001,12 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the horizontal position of the label's text relative to the icon (this
- * is a bound property with the name 'horizontalTextPosition'). Valid
- * positions are {@link #LEFT}, {@link #CENTER}, {@link #RIGHT},
+ * is a bound property with the name 'horizontalTextPosition'). Valid
+ * positions are {@link #LEFT}, {@link #CENTER}, {@link #RIGHT},
* {@link #LEADING} and {@link #TRAILING}.
*
* @param textPosition The horizontal text position.
- *
+ *
* @throws IllegalArgumentException if textPosition
is not one
* of the specified values.
*/
@@ -1017,13 +1017,13 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
int oldPos = horizontalTextPosition;
horizontalTextPosition = checkHorizontalKey(textPosition,
"horizontalTextPosition");
- firePropertyChange("horizontalTextPosition", oldPos,
+ firePropertyChange("horizontalTextPosition", oldPos,
horizontalTextPosition);
}
}
/**
- * Returns false if the current icon image (current icon will depend on
+ * Returns false if the current icon image (current icon will depend on
* whether the label is enabled) is not equal to the passed in image.
*
* @param img The image to check.
@@ -1050,7 +1050,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Returns the component that this JLabel
is providing the label
- * for. This component will typically receive the focus when the label's
+ * for. This component will typically receive the focus when the label's
* mnemonic key is activated via the keyboard.
*
* @return The component (possibly null
).
@@ -1063,11 +1063,11 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/**
* Sets the component that this JLabel
is providing the label
* for (this is a bound property with the name 'labelFor'). This component
- * will typically receive the focus when the label's mnemonic key is
+ * will typically receive the focus when the label's mnemonic key is
* activated via the keyboard.
*
* @param c the component (null
permitted).
- *
+ *
* @see #getLabelFor()
*/
public void setLabelFor(Component c)
diff --git a/libjava/classpath/javax/swing/JLayeredPane.java b/libjava/classpath/javax/swing/JLayeredPane.java
index d981788..9a4e31e 100644
--- a/libjava/classpath/javax/swing/JLayeredPane.java
+++ b/libjava/classpath/javax/swing/JLayeredPane.java
@@ -1,4 +1,4 @@
-/* JLayeredPane.java --
+/* JLayeredPane.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -85,7 +85,7 @@ import javax.accessibility.AccessibleRole;
* JLayeredPane
, use the {@link #setLayer(Component, int)}
+ * a JLayeredPane
, use the {@link #setLayer(Component, int)}
* method.
- *
component
array held in our ancestor,
* {@link java.awt.Container}, from [0 .. component.length)
. The drawing
* rule with indices is that 0 is drawn last.JLayeredPane
.
*/
@@ -136,7 +136,7 @@ public class JLayeredPane extends JComponent implements Accessible
/**
* Returns the accessble role of JLayeredPane
,
- * {@link AccessibleRole#LAYERED_PANE}.
+ * {@link AccessibleRole#LAYERED_PANE}.
*/
public AccessibleRole getAccessibleRole()
{
@@ -145,7 +145,7 @@ public class JLayeredPane extends JComponent implements Accessible
}
private static final long serialVersionUID = 5534920399324590459L;
-
+
public static final String LAYER_PROPERTY = "layeredContainerLayer";
public static final Integer FRAME_CONTENT_LAYER = new Integer(-30000);
@@ -164,7 +164,7 @@ public class JLayeredPane extends JComponent implements Accessible
setLayout(null);
}
- /**
+ /**
* Looks up the layer a child component is currently assigned to.
*
* If c
is an instance of {@link JComponent}, then the layer
@@ -199,7 +199,7 @@ public class JLayeredPane extends JComponent implements Accessible
* Looks up the layer in the client property with the key
* {@link #LAYER_PROPERTY} of comp
. If no such property can be
* found, we return 0
({@link #DEFAULT_LAYER}).
- *
+ *
* @param comp the component for which the layer is looked up
*
* @return the layer of comp
as stored in the corresponding
@@ -313,7 +313,7 @@ public class JLayeredPane extends JComponent implements Accessible
/**
* Return the position of a component within its layer. Positions are assigned
- * from the "front" (position 0) to the "back" (position N-1), and drawn from
+ * from the "front" (position 0) to the "back" (position N-1), and drawn from
* the back towards the front.
*
* @param c the component to get the position of
@@ -344,7 +344,7 @@ public class JLayeredPane extends JComponent implements Accessible
/**
* Change the position of a component within its layer. Positions are assigned
- * from the "front" (position 0) to the "back" (position N-1), and drawn from
+ * from the "front" (position 0) to the "back" (position N-1), and drawn from
* the back towards the front.
*
* @param c the component to change the position of
@@ -356,7 +356,7 @@ public class JLayeredPane extends JComponent implements Accessible
{
setLayer(c, getLayer(c), position);
}
-
+
/**
* Return an array of all components within a layer of this
* container. Components are ordered front-to-back, with the "front"
@@ -420,9 +420,9 @@ public class JLayeredPane extends JComponent implements Accessible
* @param c the component to look up.
*
* @return the external index of the component or -1
if
- * c
is not a child of this layered pane
+ * c
is not a child of this layered pane
*/
- public int getIndexOf(Component c)
+ public int getIndexOf(Component c)
{
return getComponentZOrder(c);
}
@@ -439,28 +439,28 @@ public class JLayeredPane extends JComponent implements Accessible
protected Integer getObjectForLayer(int layer)
{
switch (layer)
- {
- case -30000:
+ {
+ case -30000:
return FRAME_CONTENT_LAYER;
- case 0:
+ case 0:
return DEFAULT_LAYER;
- case 100:
+ case 100:
return PALETTE_LAYER;
- case 200:
+ case 200:
return MODAL_LAYER;
- case 300:
+ case 300:
return POPUP_LAYER;
- case 400:
+ case 400:
return DRAG_LAYER;
- default:
+ default:
break;
- }
+ }
return new Integer(layer);
}
@@ -579,8 +579,8 @@ public class JLayeredPane extends JComponent implements Accessible
*/
public void removeAll()
{
- componentToLayer.clear();
- super.removeAll();
+ componentToLayer.clear();
+ super.removeAll();
}
/**
@@ -650,7 +650,7 @@ public class JLayeredPane extends JComponent implements Accessible
* component to
* @param index the position within the layer
*/
- protected void addImpl(Component comp, Object layerConstraint, int index)
+ protected void addImpl(Component comp, Object layerConstraint, int index)
{
int layer;
if (layerConstraint != null && layerConstraint instanceof Integer)
@@ -726,14 +726,14 @@ public class JLayeredPane extends JComponent implements Accessible
boolean result = true;
for (int i = 0; i < numChildren; ++i)
{
- Component c1 = getComponent(i);
- if (! c1.isVisible())
+ Component c1 = getComponent(i);
+ if (! c1.isVisible())
continue;
- Rectangle r1 = c1.getBounds();
- if (r1.isEmpty())
+ Rectangle r1 = c1.getBounds();
+ if (r1.isEmpty())
continue;
- for (int j = i + 1; j < numChildren; ++j)
+ for (int j = i + 1; j < numChildren; ++j)
{
Component c2 = getComponent(j);
if (! c2.isVisible())
diff --git a/libjava/classpath/javax/swing/JList.java b/libjava/classpath/javax/swing/JList.java
index bd74406..b12fda3 100644
--- a/libjava/classpath/javax/swing/JList.java
+++ b/libjava/classpath/javax/swing/JList.java
@@ -115,7 +115,7 @@ import javax.swing.text.Position;
*
* UIClassID list no
* valueIsAdjusting list no
- *
+ *
*
* @author Graydon Hoare (graydon@redhat.com)
*/
@@ -277,7 +277,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns the font metrics for the specified font. This method forwards
- * to the parent visibleRowCount list no JList
.
+ * to the parent JList
.
*
* @param font the font for which the font metrics is queried
*
@@ -539,7 +539,7 @@ public class JList extends JComponent implements Accessible, Scrollable
// selectable. Is there a way to disable single children?
if (parent.isEnabled())
states.add(AccessibleState.SELECTABLE);
-
+
if (parent.isSelectedIndex(listIndex))
states.add(AccessibleState.SELECTED);
@@ -613,10 +613,10 @@ public class JList extends JComponent implements Accessible, Scrollable
{
// Do nothing here.
}
-
+
// TODO: Implement the remaining methods of this class.
}
-
+
/**
* Create a new AccessibleJList.
*/
@@ -854,23 +854,23 @@ public class JList extends JComponent implements Accessible, Scrollable
private static final long serialVersionUID = 4406629526391098046L;
- /**
+ /**
* Constant value used in "layoutOrientation" property. This value means
- * that cells are laid out in a single vertical column. This is the default.
+ * that cells are laid out in a single vertical column. This is the default.
*/
public static final int VERTICAL = 0;
- /**
+ /**
* Constant value used in "layoutOrientation" property. This value means
* that cells are laid out in multiple columns "newspaper style", filling
- * vertically first, then horizontally.
+ * vertically first, then horizontally.
*/
public static final int VERTICAL_WRAP = 1;
-
- /**
+
+ /**
* Constant value used in "layoutOrientation" property. This value means
* that cells are laid out in multiple columns "newspaper style",
- * filling horizontally first, then vertically.
+ * filling horizontally first, then vertically.
*/
public static final int HORIZONTAL_WRAP = 2;
@@ -890,7 +890,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* the {@link #prototypeCellValue} property.
*/
int fixedCellWidth;
-
+
/**
* This property indicates an fixed height to assign to all cells in the
* list. If its value is -1
, no height has been
@@ -899,13 +899,13 @@ public class JList extends JComponent implements Accessible, Scrollable
*/
int fixedCellHeight;
- /**
+ /**
* This property holds the current layout orientation of the list, which
* is one of the integer constants {@link #VERTICAL}, {@link
- * #VERTICAL_WRAP}, or {@link #HORIZONTAL_WRAP}.
+ * #VERTICAL_WRAP}, or {@link #HORIZONTAL_WRAP}.
*/
int layoutOrientation;
-
+
/** This property holds the data elements displayed by the list. */
ListModel model;
@@ -923,7 +923,7 @@ public class JList extends JComponent implements Accessible, Scrollable
*/
Object prototypeCellValue;
- /**
+ /**
* This property specifies a foreground color for the selected cells in
* the list. When {@link ListCellRenderer#getListCellRendererComponent}
* is called with a selected cell object, the component returned will
@@ -931,7 +931,7 @@ public class JList extends JComponent implements Accessible, Scrollable
*/
Color selectionBackground;
- /**
+ /**
* This property specifies a background color for the selected cells in
* the list. When {@link ListCellRenderer#getListCellRendererComponent}
* is called with a selected cell object, the component returned will
@@ -939,14 +939,14 @@ public class JList extends JComponent implements Accessible, Scrollable
*/
Color selectionForeground;
- /**
+ /**
* This property holds a description of which data elements in the {@link
* #model} property should be considered "selected", when displaying and
* interacting with the list.
*/
ListSelectionModel selectionModel;
- /**
+ /**
* This property indicates a preference for the number of rows
* displayed in the list, and will scale the
* {@link #getPreferredScrollableViewportSize} property accordingly. The actual
@@ -956,18 +956,18 @@ public class JList extends JComponent implements Accessible, Scrollable
int visibleRowCount;
/**
- * Fire a {@link ListSelectionEvent} to all the registered
+ * Fire a {@link ListSelectionEvent} to all the registered
* ListSelectionListeners.
- *
+ *
* @param firstIndex the lowest index covering the selection change.
* @param lastIndex the highest index covering the selection change.
* @param isAdjusting a flag indicating if this event is one in a series
* of events updating the selection.
*/
- protected void fireSelectionValueChanged(int firstIndex, int lastIndex,
- boolean isAdjusting)
+ protected void fireSelectionValueChanged(int firstIndex, int lastIndex,
+ boolean isAdjusting)
{
- ListSelectionEvent evt = new ListSelectionEvent(this, firstIndex,
+ ListSelectionEvent evt = new ListSelectionEvent(this, firstIndex,
lastIndex, isAdjusting);
ListSelectionListener listeners[] = getListSelectionListeners();
for (int i = 0; i < listeners.length; ++i)
@@ -984,7 +984,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* class receives either type of event, it triggers repainting of the
* list.
*/
- private class ListListener
+ private class ListListener
implements ListSelectionListener, ListDataListener
{
// ListDataListener events
@@ -1013,7 +1013,7 @@ public class JList extends JComponent implements Accessible, Scrollable
}
}
- /**
+ /**
* Shared ListListener instance, subscribed to both the current {@link
* #model} and {@link #selectionModel} properties of the list.
*/
@@ -1053,8 +1053,8 @@ public class JList extends JComponent implements Accessible, Scrollable
*
* @param model a model containing the list items (null
not
* permitted).
- *
- * @throws IllegalArgumentException if model
is
+ *
+ * @throws IllegalArgumentException if model
is
* null
.
*/
public JList(ListModel model)
@@ -1093,7 +1093,7 @@ public class JList extends JComponent implements Accessible, Scrollable
(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
}
setLayout(null);
-
+
updateUI();
}
@@ -1106,15 +1106,15 @@ public class JList extends JComponent implements Accessible, Scrollable
{
return new DefaultListSelectionModel();
}
-
+
/**
* Gets the value of the {@link #fixedCellHeight} property. This property
* may be -1
to indicate that no cell height has been
* set. This property is also set implicitly when the
* {@link #prototypeCellValue} property is set.
*
- * @return The current value of the property
- *
+ * @return The current value of the property
+ *
* @see #fixedCellHeight
* @see #setFixedCellHeight
* @see #setPrototypeCellValue
@@ -1132,7 +1132,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* overrides the height computed from {@link #prototypeCellValue}.
*
* @param h the height.
- *
+ *
* @see #getFixedCellHeight
* @see #getPrototypeCellValue
*/
@@ -1153,8 +1153,8 @@ public class JList extends JComponent implements Accessible, Scrollable
* set. This property is also set implicitly when the {@link
* #prototypeCellValue} property is set.
*
- * @return The current value of the property
- *
+ * @return The current value of the property
+ *
* @see #setFixedCellWidth
* @see #setPrototypeCellValue
*/
@@ -1171,7 +1171,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* overrides the width computed from {@link #prototypeCellValue}.
*
* @param w the width.
- *
+ *
* @see #getFixedCellHeight
* @see #getPrototypeCellValue
*/
@@ -1179,18 +1179,18 @@ public class JList extends JComponent implements Accessible, Scrollable
{
if (fixedCellWidth == w)
return;
-
+
int old = fixedCellWidth;
fixedCellWidth = w;
firePropertyChange("fixedCellWidth", old, w);
}
- /**
- * Gets the value of the {@link #visibleRowCount} property. The default
+ /**
+ * Gets the value of the {@link #visibleRowCount} property. The default
* value is 8.
*
* @return the current value of the property.
- *
+ *
* @see #setVisibleRowCount(int)
*/
public int getVisibleRowCount()
@@ -1199,10 +1199,10 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Sets the value of the {@link #visibleRowCount} property.
+ * Sets the value of the {@link #visibleRowCount} property.
*
* @param vc The new property value
- *
+ *
* @see #getVisibleRowCount()
*/
public void setVisibleRowCount(int vc)
@@ -1245,7 +1245,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns an array of all ListSelectionListeners subscribed to this
- * list.
+ * list.
*
* @return The current subscribed listeners
*
@@ -1257,20 +1257,20 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Returns the selection mode for the list (one of:
- * {@link ListSelectionModel#SINGLE_SELECTION},
- * {@link ListSelectionModel#SINGLE_INTERVAL_SELECTION} and
+ * Returns the selection mode for the list (one of:
+ * {@link ListSelectionModel#SINGLE_SELECTION},
+ * {@link ListSelectionModel#SINGLE_INTERVAL_SELECTION} and
* {@link ListSelectionModel#MULTIPLE_INTERVAL_SELECTION}).
- *
+ *
* @return The selection mode.
- *
+ *
* @see #setSelectionMode(int)
*/
public int getSelectionMode()
{
return selectionModel.getSelectionMode();
}
-
+
/**
* Sets the list's "selectionMode" property, which simply mirrors the
* same property on the list's {@link #selectionModel} property. This
@@ -1290,7 +1290,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* Adds the interval [a,a]
to the set of selections managed
* by this list's {@link #selectionModel} property. Depending on the
* selection mode, this may cause existing selections to become invalid,
- * or may simply expand the set of selections.
+ * or may simply expand the set of selections.
*
* @param a A number in the half-open range [0, x)
where
* x = getModel.getSize()
, indicating the index of an
@@ -1312,7 +1312,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* a
, calls {@link #setSelectedIndex} on a[i]
.
*
* @param a an array of selected indices (null
not permitted).
- *
+ *
* @throws NullPointerException if a
is null
.
* @see #setSelectionMode
* @see #selectionModel
@@ -1339,7 +1339,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns true
if the model's selection is empty, otherwise
- * false
.
+ * false
.
*
* @return The return value of {@link ListSelectionModel#isSelectionEmpty}
*/
@@ -1362,7 +1362,7 @@ public class JList extends JComponent implements Accessible, Scrollable
Rectangle r = getVisibleRect();
if (or == ComponentOrientation.RIGHT_TO_LEFT)
r.translate((int) r.getWidth() - 1, 0);
- return getUI().locationToIndex(this, r.getLocation());
+ return getUI().locationToIndex(this, r.getLocation());
}
@@ -1373,18 +1373,18 @@ public class JList extends JComponent implements Accessible, Scrollable
* -1
is returned.
*
* @param location for which to look for in the list
- *
+ *
* @return index of the cell to which specified location is closest to.
*/
public int locationToIndex(Point location)
{
- return getUI().locationToIndex(this, location);
+ return getUI().locationToIndex(this, location);
}
/**
* Returns location of the cell located at the specified index in the list.
* @param index of the cell for which location will be determined
- *
+ *
* @return location of the cell located at the specified index in the list.
*/
public Point indexToLocation(int index)
@@ -1443,7 +1443,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* Indicates whether the list element at a given index value is
* currently selected.
*
- * @param a The index to check
+ * @param a The index to check
* @return true
if a
is the index of a selected
* list element
*/
@@ -1476,7 +1476,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns all the values in the list's {@link #model} property which are
* selected, according to the list's {@link #selectionModel} property.
- *
+ *
* @return An array containing all the selected values
* @see #setSelectedValue
*/
@@ -1524,7 +1524,7 @@ public class JList extends JComponent implements Accessible, Scrollable
{
return selectionForeground;
}
-
+
/**
* Sets the value of the {@link #selectionForeground} property.
*
@@ -1542,7 +1542,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Sets the selection to cover only the specified value, if it
- * exists in the model.
+ * exists in the model.
*
* @param obj The object to select
* @param scroll Whether to scroll the list to make the newly selected
@@ -1595,9 +1595,9 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns a {@link ListModel} backed by the specified array.
- *
+ *
* @param items the list items (don't use null
).
- *
+ *
* @return A list model containing the specified items.
*/
private ListModel createListModel(final Object[] items)
@@ -1614,12 +1614,12 @@ public class JList extends JComponent implements Accessible, Scrollable
}
};
}
-
+
/**
* Returns a {@link ListModel} backed by the specified vector.
- *
+ *
* @param items the list items (don't use null
).
- *
+ *
* @return A list model containing the specified items.
*/
private ListModel createListModel(final Vector items)
@@ -1649,20 +1649,20 @@ public class JList extends JComponent implements Accessible, Scrollable
{
setModel(new AbstractListModel()
{
- public int getSize()
- {
- return listData.size();
- }
-
- public Object getElementAt(int i)
- {
- return listData.elementAt(i);
- }
+ public int getSize()
+ {
+ return listData.size();
+ }
+
+ public Object getElementAt(int i)
+ {
+ return listData.elementAt(i);
+ }
});
}
/**
- * Gets the value of the {@link #cellRenderer} property.
+ * Gets the value of the {@link #cellRenderer} property.
*
* @return The current value of the property
*/
@@ -1680,7 +1680,7 @@ public class JList extends JComponent implements Accessible, Scrollable
{
if (cellRenderer == renderer)
return;
-
+
ListCellRenderer old = cellRenderer;
cellRenderer = renderer;
firePropertyChange("cellRenderer", old, renderer);
@@ -1689,7 +1689,7 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Gets the value of the {@link #model} property.
+ * Gets the value of the {@link #model} property.
*
* @return The current value of the property
*/
@@ -1704,26 +1704,26 @@ public class JList extends JComponent implements Accessible, Scrollable
* and re-subscribed to the new model.
*
* @param model the new model (null
not permitted).
- *
- * @throws IllegalArgumentException if model
is
+ *
+ * @throws IllegalArgumentException if model
is
* null
.
*/
public void setModel(ListModel model)
{
- if (model == null)
+ if (model == null)
throw new IllegalArgumentException("Null 'model' argument.");
if (this.model == model)
return;
-
+
if (this.model != null)
this.model.removeListDataListener(listListener);
-
+
ListModel old = this.model;
this.model = model;
-
+
if (this.model != null)
this.model.addListDataListener(listListener);
-
+
firePropertyChange("model", old, model);
revalidate();
repaint();
@@ -1741,7 +1741,7 @@ public class JList extends JComponent implements Accessible, Scrollable
*
If the provided orientation is HORIZONTAL
, the above
* comments refer to "rightwards" for positive direction, and "leftwards"
* for negative.
VERTICAL
@@ -2031,7 +2031,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* If the provided orientation is HORIZONTAL
, the above
* comments refer to "rightwards" for positive direction, and "leftwards"
* for negative.
VERTICAL
@@ -2213,7 +2213,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns the index of the anchor item in the current selection, or
* -1
if there is no anchor item.
- *
+ *
* @return The item index.
*/
public int getAnchorSelectionIndex()
@@ -2224,7 +2224,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns the index of the lead item in the current selection, or
* -1
if there is no lead item.
- *
+ *
* @return The item index.
*/
public int getLeadSelectionIndex()
@@ -2235,9 +2235,9 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Returns the lowest item index in the current selection, or -1
* if there is no selection.
- *
+ *
* @return The index.
- *
+ *
* @see #getMaxSelectionIndex()
*/
public int getMinSelectionIndex()
@@ -2246,11 +2246,11 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Returns the highest item index in the current selection, or
+ * Returns the highest item index in the current selection, or
* -1
if there is no selection.
- *
+ *
* @return The index.
- *
+ *
* @see #getMinSelectionIndex()
*/
public int getMaxSelectionIndex()
@@ -2268,9 +2268,9 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Sets the current selection to the items in the specified range (inclusive).
- * Note that anchor
can be less than, equal to, or greater than
+ * Note that anchor
can be less than, equal to, or greater than
* lead
.
- *
+ *
* @param anchor the index of the anchor item.
* @param lead the index of the anchor item.
*/
@@ -2280,10 +2280,10 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Adds the specified interval to the current selection. Note that
- * anchor
can be less than, equal to, or greater than
+ * Adds the specified interval to the current selection. Note that
+ * anchor
can be less than, equal to, or greater than
* lead
.
- *
+ *
* @param anchor the index of the anchor item.
* @param lead the index of the lead item.
*/
@@ -2293,10 +2293,10 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Removes the specified interval from the current selection. Note that
- * index0
can be less than, equal to, or greater than
+ * Removes the specified interval from the current selection. Note that
+ * index0
can be less than, equal to, or greater than
* index1
.
- *
+ *
* @param index0 an index for one end of the range.
* @param index1 an index for the other end of the range.
*/
@@ -2317,7 +2317,7 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Sets the valueIsAdjusting
flag in the list's selection
+ * Sets the valueIsAdjusting
flag in the list's selection
* model.
*
* @param isAdjusting the new value
@@ -2331,7 +2331,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* Return the value of the dragEnabled
property.
*
* @return the value
- *
+ *
* @since 1.4
*/
public boolean getDragEnabled()
@@ -2343,7 +2343,7 @@ public class JList extends JComponent implements Accessible, Scrollable
* Set the dragEnabled
property.
*
* @param enabled new value
- *
+ *
* @since 1.4
*/
public void setDragEnabled(boolean enabled)
@@ -2352,7 +2352,7 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Returns the layout orientation, which will be one of {@link #VERTICAL},
+ * Returns the layout orientation, which will be one of {@link #VERTICAL},
* {@link #VERTICAL_WRAP} and {@link #HORIZONTAL_WRAP}. The default value
* is {@link #VERTICAL}.
*
@@ -2368,7 +2368,7 @@ public class JList extends JComponent implements Accessible, Scrollable
/**
* Sets the layout orientation (this is a bound property with the name
- * 'layoutOrientation'). Valid orientations are {@link #VERTICAL},
+ * 'layoutOrientation'). Valid orientations are {@link #VERTICAL},
* {@link #VERTICAL_WRAP} and {@link #HORIZONTAL_WRAP}.
*
* @param orientation the orientation.
@@ -2414,7 +2414,7 @@ public class JList extends JComponent implements Accessible, Scrollable
}
/**
- * Returns the index of the next list element (beginning at
+ * Returns the index of the next list element (beginning at
* startIndex
and moving in the specified direction through the
* list, looping around if necessary) that starts with prefix
* (ignoring case).
@@ -2433,7 +2433,7 @@ public class JList extends JComponent implements Accessible, Scrollable
*
* @since 1.4
*/
- public int getNextMatch(String prefix, int startIndex,
+ public int getNextMatch(String prefix, int startIndex,
Position.Bias direction)
{
if (prefix == null)
@@ -2455,7 +2455,7 @@ public class JList extends JComponent implements Accessible, Scrollable
int itemCount = model.getSize();
boolean finished = false;
prefix = prefix.toUpperCase();
-
+
if (direction == Position.Bias.Forward)
delta = 1;
while (!finished)
@@ -2467,15 +2467,15 @@ public class JList extends JComponent implements Accessible, Scrollable
if (current == -1)
current += itemCount;
else
- current = current % itemCount;
+ current = current % itemCount;
finished = current == startIndex;
}
return result;
}
-
+
/**
* Returns a string describing the attributes for the JList
- * component, for use in debugging. The return value is guaranteed to be
+ * component, for use in debugging. The return value is guaranteed to be
* non-null
, but the format of the string may vary between
* implementations.
*
diff --git a/libjava/classpath/javax/swing/JMenu.java b/libjava/classpath/javax/swing/JMenu.java
index 7e627f11..e715ff9 100644
--- a/libjava/classpath/javax/swing/JMenu.java
+++ b/libjava/classpath/javax/swing/JMenu.java
@@ -74,7 +74,7 @@ import javax.swing.plaf.MenuItemUI;
* * JMenu's fires MenuEvents when this menu's selection changes. If this menu * is selected, then fireMenuSelectedEvent() is invoked. In case when menu is - * deselected or cancelled, then fireMenuDeselectedEvent() or + * deselected or cancelled, then fireMenuDeselectedEvent() or * fireMenuCancelledEvent() is invoked, respectivelly. *
*/ @@ -156,7 +156,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement public JMenu(String text) { super(text); - popupMenu = new JPopupMenu(); + popupMenu = new JPopupMenu(); popupMenu.setInvoker(this); setOpaque(false); } @@ -274,7 +274,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement { if (index < 0 || (index > 0 && getMenuComponentCount() == 0)) throw new IllegalArgumentException(); - + if (getMenuComponentCount() > 0) popupMenu.remove(index); } @@ -445,7 +445,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement /** * Returns origin point of the popup menu. This takes the screen bounds - * into account and places the popup where it fits best. + * into account and places the popup where it fits best. * * @return the origin of the popup menu */ @@ -459,7 +459,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement JPopupMenu popup = getPopupMenu(); Dimension popupSize = popup.getSize(); if (popupSize.width == 0 || popupSize.height == 0) - popupSize = popup.getPreferredSize(); + popupSize = popup.getPreferredSize(); // Determine screen bounds. Toolkit tk = Toolkit.getDefaultToolkit(); @@ -652,7 +652,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement if (getItemCount() == 0) return null; - + Component c = popupMenu.getComponentAtIndex(index); if (c instanceof JMenuItem) @@ -680,7 +680,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement */ public boolean isTearOff() { - // NOT YET IMPLEMENTED + // NOT YET IMPLEMENTED throw new Error("The method isTearOff() has not yet been implemented."); } @@ -706,7 +706,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement { if (getPopupMenu() == null || getMenuComponentCount() == 0) return null; - + return popupMenu.getComponentAtIndex(index); } @@ -784,7 +784,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement * Returns all registeredMenuListener
objects.
*
* @return an array of listeners
- *
+ *
* @since 1.4
*/
public MenuListener[] getMenuListeners()
@@ -853,7 +853,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
*/
public void menuSelectionChanged(boolean changed)
{
- // if this menu selection is true, then activate this menu and
+ // if this menu selection is true, then activate this menu and
// display popup associated with this menu
setSelected(changed);
}
@@ -910,11 +910,11 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
getModel().setPressed(true);
try
{
- java.lang.Thread.sleep(time);
+ java.lang.Thread.sleep(time);
}
catch (java.lang.InterruptedException e)
{
- // probably harmless
+ // probably harmless
}
getModel().setPressed(false);
@@ -1237,7 +1237,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
Action a = menuItem.getAction();
if (a != null)
- a.addPropertyChangeListener(this);
+ a.addPropertyChangeListener(this);
}
/**This method is invoked when some change occures in menuItem's action*/
diff --git a/libjava/classpath/javax/swing/JMenuBar.java b/libjava/classpath/javax/swing/JMenuBar.java
index 030fc4c..1c5a448 100644
--- a/libjava/classpath/javax/swing/JMenuBar.java
+++ b/libjava/classpath/javax/swing/JMenuBar.java
@@ -61,14 +61,14 @@ import javax.swing.border.Border;
* components to container, one can use add() to add menu's to the menu bar.
* Menu's will be displayed in the menu bar in the order they were added.
* The JMenuBar uses selectionModel to keep track of selected menu index.
- * JMenuBar's selectionModel will fire ChangeEvents to its registered
+ * JMenuBar's selectionModel will fire ChangeEvents to its registered
* listeners when the selected index changes.
*/
public class JMenuBar extends JComponent implements Accessible, MenuElement
{
/**
* Provides accessibility support for JMenuBar
.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
protected class AccessibleJMenuBar extends AccessibleJComponent
@@ -289,11 +289,11 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
for (int i = 0; i < comps.length; i++)
{
- if (comps[i].equals(c))
- {
- index = i;
- break;
- }
+ if (comps[i].equals(c))
+ {
+ index = i;
+ break;
+ }
}
return index;
@@ -306,18 +306,18 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
*/
public JMenu getHelpMenu()
{
- // the following error matches the behaviour of the reference
+ // the following error matches the behaviour of the reference
// implementation...
throw new Error("getHelpMenu() is not implemented");
}
/**
* Returns the margin between the menu bar's border and its menus. If the
- * margin is null
, this method returns
+ * margin is null
, this method returns
* new Insets(0, 0, 0, 0)
.
*
* @return The margin (never null
).
- *
+ *
* @see #setMargin(Insets)
*/
public Insets getMargin()
@@ -508,14 +508,14 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
}
/**
- * This method overrides JComponent.processKeyBinding to allow the
- * JMenuBar to check all the child components (recursiveley) to see
+ * This method overrides JComponent.processKeyBinding to allow the
+ * JMenuBar to check all the child components (recursiveley) to see
* if they'll consume the event.
- *
+ *
* @param ks the KeyStroke for the event
* @param e the KeyEvent for the event
* @param condition the focus condition for the binding
- * @param pressed true if the key is pressed
+ * @param pressed true if the key is pressed
*/
protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition,
boolean pressed)
@@ -523,19 +523,19 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
// See if the regular JComponent behavior consumes the event
if (super.processKeyBinding(ks, e, condition, pressed))
return true;
-
- // If not, have to recursively check all the child menu elements to see
- // if they want it
+
+ // If not, have to recursively check all the child menu elements to see
+ // if they want it
MenuElement[] children = getSubElements();
for (int i = 0; i < children.length; i++)
if (processKeyBindingHelper(children[i], ks, e, condition, pressed))
return true;
return false;
}
-
+
/**
* This is a helper method to recursively check the children of this
- * JMenuBar to see if they will consume a key event via key bindings.
+ * JMenuBar to see if they will consume a key event via key bindings.
* This is used for menu accelerators.
* @param menuElement the menuElement to check (and check all its children)
* @param ks the KeyStroke for the event
@@ -558,7 +558,7 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
&& ((JComponent) menuElement).processKeyBinding(ks, e, condition,
pressed))
return true;
-
+
// If that didn't consume it, check all the children recursively
MenuElement[] children = menuElement.getSubElements();
for (int i = 0; i < children.length; i++)
@@ -566,7 +566,7 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
return true;
return false;
}
-
+
/**
* Process mouse events forwarded from MenuSelectionManager. This method
* doesn't do anything. It is here to conform to the MenuElement interface.
@@ -602,11 +602,11 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
{
if (b != borderPainted)
{
- boolean old = borderPainted;
- borderPainted = b;
- firePropertyChange("borderPainted", old, b);
- revalidate();
- repaint();
+ boolean old = borderPainted;
+ borderPainted = b;
+ firePropertyChange("borderPainted", old, b);
+ revalidate();
+ repaint();
}
}
@@ -629,7 +629,7 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
* bound property with the name 'margin').
*
* @param m the margin (null
permitted).
- *
+ *
* @see #getMargin()
*/
public void setMargin(Insets m)
@@ -664,9 +664,9 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
{
if (selectionModel != model)
{
- SingleSelectionModel oldModel = selectionModel;
- selectionModel = model;
- firePropertyChange("model", oldModel, selectionModel);
+ SingleSelectionModel oldModel = selectionModel;
+ selectionModel = model;
+ firePropertyChange("model", oldModel, selectionModel);
}
}
diff --git a/libjava/classpath/javax/swing/JMenuItem.java b/libjava/classpath/javax/swing/JMenuItem.java
index ffdccdc..fea3166 100644
--- a/libjava/classpath/javax/swing/JMenuItem.java
+++ b/libjava/classpath/javax/swing/JMenuItem.java
@@ -123,20 +123,20 @@ public class JMenuItem extends AbstractButton implements Accessible,
init(null, null);
if (action != null)
{
- String name = (String) action.getValue(Action.NAME);
- if (name != null)
+ String name = (String) action.getValue(Action.NAME);
+ if (name != null)
setName(name);
- KeyStroke accel = (KeyStroke) action.getValue(Action.ACCELERATOR_KEY);
- if (accel != null)
+ KeyStroke accel = (KeyStroke) action.getValue(Action.ACCELERATOR_KEY);
+ if (accel != null)
setAccelerator(accel);
- Integer mnemonic = (Integer) action.getValue(Action.MNEMONIC_KEY);
- if (mnemonic != null)
+ Integer mnemonic = (Integer) action.getValue(Action.MNEMONIC_KEY);
+ if (mnemonic != null)
setMnemonic(mnemonic.intValue());
- String command = (String) action.getValue(Action.ACTION_COMMAND_KEY);
- if (command != null)
+ String command = (String) action.getValue(Action.ACTION_COMMAND_KEY);
+ if (command != null)
setActionCommand(command);
}
}
@@ -180,7 +180,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
super.init(text, icon);
// Initializes properties for this menu item, that are different
- // from Abstract button properties.
+ // from Abstract button properties.
/* NOTE: According to java specifications paint_border should be set to false,
since menu item should not have a border. However running few java programs
it seems that menu items and menues can have a border. Commenting
@@ -201,7 +201,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
{
super.setUI(ui);
}
-
+
/**
* This method sets this menuItem's UI to the UIManager's default for the
* current look and feel.
@@ -265,11 +265,11 @@ public class JMenuItem extends AbstractButton implements Accessible,
}
/**
- * Sets the key combination which invokes the menu item's action
- * listeners without navigating the menu hierarchy. Note that when the
- * keyboard accelerator is typed, it will work whether or not the
+ * Sets the key combination which invokes the menu item's action
+ * listeners without navigating the menu hierarchy. Note that when the
+ * keyboard accelerator is typed, it will work whether or not the
* menu is currently displayed.
- *
+ *
* @param keystroke accelerator for this menu item.
*/
public void setAccelerator(KeyStroke keystroke)
@@ -294,7 +294,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
{
setAccelerator((KeyStroke) (action.getValue(Action.ACCELERATOR_KEY)));
if (accelerator != null)
- super.registerKeyboardAction(action, accelerator,
+ super.registerKeyboardAction(action, accelerator,
JComponent.WHEN_IN_FOCUSED_WINDOW);
}
}
@@ -312,11 +312,11 @@ public class JMenuItem extends AbstractButton implements Accessible,
{
return new PropertyChangeListener()
{
- public void propertyChange(PropertyChangeEvent e)
- {
- Action act = (Action) (e.getSource());
- configurePropertiesFromAction(act);
- }
+ public void propertyChange(PropertyChangeEvent e)
+ {
+ Action act = (Action) (e.getSource());
+ configurePropertiesFromAction(act);
+ }
};
}
@@ -374,20 +374,20 @@ public class JMenuItem extends AbstractButton implements Accessible,
{
case MouseEvent.MOUSE_ENTERED:
isDragging = false;
- fireMenuDragMouseEntered(event);
- break;
+ fireMenuDragMouseEntered(event);
+ break;
case MouseEvent.MOUSE_EXITED:
isDragging = false;
- fireMenuDragMouseExited(event);
- break;
+ fireMenuDragMouseExited(event);
+ break;
case MouseEvent.MOUSE_DRAGGED:
isDragging = true;
- fireMenuDragMouseDragged(event);
- break;
+ fireMenuDragMouseDragged(event);
+ break;
case MouseEvent.MOUSE_RELEASED:
if (isDragging)
fireMenuDragMouseReleased(event);
- break;
+ break;
}
}
@@ -524,17 +524,17 @@ public class JMenuItem extends AbstractButton implements Accessible,
Component parent = this.getParent();
if (changed)
{
- model.setArmed(true);
+ model.setArmed(true);
- if (parent != null && parent instanceof JPopupMenu)
- ((JPopupMenu) parent).setSelected(this);
+ if (parent != null && parent instanceof JPopupMenu)
+ ((JPopupMenu) parent).setSelected(this);
}
else
{
- model.setArmed(false);
+ model.setArmed(false);
- if (parent != null && parent instanceof JPopupMenu)
- ((JPopupMenu) parent).getSelectionModel().clearSelection();
+ if (parent != null && parent instanceof JPopupMenu)
+ ((JPopupMenu) parent).getSelectionModel().clearSelection();
}
}
@@ -630,7 +630,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
/**
* Returns a string describing the attributes for the JMenuItem
- * component, for use in debugging. The return value is guaranteed to be
+ * component, for use in debugging. The return value is guaranteed to be
* non-null
, but the format of the string may vary between
* implementations.
*
@@ -646,14 +646,14 @@ public class JMenuItem extends AbstractButton implements Accessible,
* Returns the object that provides accessibility features for this
* JMenuItem
component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJMenuItem}).
*/
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
{
- AccessibleJMenuItem ctx = new AccessibleJMenuItem();
+ AccessibleJMenuItem ctx = new AccessibleJMenuItem();
addChangeListener(ctx);
accessibleContext = ctx;
}
@@ -662,9 +662,9 @@ public class JMenuItem extends AbstractButton implements Accessible,
}
/**
- * Provides the accessibility features for the JMenuItem
+ * Provides the accessibility features for the JMenuItem
* component.
- *
+ *
* @see JMenuItem#getAccessibleContext()
*/
protected class AccessibleJMenuItem extends AccessibleAbstractButton
diff --git a/libjava/classpath/javax/swing/JOptionPane.java b/libjava/classpath/javax/swing/JOptionPane.java
index 43caecd..8c765ed 100644
--- a/libjava/classpath/javax/swing/JOptionPane.java
+++ b/libjava/classpath/javax/swing/JOptionPane.java
@@ -71,7 +71,7 @@ public class JOptionPane extends JComponent implements Accessible
protected class AccessibleJOptionPane extends JComponent.AccessibleJComponent
{
private static final long serialVersionUID = 686071432213084821L;
-
+
/**
* Creates a new AccessibleJOptionPane
instance.
*/
@@ -477,7 +477,7 @@ public class JOptionPane extends JComponent implements Accessible
* Returns the object that provides accessibility features for this
* JOptionPane
component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJOptionPane}).
*/
public AccessibleContext getAccessibleContext()
@@ -700,9 +700,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (icon != newIcon)
{
- Icon old = icon;
- icon = newIcon;
- firePropertyChange(ICON_PROPERTY, old, icon);
+ Icon old = icon;
+ icon = newIcon;
+ firePropertyChange(ICON_PROPERTY, old, icon);
}
}
@@ -715,10 +715,10 @@ public class JOptionPane extends JComponent implements Accessible
{
if (initialSelectionValue != newValue)
{
- Object old = initialSelectionValue;
- initialSelectionValue = newValue;
- firePropertyChange(INITIAL_SELECTION_VALUE_PROPERTY, old,
- initialSelectionValue);
+ Object old = initialSelectionValue;
+ initialSelectionValue = newValue;
+ firePropertyChange(INITIAL_SELECTION_VALUE_PROPERTY, old,
+ initialSelectionValue);
}
}
@@ -731,9 +731,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (initialValue != newValue)
{
- Object old = initialValue;
- initialValue = newValue;
- firePropertyChange(INITIAL_VALUE_PROPERTY, old, initialValue);
+ Object old = initialValue;
+ initialValue = newValue;
+ firePropertyChange(INITIAL_VALUE_PROPERTY, old, initialValue);
}
}
@@ -746,9 +746,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (inputValue != newValue)
{
- Object old = inputValue;
- inputValue = newValue;
- firePropertyChange(INPUT_VALUE_PROPERTY, old, inputValue);
+ Object old = inputValue;
+ inputValue = newValue;
+ firePropertyChange(INPUT_VALUE_PROPERTY, old, inputValue);
}
}
@@ -761,9 +761,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (message != newMessage)
{
- Object old = message;
- message = newMessage;
- firePropertyChange(MESSAGE_PROPERTY, old, message);
+ Object old = message;
+ message = newMessage;
+ firePropertyChange(MESSAGE_PROPERTY, old, message);
}
}
@@ -780,9 +780,9 @@ public class JOptionPane extends JComponent implements Accessible
throw new IllegalArgumentException("Message Type not legal value.");
if (newType != messageType)
{
- int old = messageType;
- messageType = newType;
- firePropertyChange(MESSAGE_TYPE_PROPERTY, old, messageType);
+ int old = messageType;
+ messageType = newType;
+ firePropertyChange(MESSAGE_TYPE_PROPERTY, old, messageType);
}
}
@@ -795,9 +795,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (options != newOptions)
{
- Object[] old = options;
- options = newOptions;
- firePropertyChange(OPTIONS_PROPERTY, old, options);
+ Object[] old = options;
+ options = newOptions;
+ firePropertyChange(OPTIONS_PROPERTY, old, options);
}
}
@@ -814,9 +814,9 @@ public class JOptionPane extends JComponent implements Accessible
throw new IllegalArgumentException("Option Type not legal value.");
if (newType != optionType)
{
- int old = optionType;
- optionType = newType;
- firePropertyChange(OPTION_TYPE_PROPERTY, old, optionType);
+ int old = optionType;
+ optionType = newType;
+ firePropertyChange(OPTION_TYPE_PROPERTY, old, optionType);
}
}
@@ -840,11 +840,11 @@ public class JOptionPane extends JComponent implements Accessible
{
if (newValues != selectionValues)
{
- if (newValues != null)
- wantsInput = true;
- Object[] old = selectionValues;
- selectionValues = newValues;
- firePropertyChange(SELECTION_VALUES_PROPERTY, old, selectionValues);
+ if (newValues != null)
+ wantsInput = true;
+ Object[] old = selectionValues;
+ selectionValues = newValues;
+ firePropertyChange(SELECTION_VALUES_PROPERTY, old, selectionValues);
}
}
@@ -867,9 +867,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (value != newValue)
{
- Object old = value;
- value = newValue;
- firePropertyChange(VALUE_PROPERTY, old, value);
+ Object old = value;
+ value = newValue;
+ firePropertyChange(VALUE_PROPERTY, old, value);
}
}
@@ -882,9 +882,9 @@ public class JOptionPane extends JComponent implements Accessible
{
if (wantsInput != newValue)
{
- boolean old = wantsInput;
- wantsInput = newValue;
- firePropertyChange(WANTS_INPUT_PROPERTY, old, wantsInput);
+ boolean old = wantsInput;
+ wantsInput = newValue;
+ firePropertyChange(WANTS_INPUT_PROPERTY, old, wantsInput);
}
}
@@ -904,7 +904,7 @@ public class JOptionPane extends JComponent implements Accessible
JOptionPane pane = new JOptionPane(message, QUESTION_MESSAGE);
JDialog dialog = pane.createDialog(parentComponent, "Select an Option");
dialog.show();
-
+
if (pane.getValue() instanceof Integer)
return ((Integer) pane.getValue()).intValue();
return -1;
@@ -1011,7 +1011,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setWantsInput(true);
JDialog dialog = pane.createDialog(parentComponent, null);
dialog.show();
-
+
return (String) pane.getInputValue();
}
@@ -1037,7 +1037,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setWantsInput(true);
JDialog dialog = pane.createDialog(parentComponent, null);
dialog.show();
-
+
return (String) pane.getInputValue();
}
@@ -1062,7 +1062,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setWantsInput(true);
JDialog dialog = pane.createDialog(parentComponent, title);
dialog.show();
-
+
return (String) pane.getInputValue();
}
@@ -1094,7 +1094,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setInitialSelectionValue(initialSelectionValue);
JDialog dialog = pane.createDialog(parentComponent, title);
dialog.show();
-
+
return pane.getInputValue();
}
@@ -1114,7 +1114,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setWantsInput(true);
JDialog dialog = pane.createDialog(null, null);
dialog.show();
-
+
return (String) pane.getInputValue();
}
@@ -1138,7 +1138,7 @@ public class JOptionPane extends JComponent implements Accessible
pane.setInitialSelectionValue(initialSelectionValue);
JDialog dialog = pane.createDialog(null, null);
dialog.show();
-
+
return (String) pane.getInputValue();
}
@@ -1160,7 +1160,7 @@ public class JOptionPane extends JComponent implements Accessible
JInternalFrame frame = pane.createInternalFrame(parentComponent, null);
startModal(frame);
-
+
if (pane.getValue() instanceof Integer)
return ((Integer) pane.getValue()).intValue();
return -1;
@@ -1270,7 +1270,7 @@ public class JOptionPane extends JComponent implements Accessible
JInternalFrame frame = pane.createInternalFrame(parentComponent, null);
startModal(frame);
-
+
return (String) pane.getInputValue();
}
@@ -1296,7 +1296,7 @@ public class JOptionPane extends JComponent implements Accessible
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
startModal(frame);
-
+
return (String) pane.getInputValue();
}
@@ -1331,7 +1331,7 @@ public class JOptionPane extends JComponent implements Accessible
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
startModal(frame);
-
+
return pane.getInputValue();
}
@@ -1424,7 +1424,7 @@ public class JOptionPane extends JComponent implements Accessible
JInternalFrame frame = pane.createInternalFrame(parentComponent, title);
startModal(frame);
-
+
if (pane.getValue() instanceof Integer)
return ((Integer) pane.getValue()).intValue();
return -1;
@@ -1441,7 +1441,7 @@ public class JOptionPane extends JComponent implements Accessible
{
JOptionPane pane = new JOptionPane(message, INFORMATION_MESSAGE);
JDialog dialog = pane.createDialog(parentComponent, null);
- dialog.show();
+ dialog.show();
}
/**
@@ -1539,7 +1539,7 @@ public class JOptionPane extends JComponent implements Accessible
case PLAIN_MESSAGE:
case QUESTION_MESSAGE:
case WARNING_MESSAGE:
- return true;
+ return true;
}
return false;
}
@@ -1559,7 +1559,7 @@ public class JOptionPane extends JComponent implements Accessible
case OK_CANCEL_OPTION:
case YES_NO_CANCEL_OPTION:
case YES_NO_OPTION:
- return true;
+ return true;
}
return false;
}
diff --git a/libjava/classpath/javax/swing/JPanel.java b/libjava/classpath/javax/swing/JPanel.java
index 3bd71d1..f2ff956 100644
--- a/libjava/classpath/javax/swing/JPanel.java
+++ b/libjava/classpath/javax/swing/JPanel.java
@@ -91,10 +91,10 @@ public class JPanel extends JComponent implements Accessible
/**
* Creates a new panel with double-buffering enabled or disabled as
- * specified. The default layout manager is an instance of
+ * specified. The default layout manager is an instance of
* {@link FlowLayout}.
- *
- * @param isDoubleBuffered a flag that controls whether or not
+ *
+ * @param isDoubleBuffered a flag that controls whether or not
* double-buffering is enabled.
*/
public JPanel(boolean isDoubleBuffered)
@@ -105,7 +105,7 @@ public class JPanel extends JComponent implements Accessible
/**
* Creates a new panel with the specified layout manager. Double-buffering
* is enabled by default.
- *
+ *
* @param layout the layout manager (null
permitted).
*/
public JPanel(LayoutManager layout)
@@ -114,24 +114,24 @@ public class JPanel extends JComponent implements Accessible
}
/**
- * Creates a new panel with the specified layout manager and
+ * Creates a new panel with the specified layout manager and
* double-buffering.
- *
+ *
* @param layout the layout manager (null
permitted).
- * @param isDoubleBuffered a flag that controls whether or not
+ * @param isDoubleBuffered a flag that controls whether or not
* double-buffering is enabled.
*/
public JPanel(LayoutManager layout, boolean isDoubleBuffered)
{
- setLayout(layout);
+ setLayout(layout);
setOpaque(true);
setDoubleBuffered(isDoubleBuffered);
- updateUI();
- }
+ updateUI();
+ }
/**
- * Returns the suffix ("PanelUI"
in this case) used to
- * determine the class name for a UI delegate that can provide the look and
+ * Returns the suffix ("PanelUI"
in this case) used to
+ * determine the class name for a UI delegate that can provide the look and
* feel for a JPanel
.
*
* @return "PanelUI"
.
@@ -143,9 +143,9 @@ public class JPanel extends JComponent implements Accessible
/**
* Sets the UI delegate for the JPanel
component.
- *
+ *
* @param ui the UI delegate.
- *
+ *
* @since 1.4
* @see #getUI()
*/
@@ -156,9 +156,9 @@ public class JPanel extends JComponent implements Accessible
/**
* Returns the UI delegate for the JPanel
component.
- *
+ *
* @return The UI delegate.
- *
+ *
* @since 1.4
* @see #setUI(PanelUI)
*/
@@ -188,7 +188,7 @@ public class JPanel extends JComponent implements Accessible
accessibleContext = new AccessibleJPanel();
return accessibleContext;
}
-
+
/**
* Returns an implementation-dependent string describing the attributes of
* this JPanel
.
@@ -198,6 +198,6 @@ public class JPanel extends JComponent implements Accessible
*/
protected String paramString()
{
- return super.paramString();
+ return super.paramString();
}
}
diff --git a/libjava/classpath/javax/swing/JPasswordField.java b/libjava/classpath/javax/swing/JPasswordField.java
index 11e45e8..e73993f 100644
--- a/libjava/classpath/javax/swing/JPasswordField.java
+++ b/libjava/classpath/javax/swing/JPasswordField.java
@@ -48,7 +48,7 @@ import javax.swing.text.Document;
/**
* class JPasswordField
- *
+ *
* @author Andrew Selkirk
* @author Lillian Angel
* @version 1.0
@@ -72,7 +72,7 @@ public class JPasswordField extends JTextField
/**
* getAccessibleRole
- *
+ *
* @return AccessibleRole
*/
public AccessibleRole getAccessibleRole()
@@ -96,7 +96,7 @@ public class JPasswordField extends JTextField
/**
* Creates a JPasswordField
object.
- *
+ *
* @param text the initial text
*/
public JPasswordField(String text)
@@ -106,7 +106,7 @@ public class JPasswordField extends JTextField
/**
* Creates a JPasswordField
object.
- *
+ *
* @param columns the number of columns
*/
public JPasswordField(int columns)
@@ -116,7 +116,7 @@ public class JPasswordField extends JTextField
/**
* Creates a JPasswordField
object.
- *
+ *
* @param text the initial text
* @param columns the number of columns
*/
@@ -127,7 +127,7 @@ public class JPasswordField extends JTextField
/**
* Creates a JPasswordField
object.
- *
+ *
* @param document the document to use
* @param text the initial text
* @param columns the number of columns
@@ -139,9 +139,9 @@ public class JPasswordField extends JTextField
/**
* writeObject
- *
+ *
* @param stream the stream to write to
- *
+ *
* @exception IOException if an error occurs
*/
private void writeObject(ObjectOutputStream stream) throws IOException
@@ -151,7 +151,7 @@ public class JPasswordField extends JTextField
/**
* Returns the UIClassID
- *
+ *
* @return the string "PasswordFieldUI"
*/
public String getUIClassID()
@@ -161,7 +161,7 @@ public class JPasswordField extends JTextField
/**
* getEchoChar
- *
+ *
* @return the echo char
*/
public char getEchoChar()
@@ -171,7 +171,7 @@ public class JPasswordField extends JTextField
/**
* setEchoChar
- *
+ *
* @param echo the echo char
*/
public void setEchoChar(char echo)
@@ -180,9 +180,9 @@ public class JPasswordField extends JTextField
}
/**
- * Returns true if this JPasswordField has a character set for echoing.
+ * Returns true if this JPasswordField has a character set for echoing.
* A character is considered to be set if the echo character is not 0.
- *
+ *
* @return true
if the echo char is set,
* false
otherwise.
*/
@@ -210,11 +210,11 @@ public class JPasswordField extends JTextField
}
/**
- * Returns the text contained in this TextComponent. If the
+ * Returns the text contained in this TextComponent. If the
* underlying document is null, will give a NullPointerException.
- *
+ *
* @return String
- *
+ *
* @deprecated
*/
public String getText()
@@ -231,15 +231,15 @@ public class JPasswordField extends JTextField
}
/**
- * Fetches a portion of the text represented by the component.
- * Returns an empty string if length is 0. If the
+ * Fetches a portion of the text represented by the component.
+ * Returns an empty string if length is 0. If the
* underlying document is null, will give a NullPointerException.
- *
+ *
* @param offset TODO
* @param length TODO
- *
+ *
* @return String
- *
+ *
* @exception BadLocationException TODO
*
* @deprecated
@@ -250,11 +250,11 @@ public class JPasswordField extends JTextField
}
/**
- * Returns the text contained in this TextComponent. If the underlying
- * document is null, will give a NullPointerException.
- * For stronger security, it is recommended that the returned character
+ * Returns the text contained in this TextComponent. If the underlying
+ * document is null, will give a NullPointerException.
+ * For stronger security, it is recommended that the returned character
* array be cleared after use by setting each character to zero.
- *
+ *
* @return char[]
*/
public char[] getPassword()
@@ -263,11 +263,11 @@ public class JPasswordField extends JTextField
}
/**
- * Returns a string representation of this JPasswordField. This method is
- * intended to be used only for debugging purposes,
- * and the content and format of the returned string may vary between
+ * Returns a string representation of this JPasswordField. This method is
+ * intended to be used only for debugging purposes,
+ * and the content and format of the returned string may vary between
* implementations. The returned string may be empty but may not be null.
- *
+ *
* @return String
*/
protected String paramString()
@@ -284,7 +284,7 @@ public class JPasswordField extends JTextField
/**
* getAccessibleContext
- *
+ *
* @return the AccessibleContext
object
*/
public AccessibleContext getAccessibleContext()
diff --git a/libjava/classpath/javax/swing/JPopupMenu.java b/libjava/classpath/javax/swing/JPopupMenu.java
index ac1a9eb..8f16aa2 100644
--- a/libjava/classpath/javax/swing/JPopupMenu.java
+++ b/libjava/classpath/javax/swing/JPopupMenu.java
@@ -79,10 +79,10 @@ import javax.swing.plaf.PopupMenuUI;
* popupMenuBecomeInvisible() or popupMenuCancelled() methods of
* PopupMenuListeners will be invoked.
*
- * JPopupMenu also fires PropertyChangeEvents when its bound properties
- * change.In addittion to inheritted bound properties, JPopupMenu has
+ * JPopupMenu also fires PropertyChangeEvents when its bound properties
+ * change.In addittion to inheritted bound properties, JPopupMenu has
* 'visible' bound property. When JPopupMenu becomes visible/invisible on
- * the screen it fires PropertyChangeEvents to its registered
+ * the screen it fires PropertyChangeEvents to its registered
* PropertyChangeListeners.
*/
public class JPopupMenu extends JComponent implements Accessible, MenuElement
@@ -139,7 +139,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
/* Field indicating if popup menu is visible or not */
private boolean visible = false;
-
+
/**
* Creates a new JPopupMenu object.
*/
@@ -326,7 +326,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
*/
public void setSelectionModel(SingleSelectionModel model)
{
- selectionModel = model;
+ selectionModel = model;
}
/**
@@ -397,9 +397,9 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
{
if (label != this.label)
{
- String oldLabel = this.label;
- this.label = label;
- firePropertyChange("label", oldLabel, label);
+ String oldLabel = this.label;
+ this.label = label;
+ firePropertyChange("label", oldLabel, label);
}
}
@@ -408,40 +408,40 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
*/
public void addSeparator()
{
- // insert separator at the end of the list of menu items
+ // insert separator at the end of the list of menu items
this.insert(new Separator(), -1);
}
/**
* Adds a MenuKeyListener to the popup.
- *
+ *
* @param l - the listener to add.
*/
public void addMenuKeyListener(MenuKeyListener l)
{
listenerList.add(MenuKeyListener.class, l);
}
-
+
/**
* Removes a MenuKeyListener from the popup.
- *
+ *
* @param l - the listener to remove.
*/
public void removeMenuKeyListener(MenuKeyListener l)
{
listenerList.remove(MenuKeyListener.class, l);
}
-
+
/**
* Returns array of getMenuKeyListeners that are listening to JPopupMenu.
- *
+ *
* @return array of getMenuKeyListeners that are listening to JPopupMenu
*/
public MenuKeyListener[] getMenuKeyListeners()
{
return ((MenuKeyListener[]) listenerList.getListeners(MenuKeyListener.class));
}
-
+
/**
* Adds popupMenuListener to listen for PopupMenuEvents fired
* by the JPopupMenu
@@ -691,8 +691,8 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
for (int i = 0; i < items.length; i++)
{
- if (items[i].equals(component))
- return i;
+ if (items[i].equals(component))
+ return i;
}
return -1;
@@ -783,7 +783,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
}
/**
- * Process mouse events forwarded from MenuSelectionManager. This method
+ * Process mouse events forwarded from MenuSelectionManager. This method
* doesn't do anything. It is here to conform to the MenuElement interface.
*
* @param event event forwarded from MenuSelectionManager
@@ -846,7 +846,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
for (int i = 0; i < items.length; i++)
if (items[i] instanceof MenuElement)
- subElements.add(items[i]);
+ subElements.add(items[i]);
return (MenuElement[])
subElements.toArray(new MenuElement[subElements.size()]);
diff --git a/libjava/classpath/javax/swing/JProgressBar.java b/libjava/classpath/javax/swing/JProgressBar.java
index b20b02a..d24a380 100644
--- a/libjava/classpath/javax/swing/JProgressBar.java
+++ b/libjava/classpath/javax/swing/JProgressBar.java
@@ -57,8 +57,8 @@ import javax.swing.plaf.ProgressBarUI;
/**
* A component that displays a visual indicator of the progress of a task. The
* component has two modes: determinate and indeterminate. In determinate mode,
- * the JProgressBar
fills a percentage of its bar based on its
- * current value. In indeterminate mode, it creates box and bounces it between
+ * the JProgressBar
fills a percentage of its bar based on its
+ * current value. In indeterminate mode, it creates box and bounces it between
* its bounds.
* * This component has the following properties: @@ -67,10 +67,10 @@ import javax.swing.plaf.ProgressBarUI; *
AccessibleJProgressBar
instance.
*/
protected AccessibleJProgressBar()
{
// Nothing to do here.
- }
+ }
/**
- * Returns a set containing the current state of the {@link JProgressBar}
+ * Returns a set containing the current state of the {@link JProgressBar}
* component.
*
* @return The accessible state set.
@@ -112,7 +112,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
else if (orientation == JProgressBar.VERTICAL)
result.add(AccessibleState.VERTICAL);
return result;
- }
+ }
/**
* Returns the accessible role for the JProgressBar
component.
@@ -122,10 +122,10 @@ public class JProgressBar extends JComponent implements SwingConstants,
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.PROGRESS_BAR;
- }
+ }
/**
- * Returns an object that provides access to the current, minimum and
+ * Returns an object that provides access to the current, minimum and
* maximum values.
*
* @return The accessible value.
@@ -133,7 +133,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
public AccessibleValue getAccessibleValue()
{
return this;
- }
+ }
/**
* Returns the current value of the {@link JProgressBar} component, as an
@@ -148,14 +148,14 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the current value of the {@link JProgressBar} component and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * {@link PropertyChangeEvent} (with the property name
* {@link AccessibleContext#ACCESSIBLE_VALUE_PROPERTY}) to all registered
- * listeners. If the supplied value is null
, this method
+ * listeners. If the supplied value is null
, this method
* does nothing and returns false
.
*
* @param value the new progress bar value (null
permitted).
*
- * @return true
if the slider value is updated, and
+ * @return true
if the slider value is updated, and
* false
otherwise.
*/
public boolean setCurrentAccessibleValue(Number value)
@@ -164,7 +164,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
return false;
Number oldValue = getCurrentAccessibleValue();
setValue(value.intValue());
- firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
+ firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
new Integer(getValue()));
return true;
}
@@ -190,63 +190,63 @@ public class JProgressBar extends JComponent implements SwingConstants,
{
return new Integer(getMaximum());
}
- }
+ }
private static final long serialVersionUID = 1980046021813598781L;
-
- /**
- * A flag that determines the mode (true
for indeterminate,
+
+ /**
+ * A flag that determines the mode (true
for indeterminate,
* false
for determinate).
*/
private transient boolean indeterminate = false;
- /**
- * The orientation of the JProgressBar
- * ({@link SwingConstants#HORIZONTAL} or {@link SwingConstants#VERTICAL}).
+ /**
+ * The orientation of the JProgressBar
+ * ({@link SwingConstants#HORIZONTAL} or {@link SwingConstants#VERTICAL}).
* Defaults to {@link SwingConstants#HORIZONTAL}.
* @see #setOrientation(int)
*/
protected int orientation;
- /**
+ /**
* A flag the controls whether or not the component's border is painted.
- * The default is true
.
+ * The default is true
.
* @see #setBorderPainted(boolean)
*/
protected boolean paintBorder = true;
- /**
+ /**
* The model defining the bounds and current value for the progress bar.
- * @see #setModel(BoundedRangeModel)
+ * @see #setModel(BoundedRangeModel)
*/
protected BoundedRangeModel model;
- /**
- * A custom string for display in the progress bar. If this is
- * null
, a default string will be generated.
+ /**
+ * A custom string for display in the progress bar. If this is
+ * null
, a default string will be generated.
* @see #setString(String)
*/
protected String progressString;
- /**
- * A flag that controls whether a string is displayed within the progress
- * bar.
+ /**
+ * A flag that controls whether a string is displayed within the progress
+ * bar.
* @see #setStringPainted(boolean)
*/
protected boolean paintString = false;
- /**
+ /**
* A single change event reused for all events.
- * @see #fireStateChanged()
+ * @see #fireStateChanged()
*/
protected transient ChangeEvent changeEvent;
- /**
+ /**
* The listener that is registered with the model. */
protected ChangeListener changeListener;
/**
- * Creates a new JProgressBar
with default attributes. The
+ * Creates a new JProgressBar
with default attributes. The
* following defaults are used:
* *
minimum
: 0;maximum
: 100;orientation
: {@link SwingConstants#HORIZONTAL}.JProgressBar
with the specified
+ * Creates a new JProgressBar
with the specified
* orientation
. The following defaults are used:
* *
value
: 0;minimum
: 0;maximum
: 100;orientation
is not one of
* the specified values.
*/
@@ -289,8 +289,8 @@ public class JProgressBar extends JComponent implements SwingConstants,
* value
: minimum
;orientation
: {@link SwingConstants#HORIZONTAL}.*
value
: minimum
;orientation
is not one of
* the specified values.
*/
@@ -320,7 +320,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
model = new DefaultBoundedRangeModel(minimum, 0, minimum, maximum);
if (orientation != HORIZONTAL && orientation != VERTICAL)
throw new IllegalArgumentException(orientation
- + " is not a legal orientation");
+ + " is not a legal orientation");
this.orientation = orientation;
changeListener = createChangeListener();
model.addChangeListener(changeListener);
@@ -333,8 +333,8 @@ public class JProgressBar extends JComponent implements SwingConstants,
* *
orientation
: {@link SwingConstants#HORIZONTAL}.null
not permitted).
*/
public JProgressBar(BoundedRangeModel model)
@@ -343,15 +343,15 @@ public class JProgressBar extends JComponent implements SwingConstants,
changeListener = createChangeListener();
if (model != null)
model.addChangeListener(changeListener);
- updateUI();
+ updateUI();
}
/**
- * Returns the current value for the JProgressBar
. This value
+ * Returns the current value for the JProgressBar
. This value
* is fetched from the model.
*
* @return The current value.
- *
+ *
* @see #setValue(int)
*/
public int getValue()
@@ -361,18 +361,18 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the current value for the JProgressBar
. The value is
- * stored in the component's model
(see {@link #getModel()}).
- * If the new value is different to the old value, a {@link ChangeEvent} is
- * sent to the model's registered listeners. In turn, this triggers a call
- * to {@link #fireStateChanged()} which will send a ChangeEvent
+ * stored in the component's model
(see {@link #getModel()}).
+ * If the new value is different to the old value, a {@link ChangeEvent} is
+ * sent to the model's registered listeners. In turn, this triggers a call
+ * to {@link #fireStateChanged()} which will send a ChangeEvent
* to this component's registered listeners.
*
- * If value
is outside the range minimum
to
- * maximum
, it will be set to the nearest of those boundary
+ * If value
is outside the range minimum
to
+ * maximum
, it will be set to the nearest of those boundary
* values.
*
* @param value the new value.
- *
+ *
* @see #getValue()
*/
public void setValue(int value)
@@ -385,7 +385,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
* returns true
.
*
* @param graphics the graphics object to paint with.
- *
+ *
* @see #setBorderPainted(boolean)
*/
protected void paintBorder(Graphics graphics)
@@ -397,12 +397,12 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Returns the orientation of the JProgressBar
component, which
- * is either {@link SwingConstants#HORIZONTAL} or
- * {@link SwingConstants#VERTICAL}. The default orientation is
+ * is either {@link SwingConstants#HORIZONTAL} or
+ * {@link SwingConstants#VERTICAL}. The default orientation is
* HORIZONTAL
.
*
* @return The orientation.
- *
+ *
* @see #setOrientation(int)
*/
public int getOrientation()
@@ -412,22 +412,22 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the orientation for this JProgressBar
component and,
- * if the value changes, sends a {@link PropertyChangeEvent} (with the
+ * if the value changes, sends a {@link PropertyChangeEvent} (with the
* property name "orientation"
) to all registered listeners.
*
- * @param orientation the orientation ({@link #HORIZONTAL} or
+ * @param orientation the orientation ({@link #HORIZONTAL} or
* {@link #VERTICAL}).
- *
+ *
* @throws IllegalArgumentException if orientation
is not
* one of the listed values.
- *
+ *
* @see #getOrientation()
*/
public void setOrientation(int orientation)
{
if (orientation != VERTICAL && orientation != HORIZONTAL)
throw new IllegalArgumentException(orientation
- + " is not a legal orientation");
+ + " is not a legal orientation");
if (this.orientation != orientation)
{
int oldOrientation = this.orientation;
@@ -438,12 +438,12 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Returns the flag that controls whether or not the string returned by
- * {@link #getString()} is displayed by the JProgressBar
+ * {@link #getString()} is displayed by the JProgressBar
* component.
*
- * @return true
if the string should be displayed, and
+ * @return true
if the string should be displayed, and
* false
otherwise.
- *
+ *
* @see #setStringPainted(boolean)
*/
public boolean isStringPainted()
@@ -453,13 +453,13 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the flag that controls whether or not the string returned by
- * {@link #getString()} is displayed by the JProgressBar
- * component. If the flag value changes, a {@link PropertyChangeEvent} (with
- * the property name "stringPainted"
) is sent to all registered
+ * {@link #getString()} is displayed by the JProgressBar
+ * component. If the flag value changes, a {@link PropertyChangeEvent} (with
+ * the property name "stringPainted"
) is sent to all registered
* listeners.
*
* @param painted the new flag value.
- *
+ *
* @see #isStringPainted()
* @see #setString(String)
*/
@@ -474,13 +474,13 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Returns the string that is painted on the JProgressBar
if
- * {@link #isStringPainted()} returns true
. If no string has
- * been explicitly set, this method will return a string displaying the
+ * Returns the string that is painted on the JProgressBar
if
+ * {@link #isStringPainted()} returns true
. If no string has
+ * been explicitly set, this method will return a string displaying the
* value of {@link #getPercentComplete()}.
*
* @return The string.
- *
+ *
* @see #setString(String)
* @see #setStringPainted(boolean)
*/
@@ -494,13 +494,13 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the string to display within the progress bar and, if the new value
- * is different to the old value, sends a {@link PropertyChangeEvent} (with
- * the property name "string"
) to all registered listeners. If
+ * is different to the old value, sends a {@link PropertyChangeEvent} (with
+ * the property name "string"
) to all registered listeners. If
* the string is set to null
, {@link #getString()} will return
* a default string.
*
* @param string the string (null
permitted).
- *
+ *
* @see #getString()
* @see #setStringPainted(boolean)
*/
@@ -508,7 +508,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
{
if (((string == null || progressString == null) &&
string != progressString) || (string != null &&
- ! string.equals(progressString)))
+ ! string.equals(progressString)))
{
String oldString = progressString;
progressString = string;
@@ -517,7 +517,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Returns the current value expressed as a percentage. This is calculated
+ * Returns the current value expressed as a percentage. This is calculated
* as (value - min) / (max - min)
.
*
* @return The percentage (a value in the range 0.0 to 1.0).
@@ -527,7 +527,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
if (getMaximum() == getMinimum())
return 1.0;
else
- return (double) (model.getValue() - model.getMinimum())
+ return (double) (model.getValue() - model.getMinimum())
/ (model.getMaximum() - model.getMinimum());
}
@@ -537,7 +537,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
*
* @return true
if the component's border should be painted,
* and false
otherwise.
- *
+ *
* @see #setBorderPainted(boolean)
*/
public boolean isBorderPainted()
@@ -547,12 +547,12 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the flag that controls whether or not the component's border is
- * painted. If the flag value is changed, this method sends a
- * {@link PropertyChangeEvent} (with the property name "borderPainted") to
+ * painted. If the flag value is changed, this method sends a
+ * {@link PropertyChangeEvent} (with the property name "borderPainted") to
* all registered listeners.
*
* @param painted the new flag value.
- *
+ *
* @see #isBorderPainted()
* @see #paintBorder
*/
@@ -587,7 +587,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Sets this JProgressBar
's UI delegate to the default
+ * Sets this JProgressBar
's UI delegate to the default
* (obtained from the {@link UIManager}) for the current look and feel.
*/
public void updateUI()
@@ -596,8 +596,8 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Returns the suffix ("ProgressBarUI"
in this case) used to
- * determine the class name for a UI delegate that can provide the look and
+ * Returns the suffix ("ProgressBarUI"
in this case) used to
+ * determine the class name for a UI delegate that can provide the look and
* feel for a JProgressBar
.
*
* @return "ProgressBarUI"
.
@@ -608,11 +608,11 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Creates a new {@link ChangeListener} that calls
+ * Creates a new {@link ChangeListener} that calls
* {@link #fireStateChanged()} whenever it receives a {@link ChangeEvent}
- * (typically from the component's model
). This listener is
- * registered with the progress bar's model, so that changes made to the
- * model directly will automatically result in the progress bar's listeners
+ * (typically from the component's model
). This listener is
+ * registered with the progress bar's model, so that changes made to the
+ * model directly will automatically result in the progress bar's listeners
* being notified also.
*
* @return A new listener.
@@ -624,16 +624,16 @@ public class JProgressBar extends JComponent implements SwingConstants,
public void stateChanged(ChangeEvent ce)
{
fireStateChanged();
- }
+ }
};
}
/**
- * Registers a listener with this component so that it will receive
+ * Registers a listener with this component so that it will receive
* notification of component state changes.
*
* @param listener the listener.
- *
+ *
* @see #removeChangeListener(ChangeListener)
*/
public void addChangeListener(ChangeListener listener)
@@ -646,31 +646,31 @@ public class JProgressBar extends JComponent implements SwingConstants,
* component state changes.
*
* @param listener the listener.
- *
+ *
* @see #addChangeListener(ChangeListener)
*/
public void removeChangeListener(ChangeListener listener)
{
listenerList.remove(ChangeListener.class, listener);
}
-
+
/**
* Returns an array of the listeners that are registered with this component.
* The array may be empty, but is never null
.
*
* @return An array of listeners.
- *
+ *
* @since 1.4
*/
public ChangeListener[] getChangeListeners()
{
return (ChangeListener[]) listenerList.getListeners(ChangeListener.class);
- }
+ }
/**
* Sends a {@link ChangeEvent} to all registered listeners to indicate that
- * the state of the JProgressBar
has changed.
- *
+ * the state of the JProgressBar
has changed.
+ *
* @see #createChangeListener()
*/
protected void fireStateChanged()
@@ -689,7 +689,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
* Returns the model for the JProgressBar
.
*
* @return The model (never null
).
- *
+ *
* @see #setModel(BoundedRangeModel)
*/
public BoundedRangeModel getModel()
@@ -698,11 +698,11 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Sets the model for the JProgressBar
and sends a
+ * Sets the model for the JProgressBar
and sends a
* {@link ChangeEvent} to all registered listeners.
*
* @param model the model (null
not permitted).
- *
+ *
* @see #getModel()
*/
public void setModel(BoundedRangeModel model)
@@ -717,12 +717,12 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Returns the minimum value for the JProgressBar
. This defines
- * the lower bound for the current value, and is stored in the component's
+ * Returns the minimum value for the JProgressBar
. This defines
+ * the lower bound for the current value, and is stored in the component's
* model
.
*
* @return The minimum value.
- *
+ *
* @see #setMinimum(int)
*/
public int getMinimum()
@@ -732,14 +732,14 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the minimum value for the JProgressBar
. The value is
- * stored in the component's model
(see {@link #getModel()}).
- * If the new value is different to the old value, a {@link ChangeEvent} is
- * sent to the model's registered listeners. In turn, this triggers a call
- * to {@link #fireStateChanged()} which will send a ChangeEvent
+ * stored in the component's model
(see {@link #getModel()}).
+ * If the new value is different to the old value, a {@link ChangeEvent} is
+ * sent to the model's registered listeners. In turn, this triggers a call
+ * to {@link #fireStateChanged()} which will send a ChangeEvent
* to this component's registered listeners.
- *
+ *
* @param minimum the minimum value.
- *
+ *
* @see #getMinimum()
*/
public void setMinimum(int minimum)
@@ -748,12 +748,12 @@ public class JProgressBar extends JComponent implements SwingConstants,
}
/**
- * Returns the maximum value for the JProgressBar
. This defines
- * the upper bound for the current value, and is stored in the component's
+ * Returns the maximum value for the JProgressBar
. This defines
+ * the upper bound for the current value, and is stored in the component's
* model
.
*
* @return The maximum value.
- *
+ *
* @see #setMaximum(int)
*/
public int getMaximum()
@@ -763,14 +763,14 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the maximum value for the JProgressBar
. The value is
- * stored in the component's model
(see {@link #getModel()}).
- * If the new value is different to the old value, a {@link ChangeEvent} is
- * sent to the model's registered listeners. In turn, this triggers a call
- * to {@link #fireStateChanged()} which will send a ChangeEvent
+ * stored in the component's model
(see {@link #getModel()}).
+ * If the new value is different to the old value, a {@link ChangeEvent} is
+ * sent to the model's registered listeners. In turn, this triggers a call
+ * to {@link #fireStateChanged()} which will send a ChangeEvent
* to this component's registered listeners.
*
* @param maximum the maximum value.
- *
+ *
* @see #getMaximum()
*/
public void setMaximum(int maximum)
@@ -782,7 +782,7 @@ public class JProgressBar extends JComponent implements SwingConstants,
* Returns an implementation-dependent string describing the attributes of
* this JProgressBar
.
*
- * @return A string describing the attributes of this
+ * @return A string describing the attributes of this
* JProgressBar
(never null
).
*/
protected String paramString()
@@ -806,17 +806,17 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Sets the flag that controls the mode for this JProgressBar
* (true
for indeterminate mode, and false
for
- * determinate mode). If the flag value changes, this method sends a
- * {@link PropertyChangeEvent} (with the property name
+ * determinate mode). If the flag value changes, this method sends a
+ * {@link PropertyChangeEvent} (with the property name
* "indeterminate"
) to all registered listeners.
*
* If the JProgressBar
is determinate, it paints a percentage
- * of the bar described by its value. If it is indeterminate, it simply
- * bounces a box between the ends of the bar; the value of the
+ * of the bar described by its value. If it is indeterminate, it simply
+ * bounces a box between the ends of the bar; the value of the
* JProgressBar
is ignored.
*
* @param flag the new flag value.
- *
+ *
* @see #isIndeterminate()
* @since 1.4
*/
@@ -831,11 +831,11 @@ public class JProgressBar extends JComponent implements SwingConstants,
/**
* Returns a flag that indicates the mode for this JProgressBar
- * (true
for indeterminate mode, and false
for
- * determinate mode).
+ * (true
for indeterminate mode, and false
for
+ * determinate mode).
*
* @return A flag indicating the mode for the JProgressBar
.
- *
+ *
* @see #setIndeterminate(boolean)
* @since 1.4
*/
@@ -848,14 +848,14 @@ public class JProgressBar extends JComponent implements SwingConstants,
* Returns the object that provides accessibility features for this
* JProgressBar
component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJProgressBar}).
*/
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
accessibleContext = new AccessibleJProgressBar();
-
+
return accessibleContext;
- }
+ }
}
diff --git a/libjava/classpath/javax/swing/JRadioButton.java b/libjava/classpath/javax/swing/JRadioButton.java
index e0593f3..ae42f2c 100644
--- a/libjava/classpath/javax/swing/JRadioButton.java
+++ b/libjava/classpath/javax/swing/JRadioButton.java
@@ -1,4 +1,4 @@
-/* JRadioButton.java --
+/* JRadioButton.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -105,12 +105,12 @@ public class JRadioButton extends JToggleButton
/**
* Constructs an unselected radio button with no text or icon.
- */
+ */
public JRadioButton()
{
this(null, null, false);
}
-
+
/**
* Constructs a radio button using the labelling, state
* and icon specified by the supplied action.
@@ -130,10 +130,10 @@ public class JRadioButton extends JToggleButton
* @param icon the icon to use.
*/
public JRadioButton(Icon icon)
- {
+ {
this(null, icon, false);
- }
-
+ }
+
/**
* Constructs a radio button with the supplied icon and state.
*
@@ -142,10 +142,10 @@ public class JRadioButton extends JToggleButton
* selected state. Otherwise, the button is unselected.
*/
public JRadioButton(Icon icon, boolean selected)
- {
+ {
this(null, icon, selected);
- }
-
+ }
+
/**
* Constructs an unselected radio button using the supplied text
* and no icon.
@@ -168,7 +168,7 @@ public class JRadioButton extends JToggleButton
{
this(text, null, selected);
}
-
+
/**
* Constructs an unselected radio button with the supplied text
* and icon.
@@ -180,7 +180,7 @@ public class JRadioButton extends JToggleButton
{
this(text, icon, false);
}
-
+
/**
* Constructs a radio button with the supplied text, icon and state.
*
@@ -195,7 +195,7 @@ public class JRadioButton extends JToggleButton
setBorderPainted(false);
setHorizontalAlignment(LEADING);
}
-
+
/**
* Returns the accessible context for this JRadioButton
,
* in the form of an instance of AccessibleJRadioButton
.
@@ -209,23 +209,23 @@ public class JRadioButton extends JToggleButton
if (accessibleContext == null)
{
/* Create the context */
- accessibleContext = new AccessibleJRadioButton();
+ accessibleContext = new AccessibleJRadioButton();
}
return accessibleContext;
}
-
+
/**
* Returns a string specifying the name of the Look and Feel UI class
* that renders this component.
*
* @return the Look and Feel UI class for JRadioButton
s
* as a String
.
- */
+ */
public String getUIClassID()
{
return "RadioButtonUI";
}
-
+
/**
* Returns a string representation of this component for debugging use.
* Users should not depend on anything as regards the content or formatting
@@ -233,19 +233,19 @@ public class JRadioButton extends JToggleButton
* null (only empty).
*
* @return the component in String
form for debugging.
- */
+ */
protected String paramString()
{
return super.paramString();
}
-
+
/**
* This method resets the radio button's UI delegate to the default UI for
* the current look and feel.
*/
public void updateUI()
{
- /*
+ /*
I can't see any difference between this and the superclass one,
but Sun reimplements it... there is no RadioButtonUI class for it
to be cast to.
@@ -254,6 +254,3 @@ public class JRadioButton extends JToggleButton
}
}
-
-
-
diff --git a/libjava/classpath/javax/swing/JRadioButtonMenuItem.java b/libjava/classpath/javax/swing/JRadioButtonMenuItem.java
index 13ef189..48fc9ae 100644
--- a/libjava/classpath/javax/swing/JRadioButtonMenuItem.java
+++ b/libjava/classpath/javax/swing/JRadioButtonMenuItem.java
@@ -169,12 +169,12 @@ public class JRadioButtonMenuItem extends JMenuItem implements Accessible
}
/**
- * Returns a string describing the attributes for the
- * JRadioButtonMenuItem
component, for use in debugging. The
- * return value is guaranteed to be non-null
, but the format of
+ * Returns a string describing the attributes for the
+ * JRadioButtonMenuItem
component, for use in debugging. The
+ * return value is guaranteed to be non-null
, but the format of
* the string may vary between implementations.
*
- * @return A string describing the attributes of the
+ * @return A string describing the attributes of the
* JRadioButtonMenuItem
.
*/
protected String paramString()
@@ -187,7 +187,7 @@ public class JRadioButtonMenuItem extends JMenuItem implements Accessible
* Returns the object that provides accessibility features for this
* JRadioButtonMenuItem
component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJRadioButtonMenuItem}).
*/
public AccessibleContext getAccessibleContext()
@@ -199,9 +199,9 @@ public class JRadioButtonMenuItem extends JMenuItem implements Accessible
}
/**
- * Provides the accessibility features for the
+ * Provides the accessibility features for the
* JRadioButtonMenuItem
component.
- *
+ *
* @see JRadioButtonMenuItem#getAccessibleContext()
*/
protected class AccessibleJRadioButtonMenuItem extends AccessibleJMenuItem
@@ -217,7 +217,7 @@ public class JRadioButtonMenuItem extends JMenuItem implements Accessible
}
/**
- * Returns the accessible role for the JRadioButtonMenuItem
+ * Returns the accessible role for the JRadioButtonMenuItem
* component.
*
* @return {@link AccessibleRole#RADIO_BUTTON}.
diff --git a/libjava/classpath/javax/swing/JRootPane.java b/libjava/classpath/javax/swing/JRootPane.java
index 10fdf10..c74f4f5 100644
--- a/libjava/classpath/javax/swing/JRootPane.java
+++ b/libjava/classpath/javax/swing/JRootPane.java
@@ -93,7 +93,7 @@ public class JRootPane extends JComponent implements Accessible
}
}
- // Custom Layout Manager for JRootPane. It positions contentPane and
+ // Custom Layout Manager for JRootPane. It positions contentPane and
// menuBar withing its layeredPane.
protected class RootLayout implements LayoutManager2, Serializable
{
@@ -125,7 +125,7 @@ public class JRootPane extends JComponent implements Accessible
*/
protected RootLayout()
{
- // Nothing to do here.
+ // Nothing to do here.
}
/**
@@ -208,7 +208,7 @@ public class JRootPane extends JComponent implements Accessible
// 2. the layeredPane filles entire viewable region.
// 3. the menuBar is positioned at the upper edge of layeredPane.
// 4. the contentPane fills viewable region minus menuBar, if present.
-
+
// +-------------------------------+
// | JLayeredPane |
@@ -237,7 +237,7 @@ public class JRootPane extends JComponent implements Accessible
else
contentPaneBounds = new Rectangle(0, 0, containerWidth,
containerHeight);
-
+
glassPaneBounds = new Rectangle(i.left, i.top, containerWidth, containerHeight);
layeredPaneBounds = new Rectangle(i.left, i.top, containerWidth, containerHeight);
}
@@ -321,7 +321,7 @@ public class JRootPane extends JComponent implements Accessible
public static final int FILE_CHOOSER_DIALOG = 6;
public static final int QUESTION_DIALOG = 7;
public static final int WARNING_DIALOG = 8;
-
+
/** DOCUMENT ME! */
protected Component glassPane;
@@ -366,7 +366,7 @@ public class JRootPane extends JComponent implements Accessible
* @since 1.4
*/
private int windowDecorationStyle = NONE;
-
+
/**
* DOCUMENT ME!
*
@@ -432,7 +432,7 @@ public class JRootPane extends JComponent implements Accessible
/**
* Sets the JRootPane's content pane. The content pane should typically be
- * opaque for painting to work properly. This method also
+ * opaque for painting to work properly. This method also
* removes the old content pane from the layered pane.
*
* @param p the Container that will be the content pane
@@ -505,10 +505,10 @@ public class JRootPane extends JComponent implements Accessible
}
/**
- * Set the layered pane for the root pane.
+ * Set the layered pane for the root pane.
*
* @param f The JLayeredPane to be used.
- *
+ *
* @throws IllegalComponentStateException if JLayeredPane
* parameter is null.
*/
@@ -516,10 +516,10 @@ public class JRootPane extends JComponent implements Accessible
{
if (f == null)
throw new IllegalComponentStateException();
-
+
if (layeredPane != null)
remove(layeredPane);
-
+
layeredPane = f;
add(f, -1);
}
@@ -628,7 +628,7 @@ public class JRootPane extends JComponent implements Accessible
{
return defaultButton;
}
-
+
public void setDefaultButton(JButton newButton)
{
// We only change the default button if the new button is defaultCapable
@@ -665,7 +665,7 @@ public class JRootPane extends JComponent implements Accessible
&& style != WARNING_DIALOG
&& style != PLAIN_DIALOG)
throw new IllegalArgumentException("invalid style");
-
+
int oldStyle = windowDecorationStyle;
windowDecorationStyle = style;
firePropertyChange("windowDecorationStyle", oldStyle, style);
diff --git a/libjava/classpath/javax/swing/JScrollBar.java b/libjava/classpath/javax/swing/JScrollBar.java
index 371bb60..a600316 100644
--- a/libjava/classpath/javax/swing/JScrollBar.java
+++ b/libjava/classpath/javax/swing/JScrollBar.java
@@ -57,7 +57,7 @@ import javax.swing.event.ChangeListener;
import javax.swing.plaf.ScrollBarUI;
/**
- * The JScrollBar. Two buttons control how the values that the
+ * The JScrollBar. Two buttons control how the values that the
* scroll bar can take. You can also drag the thumb or click the track
* to move the scroll bar. Typically, the JScrollBar is used with
* other components to translate the value of the bar to the viewable
@@ -73,7 +73,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
implements AccessibleValue
{
private static final long serialVersionUID = -7758162392045586663L;
-
+
/**
* Creates a new AccessibleJScrollBar
instance.
*/
@@ -83,7 +83,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * Returns a set containing the current state of the {@link JScrollBar}
+ * Returns a set containing the current state of the {@link JScrollBar}
* component.
*
* @return The accessible state set.
@@ -109,7 +109,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * Returns an object that provides access to the current, minimum and
+ * Returns an object that provides access to the current, minimum and
* maximum values.
*
* @return The accessible value.
@@ -132,14 +132,14 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
/**
* Sets the current value of the {@link JScrollBar} component and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * {@link PropertyChangeEvent} (with the property name
* {@link AccessibleContext#ACCESSIBLE_VALUE_PROPERTY}) to all registered
- * listeners. If the supplied value is null
, this method
+ * listeners. If the supplied value is null
, this method
* does nothing and returns false
.
*
* @param value the new slider value (null
permitted).
*
- * @return true
if the slider value is updated, and
+ * @return true
if the slider value is updated, and
* false
otherwise.
*/
public boolean setCurrentAccessibleValue(Number value)
@@ -148,7 +148,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
return false;
Number oldValue = getCurrentAccessibleValue();
setValue(value.intValue());
- firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
+ firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
new Integer(getValue()));
return true;
}
@@ -195,11 +195,11 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
m.getValueIsAdjusting());
}
}
-
+
}
private static final long serialVersionUID = -8195169869225066566L;
-
+
/** How much the thumb moves when moving in a block. */
protected int blockIncrement = 10;
@@ -218,7 +218,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
*/
private ChangeListener sbChangeListener;
- /**
+ /**
* Creates a new horizontal JScrollBar object with a minimum
* of 0, a maxmium of 100, a value of 0 and an extent of 10.
*/
@@ -228,7 +228,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * Creates a new JScrollBar object with a minimum of 0, a
+ * Creates a new JScrollBar object with a minimum of 0, a
* maximum of 100, a value of 0, an extent of 10 and the given
* orientation.
*
@@ -240,7 +240,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * Creates a new JScrollBar object with the given orientation,
+ * Creates a new JScrollBar object with the given orientation,
* value, min, max, and extent.
*
* @param orientation The orientation to use.
@@ -294,7 +294,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * This method returns an identifier to
+ * This method returns an identifier to
* choose the correct UI delegate for the
* scrollbar.
*
@@ -327,15 +327,15 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
throw new IllegalArgumentException("orientation must be one of HORIZONTAL or VERTICAL");
if (orientation != this.orientation)
{
- int oldOrientation = this.orientation;
- this.orientation = orientation;
- firePropertyChange("orientation", oldOrientation,
- this.orientation);
+ int oldOrientation = this.orientation;
+ this.orientation = orientation;
+ firePropertyChange("orientation", oldOrientation,
+ this.orientation);
}
}
/**
- * This method returns the model being used with
+ * This method returns the model being used with
* the scrollbar.
*
* @return The scrollbar's model.
@@ -364,7 +364,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
/**
* This method returns how much the scrollbar's value
- * should change for a unit increment depending on the
+ * should change for a unit increment depending on the
* given direction.
*
* @param direction The direction to scroll in.
@@ -385,10 +385,10 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
{
if (unitIncrement != this.unitIncrement)
{
- int oldInc = this.unitIncrement;
- this.unitIncrement = unitIncrement;
- firePropertyChange("unitIncrement", oldInc,
- this.unitIncrement);
+ int oldInc = this.unitIncrement;
+ this.unitIncrement = unitIncrement;
+ firePropertyChange("unitIncrement", oldInc,
+ this.unitIncrement);
}
}
@@ -415,10 +415,10 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
{
if (blockIncrement != this.blockIncrement)
{
- int oldInc = this.blockIncrement;
- this.blockIncrement = blockIncrement;
- firePropertyChange("blockIncrement", oldInc,
- this.blockIncrement);
+ int oldInc = this.blockIncrement;
+ this.blockIncrement = blockIncrement;
+ firePropertyChange("blockIncrement", oldInc,
+ this.blockIncrement);
}
}
@@ -463,8 +463,8 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * This method returns the visible amount (AKA extent).
- * The visible amount can be used by UI delegates to
+ * This method returns the visible amount (AKA extent).
+ * The visible amount can be used by UI delegates to
* determine the size of the thumb.
*
* @return The visible amount (AKA extent).
@@ -545,7 +545,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * This method sets the value, extent, minimum and
+ * This method sets the value, extent, minimum and
* maximum.
*
* @param newValue The new value.
@@ -570,7 +570,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * This method removes an AdjustmentListener from the scroll bar.
+ * This method removes an AdjustmentListener from the scroll bar.
*
* @param listener The listener to remove.
*/
@@ -580,7 +580,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
}
/**
- * This method returns an arry of all AdjustmentListeners listening to
+ * This method returns an arry of all AdjustmentListeners listening to
* this scroll bar.
*
* @return An array of AdjustmentListeners listening to this scroll bar.
@@ -594,7 +594,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
* This method is called to fired AdjustmentEvents to the listeners
* of this scroll bar. All AdjustmentEvents that are fired
* will have an ID of ADJUSTMENT_VALUE_CHANGED and a type of
- * TRACK.
+ * TRACK.
*
* @param id The ID of the adjustment event.
* @param type The Type of change.
@@ -658,14 +658,14 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
*/
public void setEnabled(boolean x)
{
- // nothing special needs to be done here since we
+ // nothing special needs to be done here since we
// just check the enabled setting before changing the value.
super.setEnabled(x);
}
/**
* Returns a string describing the attributes for the JScrollBar
- * component, for use in debugging. The return value is guaranteed to be
+ * component, for use in debugging. The return value is guaranteed to be
* non-null
, but the format of the string may vary between
* implementations.
*
@@ -678,7 +678,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
sb.append(",orientation=");
if (this.orientation == JScrollBar.HORIZONTAL)
sb.append("HORIZONTAL");
- else
+ else
sb.append("VERTICAL");
sb.append(",unitIncrement=").append(unitIncrement);
return sb.toString();
@@ -688,7 +688,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible
* Returns the object that provides accessibility features for this
* JScrollBar
component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJScrollBar}).
*/
public AccessibleContext getAccessibleContext()
diff --git a/libjava/classpath/javax/swing/JScrollPane.java b/libjava/classpath/javax/swing/JScrollPane.java
index f6d37c7..6d17857 100644
--- a/libjava/classpath/javax/swing/JScrollPane.java
+++ b/libjava/classpath/javax/swing/JScrollPane.java
@@ -1,4 +1,4 @@
-/* JScrollPane.java --
+/* JScrollPane.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -146,7 +146,7 @@ public class JScrollPane extends JComponent
}
private static final long serialVersionUID = 5203525440012340014L;
-
+
protected JViewport columnHeader;
protected JViewport rowHeader;
@@ -171,9 +171,9 @@ public class JScrollPane extends JComponent
return columnHeader;
}
- public Component getCorner(String key)
+ public Component getCorner(String key)
{
- if (getComponentOrientation()
+ if (getComponentOrientation()
== ComponentOrientation.LEFT_TO_RIGHT)
{
if (key == LOWER_LEADING_CORNER)
@@ -185,7 +185,7 @@ public class JScrollPane extends JComponent
else if (key == UPPER_TRAILING_CORNER)
key = UPPER_RIGHT_CORNER;
}
- else if (getComponentOrientation()
+ else if (getComponentOrientation()
== ComponentOrientation.RIGHT_TO_LEFT)
{
if (key == LOWER_LEADING_CORNER)
@@ -261,14 +261,14 @@ public class JScrollPane extends JComponent
else
{
Rectangle b = getViewport().getBounds();
- return new Rectangle(b.x - i.left,
+ return new Rectangle(b.x - i.left,
b.y - i.top,
- b.width + i.left + i.right,
+ b.width + i.left + i.right,
b.height + i.top + i.bottom);
}
}
}
-
+
public boolean isWheelScrollingEnabled()
{
return wheelScrollingEnabled;
@@ -310,7 +310,7 @@ public class JScrollPane extends JComponent
{
if (columnHeader == h)
return;
-
+
JViewport old = columnHeader;
removeNonNull(old);
columnHeader = h;
@@ -329,7 +329,7 @@ public class JScrollPane extends JComponent
public void setCorner(String key, Component c)
{
- if (getComponentOrientation()
+ if (getComponentOrientation()
== ComponentOrientation.LEFT_TO_RIGHT)
{
if (key == LOWER_LEADING_CORNER)
@@ -341,7 +341,7 @@ public class JScrollPane extends JComponent
else if (key == UPPER_TRAILING_CORNER)
key = UPPER_RIGHT_CORNER;
}
- else if (getComponentOrientation()
+ else if (getComponentOrientation()
== ComponentOrientation.RIGHT_TO_LEFT)
{
if (key == LOWER_LEADING_CORNER)
@@ -401,11 +401,11 @@ public class JScrollPane extends JComponent
{
if (horizontalScrollBarPolicy == h)
return;
-
+
if (h != HORIZONTAL_SCROLLBAR_AS_NEEDED
&& h != HORIZONTAL_SCROLLBAR_NEVER
&& h != HORIZONTAL_SCROLLBAR_ALWAYS)
- throw new IllegalArgumentException("unknown horizontal scrollbar policy");
+ throw new IllegalArgumentException("unknown horizontal scrollbar policy");
int old = horizontalScrollBarPolicy;
horizontalScrollBarPolicy = h;
@@ -428,7 +428,7 @@ public class JScrollPane extends JComponent
{
if (rowHeader == v)
return;
-
+
JViewport old = rowHeader;
removeNonNull(old);
rowHeader = v;
@@ -449,7 +449,7 @@ public class JScrollPane extends JComponent
{
if (verticalScrollBar == v)
return;
-
+
JScrollBar old = verticalScrollBar;
removeNonNull(old);
verticalScrollBar = v;
@@ -462,12 +462,12 @@ public class JScrollPane extends JComponent
{
if (verticalScrollBarPolicy == v)
return;
-
+
if (v != VERTICAL_SCROLLBAR_AS_NEEDED
&& v != VERTICAL_SCROLLBAR_NEVER
&& v != VERTICAL_SCROLLBAR_ALWAYS)
- throw new IllegalArgumentException("unknown vertical scrollbar policy");
-
+ throw new IllegalArgumentException("unknown vertical scrollbar policy");
+
int old = verticalScrollBarPolicy;
verticalScrollBarPolicy = v;
firePropertyChange("verticalScrollBarPolicy", old, v);
@@ -479,7 +479,7 @@ public class JScrollPane extends JComponent
{
if (wheelScrollingEnabled == b)
return;
-
+
boolean old = wheelScrollingEnabled;
wheelScrollingEnabled = b;
firePropertyChange("wheelScrollingEnabled", old, b);
@@ -490,7 +490,7 @@ public class JScrollPane extends JComponent
{
if (viewport == v)
return;
-
+
JViewport old = viewport;
removeNonNull(old);
viewport = v;
@@ -510,20 +510,20 @@ public class JScrollPane extends JComponent
{
if (viewportBorder == b)
return;
-
+
Border old = viewportBorder;
viewportBorder = b;
firePropertyChange("viewportBorder", old, b);
sync();
}
-
+
public void setViewportView(Component view)
{
if (getViewport() == null)
{
setViewport(createViewport());
}
-
+
if (view != null)
{
getViewport().setView(view);
@@ -541,7 +541,7 @@ public class JScrollPane extends JComponent
* policy is set to {@link #VERTICAL_SCROLLBAR_AS_NEEDED} and
* {@link #HORIZONTAL_SCROLLBAR_AS_NEEDED}.
*/
- public JScrollPane()
+ public JScrollPane()
{
this(null);
}
@@ -553,10 +553,10 @@ public class JScrollPane extends JComponent
*
* @param view the component that is embedded inside the JScrollPane
*/
- public JScrollPane(Component view)
+ public JScrollPane(Component view)
{
- this(view,
- VERTICAL_SCROLLBAR_AS_NEEDED,
+ this(view,
+ VERTICAL_SCROLLBAR_AS_NEEDED,
HORIZONTAL_SCROLLBAR_AS_NEEDED);
}
@@ -574,7 +574,7 @@ public class JScrollPane extends JComponent
* @see ScrollPaneConstants#VERTICAL_SCROLLBAR_AS_NEEDED
* @see ScrollPaneConstants#VERTICAL_SCROLLBAR_NEVER
*/
- public JScrollPane(int vsbPolicy, int hsbPolicy)
+ public JScrollPane(int vsbPolicy, int hsbPolicy)
{
this(null, vsbPolicy, hsbPolicy);
}
@@ -594,7 +594,7 @@ public class JScrollPane extends JComponent
* @see ScrollPaneConstants#VERTICAL_SCROLLBAR_AS_NEEDED
* @see ScrollPaneConstants#VERTICAL_SCROLLBAR_NEVER
*/
- public JScrollPane(Component view, int vsbPolicy, int hsbPolicy)
+ public JScrollPane(Component view, int vsbPolicy, int hsbPolicy)
{
wheelScrollingEnabled = true;
setVerticalScrollBarPolicy(vsbPolicy);
@@ -610,7 +610,7 @@ public class JScrollPane extends JComponent
updateUI();
}
-
+
public JScrollBar createHorizontalScrollBar()
{
return new ScrollBar(SwingConstants.HORIZONTAL);
@@ -620,7 +620,7 @@ public class JScrollPane extends JComponent
{
return new ScrollBar(SwingConstants.VERTICAL);
}
-
+
protected JViewport createViewport()
{
return new JViewport();
@@ -630,11 +630,11 @@ public class JScrollPane extends JComponent
{
return "ScrollPaneUI";
}
-
+
public void updateUI()
{
setUI((ScrollPaneUI) UIManager.getUI(this));
- }
+ }
/**
* This method returns the scrollpane's UI delegate.
@@ -656,7 +656,7 @@ public class JScrollPane extends JComponent
super.setUI(ui);
}
- protected class ScrollBar
+ protected class ScrollBar
extends JScrollBar
implements UIResource
{
@@ -675,7 +675,7 @@ public class JScrollPane extends JComponent
else
{
Scrollable s = (Scrollable) view;
- return s.getScrollableBlockIncrement(JScrollPane.this.getViewport().getViewRect(),
+ return s.getScrollableBlockIncrement(JScrollPane.this.getViewport().getViewRect(),
this.getOrientation(),
direction);
}
@@ -689,7 +689,7 @@ public class JScrollPane extends JComponent
else
{
Scrollable s = (Scrollable) view;
- return s.getScrollableUnitIncrement(JScrollPane.this.getViewport().getViewRect(),
+ return s.getScrollableUnitIncrement(JScrollPane.this.getViewport().getViewRect(),
this.getOrientation(),
direction);
}
diff --git a/libjava/classpath/javax/swing/JSeparator.java b/libjava/classpath/javax/swing/JSeparator.java
index c87783b..15d15fd 100644
--- a/libjava/classpath/javax/swing/JSeparator.java
+++ b/libjava/classpath/javax/swing/JSeparator.java
@@ -58,7 +58,7 @@ public class JSeparator extends JComponent implements SwingConstants,
protected class AccessibleJSeparator extends AccessibleJComponent
{
private static final long serialVersionUID = 916332890553201095L;
-
+
/**
* Creates a new AccessibleJSeparator
instance.
*/
@@ -79,7 +79,7 @@ public class JSeparator extends JComponent implements SwingConstants,
}
private static final long serialVersionUID = 125301223445282357L;
-
+
/** The orientation of the JSeparator. */
private transient int orientation = HORIZONTAL;
@@ -94,9 +94,9 @@ public class JSeparator extends JComponent implements SwingConstants,
/**
* Creates a new JSeparator
object with the given orientation.
*
- * @param orientation the orientation (either {@link #HORIZONTAL} or
+ * @param orientation the orientation (either {@link #HORIZONTAL} or
* {@link #VERTICAL}).
- *
+ *
* @throws IllegalArgumentException if orientation
is not
* one of the specified values.
*/
@@ -139,8 +139,8 @@ public class JSeparator extends JComponent implements SwingConstants,
}
/**
- * Returns the suffix ("SeparatorUI"
in this case) used to
- * determine the class name for a UI delegate that can provide the look and
+ * Returns the suffix ("SeparatorUI"
in this case) used to
+ * determine the class name for a UI delegate that can provide the look and
* feel for a JSeparator
.
*
* @return "SeparatorUI"
.
@@ -154,7 +154,7 @@ public class JSeparator extends JComponent implements SwingConstants,
* Returns the orientation of the JSeparator
.
*
* @return The orientation (one of {@link #HORIZONTAL} and {@link #VERTICAL}).
- *
+ *
* @see #setOrientation(int)
*/
public int getOrientation()
@@ -163,16 +163,16 @@ public class JSeparator extends JComponent implements SwingConstants,
}
/**
- * Sets the orientation for the JSeparator
and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * Sets the orientation for the JSeparator
and sends a
+ * {@link PropertyChangeEvent} (with the property name
* orientation
) to all registered listeners.
*
- * @param orientation the orientation (either {@link #HORIZONTAL} or
+ * @param orientation the orientation (either {@link #HORIZONTAL} or
* {@link #VERTICAL}).
- *
+ *
* @throws IllegalArgumentException if orientation
is not
* one of the specified values.
- *
+ *
* @see #getOrientation()
*/
public void setOrientation(int orientation)
@@ -205,14 +205,14 @@ public class JSeparator extends JComponent implements SwingConstants,
* Returns the object that provides accessibility features for this
* JSeparator
component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJSeparator}).
*/
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
accessibleContext = new AccessibleJSeparator();
-
+
return accessibleContext;
}
}
diff --git a/libjava/classpath/javax/swing/JSlider.java b/libjava/classpath/javax/swing/JSlider.java
index 979707a..a6f5113 100644
--- a/libjava/classpath/javax/swing/JSlider.java
+++ b/libjava/classpath/javax/swing/JSlider.java
@@ -67,17 +67,17 @@ import javax.swing.plaf.UIResource;
*
* A JSlider
component has the following properties:
*
Property | Stored in | Bound? |
---|---|---|
extent | model | no |
inverted | slider | yes |
labelTable | slider | yes |
majorTickSpacing | slider | yes |
majorTickSpacing | slider | yes |
maximum | model | yes |
minimum | model | yes |
minorTickSpacing | slider | yes |
model | slider | yes |
model | slider | yes |
orientation | slider | yes |
paintLabels | slider | yes |
paintTicks | slider | yes |
value | model | no |
valueIsAdjusting | model | no |
* The various behavioural aspects of these properties follows: *
- * + * *AccessibleJSlider
instance.
*/
@@ -150,7 +150,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns a set containing the current state of the {@link JSlider}
+ * Returns a set containing the current state of the {@link JSlider}
* component.
*
* @return The accessible state set.
@@ -176,8 +176,8 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns an object that provides access to the current, minimum and
- * maximum values for the {@link JSlider}. Since this class implements
+ * Returns an object that provides access to the current, minimum and
+ * maximum values for the {@link JSlider}. Since this class implements
* {@link AccessibleValue}, it returns itself.
*
* @return The accessible value.
@@ -200,14 +200,14 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/**
* Sets the current value of the {@link JSlider} component and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * {@link PropertyChangeEvent} (with the property name
* {@link AccessibleContext#ACCESSIBLE_VALUE_PROPERTY}) to all registered
- * listeners. If the supplied value is null
, this method
+ * listeners. If the supplied value is null
, this method
* does nothing and returns false
.
*
* @param value the new slider value (null
permitted).
*
- * @return true
if the slider value is updated, and
+ * @return true
if the slider value is updated, and
* false
otherwise.
*/
public boolean setCurrentAccessibleValue(Number value)
@@ -216,7 +216,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
return false;
Number oldValue = getCurrentAccessibleValue();
setValue(value.intValue());
- firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
+ firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
new Integer(getValue()));
return true;
}
@@ -277,9 +277,9 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/** Whether the slider is inverted. */
private transient boolean isInverted;
- /**
+ /**
* The listener that monitors the slider's model and forwards events to the
- * slider's listeners (see createChangeListener()
).
+ * slider's listeners (see createChangeListener()
).
*/
protected ChangeListener changeListener;
@@ -287,7 +287,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
protected transient ChangeEvent changeEvent;
/**
- * Creates a new horizontal JSlider
instance with a minimum of
+ * Creates a new horizontal JSlider
instance with a minimum of
* 0, a maximum of 100, and a value of 50.
*/
public JSlider()
@@ -296,12 +296,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a new JSlider
instance with the given orientation
+ * Creates a new JSlider
instance with the given orientation
* and a minimum of 0, a maximum of 100, and a value of 50.
*
* @param orientation The orientation of the slider ({@link #HORIZONTAL} or
* {@link #VERTICAL}).
- *
+ *
* @throws IllegalArgumentException if orientation
is not one of
* the specified values.
*/
@@ -311,13 +311,13 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a new horizontal JSlider
instance with the given
+ * Creates a new horizontal JSlider
instance with the given
* maximum and minimum and a value that is halfway between the minimum and the
* maximum.
*
* @param minimum The minimum value.
* @param maximum The maximum value.
- *
+ *
* @throws IllegalArgumentException if minimum
is greater than
* maximum
.
*/
@@ -327,14 +327,14 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a new horizontal JSlider
instance with the given
+ * Creates a new horizontal JSlider
instance with the given
* minimum, maximum, and value.
*
* @param minimum The minimum value.
* @param maximum The maximum value.
* @param value The initial value.
- *
- * @throws IllegalArgumentException if value
is not in the
+ *
+ * @throws IllegalArgumentException if value
is not in the
* specified range.
* @throws IllegalArgumentException if minimum
is greater than
* maximum
.
@@ -345,7 +345,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a new JSlider
instance with the given orientation,
+ * Creates a new JSlider
instance with the given orientation,
* minimum, maximum, and value.
*
* @param orientation The orientation of the slider ({@link #HORIZONTAL} or
@@ -353,10 +353,10 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* @param minimum The minimum value of the JSlider.
* @param maximum The maximum value of the JSlider.
* @param value The initial value of the JSlider.
- *
+ *
* @throws IllegalArgumentException if orientation
is not one of
* the specified values.
- * @throws IllegalArgumentException if value
is not in the
+ * @throws IllegalArgumentException if value
is not in the
* specified range.
* @throws IllegalArgumentException if minimum
is greater than
* maximum
.
@@ -365,7 +365,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
{
sliderModel = new DefaultBoundedRangeModel(value, 0, minimum, maximum);
if (orientation != HORIZONTAL && orientation != VERTICAL)
- throw new IllegalArgumentException(orientation
+ throw new IllegalArgumentException(orientation
+ " is not a legal orientation");
this.orientation = orientation;
changeListener = createChangeListener();
@@ -374,11 +374,11 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a new horizontal JSlider
instance with the given
+ * Creates a new horizontal JSlider
instance with the given
* model.
*
* @param model The model (null
not permitted).
- *
+ *
* @throws NullPointerException if model
is null
.
*/
public JSlider(BoundedRangeModel model)
@@ -393,7 +393,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the slider's value (from the slider's model).
*
* @return The value of the slider.
- *
+ *
* @see #setValue(int)
*/
public int getValue()
@@ -402,14 +402,14 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the slider's value and sends a {@link ChangeEvent} to all
+ * Sets the slider's value and sends a {@link ChangeEvent} to all
* registered listeners. Note that the model will fire a change event to all
* of its registered listeners first (with the model as the event source) and
* then the slider will fire another change event to all of its registered
* listeners (this time with the slider as the event source).
*
* @param value the new value.
- *
+ *
* @see #getValue()
*/
public void setValue(int value)
@@ -448,8 +448,8 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns the suffix ("SliderUI"
in this case) used to
- * determine the class name for a UI delegate that can provide the look and
+ * Returns the suffix ("SliderUI"
in this case) used to
+ * determine the class name for a UI delegate that can provide the look and
* feel for a JSlider
.
*
* @return "SliderUI"
.
@@ -462,7 +462,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/**
* Creates a {@link ChangeListener} that is added to the slider's model and
* forwards change events generated by the model to the listeners that are
- * registered with the JSlider
(by calling the
+ * registered with the JSlider
(by calling the
* {@link #fireStateChanged} method).
*
* @return A new listener.
@@ -474,7 +474,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
public void stateChanged(ChangeEvent ce)
{
// No need to trigger a repaint since the UI listens to the model
- // as well. All we need to do is pass on the stateChanged event
+ // as well. All we need to do is pass on the stateChanged event
// to our listeners.
fireStateChanged();
}
@@ -482,13 +482,13 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Registers a listener with the slider so that it will receive
+ * Registers a listener with the slider so that it will receive
* {@link ChangeEvent} notifications. Note that change events generated
* by the slider's model will be forwarded automatically to the slider's
* listeners.
*
* @param listener the listener to register.
- *
+ *
* @see #removeChangeListener(ChangeListener)
*/
public void addChangeListener(ChangeListener listener)
@@ -501,7 +501,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* {@link ChangeEvent} notifications from the slider.
*
* @param listener The listener to remove.
- *
+ *
* @see #addChangeListener(ChangeListener)
*/
public void removeChangeListener(ChangeListener listener)
@@ -510,7 +510,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sends a {@link ChangeEvent} to all registered listeners, with this slider
+ * Sends a {@link ChangeEvent} to all registered listeners, with this slider
* as the source.
*/
protected void fireStateChanged()
@@ -526,12 +526,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns an array containing all the {@link ChangeListener} instances
+ * Returns an array containing all the {@link ChangeListener} instances
* registered with this slider. If no listeners are registered, this method
* returns an empty array.
*
- * @return An array array containing all the {@link ChangeListener} instances
- * registered with this slider (possibly empty, but never
+ * @return An array array containing all the {@link ChangeListener} instances
+ * registered with this slider (possibly empty, but never
* null
).
*/
public ChangeListener[] getChangeListeners()
@@ -540,11 +540,11 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns the slider's model, which stores the minimum, maximum and current
+ * Returns the slider's model, which stores the minimum, maximum and current
* values.
*
* @return The slider's model.
- *
+ *
* @see #setModel(BoundedRangeModel)
*/
public BoundedRangeModel getModel()
@@ -556,12 +556,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Sets the slider's model and sends a {@link PropertyChangeEvent} (with the
* property name "model") to all registered listeners. The change listener
* that the slider registered with the original model is removed and added
- * to the new model (this ensures that {@link ChangeEvent} notifications
+ * to the new model (this ensures that {@link ChangeEvent} notifications
* generated by the model are automatically forwarded to listeners that are
* registered with the slider).
*
* @param model The model to use with the slider.
- *
+ *
* @see #getModel()
*/
public void setModel(BoundedRangeModel model)
@@ -583,7 +583,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the minimum value of the slider (from the slider's model).
*
* @return The minimum value of the slider.
- *
+ *
* @see #setMinimum(int)
*/
public int getMinimum()
@@ -592,19 +592,19 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the minimum value of the slider and fires a
+ * Sets the minimum value of the slider and fires a
* {@link PropertyChangeEvent} (with the property name "minimum") to all
* registered listeners. Note that:
* *
*
valueIsAdjusting
flag from the slider's model.
*
* @return The valueIsAdjusting
flag from the slider's model.
- *
+ *
* @see #setValueIsAdjusting(boolean)
*/
public boolean getValueIsAdjusting()
@@ -664,11 +664,11 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the valueIsAdjusting
flag in the slider's model, and
+ * Sets the valueIsAdjusting
flag in the slider's model, and
* sends a {@link ChangeEvent} to all registered listeners.
*
* @param adjusting the new flag value.
- *
+ *
* @see #getValueIsAdjusting()
*/
public void setValueIsAdjusting(boolean adjusting)
@@ -680,7 +680,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the slider's extent value, obtained from the slider's model.
*
* @return The extent value.
- *
+ *
* @see #setExtent(int)
*/
public int getExtent()
@@ -689,14 +689,14 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the slider's extent value and sends a {@link ChangeEvent} to all
+ * Sets the slider's extent value and sends a {@link ChangeEvent} to all
* registered listeners. Note that the model will fire a change event to all
* of its registered listeners first (with the model as the event source) and
* then the slider will fire another change event to all of its registered
* listeners (this time with the slider as the event source).
*
* @param extent The extent value for this slider.
- *
+ *
* @see #getExtent()
*/
public void setExtent(int extent)
@@ -709,7 +709,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* or {@link JSlider#VERTICAL}.
*
* @return The orientation of the slider.
- *
+ *
* @see #setOrientation(int)
*/
public int getOrientation()
@@ -718,16 +718,16 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the orientation for the slider and sends a
+ * Sets the orientation for the slider and sends a
* {@link PropertyChangeEvent} (with the property name "orientation") to all
* registered listeners.
*
* @param orientation the orientation (one of {@link JSlider#HORIZONTAL} or
* {@link JSlider#VERTICAL}).
- *
+ *
* @throws IllegalArgumentException if orientation
is not one of
* the permitted values.
- *
+ *
* @see #getOrientation()
*/
public void setOrientation(int orientation)
@@ -748,7 +748,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the label table for the slider.
*
* @return The label table for the slider (possibly null
).
- *
+ *
* @see #setLabelTable(Dictionary)
*/
public Dictionary getLabelTable()
@@ -757,12 +757,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the table of labels for the slider and sends a
- * {@link PropertyChangeEvent} (with the property name "labelTable") to all
+ * Sets the table of labels for the slider and sends a
+ * {@link PropertyChangeEvent} (with the property name "labelTable") to all
* registered listeners.
*
* @param table the table of labels (null
permitted).
- *
+ *
* @see #getLabelTable()
*/
public void setLabelTable(Dictionary table)
@@ -779,7 +779,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Resets the UI delegates for the labels in the labelTable
to
+ * Resets the UI delegates for the labels in the labelTable
to
* the default for the current look and feel.
*/
protected void updateLabelUIs()
@@ -800,8 +800,8 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a hashtable of (Integer, JLabel)
pairs that can be
- * used as a label table for this slider. The labels will start from the
+ * Creates a hashtable of (Integer, JLabel)
pairs that can be
+ * used as a label table for this slider. The labels will start from the
* slider's minimum and increase by the increment. Each label will have a text
* string indicating its integer value.
*
@@ -818,9 +818,9 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Creates a hashtable of (Integer, JLabel)
pairs that can be
- * used as a label table for this slider. The labels will start from the
- * given start value and increase by the increment. Each label will have a
+ * Creates a hashtable of (Integer, JLabel)
pairs that can be
+ * used as a label table for this slider. The labels will start from the
+ * given start value and increase by the increment. Each label will have a
* text string indicating its integer value.
*
* @param increment The increment between labels (must be > 0).
@@ -834,7 +834,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
*/
public Hashtable createStandardLabels(int increment, int start)
{
- if (increment <= 0)
+ if (increment <= 0)
throw new IllegalArgumentException("Requires 'increment' > 0.");
if (start < getMinimum() || start > getMaximum())
throw new IllegalArgumentException("The 'start' value is out of range.");
@@ -855,7 +855,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
*
* @return The flag that controls whether or not the value scale for the
* slider is inverted.
- *
+ *
* @see #setInverted(boolean)
*/
public boolean getInverted()
@@ -867,14 +867,14 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Sets the flag that controls whether or not the value scale for the
* slider is inverted and, if the new flag value is different to the old flag
* value, sends a {@link PropertyChangeEvent} to all registered listeners.
- * Typically, a horizontal slider will display a scale that increases from
- * left to right, but this is reversed if the 'inverted' flag is set to
+ * Typically, a horizontal slider will display a scale that increases from
+ * left to right, but this is reversed if the 'inverted' flag is set to
* true
. Similarly, a vertical slider will display a scale that
* increases from bottom to top, and this is reversed if the 'inverted' flag
* is set to true
.
*
* @param inverted the new flag value.
- *
+ *
* @see #getInverted()
*/
public void setInverted(boolean inverted)
@@ -889,11 +889,11 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns the distance between major tick marks along the slider's value
+ * Returns the distance between major tick marks along the slider's value
* scale.
*
* @return The amount of units between each major tick mark.
- *
+ *
* @see #setMajorTickSpacing(int)
*/
public int getMajorTickSpacing()
@@ -902,12 +902,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the distance between major tick marks along the slider's value scale,
- * and sends a {@link PropertyChangeEvent} (with the property name
+ * Sets the distance between major tick marks along the slider's value scale,
+ * and sends a {@link PropertyChangeEvent} (with the property name
* "majorTickSpacing") to all registered listeners.
*
* @param spacing the distance between major tick marks.
- *
+ *
* @see #getMajorTickSpacing()
*/
public void setMajorTickSpacing(int spacing)
@@ -925,12 +925,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Returns the distance between minor tick marks along the slider's value
+ * Returns the distance between minor tick marks along the slider's value
* scale.
*
- * @return The distance between minor tick marks along the slider's value
+ * @return The distance between minor tick marks along the slider's value
* scale.
- *
+ *
* @see #setMinorTickSpacing(int)
*/
public int getMinorTickSpacing()
@@ -939,12 +939,12 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the distance between minor tick marks along the slider's value scale,
- * and sends a {@link PropertyChangeEvent} (with the property name
+ * Sets the distance between minor tick marks along the slider's value scale,
+ * and sends a {@link PropertyChangeEvent} (with the property name
* "minorTickSpacing") to all registered listeners.
*
* @param spacing the distance between minor tick marks.
- *
+ *
* @see #getMinorTickSpacing()
*/
public void setMinorTickSpacing(int spacing)
@@ -961,11 +961,11 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/**
* Returns the flag that controls whether the slider thumb will snap to ticks.
- * Sliders that snap to ticks will automatically move the thumb to the
+ * Sliders that snap to ticks will automatically move the thumb to the
* nearest tick mark.
*
* @return true
if the slider thumb automatically.
- *
+ *
* @see #setSnapToTicks(boolean)
*/
public boolean getSnapToTicks()
@@ -974,13 +974,13 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the flag that controls whether the slider thumb will snap to ticks
- * and sends a {@link PropertyChangeEvent} (with the property name
- * 'snapToTicks') to all registered listeners. Sliders that snap to ticks
+ * Sets the flag that controls whether the slider thumb will snap to ticks
+ * and sends a {@link PropertyChangeEvent} (with the property name
+ * 'snapToTicks') to all registered listeners. Sliders that snap to ticks
* will automatically move the thumb to the nearest tick mark.
*
* @param snap the new flag value.
- *
+ *
* @see #getSnapToTicks()
*/
public void setSnapToTicks(boolean snap)
@@ -996,9 +996,9 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the flag that controls whether or not tick marks are painted along
* the slider's value scale.
*
- * @return true
if tick marks should be painted, and
+ * @return true
if tick marks should be painted, and
* false
if tick marks should not be painted.
- *
+ *
* @see #setPaintTicks(boolean)
*/
public boolean getPaintTicks()
@@ -1008,14 +1008,14 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/**
* Sets the flag that controls whether or not tick marks are painted along
- * the slider's value scale, and sends a {@link PropertyChangeEvent} (with
+ * the slider's value scale, and sends a {@link PropertyChangeEvent} (with
* the property name "paintTicks") to all registered listeners. In
* addition to setting this property to true
, one or both of the
- * minor tick spacing and major tick spacing attributes must be set to a
+ * minor tick spacing and major tick spacing attributes must be set to a
* value greater than 0 in order for ticks to be painted.
*
* @param paint Whether ticks will be painted.
- *
+ *
* @see #getPaintTicks()
*/
public void setPaintTicks(boolean paint)
@@ -1034,7 +1034,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the flag that controls whether or not the track is painted.
*
* @return Whether the track will be painted.
- *
+ *
* @see #setPaintTrack(boolean)
*/
public boolean getPaintTrack()
@@ -1048,7 +1048,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* registered listeners.
*
* @param paint Whether the track will be painted.
- *
+ *
* @see #getPaintTrack()
*/
public void setPaintTrack(boolean paint)
@@ -1066,7 +1066,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* tick marks along the slider.
*
* @return Whether labels will be painted.
- *
+ *
* @see #setPaintLabels(boolean)
*/
public boolean getPaintLabels()
@@ -1076,11 +1076,11 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
/**
* Sets the flag that controls whether or not labels are painted for the
- * tick marks along the slider and sends a {@link PropertyChangeEvent} (with
+ * tick marks along the slider and sends a {@link PropertyChangeEvent} (with
* the property name "paintLabels") to all registered listeners.
*
* @param paint Whether labels will be painted.
- *
+ *
* @see #getPaintLabels()
*/
public void setPaintLabels(boolean paint)
@@ -1119,7 +1119,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
sb.append(",paintTicks=").append(getPaintTicks());
sb.append(",paintTrack=").append(getPaintTrack());
sb.append(",snapToTicks=").append(getSnapToTicks());
-
+
// the following is output by the reference implementation. We don't
// strictly need to replicate this. Perhaps it has some meaning, but
// I couldn't determine it yet...
@@ -1138,7 +1138,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
{
if (accessibleContext == null)
accessibleContext = new AccessibleJSlider();
-
+
return accessibleContext;
}
}
diff --git a/libjava/classpath/javax/swing/JSpinner.java b/libjava/classpath/javax/swing/JSpinner.java
index 16a2106..e942cae 100644
--- a/libjava/classpath/javax/swing/JSpinner.java
+++ b/libjava/classpath/javax/swing/JSpinner.java
@@ -66,18 +66,18 @@ import javax.swing.text.NumberFormatter;
* from a list.
*
* @author Ka-Hing Cheung
- *
+ *
* @since 1.4
*/
public class JSpinner extends JComponent
{
/**
- * The base class for the editor used by the {@link JSpinner} component.
+ * The base class for the editor used by the {@link JSpinner} component.
* The editor is in fact a panel containing a {@link JFormattedTextField}
* component.
*/
- public static class DefaultEditor
- extends JPanel
+ public static class DefaultEditor
+ extends JPanel
implements ChangeListener, PropertyChangeListener, LayoutManager
{
/** The spinner that the editor is allocated to. */
@@ -92,7 +92,7 @@ public class JSpinner extends JComponent
private static final long serialVersionUID = -5317788736173368172L;
/**
- * Creates a new DefaultEditor
object. The editor is
+ * Creates a new DefaultEditor
object. The editor is
* registered with the spinner as a {@link ChangeListener} here.
*
* @param spinner the JSpinner
associated with this editor
@@ -107,23 +107,23 @@ public class JSpinner extends JComponent
ftf.setValue(spinner.getValue());
ftf.addPropertyChangeListener(this);
if (getComponentOrientation().isLeftToRight())
- ftf.setHorizontalAlignment(JTextField.RIGHT);
+ ftf.setHorizontalAlignment(JTextField.RIGHT);
else
- ftf.setHorizontalAlignment(JTextField.LEFT);
+ ftf.setHorizontalAlignment(JTextField.LEFT);
spinner.addChangeListener(this);
}
/**
* Returns the JSpinner
component that the editor is assigned
* to.
- *
+ *
* @return The spinner that the editor is assigned to.
*/
public JSpinner getSpinner()
{
return spinner;
}
-
+
/**
* DOCUMENT ME!
*/
@@ -144,7 +144,7 @@ public class JSpinner extends JComponent
}
/**
- * Returns the text field used to display and edit the current value in
+ * Returns the text field used to display and edit the current value in
* the spinner.
*
* @return The text field.
@@ -153,7 +153,7 @@ public class JSpinner extends JComponent
{
return ftf;
}
-
+
/**
* Sets the bounds for the child components in this container. In this
* case, the text field is the only component to be laid out.
@@ -168,7 +168,7 @@ public class JSpinner extends JComponent
size.width - insets.left - insets.right,
size.height - insets.top - insets.bottom);
}
-
+
/**
* Calculates the minimum size for this component. In this case, the
* text field is the only subcomponent, so the return value is the minimum
@@ -185,10 +185,10 @@ public class JSpinner extends JComponent
return new Dimension(minSize.width + insets.left + insets.right,
minSize.height + insets.top + insets.bottom);
}
-
+
/**
* Calculates the preferred size for this component. In this case, the
- * text field is the only subcomponent, so the return value is the
+ * text field is the only subcomponent, so the return value is the
* preferred size of the text field plus the insets of this component.
*
* @param parent the parent container.
@@ -202,26 +202,26 @@ public class JSpinner extends JComponent
return new Dimension(prefSize.width + insets.left + insets.right,
prefSize.height + insets.top + insets.bottom);
}
-
+
/**
- * Receives notification of property changes. If the text field's 'value'
+ * Receives notification of property changes. If the text field's 'value'
* property changes, the spinner's model is updated accordingly.
*
* @param event the event.
*/
public void propertyChange(PropertyChangeEvent event)
{
- if (event.getSource() == ftf)
+ if (event.getSource() == ftf)
{
if (event.getPropertyName().equals("value"))
spinner.getModel().setValue(event.getNewValue());
}
}
-
+
/**
* Receives notification of changes in the state of the {@link JSpinner}
* that the editor belongs to - the content of the text field is updated
- * accordingly.
+ * accordingly.
*
* @param event the change event.
*/
@@ -229,12 +229,12 @@ public class JSpinner extends JComponent
{
ftf.setValue(spinner.getValue());
}
-
+
/**
* This method does nothing. It is required by the {@link LayoutManager}
* interface, but since this component has a single child, there is no
* need to use this method.
- *
+ *
* @param child the child component to remove.
*/
public void removeLayoutComponent(Component child)
@@ -246,7 +246,7 @@ public class JSpinner extends JComponent
* This method does nothing. It is required by the {@link LayoutManager}
* interface, but since this component has a single child, there is no
* need to use this method.
- *
+ *
* @param name the name.
* @param child the child component to add.
*/
@@ -260,7 +260,7 @@ public class JSpinner extends JComponent
* A panel containing a {@link JFormattedTextField} that is configured for
* displaying and editing numbers. The panel is used as a subcomponent of
* a {@link JSpinner}.
- *
+ *
* @see JSpinner#createEditor(SpinnerModel)
*/
public static class NumberEditor extends DefaultEditor
@@ -271,8 +271,8 @@ public class JSpinner extends JComponent
private static final long serialVersionUID = 3791956183098282942L;
/**
- * Creates a new NumberEditor
object for the specified
- * spinner
. The editor is registered with the spinner as a
+ * Creates a new NumberEditor
object for the specified
+ * spinner
. The editor is registered with the spinner as a
* {@link ChangeListener}.
*
* @param spinner the component the editor will be used with.
@@ -295,7 +295,7 @@ public class JSpinner extends JComponent
public NumberEditor(JSpinner spinner, String decimalFormatPattern)
{
super(spinner);
- NumberEditorFormatter nef
+ NumberEditorFormatter nef
= new NumberEditorFormatter(decimalFormatPattern);
nef.setMinimum(getModel().getMinimum());
nef.setMaximum(getModel().getMaximum());
@@ -316,7 +316,7 @@ public class JSpinner extends JComponent
/**
* Returns the model used by the editor's {@link JSpinner} component,
* cast to a {@link SpinnerNumberModel}.
- *
+ *
* @return The model.
*/
public SpinnerNumberModel getModel()
@@ -324,11 +324,11 @@ public class JSpinner extends JComponent
return (SpinnerNumberModel) getSpinner().getModel();
}
}
-
- static class NumberEditorFormatter
+
+ static class NumberEditorFormatter
extends NumberFormatter
{
- public NumberEditorFormatter()
+ public NumberEditorFormatter()
{
super(NumberFormat.getInstance());
}
@@ -359,7 +359,7 @@ public class JSpinner extends JComponent
/**
* Returns the spinner's model cast as a {@link SpinnerListModel}.
- *
+ *
* @return The spinner's model.
*/
public SpinnerListModel getModel()
@@ -442,10 +442,10 @@ public class JSpinner extends JComponent
}
}
- static class DateEditorFormatter
+ static class DateEditorFormatter
extends DateFormatter
{
- public DateEditorFormatter()
+ public DateEditorFormatter()
{
super(DateFormat.getInstance());
}
@@ -455,9 +455,9 @@ public class JSpinner extends JComponent
}
}
- /**
+ /**
* A listener that forwards {@link ChangeEvent} notifications from the model
- * to the {@link JSpinner}'s listeners.
+ * to the {@link JSpinner}'s listeners.
*/
class ModelListener implements ChangeListener
{
@@ -468,10 +468,10 @@ public class JSpinner extends JComponent
{
// nothing to do here
}
-
+
/**
* Receives notification from the model that its state has changed.
- *
+ *
* @param event the event (ignored).
*/
public void stateChanged(ChangeEvent event)
@@ -480,9 +480,9 @@ public class JSpinner extends JComponent
}
}
- /**
- * The model that defines the current value and permitted values for the
- * spinner.
+ /**
+ * The model that defines the current value and permitted values for the
+ * spinner.
*/
private SpinnerModel model;
@@ -492,8 +492,8 @@ public class JSpinner extends JComponent
private static final long serialVersionUID = 3412663575706551720L;
/**
- * Creates a new JSpinner
with default instance of
- * {@link SpinnerNumberModel} (that is, a model with value 0, step size 1,
+ * Creates a new JSpinner
with default instance of
+ * {@link SpinnerNumberModel} (that is, a model with value 0, step size 1,
* and no upper or lower limit).
*
* @see javax.swing.SpinnerNumberModel
@@ -504,12 +504,12 @@ public class JSpinner extends JComponent
}
/**
- * Creates a new JSpinner with the specified model. The
+ * Creates a new JSpinner with the specified model. The
* {@link #createEditor(SpinnerModel)} method is used to create an editor
* that is suitable for the model.
*
* @param model the model (null
not permitted).
- *
+ *
* @throws NullPointerException if model
is null
.
*/
public JSpinner(SpinnerModel model)
@@ -550,7 +550,7 @@ public class JSpinner extends JComponent
*
* @param editor the new editor (null
not permitted.
*
- * @throws IllegalArgumentException if editor
is
+ * @throws IllegalArgumentException if editor
is
* null
.
*
* @see #getEditor
@@ -565,7 +565,7 @@ public class JSpinner extends JComponent
((DefaultEditor) oldEditor).dismiss(this);
else if (oldEditor instanceof ChangeListener)
removeChangeListener((ChangeListener) oldEditor);
-
+
this.editor = editor;
firePropertyChange("editor", oldEditor, editor);
}
@@ -574,7 +574,7 @@ public class JSpinner extends JComponent
* Returns the model used by the {@link JSpinner} component.
*
* @return The model.
- *
+ *
* @see #setModel(SpinnerModel)
*/
public SpinnerModel getModel()
@@ -593,7 +593,7 @@ public class JSpinner extends JComponent
{
if (newModel == null)
throw new IllegalArgumentException();
-
+
if (model == newModel)
return;
diff --git a/libjava/classpath/javax/swing/JSplitPane.java b/libjava/classpath/javax/swing/JSplitPane.java
index 5b6ec15..856b2e5 100644
--- a/libjava/classpath/javax/swing/JSplitPane.java
+++ b/libjava/classpath/javax/swing/JSplitPane.java
@@ -1,4 +1,4 @@
-/* JSplitPane.java --
+/* JSplitPane.java --
Copyright (C) 2004, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -69,7 +69,7 @@ public class JSplitPane extends JComponent implements Accessible
implements AccessibleValue
{
private static final long serialVersionUID = -1788116871416305366L;
-
+
/**
* Creates a new AccessibleJSplitPane
instance.
*/
@@ -79,7 +79,7 @@ public class JSplitPane extends JComponent implements Accessible
}
/**
- * Returns a set containing the current state of the {@link JSplitPane}
+ * Returns a set containing the current state of the {@link JSplitPane}
* component.
*
* @return The accessible state set.
@@ -109,8 +109,8 @@ public class JSplitPane extends JComponent implements Accessible
}
/**
- * Returns an object that provides access to the current, minimum and
- * maximum values for the {@link JSplitPane}. Since this class implements
+ * Returns an object that provides access to the current, minimum and
+ * maximum values for the {@link JSplitPane}. Since this class implements
* {@link AccessibleValue}, it returns itself.
*
* @return The accessible value.
@@ -121,7 +121,7 @@ public class JSplitPane extends JComponent implements Accessible
}
/**
- * Returns the current divider location for the {@link JSplitPane}
+ * Returns the current divider location for the {@link JSplitPane}
* component, as an {@link Integer}.
*
* @return The current divider location.
@@ -132,15 +132,15 @@ public class JSplitPane extends JComponent implements Accessible
}
/**
- * Sets the divider location for the {@link JSplitPane} component and sends
- * a {@link PropertyChangeEvent} (with the property name
+ * Sets the divider location for the {@link JSplitPane} component and sends
+ * a {@link PropertyChangeEvent} (with the property name
* {@link AccessibleContext#ACCESSIBLE_VALUE_PROPERTY}) to all registered
- * listeners. If the supplied value is null
, this method
+ * listeners. If the supplied value is null
, this method
* does nothing and returns false
.
*
* @param value the new divider location (null
permitted).
*
- * @return true
if the divider location value is updated, and
+ * @return true
if the divider location value is updated, and
* false
otherwise.
*/
public boolean setCurrentAccessibleValue(Number value)
@@ -149,13 +149,13 @@ public class JSplitPane extends JComponent implements Accessible
return false;
Number oldValue = getCurrentAccessibleValue();
setDividerLocation(value.intValue());
- firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
+ firePropertyChange(AccessibleContext.ACCESSIBLE_VALUE_PROPERTY, oldValue,
new Integer(value.intValue()));
return true;
}
/**
- * Returns the minimum divider location for the {@link JSplitPane}
+ * Returns the minimum divider location for the {@link JSplitPane}
* component, as an {@link Integer}.
*
* @return The minimum divider location.
@@ -166,7 +166,7 @@ public class JSplitPane extends JComponent implements Accessible
}
/**
- * Returns the maximum divider location for the {@link JSplitPane}
+ * Returns the maximum divider location for the {@link JSplitPane}
* component, as an {@link Integer}.
*
* @return The maximum divider location.
@@ -178,7 +178,7 @@ public class JSplitPane extends JComponent implements Accessible
}
private static final long serialVersionUID = -5634142046175988380L;
-
+
/** The constraints string used to add components to the bottom. */
public static final String BOTTOM = "bottom";
@@ -200,14 +200,14 @@ public class JSplitPane extends JComponent implements Accessible
public static final int HORIZONTAL_SPLIT = 1;
/** The property fired when the last divider location property changes. */
- public static final String LAST_DIVIDER_LOCATION_PROPERTY =
+ public static final String LAST_DIVIDER_LOCATION_PROPERTY =
"lastDividerLocation";
/** The constraints string used to add components to the left. */
public static final String LEFT = "left";
/** The property fired when the one touch expandable property changes. */
- public static final String ONE_TOUCH_EXPANDABLE_PROPERTY =
+ public static final String ONE_TOUCH_EXPANDABLE_PROPERTY =
"oneTouchExpandable";
/** The property fired when the orientation property changes. */
@@ -231,7 +231,7 @@ public class JSplitPane extends JComponent implements Accessible
/** Whether the JSplitPane uses one touch expandable buttons. */
protected boolean oneTouchExpandable = false;
- // This is the master dividerSize variable and sets the
+ // This is the master dividerSize variable and sets the
// BasicSplitPaneDivider one accordingly
/** The size of the divider. */
@@ -357,7 +357,7 @@ public class JSplitPane extends JComponent implements Accessible
* @param constraints The constraints string to use.
* @param index Where to place to component in the list of components.
*
- * @throws IllegalArgumentException When the constraints is not a known
+ * @throws IllegalArgumentException When the constraints is not a known
* identifier.
*/
protected void addImpl(Component comp, Object constraints, int index)
@@ -389,7 +389,7 @@ public class JSplitPane extends JComponent implements Accessible
else if (placement.equals(DIVIDER))
constraints = null;
else
- throw new
+ throw new
IllegalArgumentException("Constraints is not a known identifier.");
// If no dividerLocation has been set, then we need to trigger an
@@ -405,14 +405,14 @@ public class JSplitPane extends JComponent implements Accessible
* Returns the object that provides accessibility features for this
* JSplitPane
component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJSplitPane}).
*/
public AccessibleContext getAccessibleContext()
{
if (accessibleContext == null)
accessibleContext = new AccessibleJSplitPane();
-
+
return accessibleContext;
}
@@ -715,7 +715,7 @@ public class JSplitPane extends JComponent implements Accessible
/**
* This method sets the location of the divider.
- *
+ *
* @param location The location of the divider. The negative value forces to
* compute the new location from the preferred sizes of the split
* pane components.
@@ -727,7 +727,7 @@ public class JSplitPane extends JComponent implements Accessible
SplitPaneUI ui = getUI();
if (ui != null)
ui.setDividerLocation(this, location);
- firePropertyChange(DIVIDER_LOCATION_PROPERTY, oldLocation,
+ firePropertyChange(DIVIDER_LOCATION_PROPERTY, oldLocation,
location);
}
@@ -773,7 +773,7 @@ public class JSplitPane extends JComponent implements Accessible
* @param comp The left component.
*/
public void setLeftComponent(Component comp)
- {
+ {
if (comp != null)
add(comp, LEFT);
else
@@ -801,8 +801,8 @@ public class JSplitPane extends JComponent implements Accessible
}
/**
- * Sets the orientation for the JSplitPane
and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * Sets the orientation for the JSplitPane
and sends a
+ * {@link PropertyChangeEvent} (with the property name
* {@link #ORIENTATION_PROPERTY}) to all registered listeners.
*
* @param orientation the orientation (either {@link #HORIZONTAL_SPLIT}
@@ -839,7 +839,7 @@ public class JSplitPane extends JComponent implements Accessible
if (value < 0.0 || value > 1.0)
throw new IllegalArgumentException("Value outside permitted range.");
if (this.resizeWeight != value)
- {
+ {
double old = resizeWeight;
resizeWeight = value;
firePropertyChange(RESIZE_WEIGHT_PROPERTY, old, value);
@@ -905,7 +905,7 @@ public class JSplitPane extends JComponent implements Accessible
/**
* Helper method for
* {@link LookAndFeel#installProperty(JComponent, String, Object)}.
- *
+ *
* @param propertyName the name of the property
* @param value the value of the property
*
diff --git a/libjava/classpath/javax/swing/JTabbedPane.java b/libjava/classpath/javax/swing/JTabbedPane.java
index 79521be3..18055e8 100644
--- a/libjava/classpath/javax/swing/JTabbedPane.java
+++ b/libjava/classpath/javax/swing/JTabbedPane.java
@@ -64,7 +64,7 @@ import javax.swing.plaf.UIResource;
* This is a container for components where only one component is displayed at
* a given time and the displayed component can be switched by clicking on
* tabs.
- *
+ *
*
* Tabs can be oriented in several ways. They can be above, below, left and
* right of the component. Tabs can either wrap around (by creating multiple
@@ -185,7 +185,7 @@ public class JTabbedPane extends JComponent implements Serializable,
/**
* Returns the number of selected child components of the
* JTabbedPane
. The reference implementation appears
- * to return 1
always and we do the same.
+ * to return 1
always and we do the same.
*
* @return 1
*/
@@ -195,7 +195,7 @@ public class JTabbedPane extends JComponent implements Serializable,
}
/**
- * Returns the selected tab, or null
if there is no
+ * Returns the selected tab, or null
if there is no
* selection.
*
* @param i the selection index (ignored here).
@@ -239,7 +239,7 @@ public class JTabbedPane extends JComponent implements Serializable,
* tabbed pane, since one tab must always be selected.
*
* @param i the item index.
- *
+ *
* @see #addAccessibleSelection(int)
*/
public void removeAccessibleSelection(int i)
@@ -250,7 +250,7 @@ public class JTabbedPane extends JComponent implements Serializable,
/**
* Does nothing - it makes no sense to clear the selection for
* a tabbed pane, since one tab must always be selected.
- *
+ *
* @see #addAccessibleSelection(int)
*/
public void clearAccessibleSelection()
@@ -261,7 +261,7 @@ public class JTabbedPane extends JComponent implements Serializable,
/**
* Does nothing - it makes no sense to select all for a tabbed
* pane, since only one tab can be selected at a time.
- *
+ *
* @see #addAccessibleSelection(int)
*/
public void selectAllAccessibleSelection()
@@ -464,7 +464,7 @@ public class JTabbedPane extends JComponent implements Serializable,
{
title = text;
if (title != null && title.length() <= underlinedChar)
- setDisplayedMnemonicIndex(title.length() - 1);
+ setDisplayedMnemonicIndex(title.length() - 1);
}
/**
@@ -495,7 +495,7 @@ public class JTabbedPane extends JComponent implements Serializable,
public Icon getDisabledIcon()
{
if (disabledIcon == null && icon instanceof ImageIcon)
- setDisabledIcon(icon);
+ setDisabledIcon(icon);
return disabledIcon;
}
@@ -560,7 +560,7 @@ public class JTabbedPane extends JComponent implements Serializable,
{
mnemonicKey = aChar;
if (title != null)
- setDisplayedMnemonicIndex(title.indexOf(mnemonicKey));
+ setDisplayedMnemonicIndex(title.indexOf(mnemonicKey));
}
/**
@@ -585,10 +585,10 @@ public class JTabbedPane extends JComponent implements Serializable,
throws IllegalArgumentException
{
if (index < -1 || title != null && index >= title.length())
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException();
if (title == null || mnemonicKey == 0 || (index > -1 && title.charAt(index) != mnemonicKey))
- index = -1;
+ index = -1;
underlinedChar = index;
}
@@ -605,7 +605,7 @@ public class JTabbedPane extends JComponent implements Serializable,
/**
* Returns the accessible name for this tab.
- *
+ *
* @return The accessible name.
*/
public String getAccessibleName()
@@ -615,7 +615,7 @@ public class JTabbedPane extends JComponent implements Serializable,
else
return title;
}
-
+
/**
* Returns the accessible role of this tab, which is always
* {@link AccessibleRole#PAGE_TAB}.
@@ -634,7 +634,7 @@ public class JTabbedPane extends JComponent implements Serializable,
*/
public AccessibleStateSet getAccessibleStateSet()
{
- AccessibleContext parentCtx = JTabbedPane.this.getAccessibleContext();
+ AccessibleContext parentCtx = JTabbedPane.this.getAccessibleContext();
AccessibleStateSet state = parentCtx.getAccessibleStateSet();
state.add(AccessibleState.SELECTABLE);
if (component == getSelectedComponent())
@@ -761,7 +761,7 @@ public class JTabbedPane extends JComponent implements Serializable,
throw new IllegalArgumentException("tabLayoutPolicy is not valid.");
this.tabPlacement = tabPlacement;
layoutPolicy = tabLayoutPolicy;
-
+
setModel(new DefaultSingleSelectionModel());
updateUI();
@@ -847,8 +847,8 @@ public class JTabbedPane extends JComponent implements Serializable,
changeEvent = new ChangeEvent(this);
for (int i = changeListeners.length - 2; i >= 0; i -= 2)
{
- if (changeListeners[i] == ChangeListener.class)
- ((ChangeListener) changeListeners[i + 1]).stateChanged(changeEvent);
+ if (changeListeners[i] == ChangeListener.class)
+ ((ChangeListener) changeListeners[i + 1]).stateChanged(changeEvent);
}
}
@@ -881,11 +881,11 @@ public class JTabbedPane extends JComponent implements Serializable,
{
if (m != model)
{
- SingleSelectionModel oldModel = this.model;
+ SingleSelectionModel oldModel = this.model;
if (oldModel != null && changeListener != null)
oldModel.removeChangeListener(changeListener);
- model = m;
+ model = m;
if (model != null)
{
@@ -893,7 +893,7 @@ public class JTabbedPane extends JComponent implements Serializable,
changeListener = createChangeListener();
model.addChangeListener(changeListener);
}
- firePropertyChange("model", oldModel, this.model);
+ firePropertyChange("model", oldModel, this.model);
}
}
@@ -922,9 +922,9 @@ public class JTabbedPane extends JComponent implements Serializable,
throw new IllegalArgumentException("tabPlacement is not valid.");
if (tabPlacement != this.tabPlacement)
{
- int oldPlacement = this.tabPlacement;
- this.tabPlacement = tabPlacement;
- firePropertyChange("tabPlacement", oldPlacement, this.tabPlacement);
+ int oldPlacement = this.tabPlacement;
+ this.tabPlacement = tabPlacement;
+ firePropertyChange("tabPlacement", oldPlacement, this.tabPlacement);
}
}
@@ -953,9 +953,9 @@ public class JTabbedPane extends JComponent implements Serializable,
throw new IllegalArgumentException("tabLayoutPolicy is not valid.");
if (tabLayoutPolicy != layoutPolicy)
{
- int oldPolicy = layoutPolicy;
- layoutPolicy = tabLayoutPolicy;
- firePropertyChange("tabLayoutPolicy", oldPolicy, layoutPolicy);
+ int oldPolicy = layoutPolicy;
+ layoutPolicy = tabLayoutPolicy;
+ firePropertyChange("tabLayoutPolicy", oldPolicy, layoutPolicy);
}
}
@@ -998,7 +998,7 @@ public class JTabbedPane extends JComponent implements Serializable,
{
// Hiding and showing the involved components
// is done by the JTabbedPane's UI.
- model.setSelectedIndex(index);
+ model.setSelectedIndex(index);
}
}
@@ -1051,8 +1051,8 @@ public class JTabbedPane extends JComponent implements Serializable,
// so we don't trigger a repaint.
if (component != null)
{
- component.hide();
- super.add(component);
+ component.hide();
+ super.add(component);
}
if (getSelectedIndex() == -1)
@@ -1117,7 +1117,7 @@ public class JTabbedPane extends JComponent implements Serializable,
super.add(component);
else
insertTab(component.getName(), null, component, null, tabs.size());
-
+
return component;
}
@@ -1191,18 +1191,18 @@ public class JTabbedPane extends JComponent implements Serializable,
super.add(component);
else
{
- if (constraints instanceof String)
- insertTab((String) constraints, null, component, null, index);
- else
- insertTab(component.getName(),
- (constraints instanceof Icon) ? (Icon) constraints : null,
- component, null, index);
+ if (constraints instanceof String)
+ insertTab((String) constraints, null, component, null, index);
+ else
+ insertTab(component.getName(),
+ (constraints instanceof Icon) ? (Icon) constraints : null,
+ component, null, index);
}
}
/**
- * Removes the tab at index. After the component associated with
- * index is removed, its visibility is reset to true to ensure it
+ * Removes the tab at index. After the component associated with
+ * index is removed, its visibility is reset to true to ensure it
* will be visible if added to other containers.
*
* @param index The index of the tab to remove.
@@ -1261,7 +1261,7 @@ public class JTabbedPane extends JComponent implements Serializable,
// Since components implementing UIResource
// are not added as regular tabs by the add()
// methods we have to take special care when
- // removing these object. Especially
+ // removing these object. Especially
// Container.remove(Component) cannot be used
// because it will call JTabbedPane.remove(int)
// later which is overridden and can only
@@ -1270,7 +1270,7 @@ public class JTabbedPane extends JComponent implements Serializable,
// situation that someone called insertTab()
// with a component that implements UIResource.
int index = indexOfComponent(component);
-
+
// If the component is not a tab component
// find out its Container-given index
// and call that class' implementation
@@ -1603,11 +1603,11 @@ public class JTabbedPane extends JComponent implements Serializable,
int index = -1;
for (int i = 0; i < tabs.size(); i++)
{
- if (((Page) tabs.elementAt(i)).getTitle().equals(title))
- {
- index = i;
- break;
- }
+ if (((Page) tabs.elementAt(i)).getTitle().equals(title))
+ {
+ index = i;
+ break;
+ }
}
return index;
}
@@ -1624,11 +1624,11 @@ public class JTabbedPane extends JComponent implements Serializable,
int index = -1;
for (int i = 0; i < tabs.size(); i++)
{
- if (((Page) tabs.elementAt(i)).getIcon() == icon)
- {
- index = i;
- break;
- }
+ if (((Page) tabs.elementAt(i)).getIcon() == icon)
+ {
+ index = i;
+ break;
+ }
}
return index;
}
@@ -1645,11 +1645,11 @@ public class JTabbedPane extends JComponent implements Serializable,
int index = -1;
for (int i = 0; i < tabs.size(); i++)
{
- if (((Page) tabs.elementAt(i)).getComponent() == component)
- {
- index = i;
- break;
- }
+ if (((Page) tabs.elementAt(i)).getComponent() == component)
+ {
+ index = i;
+ break;
+ }
}
return index;
}
@@ -1684,12 +1684,12 @@ public class JTabbedPane extends JComponent implements Serializable,
}
/**
- * Returns a string describing the attributes for the
- * JTabbedPane
component, for use in debugging. The return
- * value is guaranteed to be non-null
, but the format of the
+ * Returns a string describing the attributes for the
+ * JTabbedPane
component, for use in debugging. The return
+ * value is guaranteed to be non-null
, but the format of the
* string may vary between implementations.
*
- * @return A string describing the attributes of the
+ * @return A string describing the attributes of the
* JTabbedPane
.
*/
protected String paramString()
@@ -1711,7 +1711,7 @@ public class JTabbedPane extends JComponent implements Serializable,
* Returns the object that provides accessibility features for this
* JTabbedPane
component.
*
- * @return The accessible context (an instance of
+ * @return The accessible context (an instance of
* {@link AccessibleJTabbedPane}).
*/
public AccessibleContext getAccessibleContext()
diff --git a/libjava/classpath/javax/swing/JTable.java b/libjava/classpath/javax/swing/JTable.java
index 42563e6..b60c67a 100644
--- a/libjava/classpath/javax/swing/JTable.java
+++ b/libjava/classpath/javax/swing/JTable.java
@@ -1,4 +1,4 @@
-/* JTable.java --
+/* JTable.java --
Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -90,9 +90,9 @@ import javax.swing.table.TableModel;
* The table component, displaying information, organized in rows and columns.
* The table can be placed in the scroll bar and have the optional header
* that is always visible. Cell values may be editable after double clicking
- * on the cell. Cell columns may have various data types, that are
+ * on the cell. Cell columns may have various data types, that are
* displayed and edited by the different renderers and editors. It is possible
- * to set different column width. The columns are also resizeable by
+ * to set different column width. The columns are also resizeable by
* dragging the column boundary in the header.
*/
public class JTable
@@ -271,7 +271,7 @@ public class JTable
* Sets the background of the cell. Since table cells cannot have
* individual background colors, this method does nothing. Set the
* background directly on the table instead.
- *
+ *
* @param color not used
*/
public void setBackground(Color color)
@@ -293,7 +293,7 @@ public class JTable
* Sets the foreground of the cell. Since table cells cannot have
* individual foreground colors, this method does nothing. Set the
* foreground directly on the table instead.
- *
+ *
* @param color not used
*/
public void setForeground(Color color)
@@ -315,7 +315,7 @@ public class JTable
* Sets the cursor of the cell. Since table cells cannot have
* individual cursors, this method does nothing. Set the
* cursor directly on the table instead.
- *
+ *
* @param cursor not used
*/
public void setCursor(Cursor cursor)
@@ -337,7 +337,7 @@ public class JTable
* Sets the font of the cell. Since table cells cannot have
* individual fonts, this method does nothing. Set the
* font directly on the table instead.
- *
+ *
* @param font not used
*/
public void setFont(Font font)
@@ -568,7 +568,7 @@ public class JTable
{
table.removeFocusListener(listener);
}
-
+
}
protected class AccessibleJTableModelChange
@@ -748,7 +748,7 @@ public class JTable
public void setAccessibleRowHeader(AccessibleTable header)
{
// TODO Auto-generated method stub
-
+
}
public AccessibleTable getAccessibleColumnHeader()
@@ -760,7 +760,7 @@ public class JTable
public void setAccessibleColumnHeader(AccessibleTable header)
{
// TODO Auto-generated method stub
-
+
}
public Accessible getAccessibleRowDescription(int r)
@@ -772,7 +772,7 @@ public class JTable
public void setAccessibleRowDescription(int r, Accessible description)
{
// TODO Auto-generated method stub
-
+
}
public Accessible getAccessibleColumnDescription(int c)
@@ -784,7 +784,7 @@ public class JTable
public void setAccessibleColumnDescription(int c, Accessible description)
{
// TODO Auto-generated method stub
-
+
}
public boolean isAccessibleSelected(int r, int c)
@@ -816,7 +816,7 @@ public class JTable
// TODO Auto-generated method stub
return null;
}
-
+
}
/**
@@ -830,11 +830,11 @@ public class JTable
{
JTableHeader header;
-
+
int columnIndex;
-
+
/**
- *
+ *
* @param h the table header.
* @param comp
* @param r
@@ -849,7 +849,7 @@ public class JTable
/**
* Returns the header renderer.
- *
+ *
* @return The header renderer.
*/
Component getColumnHeaderRenderer()
@@ -858,13 +858,13 @@ public class JTable
TableCellRenderer r = tc.getHeaderRenderer();
if (r == null)
r = header.getDefaultRenderer();
- return r.getTableCellRendererComponent(header.getTable(),
+ return r.getTableCellRendererComponent(header.getTable(),
tc.getHeaderValue(), false, false, -1, columnIndex);
}
-
+
/**
* Returns the accessible role for the table header cell.
- *
+ *
* @return The accessible role.
*/
public AccessibleRole getAccessibleRole()
@@ -910,7 +910,7 @@ public class JTable
/**
* Returns the accessible context.
- *
+ *
* @return this
.
*/
public AccessibleContext getAccessibleContext()
@@ -927,7 +927,7 @@ public class JTable
public void setBackground(Color color)
{
// TODO Auto-generated method stub
-
+
}
public Color getForeground()
@@ -939,7 +939,7 @@ public class JTable
public void setForeground(Color color)
{
// TODO Auto-generated method stub
-
+
}
public Cursor getCursor()
@@ -951,7 +951,7 @@ public class JTable
public void setCursor(Cursor cursor)
{
// TODO Auto-generated method stub
-
+
}
public Font getFont()
@@ -963,7 +963,7 @@ public class JTable
public void setFont(Font font)
{
// TODO Auto-generated method stub
-
+
}
public FontMetrics getFontMetrics(Font font)
@@ -981,7 +981,7 @@ public class JTable
public void setEnabled(boolean b)
{
// TODO Auto-generated method stub
-
+
}
public boolean isVisible()
@@ -993,7 +993,7 @@ public class JTable
public void setVisible(boolean b)
{
// TODO Auto-generated method stub
-
+
}
public boolean isShowing()
@@ -1023,7 +1023,7 @@ public class JTable
public void setLocation(Point point)
{
// TODO Auto-generated method stub
-
+
}
public Rectangle getBounds()
@@ -1035,7 +1035,7 @@ public class JTable
public void setBounds(Rectangle rectangle)
{
// TODO Auto-generated method stub
-
+
}
public Dimension getSize()
@@ -1047,7 +1047,7 @@ public class JTable
public void setSize(Dimension dimension)
{
// TODO Auto-generated method stub
-
+
}
public Accessible getAccessibleAt(Point point)
@@ -1065,21 +1065,21 @@ public class JTable
public void requestFocus()
{
// TODO Auto-generated method stub
-
+
}
public void addFocusListener(FocusListener listener)
{
// TODO Auto-generated method stub
-
+
}
public void removeFocusListener(FocusListener listener)
{
// TODO Auto-generated method stub
-
+
}
-
+
}
/**
@@ -1140,17 +1140,17 @@ public class JTable
{
return AccessibleRole.TABLE;
}
-
+
/**
* Returns the accessible table.
- *
+ *
* @return this
.
*/
public AccessibleTable getAccessibleTable()
{
return this;
}
-
+
/**
* Returns the number of selected items in this table.
*/
@@ -1489,7 +1489,7 @@ public class JTable
*/
public void propertyChange(PropertyChangeEvent e)
{
- String propName = e.getPropertyName();
+ String propName = e.getPropertyName();
if (propName.equals("tableModel"))
{
TableModel oldModel = (TableModel) e.getOldValue();
@@ -1525,9 +1525,9 @@ public class JTable
* index.
*
* @param index the index of the cell of which the row number is queried
- *
+ *
* @return the row number of an accessible child (cell) with the specified
- * index
+ * index
*/
public int getAccessibleRow(int index)
{
@@ -1539,9 +1539,9 @@ public class JTable
* specified index.
*
* @param index the index of the cell of which the column number is queried
- *
+ *
* @return the column number of an accessible child (cell) with the
- * specified index
+ * specified index
*/
public int getAccessibleColumn(int index)
{
@@ -1629,16 +1629,16 @@ public class JTable
* Returns the accessible child at the given index.
*
* @param index the child index.
- *
+ *
* @return The accessible child.
*/
public Accessible getAccessibleChild(int index)
{
int r = getAccessibleRow(index);
int c = getAccessibleColumn(index);
- return getAccessibleAt(r, c);
+ return getAccessibleAt(r, c);
}
-
+
/**
* Returns the accessible child (table cell) at the specified row and
* column.
@@ -1707,7 +1707,7 @@ public class JTable
*/
public void setAccessibleRowHeader(AccessibleTable header)
{
- // In the RI this seems to be a no-op.
+ // In the RI this seems to be a no-op.
}
/**
@@ -1912,7 +1912,7 @@ public class JTable
/**
* Receives notification that a property of the observed TableColumns has
* changed.
- *
+ *
* @param ev the property change event
*/
public void propertyChange(PropertyChangeEvent ev)
@@ -1943,7 +1943,7 @@ public class JTable
* The CheckBox that is used for rendering.
*/
private final JCheckBox checkBox;
-
+
/**
* Creates a new checkbox based boolean cell renderer. The checkbox is
* centered by default.
@@ -1953,7 +1953,7 @@ public class JTable
checkBox = new JCheckBox();
checkBox.setHorizontalAlignment(SwingConstants.CENTER);
}
-
+
/**
* Get the check box.
*/
@@ -1964,7 +1964,7 @@ public class JTable
/**
* Returns the component that is used for rendering the value.
- *
+ *
* @param table the JTable
* @param value the value of the object
* @param isSelected is the cell selected?
@@ -2031,7 +2031,7 @@ public class JTable
* @param hasFocus has the cell the focus?
* @param row the row to render
* @param column the cell to render
- *
+ *
* @return this component (the default table cell renderer)
*/
public Component getTableCellRendererComponent(JTable table, Object value,
@@ -2074,7 +2074,7 @@ public class JTable
* @param hasFocus has the cell the focus?
* @param row the row to render
* @param column the cell to render
- *
+ *
* @return this component (the default table cell renderer)
*/
public Component getTableCellRendererComponent(JTable table, Object value,
@@ -2117,7 +2117,7 @@ public class JTable
* @param hasFocus has the cell the focus?
* @param row the row to render
* @param column the cell to render
- *
+ *
* @return this component (the default table cell renderer)
*/
public Component getTableCellRendererComponent(JTable table, Object value,
@@ -2162,8 +2162,8 @@ public class JTable
{
setHorizontalAlignment(SwingConstants.CENTER);
}
-
-
+
+
/**
* Returns the component that is used for rendering the value.
*
@@ -2173,7 +2173,7 @@ public class JTable
* @param hasFocus has the cell the focus?
* @param row the row to render
* @param column the cell to render
- *
+ *
* @return this component (the default table cell renderer)
*/
public Component getTableCellRendererComponent(JTable table, Object value,
@@ -2196,7 +2196,7 @@ public class JTable
return this;
}
}
-
+
/**
* The JTable text component (used in editing) always has the table
* as its parent. The scrollRectToVisible must be adjusted taking the
@@ -2213,11 +2213,11 @@ public class JTable
{
setBorder(BorderFactory.createLineBorder(getGridColor(), 2));
}
- }
-
+ }
+
private static final long serialVersionUID = 3876025080382781659L;
-
+
/**
* This table, for referring identically name methods from inner classes.
*/
@@ -2244,7 +2244,7 @@ public class JTable
* n)
, uniformly, to provide or absorb excess space requirements.
*/
public static final int AUTO_RESIZE_SUBSEQUENT_COLUMNS = 2;
-
+
/**
* When resizing column i
in a table of n
* columns, automatically change all columns in the range [0,
@@ -2261,15 +2261,15 @@ public class JTable
public static final int AUTO_RESIZE_LAST_COLUMN = 3;
/**
- * A table mapping {@link java.lang.Class} objects to
- * {@link TableCellEditor} objects. This table is consulted by the
+ * A table mapping {@link java.lang.Class} objects to
+ * {@link TableCellEditor} objects. This table is consulted by the
* FIXME
*/
protected Hashtable defaultEditorsByColumnClass = new Hashtable();
/**
- * A table mapping {@link java.lang.Class} objects to
- * {@link TableCellEditor} objects. This table is consulted by the
+ * A table mapping {@link java.lang.Class} objects to
+ * {@link TableCellEditor} objects. This table is consulted by the
* FIXME
*/
protected Hashtable defaultRenderersByColumnClass = new Hashtable();
@@ -2295,7 +2295,7 @@ public class JTable
/**
* Whether or not the table should automatically compute a matching
* {@link TableColumnModel} and assign it to the {@link #columnModel}
- * property when the {@link #dataModel} property is changed.
+ * property when the {@link #dataModel} property is changed.
*
* @see #setModel(TableModel)
* @see #createDefaultColumnsFromModel()
@@ -2310,7 +2310,7 @@ public class JTable
* one of {@link #AUTO_RESIZE_ALL_COLUMNS} (the default), {@link
* #AUTO_RESIZE_LAST_COLUMN}, {@link #AUTO_RESIZE_NEXT_COLUMN}, {@link
* #AUTO_RESIZE_SUBSEQUENT_COLUMNS}, or {@link #AUTO_RESIZE_OFF}.
- *
+ *
* @see #doLayout()
* @see #setAutoResizeMode(int)
* @see #getAutoResizeMode()
@@ -2322,7 +2322,7 @@ public class JTable
* of uniform height. This differs from column width, which varies on a
* per-column basis, and is stored in the individual columns of the
* {@link #columnModel}.
- *
+ *
* @see #getRowHeight()
* @see #setRowHeight(int)
* @see TableColumn#getWidth()
@@ -2331,8 +2331,8 @@ public class JTable
protected int rowHeight;
/**
- * The height in pixels of the gap left between any two rows of the table.
- *
+ * The height in pixels of the gap left between any two rows of the table.
+ *
* @see #setRowMargin(int)
* @see #getRowHeight()
* @see #getIntercellSpacing()
@@ -2358,12 +2358,12 @@ public class JTable
protected boolean rowSelectionAllowed;
/**
- * Obsolete. Use {@link #rowSelectionAllowed}, {@link
+ * Obsolete. Use {@link #rowSelectionAllowed}, {@link
* #getColumnSelectionAllowed}, or the combined methods {@link
* #getCellSelectionEnabled} and {@link #setCellSelectionEnabled(boolean)}.
*/
protected boolean cellSelectionEnabled;
-
+
/**
* The model for data stored in the table. Confusingly, the published API
* requires that this field be called dataModel
, despite its
@@ -2393,7 +2393,7 @@ public class JTable
* at all: setting {@link #autoCreateColumnsFromModel} will construct the
* columnModel automatically, and the table acts as a facade for most of
* the interesting properties of the columnModel anyways.
- *
+ *
* @see #setColumnModel(TableColumnModel)
* @see #getColumnModel()
*/
@@ -2409,12 +2409,12 @@ public class JTable
* @see #setSelectionModel(ListSelectionModel)
* @see #getSelectionModel()
* @see TableColumnModel#getSelectionModel()
- * @see ListSelectionModel#addListSelectionListener(ListSelectionListener)
+ * @see ListSelectionModel#addListSelectionListener(ListSelectionListener)
*/
protected ListSelectionModel selectionModel;
/**
- * The current cell editor.
+ * The current cell editor.
*/
protected TableCellEditor cellEditor;
@@ -2504,7 +2504,7 @@ public class JTable
private boolean surrendersFocusOnKeystroke = false;
/**
- * A Rectangle object to be reused in {@link #getCellRect}.
+ * A Rectangle object to be reused in {@link #getCellRect}.
*/
private Rectangle rectCache = new Rectangle();
@@ -2531,13 +2531,13 @@ public class JTable
* @see #setRowHeight(int, int)
*/
private SizeSequence rowHeights;
-
+
/**
* This editor serves just a marker that the value must be simply changed to
* the opposite one instead of starting the editing session.
*/
- private transient TableCellEditor booleanInvertingEditor;
-
+ private transient TableCellEditor booleanInvertingEditor;
+
/**
* Creates a new JTable
instance.
*/
@@ -2559,7 +2559,7 @@ public class JTable
}
/**
- * Creates a new JTable
instance, storing the given data
+ * Creates a new JTable
instance, storing the given data
* array and heaving the given column names. To see the column names,
* you must place the JTable into the {@link JScrollPane}.
*
@@ -2576,7 +2576,7 @@ public class JTable
* object that provides information about the table content. The table model
* object is asked for the table size, other features and also receives
* notifications in the case when the table has been edited by the user.
- *
+ *
* @param model
* the table model.
*/
@@ -2592,7 +2592,7 @@ public class JTable
* notifications in the case when the table has been edited by the user. The
* table column model provides more detailed control on the table column
* related features.
- *
+ *
* @param dm
* the table data mode
* @param cm
@@ -2618,24 +2618,24 @@ public class JTable
TableColumnModel columnModel;
if (cm != null)
columnModel = cm;
- else
+ else
{
columnModel = createDefaultColumnModel();
autoCreate = true;
}
-
+
// Initialise the intercelar spacing before setting the column model to
// avoid firing unnecessary events.
- // The initial incellar spacing is new Dimenstion(1,1).
+ // The initial incellar spacing is new Dimenstion(1,1).
rowMargin = 1;
columnModel.setColumnMargin(1);
setColumnModel(columnModel);
-
+
setSelectionModel(sm == null ? createDefaultSelectionModel() : sm);
setModel(dm == null ? createDefaultDataModel() : dm);
setAutoCreateColumnsFromModel(autoCreate);
initializeLocalVars();
-
+
// The following four lines properly set the lead selection indices.
// After this, the UI will handle the lead selection indices.
// FIXME: this should probably not be necessary, if the UI is installed
@@ -2649,9 +2649,9 @@ public class JTable
// selectionModel.setLeadSelectionIndex(-1);
// columnModel.getSelectionModel().setAnchorSelectionIndex(-1);
// columnModel.getSelectionModel().setLeadSelectionIndex(-1);
- updateUI();
+ updateUI();
}
-
+
/**
* Creates a new JTable
instance that uses data and column
* names, stored in {@link Vector}s.
@@ -2662,8 +2662,8 @@ public class JTable
public JTable(Vector data, Vector columnNames)
{
this(new DefaultTableModel(data, columnNames));
- }
-
+ }
+
/**
* Initialize local variables to default values.
*/
@@ -2678,10 +2678,10 @@ public class JTable
setRowHeight(16);
this.rowMargin = 1;
this.rowSelectionAllowed = true;
-
+
// this.accessibleContext = new AccessibleJTable();
this.cellEditor = null;
-
+
// COMPAT: Both Sun and IBM have drag enabled
this.dragEnabled = false;
this.preferredViewportSize = new Dimension(450,400);
@@ -2690,15 +2690,15 @@ public class JTable
this.editingColumn = -1;
this.editingRow = -1;
}
-
+
/**
* Add the new table column. The table column class allows to specify column
* features more precisely, setting the preferred width, column data type
* (column class) and table headers.
- *
- * There is no need the add columns to the table if the default column
+ *
+ * There is no need the add columns to the table if the default column
* handling is sufficient.
- *
+ *
* @param column
* the new column to add.
*/
@@ -2709,15 +2709,15 @@ public class JTable
String name = dataModel.getColumnName(column.getModelIndex());
column.setHeaderValue(name);
}
-
+
columnModel.addColumn(column);
column.addPropertyChangeListener(tableColumnPropertyChangeHandler);
}
-
+
/**
* Create the default editors for this table. The default method creates
* the editor for Booleans.
- *
+ *
* Other fields are edited as strings at the moment.
*/
protected void createDefaultEditors()
@@ -2725,10 +2725,10 @@ public class JTable
JCheckBox box = new BooleanCellRenderer().getCheckBox();
box.setBorder(BorderFactory.createLineBorder(getGridColor(), 2));
box.setBorderPainted(true);
- booleanInvertingEditor = new DefaultCellEditor(box);
+ booleanInvertingEditor = new DefaultCellEditor(box);
setDefaultEditor(Boolean.class, booleanInvertingEditor);
}
-
+
/**
* Create the default renderers for this table. The default method creates
* renderers for Boolean, Number, Double, Date, Icon and ImageIcon.
@@ -2742,9 +2742,9 @@ public class JTable
setDefaultRenderer(Double.class, new FloatCellRenderer());
setDefaultRenderer(Date.class, new DateCellRenderer());
setDefaultRenderer(Icon.class, new IconCellRenderer());
- setDefaultRenderer(ImageIcon.class, new IconCellRenderer());
+ setDefaultRenderer(ImageIcon.class, new IconCellRenderer());
}
-
+
/**
* @deprecated 1.0.2, replaced by new JScrollPane(JTable)
*/
@@ -2752,12 +2752,12 @@ public class JTable
{
return new JScrollPane(table);
}
-
+
/**
* Create the default table column model that is used if the user-defined
* column model is not provided. The default method creates
* {@link DefaultTableColumnModel}.
- *
+ *
* @return the created table column model.
*/
protected TableColumnModel createDefaultColumnModel()
@@ -2769,7 +2769,7 @@ public class JTable
* Create the default table data model that is used if the user-defined
* data model is not provided. The default method creates
* {@link DefaultTableModel}.
- *
+ *
* @return the created table data model.
*/
protected TableModel createDefaultDataModel()
@@ -2781,25 +2781,25 @@ public class JTable
* Create the default table selection model that is used if the user-defined
* selection model is not provided. The default method creates
* {@link DefaultListSelectionModel}.
- *
+ *
* @return the created table data model.
*/
protected ListSelectionModel createDefaultSelectionModel()
{
return new DefaultListSelectionModel();
}
-
+
/**
* Create the default table header, if the user - defined table header is not
* provided.
- *
+ *
* @return the default table header.
*/
protected JTableHeader createDefaultTableHeader()
{
return new JTableHeader(columnModel);
}
-
+
/**
* Invoked when the column is added. Revalidates and repains the table.
*/
@@ -2810,7 +2810,7 @@ public class JTable
}
/**
- * Invoked when the column margin is changed.
+ * Invoked when the column margin is changed.
* Revalidates and repains the table.
*/
public void columnMarginChanged (ChangeEvent event)
@@ -2838,7 +2838,7 @@ public class JTable
revalidate();
repaint();
}
-
+
/**
* Invoked when the the column selection changes, repaints the changed
* columns. It is not recommended to override this method, register the
@@ -2887,7 +2887,7 @@ public class JTable
repaint(dirty);
}
}
-
+
/**
* Invoked when the editing is cancelled.
*/
@@ -2896,23 +2896,23 @@ public class JTable
if (editorComp!=null)
{
remove(editorComp);
- repaint(editorComp.getBounds());
+ repaint(editorComp.getBounds());
editorComp = null;
}
}
-
+
/**
* Finish the current editing session and update the table with the
* new value by calling {@link #setValueAt}.
- *
+ *
* @param event the change event
*/
public void editingStopped (ChangeEvent event)
{
if (editorComp!=null)
{
- remove(editorComp);
- setValueAt(cellEditor.getCellEditorValue(), editingRow, editingColumn);
+ remove(editorComp);
+ setValueAt(cellEditor.getCellEditorValue(), editingRow, editingColumn);
repaint(editorComp.getBounds());
editorComp = null;
}
@@ -3051,7 +3051,7 @@ public class JTable
Rectangle dirty;
if (col == TableModelEvent.ALL_COLUMNS)
{
- // All columns changed.
+ // All columns changed.
dirty = new Rectangle(0, firstRow * getRowHeight(),
getColumnModel().getTotalColumnWidth(), 0);
}
@@ -3121,7 +3121,7 @@ public class JTable
// If we are in the editing process, end the editing session.
if (isEditing())
editingStopped(null);
-
+
// Repaint the changed region.
int first = Math.max(0, Math.min(getRowCount() - 1, event.getFirstIndex()));
int last = Math.max(0, Math.min(getRowCount() - 1, event.getLastIndex()));
@@ -3134,11 +3134,11 @@ public class JTable
}
/**
- * Returns index of the column that contains specified point
+ * Returns index of the column that contains specified point
* or -1 if this table doesn't contain this point.
*
* @param point point to identify the column
- * @return index of the column that contains specified point or
+ * @return index of the column that contains specified point or
* -1 if this table doesn't contain this point.
*/
public int columnAtPoint(Point point)
@@ -3162,7 +3162,7 @@ public class JTable
/**
* Returns index of the row that contains specified point or -1 if this table
* doesn't contain this point.
- *
+ *
* @param point point to identify the row
* @return index of the row that contains specified point or -1 if this table
* doesn't contain this point.
@@ -3191,7 +3191,7 @@ public class JTable
return -1;
}
- /**
+ /**
* Calculate the visible rectangle for a particular row and column. The
* row and column are specified in visual terms; the column may not match
* the {@link #dataModel} column.
@@ -3272,7 +3272,7 @@ public class JTable
cellRect.x += cMargin / 2;
cellRect.width -= cMargin;
}
- }
+ }
return cellRect;
}
@@ -3291,10 +3291,10 @@ public class JTable
* @return The current value of the selectedRow property
*/
public int getSelectedRow ()
- {
+ {
return selectionModel.getMinSelectionIndex();
}
-
+
/**
* Get the value of the {@link #selectionModel} property.
*
@@ -3305,7 +3305,7 @@ public class JTable
//Neither Sun nor IBM returns null if rowSelection not allowed
return selectionModel;
}
-
+
public int getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction)
{
int block;
@@ -3334,7 +3334,7 @@ public class JTable
{
return false;
}
-
+
/**
* Get the value of the scrollableTracksViewportWidth
property.
*
@@ -3348,20 +3348,20 @@ public class JTable
else
return true;
}
-
+
/**
* Return the preferred scrolling amount (in pixels) for the given scrolling
* direction and orientation. This method handles a partially exposed row by
* returning the distance required to completely expose the item. When
* scrolling the top item is completely exposed.
- *
+ *
* @param visibleRect the currently visible part of the component.
* @param orientation the scrolling orientation
* @param direction the scrolling direction (negative - up, positive -down).
* The values greater than one means that more mouse wheel or similar
* events were generated, and hence it is better to scroll the longer
* distance.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation,
@@ -3403,7 +3403,7 @@ public class JTable
* not provide the editor, the call is forwarded to the
* {@link #getDefaultEditor(Class)} with the parameter, obtained from
* {@link TableModel#getColumnClass(int)}.
- *
+ *
* @param row the cell row
* @param column the cell column
* @return the editor to edit that cell
@@ -3420,13 +3420,13 @@ public class JTable
return editor;
}
-
+
/**
* Get the default editor for editing values of the given type
* (String, Boolean and so on).
- *
+ *
* @param columnClass the class of the value that will be edited.
- *
+ *
* @return the editor, suitable for editing this data type
*/
public TableCellEditor getDefaultEditor(Class> columnClass)
@@ -3435,7 +3435,7 @@ public class JTable
return (TableCellEditor) defaultEditorsByColumnClass.get(columnClass);
else
{
- JTextField t = new TableTextField();
+ JTextField t = new TableTextField();
TableCellEditor r = new DefaultCellEditor(t);
defaultEditorsByColumnClass.put(columnClass, r);
return r;
@@ -3444,7 +3444,7 @@ public class JTable
/**
* Get the cell renderer for rendering the given cell.
- *
+ *
* @param row the cell row
* @param column the cell column
* @return the cell renderer to render that cell.
@@ -3464,7 +3464,7 @@ public class JTable
/**
* Set default renderer for rendering the given data type.
- *
+ *
* @param columnClass the data type (String, Boolean and so on) that must be
* rendered.
* @param rend the renderer that will rend this data type
@@ -3476,9 +3476,9 @@ public class JTable
/**
* Get the default renderer for rendering the given data type.
- *
+ *
* @param columnClass the data that must be rendered
- *
+ *
* @return the appropriate defauld renderer for rendering that data type.
*/
public TableCellRenderer getDefaultRenderer(Class> columnClass)
@@ -3492,7 +3492,7 @@ public class JTable
return r;
}
}
-
+
/**
* Convert the table model index into the table column number.
* The model number need not match the real column position. The columns
@@ -3500,9 +3500,9 @@ public class JTable
* column headers.
*
* @param vc the column number (0=first).
- *
+ *
* @return the table column model index of this column.
- *
+ *
* @see TableColumn#getModelIndex()
*/
public int convertColumnIndexToModel(int vc)
@@ -3512,18 +3512,18 @@ public class JTable
else
return columnModel.getColumn(vc).getModelIndex();
}
-
+
/**
* Convert the table column number to the table column model index.
* The model number need not match the real column position. The columns
* may be rearranged by the user with mouse at any time by dragging the
* column headers.
- *
+ *
* @param mc the table column index (0=first).
- *
+ *
* @return the table column number in the model
- *
- * @see TableColumn#getModelIndex()
+ *
+ * @see TableColumn#getModelIndex()
*/
public int convertColumnIndexToView(int mc)
{
@@ -3537,14 +3537,14 @@ public class JTable
}
return -1;
}
-
+
/**
* Prepare the renderer for rendering the given cell.
- *
+ *
* @param renderer the renderer being prepared
* @param row the row of the cell being rendered
* @param column the column of the cell being rendered
- *
+ *
* @return the component which .paint() method will paint the cell.
*/
public Component prepareRenderer(TableCellRenderer renderer,
@@ -3569,7 +3569,7 @@ public class JTable
&& colSel.getLeadSelectionIndex() == column;
return renderer.getTableCellRendererComponent(this,
- dataModel.getValueAt(row,
+ dataModel.getValueAt(row,
convertColumnIndexToModel(column)),
isSel,
hasFocus,
@@ -3635,7 +3635,7 @@ public class JTable
* Get the value of the {@link #rowSelectionAllowed} property.
*
* @return The current value of the property
- *
+ *
* @see #setRowSelectionAllowed(boolean)
*/
public boolean getRowSelectionAllowed()
@@ -3671,7 +3671,7 @@ public class JTable
*/
public int getColumnCount()
{
- return columnModel.getColumnCount();
+ return columnModel.getColumnCount();
}
/**
@@ -3718,14 +3718,14 @@ public class JTable
case ListSelectionModel.SINGLE_SELECTION:
sum = 1;
break;
-
+
case ListSelectionModel.SINGLE_INTERVAL_SELECTION:
sum = hi - lo + 1;
break;
-
- case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
+
+ case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
for (int i = lo; i <= hi; ++i)
- if (lsm.isSelectedIndex(i))
+ if (lsm.isSelectedIndex(i))
++sum;
break;
}
@@ -3747,16 +3747,16 @@ public class JTable
{
case ListSelectionModel.SINGLE_SELECTION:
ret[0] = lo;
- break;
-
- case ListSelectionModel.SINGLE_INTERVAL_SELECTION:
+ break;
+
+ case ListSelectionModel.SINGLE_INTERVAL_SELECTION:
for (int i = lo; i <= hi; ++i)
ret[j++] = i;
break;
-
- case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
+
+ case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
for (int i = lo; i <= hi; ++i)
- if (lsm.isSelectedIndex(i))
+ if (lsm.isSelectedIndex(i))
ret[j++] = i;
break;
}
@@ -3769,7 +3769,7 @@ public class JTable
* delegation to the {@link #columnModel} field.
*
* @return The current value of the selectedColumnCount property
- */
+ */
public int getSelectedColumnCount()
{
return countSelections(columnModel.getSelectionModel());
@@ -3790,7 +3790,7 @@ public class JTable
* Get the value of the columnSelectionAllowed
property.
*
* @return The current value of the columnSelectionAllowed property
- *
+ *
* @see #setColumnSelectionAllowed(boolean)
*/
public boolean getColumnSelectionAllowed()
@@ -3835,7 +3835,7 @@ public class JTable
tcm.addColumnModelListener(ctx);
tcm.getSelectionModel().addListSelectionListener(ctx);
getSelectionModel().addListSelectionListener(ctx);
-
+
accessibleContext = ctx;
}
return accessibleContext;
@@ -3947,7 +3947,7 @@ public class JTable
* @param column column to removed
*/
public void removeColumn(TableColumn column)
- {
+ {
columnModel.removeColumn(column);
}
@@ -3956,8 +3956,8 @@ public class JTable
*
* @param column index of the column to move
* @param targetColumn index specifying new location of the column
- */
- public void moveColumn(int column,int targetColumn)
+ */
+ public void moveColumn(int column,int targetColumn)
{
columnModel.moveColumn(column, targetColumn);
}
@@ -3968,7 +3968,7 @@ public class JTable
* {@link #createDefaultColumnsFromModel()} method is called.
*
* @param autoCreate the new value of the flag.
- */
+ */
public void setAutoCreateColumnsFromModel(boolean autoCreate)
{
if (autoCreateColumnsFromModel != autoCreate)
@@ -3983,7 +3983,7 @@ public class JTable
* Set the value of the {@link #autoResizeMode} property.
*
* @param a The new value of the autoResizeMode property
- */
+ */
public void setAutoResizeMode(int a)
{
autoResizeMode = a;
@@ -4000,7 +4000,7 @@ public class JTable
* @see #getRowHeight()
* @see #setRowHeight(int, int)
* @see #getRowHeight(int)
- */
+ */
public void setRowHeight(int r)
{
if (r < 1)
@@ -4013,10 +4013,10 @@ public class JTable
revalidate();
repaint();
}
-
+
/**
* Sets the height of a single row in the table.
- *
+ *
* @param rh the new row height
* @param row the row to change the height of
*/
@@ -4028,12 +4028,12 @@ public class JTable
}
rowHeights.setSize(row, rh);
}
-
+
/**
* Set the value of the {@link #rowMargin} property.
*
* @param r The new value of the rowMargin property
- */
+ */
public void setRowMargin(int r)
{
rowMargin = r;
@@ -4045,12 +4045,12 @@ public class JTable
* Set the value of the {@link #rowSelectionAllowed} property.
*
* @param r The new value of the rowSelectionAllowed property
- *
+ *
* @see #getRowSelectionAllowed()
- */
+ */
public void setRowSelectionAllowed(boolean r)
{
- if (rowSelectionAllowed != r)
+ if (rowSelectionAllowed != r)
{
rowSelectionAllowed = r;
firePropertyChange("rowSelectionAllowed", !r, r);
@@ -4062,7 +4062,7 @@ public class JTable
* Set the value of the {@link #cellSelectionEnabled} property.
*
* @param c The new value of the cellSelectionEnabled property
- */
+ */
public void setCellSelectionEnabled(boolean c)
{
setColumnSelectionAllowed(c);
@@ -4079,13 +4079,13 @@ public class JTable
* m
.
*
* @param m The new value of the model property
- */
+ */
public void setModel(TableModel m)
{
// Throw exception is m is null.
if (m == null)
throw new IllegalArgumentException();
-
+
// Don't do anything if setting the current model again.
if (dataModel == m)
return;
@@ -4095,7 +4095,7 @@ public class JTable
// Remove table as TableModelListener from old model.
if (dataModel != null)
dataModel.removeTableModelListener(this);
-
+
if (m != null)
{
// Set property.
@@ -4129,7 +4129,7 @@ public class JTable
* c
.
*
* @param c The new value of the columnModel property
- */
+ */
public void setColumnModel(TableColumnModel c)
{
if (c == null)
@@ -4146,7 +4146,7 @@ public class JTable
TableColumn column;
for (int i = 0; i < ncols; ++i)
{
- column = columnModel.getColumn(i);
+ column = columnModel.getColumn(i);
if (column.getHeaderValue()==null)
column.setHeaderValue(dataModel.getColumnName(i));
}
@@ -4165,9 +4165,9 @@ public class JTable
* Set the value of the columnSelectionAllowed
property.
*
* @param c The new value of the property
- *
+ *
* @see #getColumnSelectionAllowed()
- */
+ */
public void setColumnSelectionAllowed(boolean c)
{
if (columnModel.getColumnSelectionAllowed() != c)
@@ -4186,7 +4186,7 @@ public class JTable
* parameter s
.
*
* @param s The new value of the selectionModel property
- */
+ */
public void setSelectionModel(ListSelectionModel s)
{
if (s == null)
@@ -4206,12 +4206,12 @@ public class JTable
* mode is set for row and column selection models.
*
* @param s The new value of the property
- */
+ */
public void setSelectionMode(int s)
- {
- selectionModel.setSelectionMode(s);
+ {
+ selectionModel.setSelectionMode(s);
columnModel.getSelectionModel().setSelectionMode(s);
-
+
repaint();
}
@@ -4223,7 +4223,7 @@ public class JTable
* c
.
*
* @param c The new value of the cellEditor property
- */
+ */
public void setCellEditor(TableCellEditor c)
{
TableCellEditor tmp = cellEditor;
@@ -4238,7 +4238,7 @@ public class JTable
* Set the value of the {@link #dragEnabled} property.
*
* @param d The new value of the dragEnabled property
- */
+ */
public void setDragEnabled(boolean d)
{
dragEnabled = d;
@@ -4248,7 +4248,7 @@ public class JTable
* Set the value of the {@link #gridColor} property.
*
* @param g The new value of the gridColor property
- */
+ */
public void setGridColor(Color g)
{
gridColor = g;
@@ -4259,7 +4259,7 @@ public class JTable
* Set the value of the intercellSpacing
property.
*
* @param i The new value of the intercellSpacing property
- */
+ */
public void setIntercellSpacing(Dimension i)
{
rowMargin = i.height;
@@ -4271,7 +4271,7 @@ public class JTable
* Set the value of the {@link #preferredViewportSize} property.
*
* @param p The new value of the preferredViewportSize property
- */
+ */
public void setPreferredScrollableViewportSize(Dimension p)
{
preferredViewportSize = p;
@@ -4287,7 +4287,7 @@ public class JTable
* selectionBackground changed.
*
* @param s The new value of the selectionBackground property
- */
+ */
public void setSelectionBackground(Color s)
{
Color tmp = selectionBackground;
@@ -4307,7 +4307,7 @@ public class JTable
* selectionForeground changed.
*
* @param s The new value of the selectionForeground property
- */
+ */
public void setSelectionForeground(Color s)
{
Color tmp = selectionForeground;
@@ -4323,7 +4323,7 @@ public class JTable
* Set the value of the showGrid
property.
*
* @param s The new value of the showGrid property
- */
+ */
public void setShowGrid(boolean s)
{
setShowVerticalLines(s);
@@ -4334,7 +4334,7 @@ public class JTable
* Set the value of the {@link #showHorizontalLines} property.
*
* @param s The new value of the showHorizontalLines property
- */
+ */
public void setShowHorizontalLines(boolean s)
{
showHorizontalLines = s;
@@ -4345,7 +4345,7 @@ public class JTable
* Set the value of the {@link #showVerticalLines} property.
*
* @param s The new value of the showVerticalLines property
- */
+ */
public void setShowVerticalLines(boolean s)
{
showVerticalLines = s;
@@ -4356,7 +4356,7 @@ public class JTable
* Set the value of the {@link #tableHeader} property.
*
* @param t The new value of the tableHeader property
- */
+ */
public void setTableHeader(JTableHeader t)
{
if (tableHeader != null)
@@ -4383,7 +4383,7 @@ public class JTable
if (jsp != null)
{
jsp.setColumnHeaderView(null);
- }
+ }
}
@@ -4417,7 +4417,7 @@ public class JTable
cols[i].setWidth(cols[i].getPreferredWidth() + average);
}
}
-
+
/**
* This distributes the superfluous width in a table, setting the width of the
* column being resized strictly to its preferred width.
@@ -4434,20 +4434,20 @@ public class JTable
cols[i].setWidth(cols[i].getPreferredWidth() + average);
}
resizeIt.setWidth(resizeIt.getPreferredWidth());
- }
-
+ }
+
/**
* Set the widths of all columns, taking they preferred widths into
* consideration. The excess space, if any, will be distrubuted between
* all columns. This method also handles special cases when one of the
* collumns is currently being resized.
- *
+ *
* @see TableColumn#setPreferredWidth(int)
*/
public void doLayout()
{
TableColumn resizingColumn = null;
-
+
int ncols = columnModel.getColumnCount();
if (ncols < 1)
return;
@@ -4457,7 +4457,7 @@ public class JTable
if (tableHeader != null)
resizingColumn = tableHeader.getResizingColumn();
-
+
for (int i = 0; i < ncols; ++i)
{
TableColumn col = columnModel.getColumn(i);
@@ -4466,21 +4466,21 @@ public class JTable
if (resizingColumn == col)
rCol = i;
}
-
+
int spill = getWidth() - prefSum;
if (resizingColumn != null)
{
TableColumn col;
TableColumn [] cols;
-
+
switch (getAutoResizeMode())
{
case AUTO_RESIZE_LAST_COLUMN:
col = columnModel.getColumn(ncols-1);
col.setWidth(col.getPreferredWidth() + spill);
break;
-
+
case AUTO_RESIZE_NEXT_COLUMN:
col = columnModel.getColumn(ncols-1);
col.setWidth(col.getPreferredWidth() + spill);
@@ -4494,7 +4494,7 @@ public class JTable
break;
case AUTO_RESIZE_SUBSEQUENT_COLUMNS:
-
+
// Subtract the width of the non-resized columns from the spill.
int w = 0;
int wp = 0;
@@ -4513,7 +4513,7 @@ public class JTable
// If there are any columns on the right sied to resize.
spill = (getWidth()-w) - (prefSum-wp);
int average = spill / n;
-
+
// For all columns right from the column being resized:
for (int i = rCol+1; i < ncols; i++)
{
@@ -4539,17 +4539,17 @@ public class JTable
distributeSpill(cols, spill);
}
-
+
if (editorComp!=null)
moveToCellBeingEdited(editorComp);
-
+
int leftBoundary = getLeftResizingBoundary();
int width = getWidth() - leftBoundary;
repaint(leftBoundary, 0, width, getHeight());
if (tableHeader != null)
tableHeader.repaint(leftBoundary, 0, width, tableHeader.getHeight());
}
-
+
/**
* Get the left boundary of the rectangle which changes during the column
* resizing.
@@ -4569,12 +4569,12 @@ public class JTable
for (int i = 0; i < rc; i++)
p += columnModel.getColumn(i).getWidth();
-
+
return p;
}
}
-
-
+
+
/**
* @deprecated Replaced by doLayout()
*/
@@ -4582,7 +4582,7 @@ public class JTable
{
doLayout();
}
-
+
/**
* Obsolete since JDK 1.4. Please use doLayout()
.
*/
@@ -4628,9 +4628,9 @@ public class JTable
/**
* Get the class (datatype) of the column. The cells are rendered and edited
* differently, depending from they data type.
- *
+ *
* @param column the column (not the model index).
- *
+ *
* @return the class, defining data type of that column (String.class for
* String, Boolean.class for boolean and so on).
*/
@@ -4638,16 +4638,16 @@ public class JTable
{
return getModel().getColumnClass(convertColumnIndexToModel(column));
}
-
+
/**
* Get the name of the column. If the column has the column identifier set,
* the return value is the result of the .toString() method call on that
* identifier. If the identifier is not explicitly set, the returned value
- * is calculated by
+ * is calculated by
* {@link javax.swing.table.AbstractTableModel#getColumnName(int)}.
- *
+ *
* @param column the column
- *
+ *
* @return the name of that column.
*/
public String getColumnName(int column)
@@ -4658,7 +4658,7 @@ public class JTable
/**
* Get the column, currently being edited
- *
+ *
* @return the column, currently being edited.
*/
public int getEditingColumn()
@@ -4668,17 +4668,17 @@ public class JTable
/**
* Set the column, currently being edited
- *
+ *
* @param column the column, currently being edited.
*/
public void setEditingColumn(int column)
{
editingColumn = column;
}
-
+
/**
* Get the row currently being edited.
- *
+ *
* @return the row, currently being edited.
*/
public int getEditingRow()
@@ -4688,17 +4688,17 @@ public class JTable
/**
* Set the row currently being edited.
- *
+ *
* @param row the row, that will be edited
*/
public void setEditingRow(int row)
{
editingRow = row;
}
-
+
/**
* Get the editor component that is currently editing one of the cells
- *
+ *
* @return the editor component or null, if none of the cells is being
* edited.
*/
@@ -4706,10 +4706,10 @@ public class JTable
{
return editorComp;
}
-
+
/**
* Check if one of the table cells is currently being edited.
- *
+ *
* @return true if there is a cell being edited.
*/
public boolean isEditing()
@@ -4721,10 +4721,10 @@ public class JTable
* Set the default editor for the given column class (column data type).
* By default, String is handled by text field and Boolean is handled by
* the check box.
- *
+ *
* @param columnClass the column data type
* @param editor the editor that will edit this data type
- *
+ *
* @see TableModel#getColumnClass(int)
*/
public void setDefaultEditor(Class> columnClass, TableCellEditor editor)
@@ -4734,25 +4734,25 @@ public class JTable
else
defaultEditorsByColumnClass.remove(columnClass);
}
-
+
public void addColumnSelectionInterval(int index0, int index1)
{
if ((index0 < 0 || index0 > (getColumnCount()-1)
|| index1 < 0 || index1 > (getColumnCount()-1)))
throw new IllegalArgumentException("Column index out of range.");
-
+
getColumnModel().getSelectionModel().addSelectionInterval(index0, index1);
}
-
+
public void addRowSelectionInterval(int index0, int index1)
- {
+ {
if ((index0 < 0 || index0 > (getRowCount()-1)
|| index1 < 0 || index1 > (getRowCount()-1)))
throw new IllegalArgumentException("Row index out of range.");
-
+
getSelectionModel().addSelectionInterval(index0, index1);
}
-
+
public void setColumnSelectionInterval(int index0, int index1)
{
if ((index0 < 0 || index0 > (getColumnCount()-1)
@@ -4761,17 +4761,17 @@ public class JTable
getColumnModel().getSelectionModel().setSelectionInterval(index0, index1);
}
-
+
public void setRowSelectionInterval(int index0, int index1)
- {
+ {
if ((index0 < 0 || index0 > (getRowCount()-1)
|| index1 < 0 || index1 > (getRowCount()-1)))
throw new IllegalArgumentException("Row index out of range.");
getSelectionModel().setSelectionInterval(index0, index1);
}
-
- public void removeColumnSelectionInterval(int index0, int index1)
+
+ public void removeColumnSelectionInterval(int index0, int index1)
{
if ((index0 < 0 || index0 > (getColumnCount()-1)
|| index1 < 0 || index1 > (getColumnCount()-1)))
@@ -4779,7 +4779,7 @@ public class JTable
getColumnModel().getSelectionModel().removeSelectionInterval(index0, index1);
}
-
+
public void removeRowSelectionInterval(int index0, int index1)
{
if ((index0 < 0 || index0 > (getRowCount()-1)
@@ -4788,12 +4788,12 @@ public class JTable
getSelectionModel().removeSelectionInterval(index0, index1);
}
-
+
/**
* Checks if the given column is selected.
- *
+ *
* @param column the column
- *
+ *
* @return true if the column is selected (as reported by the selection
* model, associated with the column model), false otherwise.
*/
@@ -4801,12 +4801,12 @@ public class JTable
{
return getColumnModel().getSelectionModel().isSelectedIndex(column);
}
-
+
/**
* Checks if the given row is selected.
- *
+ *
* @param row the row
- *
+ *
* @return true if the row is selected (as reported by the selection model),
* false otherwise.
*/
@@ -4814,21 +4814,21 @@ public class JTable
{
return getSelectionModel().isSelectedIndex(row);
}
-
+
/**
* Checks if the given cell is selected. The cell is selected if both
* the cell row and the cell column are selected.
- *
+ *
* @param row the cell row
* @param column the cell column
- *
+ *
* @return true if the cell is selected, false otherwise
*/
public boolean isCellSelected(int row, int column)
{
return isRowSelected(row) && isColumnSelected(column);
}
-
+
/**
* Select all table.
*/
@@ -4837,7 +4837,7 @@ public class JTable
// The table is empty - nothing to do!
if (getRowCount() == 0 || getColumnCount() == 0)
return;
-
+
// rowLead and colLead store the current lead selection indices
int rowLead = selectionModel.getLeadSelectionIndex();
int colLead = getColumnModel().getSelectionModel().getLeadSelectionIndex();
@@ -4850,25 +4850,25 @@ public class JTable
addColumnSelectionInterval(colLead,colLead);
addRowSelectionInterval(rowLead, rowLead);
}
-
+
/**
* Get the cell value at the given position.
- *
+ *
* @param row the row to get the value
- * @param column the actual column number (not the model index)
+ * @param column the actual column number (not the model index)
* to get the value.
- *
+ *
* @return the cell value, as returned by model.
*/
public Object getValueAt(int row, int column)
{
return dataModel.getValueAt(row, convertColumnIndexToModel(column));
}
-
+
/**
* Set value for the cell at the given position. The modified cell is
* repainted.
- *
+ *
* @param value the value to set
* @param row the row of the cell being modified
* @param column the column of the cell being modified
@@ -4876,20 +4876,20 @@ public class JTable
public void setValueAt(Object value, int row, int column)
{
dataModel.setValueAt(value, row, convertColumnIndexToModel(column));
-
+
repaint(getCellRect(row, column, true));
}
-
+
/**
* Get table column with the given identified.
- *
+ *
* @param identifier the column identifier
- *
+ *
* @return the table column with this identifier
- *
- * @throws IllegalArgumentException if identifier
is
+ *
+ * @throws IllegalArgumentException if identifier
is
* null
or there is no column with that identifier.
- *
+ *
* @see TableColumn#setIdentifier(Object)
*/
public TableColumn getColumn(Object identifier)
@@ -4929,7 +4929,7 @@ public class JTable
columnModel.removeColumn(columnModel.getColumn(columnIndex));
columnIndex--;
}
-
+
// add new columns to match the TableModel
int columnCount = dataModel.getColumnCount();
for (int c = 0; c < columnCount; c++)
@@ -4967,7 +4967,7 @@ public class JTable
}
else if (extend)
{
- // Extend the previous selection from the anchor to the
+ // Extend the previous selection from the anchor to the
// specified cell, clearing all other selections
selectionModel.setLeadSelectionIndex(rowIndex);
getColumnModel().getSelectionModel().setLeadSelectionIndex(columnIndex);
@@ -4980,14 +4980,14 @@ public class JTable
selectionModel.setSelectionInterval(rowIndex,rowIndex);
getColumnModel().getSelectionModel().clearSelection();
getColumnModel().getSelectionModel().setSelectionInterval(columnIndex, columnIndex);
-
-
+
+
}
}
/**
* Programmatically starts editing the specified cell.
- *
+ *
* @param row the row of the cell to edit.
* @param column the column of the cell to edit.
*/
@@ -4998,7 +4998,7 @@ public class JTable
editingStopped(new ChangeEvent("editingStopped"));
TableCellEditor editor = getCellEditor(row, column);
-
+
// The boolean values are inverted by the single click without the
// real editing session.
if (editor == booleanInvertingEditor && isCellEditable(row, column))
@@ -5024,16 +5024,16 @@ public class JTable
moveToCellBeingEdited(editorComp);
scrollRectToVisible(editorComp.getBounds());
editorComp.requestFocusInWindow();
-
+
// Deliver the should select event.
- return editor.shouldSelectCell(null);
+ return editor.shouldSelectCell(null);
}
}
/**
- * Move the given component under the cell being edited.
+ * Move the given component under the cell being edited.
* The table must be in the editing mode.
- *
+ *
* @param component the component to move.
*/
private void moveToCellBeingEdited(Component component)
@@ -5107,7 +5107,7 @@ public class JTable
// TODO: Implement functionality of this property (in UI impl).
surrendersFocusOnKeystroke = value;
}
-
+
/**
* Returns whether cell editors of this table should receive keyboard focus
* when the editor is activated by a keystroke. The default setting is
@@ -5128,7 +5128,7 @@ public class JTable
/**
* Helper method for
* {@link LookAndFeel#installProperty(JComponent, String, Object)}.
- *
+ *
* @param propertyName the name of the property
* @param value the value of the property
*
diff --git a/libjava/classpath/javax/swing/JTextArea.java b/libjava/classpath/javax/swing/JTextArea.java
index 9b50feb..51921cc 100644
--- a/libjava/classpath/javax/swing/JTextArea.java
+++ b/libjava/classpath/javax/swing/JTextArea.java
@@ -1,4 +1,4 @@
-/* JTextArea.java --
+/* JTextArea.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -126,7 +126,7 @@ public class JTextArea extends JTextComponent
* Compatible with Sun's JDK
*/
private static final long serialVersionUID = -6141680179310439825L;
-
+
/**
* The number of rows used by the component.
*/
@@ -235,14 +235,14 @@ public class JTextArea extends JTextComponent
public void append(String toAppend)
{
try
- {
- getDocument().insertString(getText().length(), toAppend, null);
- }
+ {
+ getDocument().insertString(getText().length(), toAppend, null);
+ }
catch (BadLocationException exception)
- {
- /* This shouldn't happen in theory -- but, if it does... */
- throw new RuntimeException("Unexpected exception occurred.", exception);
- }
+ {
+ /* This shouldn't happen in theory -- but, if it does... */
+ throw new RuntimeException("Unexpected exception occurred.", exception);
+ }
if (toAppend != null && toAppend.length() > 0)
revalidate();
}
@@ -337,7 +337,7 @@ public class JTextArea extends JTextComponent
{
return columns;
}
-
+
/**
* Sets the number of rows.
*
@@ -349,7 +349,7 @@ public class JTextArea extends JTextComponent
{
if (columns < 0)
throw new IllegalArgumentException();
-
+
if (columns != this.columns)
{
this.columns = columns;
@@ -378,7 +378,7 @@ public class JTextArea extends JTextComponent
{
if (rows < 0)
throw new IllegalArgumentException();
-
+
if (rows != this.rows)
{
this.rows = rows;
@@ -423,7 +423,7 @@ public class JTextArea extends JTextComponent
{
return wrapStyleWord;
}
-
+
/**
* Enables/Disables word style wrapping.
*
@@ -434,12 +434,12 @@ public class JTextArea extends JTextComponent
{
if (wrapStyleWord == flag)
return;
-
+
boolean oldValue = wrapStyleWord;
wrapStyleWord = flag;
firePropertyChange("wrapStyleWord", oldValue, wrapStyleWord);
}
-
+
/**
* Returns the number of characters used for a tab.
* This defaults to 8.
@@ -456,14 +456,14 @@ public class JTextArea extends JTextComponent
* supplied value. If a change to the tab size property
* occurs (i.e. newSize != tabSize), a property change event
* is fired.
- *
+ *
* @param newSize The new number of characters to use for a tab.
*/
public void setTabSize(int newSize)
{
if (tabSize == newSize)
return;
-
+
int oldValue = tabSize;
tabSize = newSize;
firePropertyChange("tabSize", oldValue, tabSize);
@@ -484,7 +484,7 @@ public class JTextArea extends JTextComponent
throws BadLocationException
{
int lineCount = getLineCount();
-
+
if (line < 0 || line > lineCount)
throw new BadLocationException("Non-existing line number", line);
@@ -496,7 +496,7 @@ public class JTextArea extends JTextComponent
throws BadLocationException
{
int lineCount = getLineCount();
-
+
if (line < 0 || line > lineCount)
throw new BadLocationException("Non-existing line number", line);
@@ -510,7 +510,7 @@ public class JTextArea extends JTextComponent
Document doc = getDocument();
if (offset < doc.getStartPosition().getOffset()
- || offset >= doc.getEndPosition().getOffset())
+ || offset >= doc.getEndPosition().getOffset())
throw new BadLocationException("offset outside of document", offset);
return doc.getDefaultRootElement().getElementIndex(offset);
@@ -536,32 +536,32 @@ public class JTextArea extends JTextComponent
{
// Retrieve the document model.
Document doc = getDocument();
-
+
// Check the model and string for validity.
if (doc == null
- || string == null
- || string.length() == 0)
+ || string == null
+ || string.length() == 0)
return;
// Insert the text into the model.
try
{
- doc.insertString(position, string, null);
+ doc.insertString(position, string, null);
}
catch (BadLocationException e)
{
- throw new IllegalArgumentException("The supplied position, "
- + position + ", was invalid.");
+ throw new IllegalArgumentException("The supplied position, "
+ + position + ", was invalid.");
}
}
public void replaceRange(String text, int start, int end)
{
Document doc = getDocument();
-
+
if (start > end
- || start < doc.getStartPosition().getOffset()
- || end >= doc.getEndPosition().getOffset())
+ || start < doc.getStartPosition().getOffset()
+ || end >= doc.getEndPosition().getOffset())
throw new IllegalArgumentException();
try
@@ -571,7 +571,7 @@ public class JTextArea extends JTextComponent
}
catch (BadLocationException e)
{
- // This cannot happen as we check offset above.
+ // This cannot happen as we check offset above.
}
}
diff --git a/libjava/classpath/javax/swing/JTextField.java b/libjava/classpath/javax/swing/JTextField.java
index ace358f..69b70b0 100644
--- a/libjava/classpath/javax/swing/JTextField.java
+++ b/libjava/classpath/javax/swing/JTextField.java
@@ -95,7 +95,7 @@ public class JTextField extends JTextComponent
* gets accepted.
*/
public static final String notifyAction = "notify-field-accept";
-
+
static
{
actions = new Action[1];
@@ -108,16 +108,16 @@ public class JTextField extends JTextComponent
}
};
}
-
+
private int columns;
private int align;
-
+
/** @since 1.3 */
private Action action;
/** @since 1.3 */
private String actionCommand;
-
+
private PropertyChangeListener actionPropertyChangeListener;
/**
@@ -142,7 +142,7 @@ public class JTextField extends JTextComponent
{
this(null, text, 0);
}
-
+
/**
* Creates a new instance of JTextField
.
*
@@ -270,7 +270,7 @@ public class JTextField extends JTextComponent
*/
protected void fireActionPerformed()
{
- ActionEvent event = new ActionEvent(this, 0,
+ ActionEvent event = new ActionEvent(this, 0,
actionCommand == null ? getText() : actionCommand);
ActionListener[] listeners = getActionListeners();
@@ -305,8 +305,8 @@ public class JTextField extends JTextComponent
}
/**
- * Returns the horizontal alignment, which is one of: JTextField.LEFT,
- * JTextField.CENTER, JTextField.RIGHT, JTextField.LEADING,
+ * Returns the horizontal alignment, which is one of: JTextField.LEFT,
+ * JTextField.CENTER, JTextField.RIGHT, JTextField.LEADING,
* JTextField.TRAILING.
* @return the horizontal alignment
*/
@@ -345,7 +345,7 @@ public class JTextField extends JTextComponent
}
/**
- * Returns the preferred size. If there is a non-zero number of columns,
+ * Returns the preferred size. If there is a non-zero number of columns,
* this is the number of columns multiplied by the column width, otherwise
* it returns super.getPreferredSize().
*/
@@ -374,7 +374,7 @@ public class JTextField extends JTextComponent
/**
* Sets the scroll offset in pixels.
- *
+ *
* @param offset the scroll offset
*/
public void setScrollOffset(int offset)
@@ -385,7 +385,7 @@ public class JTextField extends JTextComponent
Math.min(horizontalVisibility.getMaximum()
- horizontalVisibility.getExtent(),
offset));
-
+
}
/**
@@ -407,7 +407,7 @@ public class JTextField extends JTextComponent
for (int index = 0; index < listeners.length; ++index)
listeners[index].actionPerformed(event);
}
-
+
/**
* @since 1.3
*/
@@ -480,7 +480,7 @@ public class JTextField extends JTextComponent
}
/**
- *
+ *
* @since 1.3
*/
protected void configurePropertiesFromAction(Action action)
@@ -546,15 +546,15 @@ public class JTextField extends JTextComponent
{
return ! (getParent() instanceof JViewport);
}
-
+
public void scrollRectToVisible(Rectangle r)
{
int v = horizontalVisibility.getValue();
-
+
// The extent value is the inner width of the text field.
int e = horizontalVisibility.getExtent();
Insets i = getInsets();
-
+
// The x value in the rectangle (usually) denotes the new location
// of the caret. We check whether the location lies inside the left or
// right border and scroll into the appropriate direction.
@@ -566,5 +566,5 @@ public class JTextField extends JTextComponent
else if (r.x > e + i.left)
setScrollOffset(r.x + v - e - i.left);
}
-
+
}
diff --git a/libjava/classpath/javax/swing/JTextPane.java b/libjava/classpath/javax/swing/JTextPane.java
index 05968fc..4fef002 100644
--- a/libjava/classpath/javax/swing/JTextPane.java
+++ b/libjava/classpath/javax/swing/JTextPane.java
@@ -179,7 +179,7 @@ public class JTextPane
catch (BadLocationException e)
{
throw new AssertionError
- ("No BadLocationException should be thrown here");
+ ("No BadLocationException should be thrown here");
}
}
@@ -326,7 +326,7 @@ public class JTextPane
}
else
getStyledDocument().setCharacterAttributes(start, end - start, attribute,
- replace);
+ replace);
}
/**
diff --git a/libjava/classpath/javax/swing/JToggleButton.java b/libjava/classpath/javax/swing/JToggleButton.java
index 60c4489..2ee4187 100644
--- a/libjava/classpath/javax/swing/JToggleButton.java
+++ b/libjava/classpath/javax/swing/JToggleButton.java
@@ -1,4 +1,4 @@
-/* JToggleButton.java --
+/* JToggleButton.java --
Copyright (C) 2002, 2004, 2005, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -92,7 +92,7 @@ public class JToggleButton extends AbstractButton implements Accessible
{
return AccessibleRole.TOGGLE_BUTTON;
}
-
+
/**
* Monitors the toggle button for state changes and fires accessible
* property change events when they occur.
@@ -106,14 +106,14 @@ public class JToggleButton extends AbstractButton implements Accessible
{
/* State has changed from unselected (null) to selected */
firePropertyChange(ACCESSIBLE_STATE_PROPERTY, null, AccessibleState.SELECTED);
- }
+ }
else
{
/* State has changed from selected to unselected (null) */
firePropertyChange(ACCESSIBLE_STATE_PROPERTY, AccessibleState.ENABLED, null);
}
}
-
+
}
/**
@@ -129,19 +129,19 @@ public class JToggleButton extends AbstractButton implements Accessible
* Compatible with Sun's JDK.
*/
private static final long serialVersionUID = -1589950750899943974L;
-
+
/**
* Sets the pressed state of the button. The selected state
* of the button also changes follwing the button being pressed.
*
* @param p true if the button is pressed down.
*/
- public void setPressed(boolean p)
+ public void setPressed(boolean p)
{
// cannot change PRESSED state unless button is enabled
if (! isEnabled())
return;
-
+
// if this call does not represent a CHANGE in state, then return
if ((p && isPressed()) || (!p && !isPressed()))
return;
@@ -164,7 +164,7 @@ public class JToggleButton extends AbstractButton implements Accessible
stateMask = stateMask | PRESSED;
else
stateMask = stateMask & (~PRESSED);
-
+
// notify interested ChangeListeners
fireStateChanged();
@@ -175,36 +175,36 @@ public class JToggleButton extends AbstractButton implements Accessible
actionCommand));
}
}
-
+
/**
* Checks if the button is selected.
- *
+ *
* @return true
if the button is selected.
*/
public boolean isSelected()
{
return super.isSelected();
}
-
+
/**
* Sets the selected state of the button.
- *
+ *
* @param b true if button is selected
*/
public void setSelected(boolean b)
{
super.setSelected(b);
- }
+ }
}
/**
* Compatible with Sun's JDK.
*/
private static final long serialVersionUID = -3128248873429850443L;
-
+
/**
* Constructs an unselected toggle button with no text or icon.
- */
+ */
public JToggleButton()
{
this(null, null, false);
@@ -229,10 +229,10 @@ public class JToggleButton extends AbstractButton implements Accessible
* @param icon the icon to use.
*/
public JToggleButton(Icon icon)
- {
+ {
this(null, icon, false);
- }
-
+ }
+
/**
* Constructs a toggle button with the supplied icon and state.
*
@@ -240,22 +240,22 @@ public class JToggleButton extends AbstractButton implements Accessible
* @param selected if true, the toggle button is initially in the
* selected state. Otherwise, the button is unselected.
*/
- public JToggleButton(Icon icon, boolean selected)
+ public JToggleButton(Icon icon, boolean selected)
{
this(null, icon, selected);
}
-
+
/**
* Constructs an unselected toggle button using the supplied text
* and no icon.
*
* @param text the text to use.
- */
+ */
public JToggleButton(String text)
{
this(text, null, false);
}
-
+
/**
* Constructs a toggle button with the supplied text and state.
*
@@ -288,10 +288,10 @@ public class JToggleButton extends AbstractButton implements Accessible
* @param selected if true, the toggle button is initially in the
* selected state. Otherwise, the button is unselected.
*/
- public JToggleButton (String text, Icon icon, boolean selected)
+ public JToggleButton (String text, Icon icon, boolean selected)
{
super();
- setModel(new ToggleButtonModel());
+ setModel(new ToggleButtonModel());
init(text, icon);
model.setSelected(selected);
setAlignmentX(LEFT_ALIGNMENT);
@@ -309,11 +309,11 @@ public class JToggleButton extends AbstractButton implements Accessible
if (accessibleContext == null)
{
/* Create the context */
- accessibleContext = new AccessibleJToggleButton();
+ accessibleContext = new AccessibleJToggleButton();
}
return accessibleContext;
}
-
+
/**
* Returns a string that specifies the name of the Look and Feel
* class that renders this component.
@@ -324,7 +324,7 @@ public class JToggleButton extends AbstractButton implements Accessible
{
return "ToggleButtonUI";
}
-
+
/**
* Returns a textual representation of this component for debugging.
* Users should not depend on anything as regards the content or formatting
@@ -337,17 +337,14 @@ public class JToggleButton extends AbstractButton implements Accessible
{
return super.paramString();
}
-
+
/**
* This method resets the toggle button's UI delegate to the default UI for
* the current look and feel.
*/
public void updateUI()
- {
+ {
setUI((ButtonUI)UIManager.getUI(this));
}
}
-
-
-
diff --git a/libjava/classpath/javax/swing/JToolBar.java b/libjava/classpath/javax/swing/JToolBar.java
index 33ebcfc..5f4816f 100644
--- a/libjava/classpath/javax/swing/JToolBar.java
+++ b/libjava/classpath/javax/swing/JToolBar.java
@@ -83,7 +83,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
}
/**
- * Returns a set containing the current state of the {@link JToolBar}
+ * Returns a set containing the current state of the {@link JToolBar}
* component. The current implementation simply calls the superclass.
*
* @return The accessible state set.
@@ -134,16 +134,16 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
public void layoutContainer(Container c)
{
if (! (c instanceof JToolBar))
- throw new Error("DefaultToolBarLayout can only be used on JToolBars.");
+ throw new Error("DefaultToolBarLayout can only be used on JToolBars.");
Insets insets = getInsets();
Insets margin = getMargin();
int middle;
if (margin != null)
{
- insets.left += margin.left;
- insets.top += margin.top;
- insets.bottom += margin.bottom;
- insets.right += margin.right;
+ insets.left += margin.left;
+ insets.top += margin.top;
+ insets.bottom += margin.bottom;
+ insets.right += margin.right;
}
Component[] components = c.getComponents();
Dimension tdims = c.getSize();
@@ -152,39 +152,39 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
if (getOrientation() == SwingUtilities.HORIZONTAL)
{
- start += insets.left;
- for (int i = 0; i < components.length; i++)
- {
- if (components[i] != null && components[i].isVisible())
- {
- pref = components[i].getPreferredSize();
- if (pref != null)
- {
- middle = (tdims.height - pref.height) / 2;
- components[i].setBounds(start, middle, pref.width,
- pref.height);
- start += pref.width;
- }
- }
- }
+ start += insets.left;
+ for (int i = 0; i < components.length; i++)
+ {
+ if (components[i] != null && components[i].isVisible())
+ {
+ pref = components[i].getPreferredSize();
+ if (pref != null)
+ {
+ middle = (tdims.height - pref.height) / 2;
+ components[i].setBounds(start, middle, pref.width,
+ pref.height);
+ start += pref.width;
+ }
+ }
+ }
}
else
{
- start += insets.top;
- for (int i = 0; i < components.length; i++)
- {
- if (components[i] != null && components[i].isVisible())
- {
- pref = components[i].getPreferredSize();
- if (pref != null)
- {
- middle = (tdims.width - pref.width) / 2;
- components[i].setBounds(middle, start, pref.width,
- pref.height);
- start += pref.height;
- }
- }
- }
+ start += insets.top;
+ for (int i = 0; i < components.length; i++)
+ {
+ if (components[i] != null && components[i].isVisible())
+ {
+ pref = components[i].getPreferredSize();
+ if (pref != null)
+ {
+ middle = (tdims.width - pref.width) / 2;
+ components[i].setBounds(middle, start, pref.width,
+ pref.height);
+ start += pref.height;
+ }
+ }
+ }
}
}
@@ -223,33 +223,33 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
if (orientation == SwingConstants.HORIZONTAL)
{
- for (int i = 0; i < components.length; i++)
- {
- dims = components[i].getPreferredSize();
- if (dims != null)
- {
- if (dims.height > limit)
- limit = dims.height;
- total += dims.width;
- }
- }
- w = total;
- h = limit;
+ for (int i = 0; i < components.length; i++)
+ {
+ dims = components[i].getPreferredSize();
+ if (dims != null)
+ {
+ if (dims.height > limit)
+ limit = dims.height;
+ total += dims.width;
+ }
+ }
+ w = total;
+ h = limit;
}
else
{
- for (int i = 0; i < components.length; i++)
- {
- dims = components[i].getPreferredSize();
- if (dims != null)
- {
- if (dims.width > limit)
- limit = dims.width;
- total += dims.height;
- }
- }
- w = limit;
- h = total;
+ for (int i = 0; i < components.length; i++)
+ {
+ dims = components[i].getPreferredSize();
+ if (dims != null)
+ {
+ if (dims.width > limit)
+ limit = dims.width;
+ total += dims.height;
+ }
+ }
+ w = limit;
+ h = total;
}
Insets insets = getInsets();
@@ -259,8 +259,8 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
Insets margin = getMargin();
if (margin != null)
{
- w += margin.left + margin.right;
- h += margin.top + margin.bottom;
+ w += margin.left + margin.right;
+ h += margin.top + margin.bottom;
}
return new Dimension(w, h);
@@ -509,10 +509,10 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
{
if (b != rollover)
{
- rollover = b;
- firePropertyChange("rollover", ! rollover, rollover);
- revalidate();
- repaint();
+ rollover = b;
+ firePropertyChange("rollover", ! rollover, rollover);
+ revalidate();
+ repaint();
}
}
@@ -541,7 +541,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
for (int i = 0; i < components.length; i++)
if (components[i] == component)
- return i;
+ return i;
return -1;
} // getComponentIndex()
@@ -584,11 +584,11 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
|| margin.right != this.margin.right || margin.top != this.margin.top
|| margin.bottom != this.margin.bottom)))
{
- Insets oldMargin = this.margin;
- this.margin = margin;
- firePropertyChange("margin", oldMargin, this.margin);
- revalidate();
- repaint();
+ Insets oldMargin = this.margin;
+ this.margin = margin;
+ firePropertyChange("margin", oldMargin, this.margin);
+ revalidate();
+ repaint();
}
} // setMargin()
@@ -612,10 +612,10 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
{
if (painted != paintBorder)
{
- paintBorder = painted;
- firePropertyChange("borderPainted", ! paintBorder,
- paintBorder);
- repaint();
+ paintBorder = painted;
+ firePropertyChange("borderPainted", ! paintBorder,
+ paintBorder);
+ repaint();
}
} // setBorderPainted()
@@ -639,8 +639,8 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
{
if (floatable != this.floatable)
{
- this.floatable = floatable;
- firePropertyChange("floatable", ! floatable, floatable);
+ this.floatable = floatable;
+ firePropertyChange("floatable", ! floatable, floatable);
}
} // setFloatable()
@@ -681,11 +681,11 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
+ " is not a legal orientation");
if (orientation != this.orientation)
{
- int oldOrientation = this.orientation;
- this.orientation = orientation;
- firePropertyChange("orientation", oldOrientation, this.orientation);
- revalidate();
- repaint();
+ int oldOrientation = this.orientation;
+ this.orientation = orientation;
+ firePropertyChange("orientation", oldOrientation, this.orientation);
+ revalidate();
+ repaint();
}
} // setOrientation()
@@ -760,7 +760,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible
/**
* Returns a string describing the attributes for the JToolBar
- * component, for use in debugging. The return value is guaranteed to be
+ * component, for use in debugging. The return value is guaranteed to be
* non-null
, but the format of the string may vary between
* implementations.
*
diff --git a/libjava/classpath/javax/swing/JToolTip.java b/libjava/classpath/javax/swing/JToolTip.java
index f59ec95..6f226e7 100644
--- a/libjava/classpath/javax/swing/JToolTip.java
+++ b/libjava/classpath/javax/swing/JToolTip.java
@@ -117,7 +117,7 @@ public class JToolTip extends JComponent implements Accessible
* Returns the text displayed by the tool tip.
*
* @return The text (possibly null
).
- *
+ *
* @see #setTipText(String)
*/
public String getTipText()
@@ -142,7 +142,7 @@ public class JToolTip extends JComponent implements Accessible
* Returns the component that the tool tip is associated with.
*
* @return The component (possibly null
).
- *
+ *
* @see #setComponent(JComponent)
*/
public JComponent getComponent()
@@ -173,7 +173,7 @@ public class JToolTip extends JComponent implements Accessible
/**
* Returns a string describing the attributes for the JToolTip
- * component, for use in debugging. The return value is guaranteed to be
+ * component, for use in debugging. The return value is guaranteed to be
* non-null
, but the format of the string may vary between
* implementations.
*
@@ -189,12 +189,12 @@ public class JToolTip extends JComponent implements Accessible
}
/**
- * Sets the component that the tool tip is associated with and sends a
- * {@link PropertyChangeEvent} (with the property name 'component') to all
+ * Sets the component that the tool tip is associated with and sends a
+ * {@link PropertyChangeEvent} (with the property name 'component') to all
* registered listeners.
*
* @param c the component (null
permitted).
- *
+ *
* @see #getComponent()
*/
public void setComponent(JComponent c)
@@ -205,12 +205,12 @@ public class JToolTip extends JComponent implements Accessible
}
/**
- * Sets the text to be displayed by the tool tip and sends a
- * {@link PropertyChangeEvent} (with the property name 'tiptext') to all
+ * Sets the text to be displayed by the tool tip and sends a
+ * {@link PropertyChangeEvent} (with the property name 'tiptext') to all
* registered listeners.
*
* @param tipText the text (null
permitted).
- *
+ *
* @see #getTipText()
*/
public void setTipText(String tipText)
diff --git a/libjava/classpath/javax/swing/JTree.java b/libjava/classpath/javax/swing/JTree.java
index c0365bc..d89adad 100644
--- a/libjava/classpath/javax/swing/JTree.java
+++ b/libjava/classpath/javax/swing/JTree.java
@@ -1,6 +1,6 @@
-/* JTree.java
+/* JTree.java
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
-
+
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
@@ -87,24 +87,24 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
/**
- * This class implements accessibility support for the JTree class. It
- * provides an implementation of the Java Accessibility API appropriate
+ * This class implements accessibility support for the JTree class. It
+ * provides an implementation of the Java Accessibility API appropriate
* to tree user-interface elements.
*/
protected class AccessibleJTree extends JComponent.AccessibleJComponent
implements AccessibleSelection, TreeSelectionListener, TreeModelListener,
TreeExpansionListener
{
-
+
/**
- * This class implements accessibility support for the JTree child. It provides
+ * This class implements accessibility support for the JTree child. It provides
* an implementation of the Java Accessibility API appropriate to tree nodes.
*/
- protected class AccessibleJTreeNode extends AccessibleContext
- implements Accessible, AccessibleComponent, AccessibleSelection,
+ protected class AccessibleJTreeNode extends AccessibleContext
+ implements Accessible, AccessibleComponent, AccessibleSelection,
AccessibleAction
{
-
+
private JTree tree;
private TreePath tp;
private Accessible acc;
@@ -113,10 +113,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
private Vector actionList;
private TreeModel mod;
private Cursor cursor;
-
+
/**
* Constructs an AccessibleJTreeNode
- *
+ *
* @param t - the current tree
* @param p - the current path to be dealt with
* @param ap - the accessible object to use
@@ -128,11 +128,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
actionList = new Vector();
mod = tree.getModel();
cursor = JTree.this.getCursor();
-
+
tree = t;
tp = p;
acc = ap;
-
+
// Add all the children of this path that may already be
// selected to the selection list.
TreePath[] selected = tree.getSelectionPaths();
@@ -142,20 +142,20 @@ public class JTree extends JComponent implements Scrollable, Accessible
if ((sel.getParentPath()).equals(tp))
selectionList.add(sel);
}
-
- // Add all the actions available for a node to
+
+ // Add all the actions available for a node to
// the action list.
actionList.add("EXPAND");
actionList.add("COLLAPSE");
actionList.add("EDIT");
actionList.add("SELECT");
actionList.add("DESELECT");
- }
-
+ }
+
/**
* Adds the specified selected item in the object to the object's
* selection.
- *
+ *
* @param i - the i-th child of this node.
*/
public void addAccessibleSelection(int i)
@@ -167,47 +167,47 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
if (!states.contains(AccessibleState.MULTISELECTABLE))
clearAccessibleSelection();
- selectionList.add(child);
+ selectionList.add(child);
tree.addSelectionPath(tp.pathByAddingChild(child));
}
}
}
-
+
/**
- * Adds the specified focus listener to receive focus events
+ * Adds the specified focus listener to receive focus events
* from this component.
- *
+ *
* @param l - the new focus listener
*/
public void addFocusListener(FocusListener l)
{
tree.addFocusListener(l);
}
-
+
/**
* Add a PropertyChangeListener to the listener list.
- *
+ *
* @param l - the new property change listener
*/
public void addPropertyChangeListener(PropertyChangeListener l)
{
// Nothing to do here.
}
-
+
/**
- * Clears the selection in the object, so that nothing in the
+ * Clears the selection in the object, so that nothing in the
* object is selected.
*/
public void clearAccessibleSelection()
{
selectionList.clear();
}
-
+
/**
- * Checks whether the specified point is within this object's
- * bounds, where the point's x and y coordinates are defined to be
- * relative to the coordinate system of the object.
- *
+ * Checks whether the specified point is within this object's
+ * bounds, where the point's x and y coordinates are defined to be
+ * relative to the coordinate system of the object.
+ *
* @param p - the point to check
* @return true if p is in the bounds
*/
@@ -215,10 +215,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
return getBounds().contains(p);
}
-
+
/**
* Perform the specified Action on the tree node.
- *
+ *
* @param i - the i-th action to perform
* @return true if the the action was performed; else false.
*/
@@ -226,7 +226,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
if (i >= actionList.size() || i < 0)
return false;
-
+
if (actionList.get(i).equals("EXPAND"))
tree.expandPath(tp);
else if (actionList.get(i).equals("COLLAPSE"))
@@ -241,30 +241,30 @@ public class JTree extends JComponent implements Scrollable, Accessible
return false;
return true;
}
-
+
/**
* Get the AccessibleAction associated with this object.
- *
+ *
* @return the action
*/
public AccessibleAction getAccessibleAction()
{
return this;
}
-
+
/**
* Returns the number of accessible actions available in this tree node.
- *
+ *
* @return the number of actions
*/
public int getAccessibleActionCount()
{
return actionList.size();
}
-
+
/**
* Return a description of the specified action of the tree node.
- *
+ *
* @param i - the i-th action's description
* @return a description of the action
*/
@@ -274,11 +274,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
return (actionList.get(i)).toString();
return super.getAccessibleDescription();
}
-
+
/**
- * Returns the Accessible child, if one exists, contained at the
+ * Returns the Accessible child, if one exists, contained at the
* local coordinate Point.
- *
+ *
* @param p - the point of the accessible
* @return the accessible at point p if it exists
*/
@@ -289,10 +289,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
return new AccessibleJTreeNode(tree, acc, this);
return null;
}
-
+
/**
* Return the specified Accessible child of the object.
- *
+ *
* @param i - the i-th child of the current path
* @return the child if it exists
*/
@@ -307,10 +307,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
}
return null;
}
-
+
/**
* Returns the number of accessible children in the object.
- *
+ *
* @return the number of children the current node has
*/
public int getAccessibleChildrenCount()
@@ -320,40 +320,40 @@ public class JTree extends JComponent implements Scrollable, Accessible
return mod.getChildCount(tp.getLastPathComponent());
return 0;
}
-
+
/**
* Get the AccessibleComponent associated with this object.
- *
+ *
* @return the accessible component if it is supported.
*/
public AccessibleComponent getAccessibleComponent()
{
return this;
}
-
+
/**
* Get the AccessibleContext associated with this tree node.
- *
+ *
* @return an instance of this class
*/
public AccessibleContext getAccessibleContext()
{
return this;
}
-
+
/**
* Get the accessible description of this object.
- *
+ *
* @return the accessible description
*/
public String getAccessibleDescription()
{
return super.getAccessibleDescription();
}
-
+
/**
* Get the index of this object in its accessible parent.
- *
+ *
* @return the index of this in the parent.
*/
public int getAccessibleIndexInParent()
@@ -367,74 +367,74 @@ public class JTree extends JComponent implements Scrollable, Accessible
}
return -1;
}
-
+
/**
* Get the accessible name of this object.
- *
+ *
* @return the accessible name
*/
public String getAccessibleName()
{
return super.getAccessibleName();
}
-
+
/**
* Get the Accessible parent of this object.
- *
+ *
* @return the accessible parent if it exists.
*/
public Accessible getAccessibleParent()
{
return super.getAccessibleParent();
}
-
+
/**
* Get the role of this object.
- *
+ *
* @return the accessible role
*/
public AccessibleRole getAccessibleRole()
{
return AccessibleJTree.this.getAccessibleRole();
}
-
+
/**
* Get the AccessibleSelection associated with this object if one exists.
- *
+ *
* @return the accessible selection for this.
*/
public AccessibleSelection getAccessibleSelection()
{
return this;
}
-
+
/**
- * Returns an Accessible representing the specified selected item
+ * Returns an Accessible representing the specified selected item
* in the object.
- *
+ *
* @return the accessible representing a certain selected item.
*/
public Accessible getAccessibleSelection(int i)
{
if (i > 0 && i < getAccessibleSelectionCount())
- return new AccessibleJTreeNode(tree,
+ return new AccessibleJTreeNode(tree,
tp.pathByAddingChild(selectionList.get(i)), acc);
return null;
}
-
+
/**
* Returns the number of items currently selected.
- *
+ *
* @return the number of items selected.
*/
public int getAccessibleSelectionCount()
{
return selectionList.size();
}
-
+
/**
* Get the state set of this object.
- *
+ *
* @return the state set for this object
*/
public AccessibleStateSet getAccessibleStateSet()
@@ -445,7 +445,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
states.add(AccessibleState.COLLAPSED);
if (tree.isEditable())
states.add(AccessibleState.EDITABLE);
- if (mod != null &&
+ if (mod != null &&
!mod.isLeaf(tp.getLastPathComponent()))
states.add(AccessibleState.EXPANDABLE);
if (tree.isExpanded(tp))
@@ -454,7 +454,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
states.add(AccessibleState.FOCUSABLE);
if (hasFocus())
states.add(AccessibleState.FOCUSED);
- if (tree.getSelectionModel().getSelectionMode() !=
+ if (tree.getSelectionModel().getSelectionMode() !=
TreeSelectionModel.SINGLE_TREE_SELECTION)
states.add(AccessibleState.MULTISELECTABLE);
if (tree.isOpaque())
@@ -467,70 +467,70 @@ public class JTree extends JComponent implements Scrollable, Accessible
states.add(AccessibleState.SELECTABLE);
return states;
}
-
+
/**
* Get the AccessibleText associated with this object if one exists.
- *
+ *
* @return the accessible text
*/
public AccessibleText getAccessibleText()
{
return super.getAccessibleText();
}
-
+
/**
* Get the AccessibleValue associated with this object if one exists.
- *
+ *
* @return the accessible value if it exists
*/
public AccessibleValue getAccessibleValue()
{
return super.getAccessibleValue();
}
-
+
/**
* Get the background color of this object.
- *
+ *
* @return the color of the background.
*/
public Color getBackground()
{
return tree.getBackground();
}
-
+
/**
* Gets the bounds of this object in the form of a Rectangle object.
- *
+ *
* @return the bounds of the current node.
*/
public Rectangle getBounds()
{
return tree.getPathBounds(tp);
}
-
+
/**
* Gets the Cursor of this object.
- *
+ *
* @return the cursor for the current node
*/
public Cursor getCursor()
{
return cursor;
}
-
+
/**
* Gets the Font of this object.
- *
+ *
* @return the font for the current node
*/
public Font getFont()
{
return tree.getFont();
}
-
+
/**
* Gets the FontMetrics of this object.
- *
+ *
* @param f - the current font.
* @return the font metrics for the given font.
*/
@@ -538,42 +538,42 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
return tree.getFontMetrics(f);
}
-
+
/**
* Get the foreground color of this object.
- *
+ *
* @return the foreground for this object.
*/
public Color getForeground()
{
return tree.getForeground();
}
-
+
/**
* Gets the locale of the component.
- *
+ *
* @return the locale of the component.
*/
public Locale getLocale()
{
return tree.getLocale();
}
-
+
/**
- * Gets the location of the object relative to the
- * parent in the form of a point specifying the object's
- * top-left corner in the screen's coordinate space.
- *
+ * Gets the location of the object relative to the
+ * parent in the form of a point specifying the object's
+ * top-left corner in the screen's coordinate space.
+ *
* @return the location of the current node.
*/
public Point getLocation()
{
return getLocationInJTree();
}
-
+
/**
* Returns the location in the tree.
- *
+ *
* @return the location in the JTree.
*/
protected Point getLocationInJTree()
@@ -581,10 +581,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
Rectangle bounds = tree.getPathBounds(tp);
return new Point(bounds.x, bounds.y);
}
-
+
/**
* Returns the location of the object on the screen.
- *
+ *
* @return the location of the object on the screen.
*/
public Point getLocationOnScreen()
@@ -593,10 +593,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
SwingUtilities.convertPointToScreen(loc, tree);
return loc;
}
-
+
/**
* Returns the size of this object in the form of a Dimension object.
- *
+ *
* @return the size of the object
*/
public Dimension getSize()
@@ -604,10 +604,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
Rectangle b = getBounds();
return b.getSize();
}
-
+
/**
* Returns true if the current child of this object is selected.
- *
+ *
* @param i - the child of the current node
* @return true if the child is selected.
*/
@@ -618,30 +618,30 @@ public class JTree extends JComponent implements Scrollable, Accessible
return tree.isPathSelected(tp.pathByAddingChild(child));
return false;
}
-
+
/**
* Determines if the object is enabled.
- *
+ *
* @return true if the tree is enabled
*/
public boolean isEnabled()
{
return tree.isEnabled();
}
-
+
/**
* Returns whether this object can accept focus or not.
- *
+ *
* @return true, it is always focus traversable
*/
public boolean isFocusTraversable()
{
return true;
}
-
+
/**
* Determines if the object is showing.
- *
+ *
* @return true if the object is visible and the
* parent is visible.
*/
@@ -649,21 +649,21 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
return isVisible() && tree.isShowing();
}
-
+
/**
* Determines if the object is visible.
- *
+ *
* @return true if the object is visible.
*/
public boolean isVisible()
{
return tree.isVisible(tp);
}
-
+
/**
* Removes the specified selected item in the object from the
* object's selection.
- *
+ *
* @param i - the specified item to remove
*/
public void removeAccessibleSelection(int i)
@@ -677,34 +677,34 @@ public class JTree extends JComponent implements Scrollable, Accessible
clearAccessibleSelection();
if (selectionList.contains(child))
{
- selectionList.remove(child);
+ selectionList.remove(child);
tree.removeSelectionPath(tp.pathByAddingChild(child));
}
}
}
}
-
+
/**
- * Removes the specified focus listener so it no longer receives focus
+ * Removes the specified focus listener so it no longer receives focus
* events from this component.
- *
+ *
* @param l - the focus listener to remove
*/
public void removeFocusListener(FocusListener l)
{
tree.removeFocusListener(l);
}
-
+
/**
* Remove a PropertyChangeListener from the listener list.
- *
+ *
* @param l - the property change listener to remove.
*/
public void removePropertyChangeListener(PropertyChangeListener l)
{
// Nothing to do here.
}
-
+
/**
* Requests focus for this object.
*/
@@ -712,9 +712,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
tree.requestFocus();
}
-
+
/**
- * Causes every selected item in the object to be selected if the object
+ * Causes every selected item in the object to be selected if the object
* supports multiple selections.
*/
public void selectAllAccessibleSelection()
@@ -738,110 +738,110 @@ public class JTree extends JComponent implements Scrollable, Accessible
}
}
}
-
+
/**
* Set the accessible description of this object.
- *
+ *
* @param s - the string to set the accessible description to.
*/
public void setAccessibleDescription(String s)
{
super.setAccessibleDescription(s);
}
-
+
/**
* Set the localized accessible name of this object.
- *
+ *
* @param s - the string to set the accessible name to.
*/
public void setAccessibleName(String s)
{
super.setAccessibleName(s);
}
-
+
/**
* Set the background color of this object.
- *
+ *
* @param c - the color to set the background to.
*/
public void setBackground(Color c)
{
// Nothing to do here.
}
-
+
/**
* Sets the bounds of this object in the form of a Rectangle object.
- *
+ *
* @param r - the bounds to set the object o
*/
public void setBounds(Rectangle r)
{
// Nothing to do here.
}
-
+
/**
* Sets the Cursor of this object.
- *
+ *
* @param c - the new cursor
*/
public void setCursor(Cursor c)
{
cursor = c;
}
-
+
/**
* Sets the enabled state of the object.
- *
+ *
* @param b - boolean to enable or disable object
*/
public void setEnabled(boolean b)
{
// Nothing to do here.
}
-
+
/**
* Sets the Font of this object.
- *
+ *
* @param f - the new font.
*/
public void setFont(Font f)
{
// Nothing to do here.
}
-
+
/**
* Sets the foreground color of this object.
- *
+ *
* @param c - the new foreground color.
*/
public void setForeground(Color c)
{
// Nothing to do here.
}
-
+
/**
* Sets the location of the object relative to the parent.
- *
+ *
* @param p - the new location for the object.
*/
public void setLocation(Point p)
{
// Nothing to do here.
}
-
+
/**
* Resizes this object so that it has width and height.
- *
+ *
* @param d - the new size for the object.
*/
public void setSize(Dimension d)
{
// Nothing to do here.
}
-
+
/**
* Sets the visible state of the object.
- *
+ *
* @param b - sets the objects visibility.
*/
public void setVisible(boolean b)
@@ -849,7 +849,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
// Nothing to do here.
}
}
-
+
/**
* Constructor
*/
@@ -857,17 +857,17 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
// Nothing to do here.
}
-
+
/**
* Adds the specified selected item in the object to the object's selection.
- *
+ *
* @param i - the row to add to the tree's selection
*/
public void addAccessibleSelection(int i)
{
addSelectionInterval(i, i);
}
-
+
/**
* Clears the selection in the object, so that nothing in the object is selected.
*/
@@ -875,7 +875,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
clearSelection();
}
-
+
/**
* Fire a visible data property change notification.
*/
@@ -883,11 +883,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
treeDidChange();
}
-
+
/**
- * Returns the Accessible child, if one exists, contained at the local
+ * Returns the Accessible child, if one exists, contained at the local
* coordinate Point.
- *
+ *
* @param p - the point of the accessible to get.
* @return the accessible at point p.
*/
@@ -898,10 +898,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
return new AccessibleJTreeNode(JTree.this, tp, null);
return null;
}
-
+
/**
* Return the nth Accessible child of the object.
- *
+ *
* @param i - the accessible child to get
* @return the i-th child
*/
@@ -909,10 +909,10 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
return null;
}
-
+
/**
* Returns the number of top-level children nodes of this JTree.
- *
+ *
* @return the number of top-level children
*/
public int getAccessibleChildrenCount()
@@ -922,68 +922,68 @@ public class JTree extends JComponent implements Scrollable, Accessible
return model.getChildCount(model.getRoot());
return 0;
}
-
+
/**
* Get the index of this object in its accessible parent.
- *
+ *
* @return the index of this object.
*/
public int getAccessibleIndexInParent()
{
return 0;
}
-
+
/**
* Get the role of this object.
- *
+ *
* @return the role of this object
*/
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.TREE;
}
-
+
/**
* Get the AccessibleSelection associated with this object.
- *
+ *
* @return the accessible selection of the tree
*/
public AccessibleSelection getAccessibleSelection()
{
TreeModel mod = getModel();
if (mod != null)
- return (new AccessibleJTreeNode(JTree.this,
+ return (new AccessibleJTreeNode(JTree.this,
new TreePath(mod.getRoot()), null)).getAccessibleSelection();
return null;
}
-
+
/**
* Returns an Accessible representing the specified selected item in the object.
- *
+ *
* @return the i-th accessible in the selection
*/
public Accessible getAccessibleSelection(int i)
{
TreeModel mod = getModel();
if (mod != null)
- return (new AccessibleJTreeNode(JTree.this,
+ return (new AccessibleJTreeNode(JTree.this,
new TreePath(mod.getRoot()), null)).getAccessibleSelection(i);
return null;
}
-
+
/**
* Returns the number of items currently selected.
- *
+ *
* @return the number of selected accessibles.
*/
public int getAccessibleSelectionCount()
{
return getSelectionCount();
}
-
+
/**
* Returns true if the current child of this object is selected.
- *
+ *
* @param i - the child of this object
* @return true if the i-th child is selected.
*/
@@ -992,92 +992,92 @@ public class JTree extends JComponent implements Scrollable, Accessible
// Nothing to do here.
return false;
}
-
+
/**
* Removes the specified selected item in the object from the object's
* selection.
- *
+ *
* @param i - the i-th selected item to remove
*/
public void removeAccessibleSelection(int i)
{
removeSelectionInterval(i, i);
}
-
+
/**
* Causes every selected item in the object to be selected if the object
* supports multiple selections.
*/
public void selectAllAccessibleSelection()
{
- if (getSelectionModel().getSelectionMode() !=
+ if (getSelectionModel().getSelectionMode() !=
TreeSelectionModel.SINGLE_TREE_SELECTION)
addSelectionInterval(0, getVisibleRowCount());
}
-
+
/**
* Tree Collapsed notification
- *
+ *
* @param e - the event
*/
public void treeCollapsed(TreeExpansionEvent e)
{
fireTreeCollapsed(e.getPath());
}
-
+
/**
* Tree Model Expansion notification.
- *
+ *
* @param e - the event
*/
public void treeExpanded(TreeExpansionEvent e)
{
fireTreeExpanded(e.getPath());
}
-
+
/**
* Tree Model Node change notification.
- *
+ *
* @param e - the event
*/
public void treeNodesChanged(TreeModelEvent e)
{
// Nothing to do here.
}
-
+
/**
* Tree Model Node change notification.
- *
+ *
* @param e - the event
*/
public void treeNodesInserted(TreeModelEvent e)
{
// Nothing to do here.
}
-
+
/**
* Tree Model Node change notification.
- *
+ *
* @param e - the event
*/
public void treeNodesRemoved(TreeModelEvent e)
{
// Nothing to do here.
}
-
+
/**
* Tree Model structure change change notification.
- *
+ *
* @param e - the event
*/
public void treeStructureChanged(TreeModelEvent e)
{
// Nothing to do here.
}
-
+
/**
* Tree Selection Listener value change method.
- *
+ *
* @param e - the event
*/
public void valueChanged(TreeSelectionEvent e)
@@ -1085,7 +1085,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
fireValueChanged(e);
}
}
-
+
public static class DynamicUtilTreeNode extends DefaultMutableTreeNode
{
protected Object childValue;
@@ -1129,9 +1129,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns the child node at position pos
. Subclassed
* here to load the children if necessary.
- *
+ *
* @param pos the position of the child node to fetch
- *
+ *
* @return the childnode at the specified position
*/
public TreeNode getChildAt(int pos)
@@ -1143,7 +1143,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
public boolean isLeaf()
{
return childValue == null || !(childValue instanceof Hashtable
- || childValue instanceof Vector
+ || childValue instanceof Vector
|| childValue.getClass().isArray());
}
@@ -1180,7 +1180,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
}
/**
- * Listens to the model of the JTree and updates the property
+ * Listens to the model of the JTree and updates the property
* expandedState
if nodes are removed or changed.
*/
protected class TreeModelHandler implements TreeModelListener
@@ -1199,9 +1199,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
* that a node has changed its location or changed it's children. It
* only means that some attributes of the node have changed that might
* affect its presentation.
- *
+ *
* This method is called after the actual change occured.
- *
+ *
* @param ev the TreeModelEvent describing the change
*/
public void treeNodesChanged(TreeModelEvent ev)
@@ -1211,9 +1211,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies when a node is inserted into the tree.
- *
+ *
* This method is called after the actual change occured.
- *
+ *
* @param ev the TreeModelEvent describing the change
*/
public void treeNodesInserted(TreeModelEvent ev)
@@ -1223,11 +1223,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies when a node is removed from the tree.
- *
+ *
* This method is called after the actual change occured.
*
* @param ev the TreeModelEvent describing the change
- */
+ */
public void treeNodesRemoved(TreeModelEvent ev)
{
if (ev != null)
@@ -1260,9 +1260,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies when the structure of the tree is changed.
- *
+ *
* This method is called after the actual change occured.
- *
+ *
* @param ev the TreeModelEvent describing the change
*/
public void treeStructureChanged(TreeModelEvent ev)
@@ -1324,12 +1324,12 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies when the tree selection changes.
- *
+ *
* @param ev the TreeSelectionEvent that describes the change
*/
public void valueChanged(TreeSelectionEvent ev)
{
- TreeSelectionEvent rewritten =
+ TreeSelectionEvent rewritten =
(TreeSelectionEvent) ev.cloneWithSource(JTree.this);
fireValueChanged(rewritten);
}
@@ -1359,7 +1359,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns the shared instance of EmptySelectionModel.
- *
+ *
* @return the shared instance of EmptySelectionModel
*/
public static EmptySelectionModel sharedInstance()
@@ -1369,7 +1369,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* This catches attempts to set a selection and sets nothing instead.
- *
+ *
* @param paths not used here
*/
public void setSelectionPaths(TreePath[] paths)
@@ -1379,7 +1379,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* This catches attempts to add something to the selection.
- *
+ *
* @param paths not used here
*/
public void addSelectionPaths(TreePath[] paths)
@@ -1389,7 +1389,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* This catches attempts to remove something from the selection.
- *
+ *
* @param paths not used here
*/
public void removeSelectionPaths(TreePath[] paths)
@@ -1431,7 +1431,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
public static final String ANCHOR_SELECTION_PATH_PROPERTY =
"anchorSelectionPath";
- /** @since 1.3 */
+ /** @since 1.3 */
public static final String LEAD_SELECTION_PATH_PROPERTY = "leadSelectionPath";
/** @since 1.3 */
@@ -1531,7 +1531,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new JTree
object.
- *
+ *
* @param value the initial nodes in the tree
*/
public JTree(Hashtable, ?> value)
@@ -1541,7 +1541,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new JTree
object.
- *
+ *
* @param value the initial nodes in the tree
*/
public JTree(Object[] value)
@@ -1551,14 +1551,14 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new JTree
object.
- *
+ *
* @param model the model to use
*/
public JTree(TreeModel model)
{
setRootVisible(true);
setSelectionModel( new DefaultTreeSelectionModel() );
-
+
// The root node appears expanded by default.
nodeStates = new Hashtable();
@@ -1575,7 +1575,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new JTree
object.
- *
+ *
* @param root the root node
*/
public JTree(TreeNode root)
@@ -1585,7 +1585,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new JTree
object.
- *
+ *
* @param root the root node
* @param asksAllowChildren if false, all nodes without children are leaf
* nodes. If true, only nodes that do not allow children are leaf
@@ -1598,7 +1598,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new JTree
object.
- *
+ *
* @param value the initial nodes in the tree
*/
public JTree(Vector> value)
@@ -1621,13 +1621,13 @@ public class JTree extends JComponent implements Scrollable, Accessible
TreeUI ui = getUI();
return ui != null ? ui.getPathForRow(this, row) : null;
}
-
+
/**
* Get the pathes that are displayes between the two given rows.
- *
+ *
* @param index0 the starting row, inclusive
* @param index1 the ending row, inclusive
- *
+ *
* @return the array of the tree pathes
*/
protected TreePath[] getPathBetweenRows(int index0, int index1)
@@ -1649,7 +1649,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates a new TreeModel
object.
- *
+ *
* @param value the values stored in the model
*/
protected static TreeModel createTreeModel(Object value)
@@ -1659,7 +1659,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Return the UI associated with this JTree
object.
- *
+ *
* @return the associated TreeUI
object
*/
public TreeUI getUI()
@@ -1669,7 +1669,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Sets the UI associated with this JTree
object.
- *
+ *
* @param ui the TreeUI
to associate
*/
public void setUI(TreeUI ui)
@@ -1687,7 +1687,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* This method returns the String ID of the UI class of Separator.
- *
+ *
* @return The UI class' String ID.
*/
public String getUIClassID()
@@ -1698,7 +1698,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Gets the AccessibleContext associated with this
* JTree
.
- *
+ *
* @return the associated context
*/
public AccessibleContext getAccessibleContext()
@@ -1708,19 +1708,19 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns the preferred viewport size.
- *
+ *
* @return the preferred size
*/
public Dimension getPreferredScrollableViewportSize()
{
return getPreferredSize();
}
-
+
/**
* Return the preferred scrolling amount (in pixels) for the given scrolling
* direction and orientation. This method handles a partially exposed row by
* returning the distance required to completely expose the item.
- *
+ *
* @param visibleRect the currently visible part of the component.
* @param orientation the scrolling orientation
* @param direction the scrolling direction (negative - up, positive -down).
@@ -1796,7 +1796,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Adds a TreeExpansionListener
object to the tree.
- *
+ *
* @param listener the listener to add
*/
public void addTreeExpansionListener(TreeExpansionListener listener)
@@ -1806,7 +1806,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Removes a TreeExpansionListener
object from the tree.
- *
+ *
* @param listener the listener to remove
*/
public void removeTreeExpansionListener(TreeExpansionListener listener)
@@ -1816,7 +1816,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns all added TreeExpansionListener
objects.
- *
+ *
* @return an array of listeners
*/
public TreeExpansionListener[] getTreeExpansionListeners()
@@ -1826,7 +1826,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies all listeners that the tree was collapsed.
- *
+ *
* @param path the path to the node that was collapsed
*/
public void fireTreeCollapsed(TreePath path)
@@ -1840,7 +1840,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies all listeners that the tree was expanded.
- *
+ *
* @param path the path to the node that was expanded
*/
public void fireTreeExpanded(TreePath path)
@@ -1854,7 +1854,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Adds a TreeSelctionListener
object to the tree.
- *
+ *
* @param listener the listener to add
*/
public void addTreeSelectionListener(TreeSelectionListener listener)
@@ -1864,7 +1864,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Removes a TreeSelectionListener
object from the tree.
- *
+ *
* @param listener the listener to remove
*/
public void removeTreeSelectionListener(TreeSelectionListener listener)
@@ -1874,18 +1874,18 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns all added TreeSelectionListener
objects.
- *
+ *
* @return an array of listeners
*/
public TreeSelectionListener[] getTreeSelectionListeners()
{
- return (TreeSelectionListener[])
+ return (TreeSelectionListener[])
getListeners(TreeSelectionListener.class);
}
/**
* Notifies all listeners when the selection of the tree changed.
- *
+ *
* @param event the event to send
*/
protected void fireValueChanged(TreeSelectionEvent event)
@@ -1898,7 +1898,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Adds a TreeWillExpandListener
object to the tree.
- *
+ *
* @param listener the listener to add
*/
public void addTreeWillExpandListener(TreeWillExpandListener listener)
@@ -1908,7 +1908,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Removes a TreeWillExpandListener
object from the tree.
- *
+ *
* @param listener the listener to remove
*/
public void removeTreeWillExpandListener(TreeWillExpandListener listener)
@@ -1918,18 +1918,18 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns all added TreeWillExpandListener
objects.
- *
+ *
* @return an array of listeners
*/
public TreeWillExpandListener[] getTreeWillExpandListeners()
{
- return (TreeWillExpandListener[])
+ return (TreeWillExpandListener[])
getListeners(TreeWillExpandListener.class);
}
/**
* Notifies all listeners that the tree will collapse.
- *
+ *
* @param path the path to the node that will collapse
*/
public void fireTreeWillCollapse(TreePath path) throws ExpandVetoException
@@ -1943,7 +1943,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Notifies all listeners that the tree will expand.
- *
+ *
* @param path the path to the node that will expand
*/
public void fireTreeWillExpand(TreePath path) throws ExpandVetoException
@@ -1957,7 +1957,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns the model of this JTree
object.
- *
+ *
* @return the associated TreeModel
*/
public TreeModel getModel()
@@ -1967,7 +1967,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Sets the model to use in JTree
.
- *
+ *
* @param model the TreeModel
to use
*/
public void setModel(TreeModel model)
@@ -2007,7 +2007,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Checks if this JTree
object is editable.
- *
+ *
* @return true
if this tree object is editable,
* false
otherwise
*/
@@ -2018,7 +2018,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Sets the editable
property.
- *
+ *
* @param flag true
to make this tree object editable,
* false
otherwise
*/
@@ -2034,7 +2034,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Checks if the root element is visible.
- *
+ *
* @return true
if the root element is visible,
* false
otherwise
*/
@@ -2056,11 +2056,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
TreePath rootPath = getPathForRow(0);
model.removeSelectionPath(rootPath);
}
-
+
boolean oldValue = rootVisible;
rootVisible = flag;
firePropertyChange(ROOT_VISIBLE_PROPERTY, oldValue, flag);
-
+
}
public boolean getShowsRootHandles()
@@ -2074,7 +2074,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
if (showsRootHandles == flag)
return;
-
+
boolean oldValue = showsRootHandles;
showsRootHandles = flag;
firePropertyChange(SHOWS_ROOT_HANDLES_PROPERTY, oldValue, flag);
@@ -2200,7 +2200,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
boolean oldValue = invokesStopCellEditing;
invokesStopCellEditing = invoke;
- firePropertyChange(INVOKES_STOP_CELL_EDITING_PROPERTY,
+ firePropertyChange(INVOKES_STOP_CELL_EDITING_PROPERTY,
oldValue, invoke);
}
@@ -2265,11 +2265,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
clearSelectionPathStates();
selectionModel.setSelectionPaths(paths);
}
-
+
/**
* This method, and all calls to it, should be removed once the
* DefaultTreeModel fires events properly. Maintenance of the nodeStates
- * table should really be done in the TreeModelHandler.
+ * table should really be done in the TreeModelHandler.
*/
private void clearSelectionPathStates()
{
@@ -2340,12 +2340,12 @@ public class JTree extends JComponent implements Scrollable, Accessible
addSelectionPaths(paths);
}
-
+
/**
* Select all rows between the two given indexes, inclusive. The method
* will not select the inner leaves and braches of the currently collapsed
* nodes in this interval.
- *
+ *
* @param index0 the starting row, inclusive
* @param index1 the ending row, inclusive
*/
@@ -2422,17 +2422,17 @@ public class JTree extends JComponent implements Scrollable, Accessible
TreePath oldValue = selectionModel.getLeadSelectionPath();
if (path == oldValue || path != null && path.equals(oldValue))
return;
-
+
// Repaint the previous and current rows with the lead selection path.
if (path != null)
{
repaint(getPathBounds(path));
selectionModel.addSelectionPath(path);
}
-
+
if (oldValue != null)
repaint(getPathBounds(oldValue));
-
+
firePropertyChange(LEAD_SELECTION_PATH_PROPERTY, oldValue, path);
}
}
@@ -2520,9 +2520,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Return the value of the dragEnabled
property.
- *
+ *
* @return the value
- *
+ *
* @since 1.4
*/
public boolean getDragEnabled()
@@ -2532,9 +2532,9 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Set the dragEnabled
property.
- *
+ *
* @param enabled new value
- *
+ *
* @since 1.4
*/
public void setDragEnabled(boolean enabled)
@@ -2722,7 +2722,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
public void cancelEditing()
{
TreeUI ui = getUI();
-
+
if (isEditing())
if (ui != null)
ui.cancelEditing(this);
@@ -2803,11 +2803,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
private void doExpandParents(TreePath path, boolean state)
{
- TreePath parent = path.getParentPath();
+ TreePath parent = path.getParentPath();
if (!isExpanded(parent) && parent != null)
doExpandParents(parent, false);
-
+
nodeStates.put(path, state ? EXPANDED : COLLAPSED);
}
@@ -2868,7 +2868,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
if (path == null)
return;
-
+
expandPath(path.getParentPath());
}
@@ -2879,7 +2879,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Creates and returns an instance of {@link TreeModelHandler}.
- *
+ *
* @return an instance of {@link TreeModelHandler}
*/
protected TreeModelListener createTreeModelListener()
@@ -2890,7 +2890,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Returns a sample TreeModel that can be used in a JTree. This can be used
* in Bean- or GUI-Builders to show something interesting.
- *
+ *
* @return a sample TreeModel that can be used in a JTree
*/
protected static TreeModel getDefaultTreeModel()
@@ -2930,11 +2930,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Converts the specified value to a String. This is used by the renderers
* of this JTree and its nodes.
- *
+ *
* This implementation simply returns value.toString()
and
* ignores all other parameters. Subclass this method to control the
* conversion.
- *
+ *
* @param value the value that is converted to a String
* @param selected indicates if that value is selected or not
* @param expanded indicates if that value is expanded or not
@@ -2952,7 +2952,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
* A String representation of this JTree. This is intended to be used for
* debugging. The returned string may be empty but may not be
* null
.
- *
+ *
* @return a String representation of this JTree
*/
protected String paramString()
@@ -2968,7 +2968,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
* and are exapanded at the moment of the execution of this method. If the
* state of any node is beeing toggled while this method is executing this
* change may be left unaccounted.
- *
+ *
* @param path The parent of this request
*
* @return An Enumeration containing TreePath objects
@@ -2993,18 +2993,18 @@ public class JTree extends JComponent implements Scrollable, Accessible
* Returns the next table element (beginning from the row
* startingRow
that starts with prefix
.
* Searching is done in the direction specified by bias
.
- *
+ *
* @param prefix the prefix to search for in the cell values
* @param startingRow the index of the row where to start searching from
* @param bias the search direction, either {@link Position.Bias#Forward} or
* {@link Position.Bias#Backward}
- *
+ *
* @return the path to the found element or -1 if no such element has been
* found
- *
+ *
* @throws IllegalArgumentException if prefix is null
or
* startingRow is not valid
- *
+ *
* @since 1.4
*/
public TreePath getNextMatch(String prefix, int startingRow,
@@ -3067,14 +3067,14 @@ public class JTree extends JComponent implements Scrollable, Accessible
* descendants of path
. If includePath
is set
* to true
and path
itself is selected, then
* it will be removed too.
- *
+ *
* @param path the path from which selected descendants are to be removed
* @param includeSelected if true
then path
itself
* will also be remove if it's selected
- *
+ *
* @return true
if something has been removed,
* false
otherwise
- *
+ *
* @since 1.3
*/
protected boolean removeDescendantSelectedPaths(TreePath path,
@@ -3093,11 +3093,11 @@ public class JTree extends JComponent implements Scrollable, Accessible
}
return removedSomething;
}
-
+
/**
- * Removes any descendants of the TreePaths in toRemove that have been
+ * Removes any descendants of the TreePaths in toRemove that have been
* expanded.
- *
+ *
* @param toRemove - Enumeration of TreePaths that need to be removed from
* cache of toggled tree paths.
*/
@@ -3107,7 +3107,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
{
TreePath current = toRemove.nextElement();
Enumeration descendants = getDescendantToggledPaths(current);
-
+
while (descendants.hasMoreElements())
{
TreePath currentDes = (TreePath) descendants.nextElement();
@@ -3130,7 +3130,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
* {@link DefaultTreeModel#reload()} after adding or removing nodes. Following
* the official Java 1.5 API standard, just calling treeDidChange, repaint()
* or revalidate() does not update the tree appearance properly.
- *
+ *
* @see DefaultTreeModel#reload()
*/
public void treeDidChange()
@@ -3141,7 +3141,7 @@ public class JTree extends JComponent implements Scrollable, Accessible
/**
* Helper method for
* {@link LookAndFeel#installProperty(JComponent, String, Object)}.
- *
+ *
* @param propertyName the name of the property
* @param value the value of the property
*
diff --git a/libjava/classpath/javax/swing/JViewport.java b/libjava/classpath/javax/swing/JViewport.java
index 0239480..729fac6 100644
--- a/libjava/classpath/javax/swing/JViewport.java
+++ b/libjava/classpath/javax/swing/JViewport.java
@@ -1,4 +1,4 @@
-/* JViewport.java --
+/* JViewport.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -62,7 +62,7 @@ import javax.swing.event.ChangeListener;
import javax.swing.plaf.ViewportUI;
/**
- *
+ *
*
* _
* +-------------------------------+ ...........Y1 \
@@ -89,7 +89,7 @@ import javax.swing.plaf.ViewportUI;
* \/
* VX = X2-X1
*
- *
+ *
* A viewport is, like all swing components, located at some position in
* the swing component tree; that location is exactly the same as any other
* components: the viewport's "bounds".
@@ -226,7 +226,7 @@ public class JViewport extends JComponent implements Accessible
/**
* Stores the bounds of the area that needs to be repainted. This is a cached
- * Rectangle object used in blitting calculations.
+ * Rectangle object used in blitting calculations.
*/
Rectangle cachedBlitPaint;
@@ -308,14 +308,14 @@ public class JViewport extends JComponent implements Accessible
*/
public Dimension getViewSize()
{
- Dimension size;
+ Dimension size;
Component view = getView();
if (view != null)
{
if (isViewSizeSet)
size = view.getSize();
else
- size = view.getPreferredSize();
+ size = view.getPreferredSize();
}
else
size = new Dimension(0, 0);
@@ -409,7 +409,7 @@ public class JViewport extends JComponent implements Accessible
{
if (getComponentCount() == 0)
return null;
-
+
return getComponents()[0];
}
@@ -458,7 +458,7 @@ public class JViewport extends JComponent implements Accessible
insets.right = 0;
return insets;
}
-
+
/**
* Overridden to return false
, so the JViewport's paint method
@@ -482,7 +482,7 @@ public class JViewport extends JComponent implements Accessible
Rectangle viewBounds = view.getBounds();
Rectangle portBounds = getBounds();
- if (viewBounds.width == 0
+ if (viewBounds.width == 0
|| viewBounds.height == 0
|| portBounds.width == 0
|| portBounds.height == 0)
@@ -515,7 +515,7 @@ public class JViewport extends JComponent implements Accessible
listenerList.remove(ChangeListener.class, listener);
}
- public ChangeListener[] getChangeListeners()
+ public ChangeListener[] getChangeListeners()
{
return (ChangeListener[]) getListeners(ChangeListener.class);
}
@@ -536,7 +536,7 @@ public class JViewport extends JComponent implements Accessible
public void updateUI()
{
setUI((ViewportUI) UIManager.getUI(this));
- }
+ }
/**
* This method returns the viewport's UI delegate.
@@ -573,7 +573,7 @@ public class JViewport extends JComponent implements Accessible
{
Component view = getView();
if (view == null)
- return;
+ return;
Point pos = getViewPosition();
// We get the contentRect in the viewport coordinates. But we want to
@@ -582,7 +582,7 @@ public class JViewport extends JComponent implements Accessible
int contentY = contentRect.y + pos.y;
Rectangle viewBounds = getView().getBounds();
Rectangle portBounds = getBounds();
-
+
if (isShowing())
getView().validate();
@@ -641,7 +641,7 @@ public class JViewport extends JComponent implements Accessible
{
if (getComponentCount() > 0)
remove(getComponents()[0]);
-
+
super.addImpl(comp, constraints, index);
}
@@ -796,7 +796,7 @@ public class JViewport extends JComponent implements Accessible
g.translate(-pos.x, -pos.y);
translated = true;
view.paint(g);
- }
+ }
finally
{
if (translated)
@@ -861,7 +861,7 @@ public class JViewport extends JComponent implements Accessible
// clip must be updated in the buffer.
if (dx == 0 && dy == 0)
g2.setClip(g.getClip());
-
+
paintSimple(g2);
}
g2.dispose();
diff --git a/libjava/classpath/javax/swing/JWindow.java b/libjava/classpath/javax/swing/JWindow.java
index b36b8cf..91e0b50 100644
--- a/libjava/classpath/javax/swing/JWindow.java
+++ b/libjava/classpath/javax/swing/JWindow.java
@@ -77,7 +77,7 @@ public class JWindow extends Window implements Accessible, RootPaneContainer
}
private static final long serialVersionUID = 5420698392125238833L;
-
+
protected JRootPane rootPane;
/**
diff --git a/libjava/classpath/javax/swing/KeyStroke.java b/libjava/classpath/javax/swing/KeyStroke.java
index b57a711..94bc334 100644
--- a/libjava/classpath/javax/swing/KeyStroke.java
+++ b/libjava/classpath/javax/swing/KeyStroke.java
@@ -42,18 +42,18 @@ import java.awt.AWTKeyStroke;
import java.awt.event.KeyEvent;
import java.io.Serializable;
-public class KeyStroke
+public class KeyStroke
extends AWTKeyStroke
implements Serializable
{
private static final long serialVersionUID = -9060180771037902530L;
-
+
// Called by java.awt.AWTKeyStroke.registerSubclass via reflection.
private KeyStroke()
{
// Nothing to do here.
}
-
+
private KeyStroke(char keyChar, int keyCode, int modifiers,
boolean onKeyRelease)
{
@@ -65,34 +65,34 @@ public class KeyStroke
AWTKeyStroke.registerSubclass(KeyStroke.class);
}
- public static KeyStroke getKeyStroke(char keyChar)
+ public static KeyStroke getKeyStroke(char keyChar)
{
return (KeyStroke) getAWTKeyStroke(keyChar);
}
- /**
+ /**
* @deprecated Use {@link #getKeyStroke(char)}
*
* This method, unlike all the other factory methods on this object,
* returns a non-cached, non-shared object. New code should not use it.
*/
- public static KeyStroke getKeyStroke(char keyChar, boolean onKeyRelease)
+ public static KeyStroke getKeyStroke(char keyChar, boolean onKeyRelease)
{
return new KeyStroke(keyChar, KeyEvent.VK_UNDEFINED, 0, onKeyRelease);
}
- public static KeyStroke getKeyStroke(Character keyChar, int modifiers)
+ public static KeyStroke getKeyStroke(Character keyChar, int modifiers)
{
return (KeyStroke) getAWTKeyStroke(keyChar, modifiers);
}
- public static KeyStroke getKeyStroke(int keyCode, int modifiers,
- boolean onKeyRelease)
+ public static KeyStroke getKeyStroke(int keyCode, int modifiers,
+ boolean onKeyRelease)
{
return (KeyStroke) getAWTKeyStroke(keyCode, modifiers, onKeyRelease);
}
- public static KeyStroke getKeyStroke(int keyCode, int modifiers)
+ public static KeyStroke getKeyStroke(int keyCode, int modifiers)
{
return (KeyStroke) getAWTKeyStroke(keyCode, modifiers);
}
@@ -103,19 +103,19 @@ public class KeyStroke
* IllegalArugmentException
when
* the keystoke sequence cannot be parsed from the given string.
*/
- public static KeyStroke getKeyStroke(String str)
+ public static KeyStroke getKeyStroke(String str)
{
try
{
- return (KeyStroke) getAWTKeyStroke(str);
+ return (KeyStroke) getAWTKeyStroke(str);
}
catch (IllegalArgumentException iae)
{
- return null;
+ return null;
}
}
- public static KeyStroke getKeyStrokeForEvent(KeyEvent event)
+ public static KeyStroke getKeyStrokeForEvent(KeyEvent event)
{
return (KeyStroke) getAWTKeyStrokeForEvent(event);
}
diff --git a/libjava/classpath/javax/swing/KeyboardManager.java b/libjava/classpath/javax/swing/KeyboardManager.java
index f7ac949..5c1c09e 100644
--- a/libjava/classpath/javax/swing/KeyboardManager.java
+++ b/libjava/classpath/javax/swing/KeyboardManager.java
@@ -1,4 +1,4 @@
-/* KeyboardManager.java --
+/* KeyboardManager.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,11 +49,11 @@ import java.util.Vector;
import java.util.WeakHashMap;
/**
- * This class maintains a mapping from top-level containers to a
- * Hashtable. The Hashtable maps KeyStrokes to Components to be used when
+ * This class maintains a mapping from top-level containers to a
+ * Hashtable. The Hashtable maps KeyStrokes to Components to be used when
* Components register keyboard actions with the condition
* JComponent.WHEN_IN_FOCUSED_WINDOW.
- *
+ *
* @author Anthony Balkissoon abalkiss at redhat dot com
*
*/
@@ -61,13 +61,13 @@ class KeyboardManager
{
/** Shared instance of KeyboardManager **/
static KeyboardManager manager = new KeyboardManager();
-
- /**
- * A mapping between top level containers and Hashtables that
+
+ /**
+ * A mapping between top level containers and Hashtables that
* map KeyStrokes to Components.
*/
- WeakHashMap topLevelLookup = new WeakHashMap();
-
+ WeakHashMap topLevelLookup = new WeakHashMap();
+
/**
* A mapping between top level containers and Vectors of JMenuBars
* used to allow all the JMenuBars within a top level container
@@ -91,22 +91,22 @@ class KeyboardManager
{
Container topLevel = (c instanceof Container) ? (Container) c
: c.getParent();
- while (topLevel != null &&
- !(topLevel instanceof Window) &&
- !(topLevel instanceof Applet) &&
+ while (topLevel != null &&
+ !(topLevel instanceof Window) &&
+ !(topLevel instanceof Applet) &&
!(topLevel instanceof JInternalFrame))
topLevel = topLevel.getParent();
return topLevel;
}
-
+
/**
- * Returns the Hashtable that maps KeyStrokes to Components, for
+ * Returns the Hashtable that maps KeyStrokes to Components, for
* the specified top-level container c. If no Hashtable exists
* we create and register it here and return the newly created
* Hashtable.
- *
+ *
* @param c the top-level container whose Hashtable we want
- * @return the Hashtable mapping KeyStrokes to Components for the
+ * @return the Hashtable mapping KeyStrokes to Components for the
* specified top-level container
*/
Hashtable getHashtableForTopLevel (Container c)
@@ -119,13 +119,13 @@ class KeyboardManager
}
return keyToComponent;
}
-
+
/**
* Registers a KeyStroke with a Component. This does not register
- * the KeyStroke to a specific Action. When searching for a
+ * the KeyStroke to a specific Action. When searching for a
* WHEN_IN_FOCUSED_WINDOW binding we will first go up to the focused
- * top-level Container, then get the Hashtable that maps KeyStrokes
- * to components for that particular top-level Container, then
+ * top-level Container, then get the Hashtable that maps KeyStrokes
+ * to components for that particular top-level Container, then
* call processKeyBindings on that component with the condition
* JComponent.WHEN_IN_FOCUSED_WINDOW.
* @param comp the JComponent associated with the KeyStroke
@@ -135,7 +135,7 @@ class KeyboardManager
{
// This method associates a KeyStroke with a particular JComponent
// When the KeyStroke occurs, if this component's top-level ancestor
- // has focus (one of its children is the focused Component) then
+ // has focus (one of its children is the focused Component) then
// comp.processKeyBindings will be called with condition
// JComponent.WHEN_IN_FOCUSED_WINDOW.
@@ -143,16 +143,16 @@ class KeyboardManager
Container topLevel = findTopLevel(comp);
if (topLevel == null)
return;
-
+
// Now get the Hashtable for this top-level container
- Hashtable keyToComponent = getHashtableForTopLevel(topLevel);
-
+ Hashtable keyToComponent = getHashtableForTopLevel(topLevel);
+
// And add the new binding to this Hashtable
// FIXME: should allow more than one JComponent to be associated
// with a KeyStroke, in case one of them is disabled
keyToComponent.put(key, comp);
}
-
+
public void clearBindingsForComp(JComponent comp)
{
// This method clears all the WHEN_IN_FOCUSED_WINDOW bindings associated
@@ -162,9 +162,9 @@ class KeyboardManager
// bindings from the updated ComponentInputMap. This is only a preliminary
// strategy and should be improved upon once the WHEN_IN_FOCUSED_WINDOW
// bindings work.
-
+
// Find the top-level ancestor
-
+
Container topLevel = findTopLevel(comp);
if (topLevel == null)
return;
@@ -179,22 +179,22 @@ class KeyboardManager
{
temp = keys.nextElement();
if (comp == (JComponent)keyToComponent.get(temp))
- keyToComponent.remove(temp);
+ keyToComponent.remove(temp);
}
}
-
+
/**
* This method registers all the bindings in the given ComponentInputMap.
* Rather than call registerBinding on all the keys, we do the work here
- * so that we don't duplicate finding the top-level container and
+ * so that we don't duplicate finding the top-level container and
* getting its Hashtable.
- *
+ *
* @param map the ComponentInputMap whose bindings we want to register
*/
public void registerEntireMap (ComponentInputMap map)
{
if (map == null)
- return;
+ return;
JComponent comp = map.getComponent();
KeyStroke[] keys = map.allKeys();
if (keys == null)
@@ -203,13 +203,13 @@ class KeyboardManager
Container topLevel = findTopLevel(comp);
if (topLevel == null)
return;
-
+
// Register the KeyStrokes in the top-level container's Hashtable
Hashtable keyToComponent = getHashtableForTopLevel(topLevel);
for (int i = 0; i < keys.length; i++)
keyToComponent.put(keys[i], comp);
}
-
+
public boolean processKeyStroke (Component comp, KeyStroke key, KeyEvent e)
{
boolean pressed = e.getID() == KeyEvent.KEY_PRESSED;
@@ -217,15 +217,15 @@ class KeyboardManager
// Look for the top-level ancestor
Container topLevel = findTopLevel(comp);
if (topLevel == null)
- return false;
+ return false;
// Now get the Hashtable for that top-level container
Hashtable keyToComponent = getHashtableForTopLevel(topLevel);
Enumeration keys = keyToComponent.keys();
- JComponent target = (JComponent)keyToComponent.get(key);
+ JComponent target = (JComponent)keyToComponent.get(key);
if (target != null && target.processKeyBinding
(key, e, JComponent.WHEN_IN_FOCUSED_WINDOW, pressed))
return true;
-
+
// Have to give all the JMenuBars a chance to consume the event
Vector menuBars = getVectorForTopLevel(topLevel);
for (int i = 0; i < menuBars.size(); i++)
@@ -233,7 +233,7 @@ class KeyboardManager
return true;
return false;
}
-
+
/**
* Returns the Vector of JMenuBars associated with the top-level
* @param c the top-level container whose JMenuBar Vector we want
@@ -249,11 +249,11 @@ class KeyboardManager
}
return result;
}
-
+
/**
- * In processKeyStroke, KeyManager must give all JMenuBars in the
- * focused top-level container a chance to process the event. So,
- * JMenuBars must be registered in KeyManager and associated with a
+ * In processKeyStroke, KeyManager must give all JMenuBars in the
+ * focused top-level container a chance to process the event. So,
+ * JMenuBars must be registered in KeyManager and associated with a
* top-level container. That's what this method is for.
* @param menuBar the JMenuBar to register
*/
@@ -264,9 +264,9 @@ class KeyboardManager
if (!menuBars.contains(menuBar))
menuBars.add(menuBar);
}
-
+
/**
- * Unregisters a JMenuBar from its top-level container. This is
+ * Unregisters a JMenuBar from its top-level container. This is
* called before the JMenuBar is actually removed from the container
* so findTopLevel will still find us the correct top-level container.
* @param menuBar the JMenuBar to unregister.
diff --git a/libjava/classpath/javax/swing/LayoutFocusTraversalPolicy.java b/libjava/classpath/javax/swing/LayoutFocusTraversalPolicy.java
index 2d13515..335bc26 100644
--- a/libjava/classpath/javax/swing/LayoutFocusTraversalPolicy.java
+++ b/libjava/classpath/javax/swing/LayoutFocusTraversalPolicy.java
@@ -45,10 +45,10 @@ import java.util.Comparator;
/**
* @author Graydon Hoare
* @author Michael Koch
- *
+ *
* @since 1.4
*/
-public class LayoutFocusTraversalPolicy
+public class LayoutFocusTraversalPolicy
extends SortingFocusTraversalPolicy
implements Serializable
{
@@ -59,7 +59,7 @@ public class LayoutFocusTraversalPolicy
{
// Do nothing here.
}
-
+
public int compare(Object o1, Object o2)
{
Component comp1 = (Component) o1;
@@ -69,19 +69,19 @@ public class LayoutFocusTraversalPolicy
int y1 = comp1.getY();
int x2 = comp2.getX();
int y2 = comp2.getY();
-
+
if (x1 == x2 && y1 == y2)
- return 0;
-
+ return 0;
+
if ((y1 < y2) || ((y1 == y2) && (x1 < x2)))
- return -1;
+ return -1;
return 1;
}
}
private static final long serialVersionUID = 4312146927238881442L;
-
+
public LayoutFocusTraversalPolicy()
{
super(new LayoutComparator());
diff --git a/libjava/classpath/javax/swing/ListCellRenderer.java b/libjava/classpath/javax/swing/ListCellRenderer.java
index e234d18..0e56d50 100644
--- a/libjava/classpath/javax/swing/ListCellRenderer.java
+++ b/libjava/classpath/javax/swing/ListCellRenderer.java
@@ -1,4 +1,4 @@
-/* ListCellRenderer.java --
+/* ListCellRenderer.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/swing/ListSelectionModel.java b/libjava/classpath/javax/swing/ListSelectionModel.java
index 499362d..1cd67e9 100644
--- a/libjava/classpath/javax/swing/ListSelectionModel.java
+++ b/libjava/classpath/javax/swing/ListSelectionModel.java
@@ -1,4 +1,4 @@
-/* ListSelectionModel.java --
+/* ListSelectionModel.java --
Copyright (C) 2002, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,19 +42,19 @@ import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
/**
- * A model that tracks the selection status of a list of items. Each item in
+ * A model that tracks the selection status of a list of items. Each item in
* the list is identified by a zero-based index only, so the model can be used
- * to track the selection status of any type of list. The model
+ * to track the selection status of any type of list. The model
* supports three modes:
*
- * SINGLE_SELECTION
- only one item in the list may be
+ * SINGLE_SELECTION
- only one item in the list may be
* selected;
- * SINGLE_INTERVAL_SELECTION
- only one interval in the list
+ * SINGLE_INTERVAL_SELECTION
- only one interval in the list
* may be selected;
- * MULTIPLE_INTERVAL_SELECTION
- any combination of items in
+ * MULTIPLE_INTERVAL_SELECTION
- any combination of items in
* the list may be selected.
*
- * The model uses an event notification mechanism to notify listeners (see
+ * The model uses an event notification mechanism to notify listeners (see
* {@link ListSelectionListener}) about updates to the selection model.
*
* This model is used to track row selections in the {@link JList} component,
@@ -62,10 +62,10 @@ import javax.swing.event.ListSelectionListener;
*/
public interface ListSelectionModel
{
-
+
/**
* A selection mode in which only one item can be selected.
- *
+ *
* @see #setSelectionMode(int)
*/
int SINGLE_SELECTION = 0;
@@ -73,14 +73,14 @@ public interface ListSelectionModel
/**
* A selection mode in which a single interval can be selected (an interval
* is a range containing one or more contiguous items).
- *
+ *
* @see #setSelectionMode(int)
*/
int SINGLE_INTERVAL_SELECTION = 1;
/**
* A selection mode in which any combination of items can be selected.
- *
+ *
* @see #setSelectionMode(int)
*/
int MULTIPLE_INTERVAL_SELECTION = 2;
@@ -90,32 +90,32 @@ public interface ListSelectionModel
*
* FIXME: The spec is silent about what happens to existing selections, for
* example when changing from an interval selection to single selection.
- *
- * @param mode one of {@link #SINGLE_SELECTION},
- * {@link #SINGLE_INTERVAL_SELECTION} and
+ *
+ * @param mode one of {@link #SINGLE_SELECTION},
+ * {@link #SINGLE_INTERVAL_SELECTION} and
* {@link #MULTIPLE_INTERVAL_SELECTION}.
- *
+ *
* @see #getSelectionMode()
- *
+ *
* @throws IllegalArgumentException if mode
is not one of the
* specified values.
*/
void setSelectionMode(int mode);
/**
- * Returns the selection mode, which is one of {@link #SINGLE_SELECTION},
- * {@link #SINGLE_INTERVAL_SELECTION} and
+ * Returns the selection mode, which is one of {@link #SINGLE_SELECTION},
+ * {@link #SINGLE_INTERVAL_SELECTION} and
* {@link #MULTIPLE_INTERVAL_SELECTION}.
- *
+ *
* @return The selection mode.
- *
+ *
* @see #setSelectionMode(int)
*/
int getSelectionMode();
/**
- * Clears the current selection from the model. If the selection state
- * changes (that is, the existing selection is non-empty) a
+ * Clears the current selection from the model. If the selection state
+ * changes (that is, the existing selection is non-empty) a
* {@link ListSelectionEvent} should be sent to all registered listeners.
*
* FIXME: what happens to the anchor and lead selection indices (the spec
@@ -126,11 +126,11 @@ public interface ListSelectionModel
void clearSelection();
/**
- * Returns the lowest selected index, or -1
if there is no
+ * Returns the lowest selected index, or -1
if there is no
* selection.
- *
+ *
* @return The lowest selected index.
- *
+ *
* @see #getMaxSelectionIndex()
*/
int getMinSelectionIndex();
@@ -138,22 +138,22 @@ public interface ListSelectionModel
/**
* Returns the highest selected index, or -1
if there is no
* selection.
- *
+ *
* @return The highest selected index.
- *
+ *
* @see #getMinSelectionIndex()
*/
int getMaxSelectionIndex();
/**
- * Returns true
if the specified item is selected, and
- * false
otherwise. Special note: if index
is
- * negative, this method should return false
(no exception
+ * Returns true
if the specified item is selected, and
+ * false
otherwise. Special note: if index
is
+ * negative, this method should return false
(no exception
* should be thrown).
- *
+ *
* @param index the item index (zero-based).
- *
- * @return true
if the specified item is selected, and
+ *
+ * @return true
if the specified item is selected, and
* false
otherwise.
*/
boolean isSelectedIndex(int index);
@@ -161,56 +161,56 @@ public interface ListSelectionModel
/**
* Returns true
if there is no selection, and false
* otherwise.
- *
- * @return true
if there is no selection, and
+ *
+ * @return true
if there is no selection, and
* false
otherwise.
*/
boolean isSelectionEmpty();
/**
- * Sets the selection interval to the specified range (note that
- * anchor
can be less than, equal to, or greater than
- * lead
). If this results in the selection being changed,
+ * Sets the selection interval to the specified range (note that
+ * anchor
can be less than, equal to, or greater than
+ * lead
). If this results in the selection being changed,
* a {@link ListSelectionEvent} is sent to all registered listeners.
*
- * If the selection mode is {@link #SINGLE_SELECTION}, only the
+ * If the selection mode is {@link #SINGLE_SELECTION}, only the
* lead
item is selected.
- *
+ *
* @param anchor the anchor index.
* @param lead the lead index.
*/
void setSelectionInterval(int anchor, int lead);
/**
- * Marks the items in the specified interval as selected. The behaviour of
+ * Marks the items in the specified interval as selected. The behaviour of
* this method depends on the selection mode:
*
- * SINGLE_SELECTION
- only the lead
item is
+ * SINGLE_SELECTION
- only the lead
item is
* selected;
- * SINGLE_INTERVAL_SELECTION
- the existing selection
+ * SINGLE_INTERVAL_SELECTION
- the existing selection
* interval is replaced by the specified interval;
- * MULTIPLE_INTERVAL_SELECTION
- the specified interval is
+ * MULTIPLE_INTERVAL_SELECTION
- the specified interval is
* merged into the currently selected intervals.
*
- * Note that anchor
can be less than, equal to, or greater than
+ * Note that anchor
can be less than, equal to, or greater than
* lead
.
- *
+ *
* @param anchor the index of the anchor item
* @param lead the index of the lead item.
*/
void addSelectionInterval(int anchor, int lead);
/**
- * Marks the items in the specified interval as not selected. The behaviour
+ * Marks the items in the specified interval as not selected. The behaviour
* of this method depends on the selection mode:
*
* SINGLE_SELECTION
- XXX;
* SINGLE_INTERVAL_SELECTION
- XXX;
* MULTIPLE_INTERVAL_SELECTION
- XXX.
*
- * Note that anchor
can be less than, equal to, or greater than
+ * Note that anchor
can be less than, equal to, or greater than
* lead
.
- *
+ *
* @param anchor the index of the anchor item
* @param lead the index of the lead item.
*/
@@ -221,67 +221,67 @@ public interface ListSelectionModel
* specified index
(the before
flag indicates
* whether the range is inserted before or after the existing item at
* index
).
- *
+ *
* FIXME: What is the selection status of the new items? Bug 4870694.
* FIXME: What event is generated?
- *
- * @param index the index of the item.
+ *
+ * @param index the index of the item.
* @param length the number of items in the interval to be inserted.
- * @param before if true
, the interval should be inserted
+ * @param before if true
, the interval should be inserted
* before index
, otherwise it is inserted after.
- *
+ *
* @see #removeIndexInterval(int, int)
*/
void insertIndexInterval(int index, int length, boolean before);
/**
* Removes the items in the specified range (inclusive) from the selection
- * model. This method should be called when an interval is deleted from
+ * model. This method should be called when an interval is deleted from
* the underlying list.
- *
- * FIXME: what happens to the lead and anchor indices if they are part of
- * the range that is removed?
+ *
+ * FIXME: what happens to the lead and anchor indices if they are part of
+ * the range that is removed?
* FIXME: what event is generated
- *
+ *
* @param index0 XXX
* @param index1 XXX
- *
+ *
* @see #insertIndexInterval(int, int, boolean)
*/
void removeIndexInterval(int index0, int index1);
/**
- * Returns the index of the anchor item.
- *
+ * Returns the index of the anchor item.
+ *
* @return The index of the anchor item.
- *
+ *
* @see #setAnchorSelectionIndex(int)
*/
int getAnchorSelectionIndex();
/**
* Sets the index of the anchor item.
- *
+ *
* @param index the item index.
- *
+ *
* @see #getAnchorSelectionIndex()
*/
void setAnchorSelectionIndex(int index);
/**
* Returns the index of the lead item.
- *
+ *
* @return The index of the lead item.
- *
+ *
* @see #setLeadSelectionIndex(int)
*/
int getLeadSelectionIndex();
/**
* Sets the index of the lead item.
- *
+ *
* @param index the item index.
- *
+ *
* @see #getLeadSelectionIndex()
*/
void setLeadSelectionIndex(int index);
@@ -289,21 +289,21 @@ public interface ListSelectionModel
/**
* Sets the flag that is passed to listeners for each change notification.
* If a sequence of changes is made to the selection model, this flag should
- * be set to true
at the start of the sequence, and
+ * be set to true
at the start of the sequence, and
* false
for the last change - this gives listeners the option
* to ignore interim changes if that is more efficient.
- *
+ *
* @param valueIsAdjusting the flag value.
- *
+ *
* @see #getValueIsAdjusting()
*/
void setValueIsAdjusting(boolean valueIsAdjusting);
/**
* Returns a flag that is passed to registered listeners when changes are
- * made to the model. See the description for
+ * made to the model. See the description for
* {@link #setValueIsAdjusting(boolean)} for more information.
- *
+ *
* @return The flag.
*/
boolean getValueIsAdjusting();
@@ -311,9 +311,9 @@ public interface ListSelectionModel
/**
* Registers a listener with the model so that it receives notification
* of changes to the model.
- *
+ *
* @param listener the listener (null
ignored).
- *
+ *
* @see #removeListSelectionListener(ListSelectionListener)
*/
void addListSelectionListener(ListSelectionListener listener);
@@ -322,9 +322,9 @@ public interface ListSelectionModel
* Deregisters a listener so that it no longer receives notification of
* changes to the model. If the specified listener is not registered with
* the model, or is null
, this method does nothing.
- *
+ *
* @param listener the listener (null
ignored).
- *
+ *
* @see #addListSelectionListener(ListSelectionListener)
*/
void removeListSelectionListener(ListSelectionListener listener);
diff --git a/libjava/classpath/javax/swing/LookAndFeel.java b/libjava/classpath/javax/swing/LookAndFeel.java
index d995bc9..aec6ebb 100644
--- a/libjava/classpath/javax/swing/LookAndFeel.java
+++ b/libjava/classpath/javax/swing/LookAndFeel.java
@@ -53,18 +53,18 @@ import javax.swing.plaf.metal.MetalLookAndFeel;
import javax.swing.text.JTextComponent;
/**
- * A look-and-feel controls most aspects of the appearance and
- * operation of user interface components in javax.swing
. A
+ * A look-and-feel controls most aspects of the appearance and
+ * operation of user interface components in javax.swing
. A
* cross-platform look-and-feel (the {@link MetalLookAndFeel}) is provided.
- *
+ *
* @see UIManager#getInstalledLookAndFeels()
* @see UIManager#setLookAndFeel(LookAndFeel)
*/
public abstract class LookAndFeel
{
/**
- * Creates and returns a look-and-feel specific defaults table. This method
- * is called once by {@link UIManager#setLookAndFeel(LookAndFeel)} and
+ * Creates and returns a look-and-feel specific defaults table. This method
+ * is called once by {@link UIManager#setLookAndFeel(LookAndFeel)} and
* shouldn't be called again (as it creates a large table of defaults).
*
* @return The UI defaults.
@@ -76,47 +76,47 @@ public abstract class LookAndFeel
/**
* Returns a description of the look and feel.
- *
+ *
* @return A description of the look and feel.
*/
public abstract String getDescription();
/**
* Returns the value of Toolkit.getDefaultToolkit()
- * .getDesktopProperty(systemPropertyName)
, or
+ * .getDesktopProperty(systemPropertyName)
, or
* fallbackValue
if no such property is defined.
- *
+ *
* @param systemPropertyName the system property name.
* @param fallbackValue the fallback value.
- *
+ *
* @return The property value or fallbackValue
.
*/
- public static Object getDesktopPropertyValue(String systemPropertyName,
+ public static Object getDesktopPropertyValue(String systemPropertyName,
Object fallbackValue)
{
Object value = Toolkit.getDefaultToolkit().getDesktopProperty(
systemPropertyName);
return value != null ? value : fallbackValue;
}
-
+
/**
* Returns an identifier for the look and feel.
- *
+ *
* @return An identifier for the look and feel.
*/
public abstract String getID();
/**
* Returns the name for the look and feel.
- *
+ *
* @return The name for the look and feel.
*/
public abstract String getName();
/**
- * Returns true
when the look-and-feel supports window
+ * Returns true
when the look-and-feel supports window
* decorations, and false
otherwise. This default implementation
- * always returns false
and needs to be overridden when the
+ * always returns false
and needs to be overridden when the
* derived look-and-feel supports this.
*
* @return false
.
@@ -127,13 +127,13 @@ public abstract class LookAndFeel
{
return false;
}
-
+
/**
- * Initializes the look-and-feel. The
- * {@link UIManager#setLookAndFeel(LookAndFeel)} method calls this method
- * before the first call (and typically the only call) to
+ * Initializes the look-and-feel. The
+ * {@link UIManager#setLookAndFeel(LookAndFeel)} method calls this method
+ * before the first call (and typically the only call) to
* {@link #getDefaults()}. This default implementation does nothing, but
- * subclasses can override this behaviour.
+ * subclasses can override this behaviour.
*/
public void initialize()
{
@@ -142,12 +142,12 @@ public abstract class LookAndFeel
}
/**
- * Convenience method for installing a component's default {@link Border}
- * object on the specified component if either the border is currently
- * null
or already an instance of {@link UIResource}.
- *
+ * Convenience method for installing a component's default {@link Border}
+ * object on the specified component if either the border is currently
+ * null
or already an instance of {@link UIResource}.
+ *
* @param c the component (null
not permitted).
- * @param defaultBorderName the border name (for lookup in the UIDefaults
+ * @param defaultBorderName the border name (for lookup in the UIDefaults
* table).
*/
public static void installBorder(JComponent c, String defaultBorderName)
@@ -160,9 +160,9 @@ public abstract class LookAndFeel
/**
* Convenience method for initializing a component's foreground and
* background color properties with values from the current defaults table.
- *
+ *
* @param c the component (null
not permitted).
- * @param defaultBgName the key for the background color in the UIDefaults
+ * @param defaultBgName the key for the background color in the UIDefaults
* table.
* @param defaultFgName the key for the foreground color in the UIDefaults
* table.
@@ -184,9 +184,9 @@ public abstract class LookAndFeel
/**
* Convenience method for initializing a component's foreground, background
* and font properties with values from the current defaults table.
- *
+ *
* @param component the component (null
not permitted).
- * @param defaultBgName the key for the background color in the UIDefaults
+ * @param defaultBgName the key for the background color in the UIDefaults
* table.
* @param defaultFgName the key for the foreground color in the UIDefaults
* table.
@@ -206,23 +206,23 @@ public abstract class LookAndFeel
}
/**
- * Returns true
if the look-and-feel is the "native"
+ * Returns true
if the look-and-feel is the "native"
* look-and-feel for the current platform, and false
otherwise.
- * A native look-and-feel emulates the appearance and behaviour of the
+ * A native look-and-feel emulates the appearance and behaviour of the
* default windowing system on the host operating system.
- *
+ *
* @return A flag indicating whether or not this is the native look and feel
* for the current platform.
*/
public abstract boolean isNativeLookAndFeel();
/**
- * Returns true
if the look-and-feel is supported on the
- * current operating system, and false
otherwise. This
+ * Returns true
if the look-and-feel is supported on the
+ * current operating system, and false
otherwise. This
* mechanism is provided so that it is possible to prevent a look-and-feel
* from being used on some operating systems (usually for legal, not
* technical, reasons).
- *
+ *
* @return A flag indicating whether or not the look-and-feel is supported
* on the current platform.
*/
@@ -232,9 +232,9 @@ public abstract class LookAndFeel
* Loads the bindings in keys into retMap. Does not remove existing entries
* from retMap. keys
describes the InputMap, every even indexed
* item is either a KeyStroke or a String representing a KeyStroke and every
- * odd indexed item is the Object associated with that KeyStroke in an
+ * odd indexed item is the Object associated with that KeyStroke in an
* ActionMap.
- *
+ *
* @param retMap the InputMap into which we load bindings
* @param keys the Object array describing the InputMap as above
*/
@@ -255,19 +255,19 @@ public abstract class LookAndFeel
}
/**
- * Creates a ComponentInputMap from keys.
+ * Creates a ComponentInputMap from keys.
* keys
describes the InputMap, every even indexed
* item is either a KeyStroke or a String representing a KeyStroke and every
- * odd indexed item is the Object associated with that KeyStroke in an
+ * odd indexed item is the Object associated with that KeyStroke in an
* ActionMap.
- *
+ *
* @param c the JComponent associated with the ComponentInputMap
* @param keys the Object array describing the InputMap as above
- *
+ *
* @return A new input map.
*/
public static ComponentInputMap makeComponentInputMap(JComponent c,
- Object[] keys)
+ Object[] keys)
{
ComponentInputMap retMap = new ComponentInputMapUIResource(c);
loadKeyBindings(retMap, keys);
@@ -277,17 +277,17 @@ public abstract class LookAndFeel
/**
* Utility method that creates a UIDefaults.LazyValue that creates an
* ImageIcon UIResource for the specified gifFile filename.
- *
+ *
* @param baseClass the base class for accessing the icon resource.
* @param gifFile the file name.
- *
- * @return A {@link UIDefaults.LazyValue} that serves up an
+ *
+ * @return A {@link UIDefaults.LazyValue} that serves up an
* {@link IconUIResource}.
*/
public static Object makeIcon(Class> baseClass, String gifFile)
{
final URL file = baseClass.getResource(gifFile);
- return new UIDefaults.LazyValue()
+ return new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults table)
{
@@ -297,14 +297,14 @@ public abstract class LookAndFeel
}
/**
- * Creates a InputMap from keys.
+ * Creates a InputMap from keys.
* keys
describes the InputMap, every even indexed
* item is either a KeyStroke or a String representing a KeyStroke and every
- * odd indexed item is the Object associated with that KeyStroke in an
+ * odd indexed item is the Object associated with that KeyStroke in an
* ActionMap.
- *
+ *
* @param keys the Object array describing the InputMap as above
- *
+ *
* @return A new input map.
*/
public static InputMap makeInputMap(Object[] keys)
@@ -319,14 +319,14 @@ public abstract class LookAndFeel
* keyBindingList
is an array of KeyStroke-Action pairs where
* even indexed elements are KeyStrokes or Strings representing KeyStrokes
* and odd indexed elements are the associated Actions.
- *
+ *
* @param keyBindingList the array of KeyStroke-Action pairs
* @return a JTextComponent.KeyBinding array
*/
public static JTextComponent.KeyBinding[] makeKeyBindings(
Object[] keyBindingList)
{
- JTextComponent.KeyBinding[] retBindings =
+ JTextComponent.KeyBinding[] retBindings =
new JTextComponent.KeyBinding[keyBindingList.length / 2];
for (int i = 0; i < keyBindingList.length - 1; i += 2)
{
@@ -335,15 +335,15 @@ public abstract class LookAndFeel
stroke = (KeyStroke) keyBindingList[i];
else
stroke = KeyStroke.getKeyStroke((String) keyBindingList[i]);
- retBindings[i / 2] = new JTextComponent.KeyBinding(stroke,
+ retBindings[i / 2] = new JTextComponent.KeyBinding(stroke,
(String) keyBindingList[i + 1]);
}
return retBindings;
}
/**
- * Invoked when the user attempts an invalid operation. The default
- * implementation just beeps. Subclasses that wish to change this need to
+ * Invoked when the user attempts an invalid operation. The default
+ * implementation just beeps. Subclasses that wish to change this need to
* override this method.
*
* @param component the component the error occured in
@@ -365,7 +365,7 @@ public abstract class LookAndFeel
/**
* UIManager.setLookAndFeel calls this method just before we're replaced by
- * a new default look and feel.
+ * a new default look and feel.
*/
public void uninitialize()
{
@@ -376,7 +376,7 @@ public abstract class LookAndFeel
/**
* Convenience method for un-installing a component's default border on the
* specified component if the border is currently an instance of UIResource.
- *
+ *
* @param c the component (null
not permitted).
*/
public static void uninstallBorder(JComponent c)
diff --git a/libjava/classpath/javax/swing/MenuSelectionManager.java b/libjava/classpath/javax/swing/MenuSelectionManager.java
index beafbf4..0b65449 100644
--- a/libjava/classpath/javax/swing/MenuSelectionManager.java
+++ b/libjava/classpath/javax/swing/MenuSelectionManager.java
@@ -127,7 +127,7 @@ public class MenuSelectionManager
// clear selected path
selectedPath.clear();
- // notify all listeners that the selected path was changed
+ // notify all listeners that the selected path was changed
fireStateChanged();
}
@@ -146,37 +146,37 @@ public class MenuSelectionManager
{
// Convert sourcePoint to screen coordinates.
Point sourcePointOnScreen = sourcePoint;
-
+
if (source.isShowing())
SwingUtilities.convertPointToScreen(sourcePointOnScreen, source);
Point compPointOnScreen;
Component resultComp = null;
- // For each menu element on the selected path, express its location
- // in terms of screen coordinates and check if there is any
+ // For each menu element on the selected path, express its location
+ // in terms of screen coordinates and check if there is any
// menu element on the selected path that contains given source point.
for (int i = 0; i < selectedPath.size(); i++)
{
- Component comp = ((Component) selectedPath.get(i));
- Dimension size = comp.getSize();
-
- // convert location of this menu item to screen coordinates
- compPointOnScreen = comp.getLocationOnScreen();
-
- if (compPointOnScreen.x <= sourcePointOnScreen.x
- && sourcePointOnScreen.x < compPointOnScreen.x + size.width
- && compPointOnScreen.y <= sourcePointOnScreen.y
- && sourcePointOnScreen.y < compPointOnScreen.y + size.height)
- {
- Point p = sourcePointOnScreen;
-
+ Component comp = ((Component) selectedPath.get(i));
+ Dimension size = comp.getSize();
+
+ // convert location of this menu item to screen coordinates
+ compPointOnScreen = comp.getLocationOnScreen();
+
+ if (compPointOnScreen.x <= sourcePointOnScreen.x
+ && sourcePointOnScreen.x < compPointOnScreen.x + size.width
+ && compPointOnScreen.y <= sourcePointOnScreen.y
+ && sourcePointOnScreen.y < compPointOnScreen.y + size.height)
+ {
+ Point p = sourcePointOnScreen;
+
if (comp.isShowing())
SwingUtilities.convertPointFromScreen(p, comp);
-
- resultComp = SwingUtilities.getDeepestComponentAt(comp, p.x, p.y);
- break;
- }
+
+ resultComp = SwingUtilities.getDeepestComponentAt(comp, p.x, p.y);
+ break;
+ }
}
return resultComp;
}
@@ -232,7 +232,7 @@ public class MenuSelectionManager
subElements = first.getSubElements();
for (int j = 0; j < subElements.length; j++)
{
- MenuElement me = subElements[j];
+ MenuElement me = subElements[j];
if (me != null
&& (SwingUtilities.isDescendingFrom(c, me.getComponent())))
{
@@ -315,9 +315,9 @@ public class MenuSelectionManager
Component source = ((Component) event.getSource());
// In the case of drag event, event.getSource() returns component
- // where drag event originated. However menu element processing this
- // event should be the one over which mouse is currently located,
- // which is not necessary the source of the drag event.
+ // where drag event originated. However menu element processing this
+ // event should be the one over which mouse is currently located,
+ // which is not necessary the source of the drag event.
Component mouseOverMenuComp;
// find over which menu element the mouse is currently located
@@ -330,28 +330,28 @@ public class MenuSelectionManager
// Process this event only if mouse is located over some menu element
if (mouseOverMenuComp != null && (mouseOverMenuComp instanceof MenuElement))
{
- MenuElement[] path = getPath(mouseOverMenuComp);
- ((MenuElement) mouseOverMenuComp).processMouseEvent(event, path,
- manager);
-
- // FIXME: Java specification says that mouse events should be
- // forwarded to subcomponents. The code below does it, but
- // menu's work fine without it. This code is commented for now.
-
- /*
- MenuElement[] subComponents = ((MenuElement) mouseOverMenuComp)
- .getSubElements();
-
- for (int i = 0; i < subComponents.length; i++)
- {
- subComponents[i].processMouseEvent(event, path, manager);
- }
- */
+ MenuElement[] path = getPath(mouseOverMenuComp);
+ ((MenuElement) mouseOverMenuComp).processMouseEvent(event, path,
+ manager);
+
+ // FIXME: Java specification says that mouse events should be
+ // forwarded to subcomponents. The code below does it, but
+ // menu's work fine without it. This code is commented for now.
+
+ /*
+ MenuElement[] subComponents = ((MenuElement) mouseOverMenuComp)
+ .getSubElements();
+
+ for (int i = 0; i < subComponents.length; i++)
+ {
+ subComponents[i].processMouseEvent(event, path, manager);
+ }
+ */
}
else
{
- if (event.getID() == MouseEvent.MOUSE_RELEASED)
- clearSelectedPath();
+ if (event.getID() == MouseEvent.MOUSE_RELEASED)
+ clearSelectedPath();
}
}
@@ -364,8 +364,8 @@ public class MenuSelectionManager
{
if (path == null)
{
- clearSelectedPath();
- return;
+ clearSelectedPath();
+ return;
}
int minSize = path.length; // size of the smaller path.
@@ -412,25 +412,25 @@ public class MenuSelectionManager
private MenuElement[] getPath(Component c)
{
// FIXME: There is the same method in BasicMenuItemUI. However I
- // cannot use it here instead of this method, since I cannot assume that
+ // cannot use it here instead of this method, since I cannot assume that
// all the menu elements on the selected path are JMenuItem or JMenu.
- // For now I've just duplicated it here. Please
- // fix me or delete me if another better approach will be found, and
+ // For now I've just duplicated it here. Please
+ // fix me or delete me if another better approach will be found, and
// this method will not be necessary.
ArrayList path = new ArrayList();
- // if given component is JMenu, we also need to include
- // it's popup menu in the path
+ // if given component is JMenu, we also need to include
+ // it's popup menu in the path
if (c instanceof JMenu)
path.add(((JMenu) c).getPopupMenu());
while (c instanceof MenuElement)
{
- path.add(0, (MenuElement) c);
+ path.add(0, (MenuElement) c);
- if (c instanceof JPopupMenu)
- c = ((JPopupMenu) c).getInvoker();
- else
- c = c.getParent();
+ if (c instanceof JPopupMenu)
+ c = ((JPopupMenu) c).getInvoker();
+ else
+ c = c.getParent();
}
MenuElement[] pathArray = new MenuElement[path.size()];
diff --git a/libjava/classpath/javax/swing/OverlayLayout.java b/libjava/classpath/javax/swing/OverlayLayout.java
index a2cccb9..b037a09 100644
--- a/libjava/classpath/javax/swing/OverlayLayout.java
+++ b/libjava/classpath/javax/swing/OverlayLayout.java
@@ -62,7 +62,7 @@ import java.io.Serializable;
* point is in the middle, an X alignment of 1.0 means, the aligment point is
* at the right edge. So if you have three components, the first with 0.0, the
* second with 0.5 and the third with 1.0, then they are laid out like this:
- *
+ *
*
* +-------+
* | 1 |
@@ -300,7 +300,7 @@ public class OverlayLayout implements LayoutManager2, Serializable
* at the right edge. So if you have three components, the first with 0.0,
* the second with 0.5 and the third with 1.0, then they are laid out like
* this:
- *
+ *
*
* +-------+
* | 1 |
diff --git a/libjava/classpath/javax/swing/Popup.java b/libjava/classpath/javax/swing/Popup.java
index 5074d64..65be7cf 100644
--- a/libjava/classpath/javax/swing/Popup.java
+++ b/libjava/classpath/javax/swing/Popup.java
@@ -85,8 +85,8 @@ public class Popup
// The real stuff happens in the implementation of subclasses,
// for instance JWindowPopup.
}
-
-
+
+
/**
* Constructs a new Popup
.
*/
@@ -177,8 +177,8 @@ public class Popup
window.setSize(contents.getSize());
window.show();
}
-
-
+
+
/**
* Removes the popup's JWindow
from the
* screen. Nothing happens if it is currently not visible.
@@ -226,12 +226,12 @@ public class Popup
* The panel that holds the content.
*/
private JPanel panel;
-
+
/**
* The layered pane of the owner.
*/
private JLayeredPane layeredPane;
-
+
/**
* Constructs a new LightweightPopup
given its owner,
* contents and the screen position where the popup
@@ -259,7 +259,7 @@ public class Popup
this.contents = contents;
this.x = x;
this.y = y;
-
+
JRootPane rootPane = SwingUtilities.getRootPane(owner);
JLayeredPane layeredPane = rootPane.getLayeredPane();
this.layeredPane = layeredPane;
@@ -279,7 +279,7 @@ public class Popup
panel = new JPanel();
panel.setLayout(new FlowLayout(0, 0, 0));
}
-
+
panel.add(contents);
panel.setSize(contents.getSize());
Point layeredPaneLoc = layeredPane.getLocationOnScreen();
diff --git a/libjava/classpath/javax/swing/PopupFactory.java b/libjava/classpath/javax/swing/PopupFactory.java
index b326205..9468c88 100644
--- a/libjava/classpath/javax/swing/PopupFactory.java
+++ b/libjava/classpath/javax/swing/PopupFactory.java
@@ -159,7 +159,7 @@ public class PopupFactory
Dimension rootSize = root.getSize();
if (x >= rootLoc.x && y > rootLoc.y
&& (x - rootLoc.x) + contentsSize.width < rootSize.width
- && (y - rootLoc.y) + contentsSize.height < rootSize.height)
+ && (y - rootLoc.y) + contentsSize.height < rootSize.height)
popup = new Popup.LightweightPopup(owner, contents, x, y);
else
popup = new Popup.JWindowPopup(owner, contents, x, y);
diff --git a/libjava/classpath/javax/swing/ProgressMonitor.java b/libjava/classpath/javax/swing/ProgressMonitor.java
index b4c3d22..0d7ab3e 100644
--- a/libjava/classpath/javax/swing/ProgressMonitor.java
+++ b/libjava/classpath/javax/swing/ProgressMonitor.java
@@ -64,12 +64,12 @@ import javax.accessibility.AccessibleContext;
*/
public class ProgressMonitor
{
-
+
/**
* The accessible content for this component
*/
protected AccessibleContext accessibleContext;
-
+
/**
* parentComponent
*/
@@ -108,13 +108,13 @@ public class ProgressMonitor
boolean canceled;
/**
- * Creates a new ProgressMonitor
instance. This is used to
- * monitor a task and pops up a dialog if the task is taking a long time to
+ * Creates a new ProgressMonitor
instance. This is used to
+ * monitor a task and pops up a dialog if the task is taking a long time to
* run.
- *
- * @param component The parent component of the progress dialog or
+ *
+ * @param component The parent component of the progress dialog or
* null
.
- * @param message A constant message object which works in the way it does
+ * @param message A constant message object which works in the way it does
* in {@link JOptionPane}.
* @param note A string message which can be changed while the operation goes
* on.
@@ -192,7 +192,7 @@ public class ProgressMonitor
}
- /**
+ /**
* Returns the minimum or start value of the operation.
*
* @return Minimum or start value of the operation.
@@ -283,9 +283,9 @@ public class ProgressMonitor
/**
* Returns the number of milliseconds to wait before displaying the progress
* dialog. The default value is 2000.
- *
+ *
* @return The number of milliseconds.
- *
+ *
* @see #setMillisToPopup(int)
*/
public int getMillisToPopup()
@@ -296,9 +296,9 @@ public class ProgressMonitor
/**
* Sets the number of milliseconds to wait before displaying the progress
* dialog.
- *
+ *
* @param time the number of milliseconds.
- *
+ *
* @see #getMillisToPopup()
*/
public void setMillisToPopup(int time)
@@ -336,7 +336,7 @@ public class ProgressMonitor
}
}
- /**
+ /**
* Internal method that creates the progress dialog.
*/
void createDialog()
@@ -408,9 +408,9 @@ public class ProgressMonitor
first = false;
- long expected = (progress - min == 0) ?
- (now - timestamp) * (max - min) :
- (now - timestamp) * (max - min) / (progress - min);
+ long expected = (progress - min == 0) ?
+ (now - timestamp) * (max - min) :
+ (now - timestamp) * (max - min) / (progress - min);
if (expected > millisToPopup)
{
@@ -428,7 +428,7 @@ public class ProgressMonitor
{
// The progress dialog is being displayed. We now calculate
// whether setting the progress bar to the current progress
- // value would result in a visual difference.
+ // value would result in a visual difference.
int delta = progress - progressBar.getValue();
if ((delta * progressBar.getWidth() / (max - min)) > 0)
@@ -447,10 +447,10 @@ public class ProgressMonitor
timestamp = now;
}
}
-
+
/**
* Gets the accessible context.
- *
+ *
* @return the accessible context.
*/
public AccessibleContext getAccessibleContext()
diff --git a/libjava/classpath/javax/swing/ProgressMonitorInputStream.java b/libjava/classpath/javax/swing/ProgressMonitorInputStream.java
index 90e7212..ba98bf6 100644
--- a/libjava/classpath/javax/swing/ProgressMonitorInputStream.java
+++ b/libjava/classpath/javax/swing/ProgressMonitorInputStream.java
@@ -47,8 +47,8 @@ import java.io.IOException;
/**
* An input stream with a {@link ProgressMonitor}.
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
* @author Robert Schuster (robertschuster@fsfe.org)
* @status updated to 1.2
* @since 1.2
@@ -68,7 +68,7 @@ public class ProgressMonitorInputStream extends FilterInputStream
/**
* Creates a new ProgressMonitorInputStream
.
- *
+ *
* @param component the parent component for the progress monitor dialog.
* @param message the task description.
* @param stream the underlying input stream.
@@ -79,7 +79,7 @@ public class ProgressMonitorInputStream extends FilterInputStream
super(stream);
int max = 0;
-
+
try
{
max = stream.available();
@@ -94,7 +94,7 @@ public class ProgressMonitorInputStream extends FilterInputStream
/**
* Resets the input stream to the point where {@link #mark(int)} was called.
- *
+ *
* @exception IOException TODO
*/
public void reset() throws IOException
@@ -108,12 +108,12 @@ public class ProgressMonitorInputStream extends FilterInputStream
}
/**
- * Reads an unsigned byte from the input stream and returns it as an
- * int
in the range of 0-255. Returns -1 if the end of the
+ * Reads an unsigned byte from the input stream and returns it as an
+ * int
in the range of 0-255. Returns -1 if the end of the
* stream has been reached. The progress monitor is updated.
- *
+ *
* @return int
- *
+ *
* @exception IOException if there is a problem reading the stream.
*/
public int read() throws IOException
@@ -129,14 +129,14 @@ public class ProgressMonitorInputStream extends FilterInputStream
/**
* Reads bytes from the input stream and stores them in the supplied array,
- * and updates the progress monitor (or closes it if the end of the stream
+ * and updates the progress monitor (or closes it if the end of the stream
* is reached).
- *
+ *
* @param data the data array for returning bytes read from the stream.
- *
+ *
* @return The number of bytes read, or -1 if there are no more bytes in the
* stream.
- *
+ *
* @throws IOException if there is a problem reading bytes from the stream.
*/
public int read(byte[] data) throws IOException
@@ -159,17 +159,17 @@ public class ProgressMonitorInputStream extends FilterInputStream
}
/**
- * Reads up to length
bytes from the input stream and stores
- * them in the supplied array at the given index, and updates the progress
+ * Reads up to length
bytes from the input stream and stores
+ * them in the supplied array at the given index, and updates the progress
* monitor (or closes it if the end of the stream is reached).
*
* @param data the data array for returning bytes read from the stream.
- * @param offset the offset into the array where the bytes should be written.
+ * @param offset the offset into the array where the bytes should be written.
* @param length the maximum number of bytes to read from the stream.
- *
+ *
* @return The number of bytes read, or -1 if there are no more bytes in the
* stream.
- *
+ *
* @throws IOException if there is a problem reading bytes from the stream.
*/
public int read(byte[] data, int offset, int length) throws IOException
@@ -192,13 +192,13 @@ public class ProgressMonitorInputStream extends FilterInputStream
}
/**
- * Skips the specified number of bytes and updates the
+ * Skips the specified number of bytes and updates the
* {@link ProgressMonitor}.
- *
+ *
* @param length the number of bytes to skip.
*
* @return The actual number of bytes skipped.
- *
+ *
* @throws IOException if there is a problem skipping bytes in the stream.
*/
public long skip(long length) throws IOException
@@ -219,7 +219,7 @@ public class ProgressMonitorInputStream extends FilterInputStream
/**
* Closes the input stream and the associated {@link ProgressMonitor}.
- *
+ *
* @throws IOException if there is a problem closing the input stream.
*/
public void close() throws IOException
@@ -230,7 +230,7 @@ public class ProgressMonitorInputStream extends FilterInputStream
/**
* Returns the {@link ProgressMonitor} used by this input stream.
- *
+ *
* @return The progress monitor.
*/
public ProgressMonitor getProgressMonitor()
diff --git a/libjava/classpath/javax/swing/Renderer.java b/libjava/classpath/javax/swing/Renderer.java
index 9a0e81a..4759c5b 100644
--- a/libjava/classpath/javax/swing/Renderer.java
+++ b/libjava/classpath/javax/swing/Renderer.java
@@ -46,7 +46,7 @@ import java.awt.Component;
* javax.swing.tree.TreeCellRenderer}.
*
* @specnote This interface is not used and exists only for compatibility.
- *
+ *
* @author Andrew Selkirk
*/
public interface Renderer
diff --git a/libjava/classpath/javax/swing/RepaintManager.java b/libjava/classpath/javax/swing/RepaintManager.java
index bb88ebf..23c05a2 100644
--- a/libjava/classpath/javax/swing/RepaintManager.java
+++ b/libjava/classpath/javax/swing/RepaintManager.java
@@ -115,7 +115,7 @@ public class RepaintManager
super.dispatch();
}
}
-
+
/**
* The current repaint managers, indexed by their ThreadGroups.
*/
@@ -150,7 +150,7 @@ public class RepaintManager
live = false;
}
- public synchronized void setLive(boolean b)
+ public synchronized void setLive(boolean b)
{
live = b;
}
@@ -178,7 +178,7 @@ public class RepaintManager
}
- /**
+ /**
* A table storing the dirty regions of components. The keys of this
* table are components, the values are rectangles. Each component maps
* to exactly one rectangle. When more regions are marked as dirty on a
@@ -212,7 +212,7 @@ public class RepaintManager
*/
private RepaintWorker repaintWorker;
- /**
+ /**
* The set of components which need revalidation, in the "layout" sense.
* There is no additional information about "what kind of layout" they
* need (as there is with dirty regions), so it is just a vector rather
@@ -224,11 +224,11 @@ public class RepaintManager
*/
private ArrayList invalidComponents;
- /**
+ /**
* Whether or not double buffering is enabled on this repaint
* manager. This is merely a hint to clients; the RepaintManager will
* always return an offscreen buffer when one is requested.
- *
+ *
* @see #isDoubleBufferingEnabled
* @see #setDoubleBufferingEnabled
*/
@@ -478,7 +478,7 @@ public class RepaintManager
dirty = new Rectangle();
return dirty;
}
-
+
/**
* Mark a component as dirty over its entire bounds.
*
@@ -605,7 +605,7 @@ public class RepaintManager
* hierarchy of dirty
to find the highest parent that is also
* marked dirty and merges the dirty regions.
*
- * @param dirtyRegions the dirty regions
+ * @param dirtyRegions the dirty regions
* @param dirty the component for which to find the repaint root
* @param roots the list to which new repaint roots get appended
*/
@@ -617,7 +617,7 @@ public class RepaintManager
// This will contain the dirty region in the root coordinate system,
// possibly clipped by ancestor's bounds.
- Rectangle originalDirtyRect = (Rectangle) dirtyRegions.get(dirty);
+ Rectangle originalDirtyRect = (Rectangle) dirtyRegions.get(dirty);
rectCache.setBounds(originalDirtyRect);
// The bounds of the current component.
@@ -631,7 +631,7 @@ public class RepaintManager
if (rectCache.isEmpty())
return;
- // The cumulated offsets.
+ // The cumulated offsets.
int dx = 0;
int dy = 0;
// The actual offset for the found root.
@@ -652,7 +652,7 @@ public class RepaintManager
dy += y;
rectCache.x += x;
rectCache.y += y;
-
+
x = current.getX();
y = current.getY();
w = current.getWidth();
@@ -705,8 +705,8 @@ public class RepaintManager
{
Component root = SwingUtilities.getWindowAncestor(component);
Image buffer = (Image) offscreenBuffers.get(root);
- if (buffer == null
- || buffer.getWidth(null) < proposedWidth
+ if (buffer == null
+ || buffer.getWidth(null) < proposedWidth
|| buffer.getHeight(null) < proposedHeight)
{
int width = Math.max(proposedWidth, root.getWidth());
@@ -733,11 +733,11 @@ public class RepaintManager
{
Component root = comp;
while (root != null
- && ! (root instanceof Window || root instanceof Applet))
+ && ! (root instanceof Window || root instanceof Applet))
{
- x += root.getX();
- y += root.getY();
- root = root.getParent();
+ x += root.getX();
+ y += root.getY();
+ root = root.getParent();
}
if (root != null)
@@ -774,8 +774,8 @@ public class RepaintManager
{
Component root = SwingUtilities.getWindowAncestor(comp);
Image buffer = (Image) offscreenBuffers.get(root);
- if (buffer == null
- || buffer.getWidth(null) < proposedWidth
+ if (buffer == null
+ || buffer.getWidth(null) < proposedWidth
|| buffer.getHeight(null) < proposedHeight
|| !(buffer instanceof VolatileImage))
{
@@ -789,7 +789,7 @@ public class RepaintManager
}
return buffer;
}
-
+
/**
* Get the value of the {@link #doubleBufferMaximumSize} property.
@@ -838,7 +838,7 @@ public class RepaintManager
{
return doubleBufferingEnabled;
}
-
+
public String toString()
{
return "RepaintManager";
diff --git a/libjava/classpath/javax/swing/ScrollPaneLayout.java b/libjava/classpath/javax/swing/ScrollPaneLayout.java
index 2a16f26..fa1743b 100644
--- a/libjava/classpath/javax/swing/ScrollPaneLayout.java
+++ b/libjava/classpath/javax/swing/ScrollPaneLayout.java
@@ -50,15 +50,15 @@ import javax.swing.border.Border;
/**
* ScrollPaneLayout
- * @author Andrew Selkirk
- * @version 1.0
+ * @author Andrew Selkirk
+ * @version 1.0
*/
public class ScrollPaneLayout
implements LayoutManager, ScrollPaneConstants, Serializable
{
private static final long serialVersionUID = -4480022884523193743L;
- public static class UIResource extends ScrollPaneLayout
+ public static class UIResource extends ScrollPaneLayout
implements javax.swing.plaf.UIResource
{
public UIResource()
@@ -81,10 +81,10 @@ public class ScrollPaneLayout
public ScrollPaneLayout()
{
- // Nothing to do here.
+ // Nothing to do here.
}
- public void syncWithScrollPane(JScrollPane scrollPane)
+ public void syncWithScrollPane(JScrollPane scrollPane)
{
viewport = scrollPane.getViewport();
rowHead = scrollPane.getRowHeader();
@@ -96,7 +96,7 @@ public class ScrollPaneLayout
lowerLeft = scrollPane.getCorner(LOWER_LEFT_CORNER);
lowerRight = scrollPane.getCorner(LOWER_RIGHT_CORNER);
upperLeft = scrollPane.getCorner(UPPER_LEFT_CORNER);
- upperRight = scrollPane.getCorner(UPPER_RIGHT_CORNER);
+ upperRight = scrollPane.getCorner(UPPER_RIGHT_CORNER);
}
/**
@@ -108,7 +108,7 @@ public class ScrollPaneLayout
* @return the newComponent
*/
protected Component addSingletonComponent(Component oldComponent,
- Component newComponent)
+ Component newComponent)
{
if (oldComponent != null && oldComponent != newComponent)
oldComponent.getParent().remove(oldComponent);
@@ -116,7 +116,7 @@ public class ScrollPaneLayout
}
/**
- * Add the specified component to the layout.
+ * Add the specified component to the layout.
* @param key must be one of VIEWPORT, VERTICAL_SCROLLBAR,
* HORIZONTAL_SCROLLBAR, ROW_HEADER, COLUMN_HEADER,
* LOWER_RIGHT_CORNER, LOWER_LEFT_CORNER, UPPER_RIGHT_CORNER,
@@ -124,7 +124,7 @@ public class ScrollPaneLayout
* @param component the Component to add
* @throws IllegalArgumentException if key is not as above
*/
- public void addLayoutComponent(String key, Component component)
+ public void addLayoutComponent(String key, Component component)
{
if (key == VIEWPORT)
viewport = (JViewport) component;
@@ -148,7 +148,7 @@ public class ScrollPaneLayout
throw new IllegalArgumentException();
}
- public void removeLayoutComponent(Component component)
+ public void removeLayoutComponent(Component component)
{
if (component == viewport)
viewport = null;
@@ -174,7 +174,7 @@ public class ScrollPaneLayout
{
return vsbPolicy;
}
-
+
/**
* Sets the vertical scrollbar policy.
* @param policy must be one of VERTICAL_SCROLLBAR_AS_NEEDED,
@@ -184,7 +184,7 @@ public class ScrollPaneLayout
*/
public void setVerticalScrollBarPolicy(int policy)
{
- if (policy != VERTICAL_SCROLLBAR_AS_NEEDED &&
+ if (policy != VERTICAL_SCROLLBAR_AS_NEEDED &&
policy != VERTICAL_SCROLLBAR_NEVER &&
policy != VERTICAL_SCROLLBAR_ALWAYS)
throw new IllegalArgumentException("Illegal Scrollbar Policy");
@@ -200,12 +200,12 @@ public class ScrollPaneLayout
* Sets the horizontal scrollbar policy.
* @param policy must be one of HORIZONTAL_SCROLLBAR_AS_NEEDED,
* HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_ALWAYS.
- * @throws IllegalArgumentException if policy is not one of the valid
+ * @throws IllegalArgumentException if policy is not one of the valid
* JScrollbar policies.
*/
public void setHorizontalScrollBarPolicy(int policy)
{
- if (policy != HORIZONTAL_SCROLLBAR_AS_NEEDED &&
+ if (policy != HORIZONTAL_SCROLLBAR_AS_NEEDED &&
policy != HORIZONTAL_SCROLLBAR_NEVER &&
policy != HORIZONTAL_SCROLLBAR_ALWAYS)
throw new IllegalArgumentException("Illegal Scrollbar Policy");
@@ -256,7 +256,7 @@ public class ScrollPaneLayout
return null;
}
- public Dimension preferredLayoutSize(Container parent)
+ public Dimension preferredLayoutSize(Container parent)
{
// Sun's implementation simply throws a ClassCastException if
// parent is no JScrollPane, so do we.
@@ -343,7 +343,7 @@ public class ScrollPaneLayout
* | c3 | h scrollbar | c4 |
* +----+--------------------+----+ y4
* x1 x2 x3 x4
- *
+ *
*/
public void layoutContainer(Container parent)
{
@@ -352,11 +352,11 @@ public class ScrollPaneLayout
JScrollPane sc = (JScrollPane) parent;
JViewport viewport = sc.getViewport();
Component view = viewport.getView();
-
+
// If there is no view in the viewport, there is no work to be done.
if (view == null)
return;
-
+
Dimension viewSize = viewport.getView().getPreferredSize();
int x1 = 0, x2 = 0, x3 = 0, x4 = 0;
@@ -388,43 +388,43 @@ public class ScrollPaneLayout
int vsbPolicy = sc.getVerticalScrollBarPolicy();
int hsbPolicy = sc.getHorizontalScrollBarPolicy();
-
+
int vsWidth = 0;
int hsHeight = 0;
- boolean showVsb =
+ boolean showVsb =
(vsb != null)
&& ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS)
- || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED
+ || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED
&& viewSize.height > (y4 - y2)));
-
+
if (showVsb)
vsWidth = vsb.getPreferredSize().width;
-
+
// The horizontal scroll bar may become necessary if the vertical scroll
// bar appears, reducing the space, left for the component.
-
- boolean showHsb =
+
+ boolean showHsb =
(hsb != null)
&& ((hsbPolicy == HORIZONTAL_SCROLLBAR_ALWAYS)
- || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED
+ || (hsbPolicy == HORIZONTAL_SCROLLBAR_AS_NEEDED
&& viewSize.width > (x4 - x2 - vsWidth)));
-
+
if (showHsb)
hsHeight = hsb.getPreferredSize().height;
-
+
// If the horizontal scroll bar appears, and the vertical scroll bar
// was not necessary assuming that there is no horizontal scroll bar,
// the vertical scroll bar may become necessary because the horizontal
// scroll bar reduces the vertical space for the component.
if (!showVsb)
{
- showVsb =
+ showVsb =
(vsb != null)
&& ((vsbPolicy == VERTICAL_SCROLLBAR_ALWAYS)
- || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED
+ || (vsbPolicy == VERTICAL_SCROLLBAR_AS_NEEDED
&& viewSize.height > (y4 - y2)));
-
+
if (showVsb)
vsWidth = vsb.getPreferredSize().width;
}
@@ -482,7 +482,7 @@ public class ScrollPaneLayout
* @deprecated As of Swing 1.1 replaced by
* {@link javax.swing.JScrollPane#getViewportBorderBounds}.
*/
- public Rectangle getViewportBorderBounds(JScrollPane scrollPane)
+ public Rectangle getViewportBorderBounds(JScrollPane scrollPane)
{
return null;
}
diff --git a/libjava/classpath/javax/swing/Scrollable.java b/libjava/classpath/javax/swing/Scrollable.java
index 396d530..26fae24 100644
--- a/libjava/classpath/javax/swing/Scrollable.java
+++ b/libjava/classpath/javax/swing/Scrollable.java
@@ -1,4 +1,4 @@
-/* Scrollable.java --
+/* Scrollable.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -54,14 +54,14 @@ public interface Scrollable
* Return the preferred scrolling amount (in pixels) for the given
* scrolling direction and orientation when scrolling in small amounts
* like table lines.
- *
- * @param visibleRect the currently visible part of the component.
+ *
+ * @param visibleRect the currently visible part of the component.
* @param orientation the scrolling orientation
* @param direction the scrolling direction (negative - up, positive -down).
- * The values greater than one means that more mouse wheel or similar
+ * The values greater than one means that more mouse wheel or similar
* events were generated, and hence it is better to scroll the longer
* distance.
- *
+ *
* @return the preferred scrolling distance, negative if up or left.
*/
int getScrollableUnitIncrement(Rectangle visibleRect, int orientation,
@@ -71,15 +71,15 @@ public interface Scrollable
* Return the preferred scrolling amount (in pixels) for the given
* scrolling direction and orientation when scrolling in large amounts
* (pages).
- *
- * @param visibleRect the currently visible part of the component.
+ *
+ * @param visibleRect the currently visible part of the component.
* @param orientation the scrolling orientation
* @param direction the scrolling direction (negative - up, positive -down).
- * The values greater than one means that more mouse wheel or similar
+ * The values greater than one means that more mouse wheel or similar
* events were generated, and hence it is better to scroll the longer
* distance.
- *
- * @return the preferred scrolling distance, negative if up or left.
+ *
+ * @return the preferred scrolling distance, negative if up or left.
*/
int getScrollableBlockIncrement(Rectangle visibleRect, int orientation,
int direction);
@@ -89,7 +89,7 @@ public interface Scrollable
* view, where it is displayed, width (for instance, the text area with
* the word wrap). In such case, the horizontal scrolling should not be
* performed.
- *
+ *
* @return true is no horizontal scrolling is assumed, faster otherwise.
*/
boolean getScrollableTracksViewportWidth();
@@ -98,7 +98,7 @@ public interface Scrollable
* Return true if the height of the scrollable is always equal to the view,
* where it is displayed, height.In such case, the vertical scrolling should
* not be performed.
- *
+ *
* @return true is no horizontal scrolling is assumed, faster otherwise.
*/
boolean getScrollableTracksViewportHeight();
diff --git a/libjava/classpath/javax/swing/SingleSelectionModel.java b/libjava/classpath/javax/swing/SingleSelectionModel.java
index 9f33e33..2a76ff3 100644
--- a/libjava/classpath/javax/swing/SingleSelectionModel.java
+++ b/libjava/classpath/javax/swing/SingleSelectionModel.java
@@ -51,19 +51,19 @@ public interface SingleSelectionModel
{
/**
* Returns the selected index or -1
if there is no selection.
- *
+ *
* @return The selected index.
- *
+ *
* @see #setSelectedIndex(int)
*/
int getSelectedIndex();
/**
- * Sets the selected index and, if this is different to the previous
+ * Sets the selected index and, if this is different to the previous
* selection, sends a {@link ChangeEvent} to all registered listeners.
- *
+ *
* @param index the index (use -1
to represent no selection).
- *
+ *
* @see #getSelectedIndex()
* @see #clearSelection
*/
@@ -72,14 +72,14 @@ public interface SingleSelectionModel
/**
* Clears the selection by setting the selected index to -1
and
* sends a {@link ChangeEvent} to all registered listeners. If the selected
- * index is already -1
, this method does nothing.
+ * index is already -1
, this method does nothing.
*/
void clearSelection();
/**
* Returns true
if there is a selection, and false
- * otherwise.
- *
+ * otherwise.
+ *
* @return A boolean.
*/
boolean isSelected();
diff --git a/libjava/classpath/javax/swing/SizeRequirements.java b/libjava/classpath/javax/swing/SizeRequirements.java
index b9b5c32..1ee0e28 100644
--- a/libjava/classpath/javax/swing/SizeRequirements.java
+++ b/libjava/classpath/javax/swing/SizeRequirements.java
@@ -386,7 +386,7 @@ public class SizeRequirements implements Serializable
*
* The components are tiled in the forward direction, beginning with
* an offset of 0.
- *
+ *
* @param allocated the amount of allocated space
* @param total the total size requirements of the components
* @param children the size requirement of each component
diff --git a/libjava/classpath/javax/swing/SizeSequence.java b/libjava/classpath/javax/swing/SizeSequence.java
index cb6c8bc..69c7366 100644
--- a/libjava/classpath/javax/swing/SizeSequence.java
+++ b/libjava/classpath/javax/swing/SizeSequence.java
@@ -40,17 +40,17 @@ package javax.swing;
import java.util.Arrays;
/**
- * A sequence of values that represent the dimensions (widths or heights) of
+ * A sequence of values that represent the dimensions (widths or heights) of
* some collection of items (for example, the widths of the columns in a table).
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
*/
public class SizeSequence
{
// TODO: Sun's API specification for this class contains an implementation
// note regarding the encoding for the element sizes. We currently use the
// simple size encoding but we should look at improving this.
-
+
/** Storage for the element sizes. */
private int[] sizes;
@@ -63,9 +63,9 @@ public class SizeSequence
}
/**
- * Creates a new SizeSequence
instance with the specified number
+ * Creates a new SizeSequence
instance with the specified number
* of elements, each having a size of 0.
- *
+ *
* @param numEntries the number of elements.
*/
public SizeSequence(int numEntries)
@@ -76,7 +76,7 @@ public class SizeSequence
/**
* Creates a new SizeSequence
instance with the specified number
* of elements all having the same size (value
).
- *
+ *
* @param numEntries the number of elements.
* @param value the value for each element.
*/
@@ -87,9 +87,9 @@ public class SizeSequence
}
/**
- * Creates a new SizeSequence
instance using the specified
+ * Creates a new SizeSequence
instance using the specified
* element sizes.
- *
+ *
* @param sizes the element sizes (null
not permitted).
*/
public SizeSequence(int[] sizes)
@@ -99,7 +99,7 @@ public class SizeSequence
/**
* Sets the size of the element at the specified index.
- *
+ *
* @param index the index.
* @param size the size.
*/
@@ -111,16 +111,16 @@ public class SizeSequence
/**
* Returns the index of the element that contains the specified position.
- *
+ *
* @param position the position.
- *
+ *
* @return The index of the element that contains the specified position.
*/
public int getIndex(int position)
{
int i = 0;
- int runningTotal = 0;
- while (i < sizes.length && position >= runningTotal + sizes[i])
+ int runningTotal = 0;
+ while (i < sizes.length && position >= runningTotal + sizes[i])
{
runningTotal += sizes[i];
i++;
@@ -131,9 +131,9 @@ public class SizeSequence
/**
* Returns the size of the specified element, or 0 if the element index is
* outside the defined range.
- *
+ *
* @param index the element index.
- *
+ *
* @return The size of the specified element, or 0 if the element index is
* outside the defined range.
*/
@@ -146,7 +146,7 @@ public class SizeSequence
/**
* Sets the sizes for the elements in the sequence.
- *
+ *
* @param sizes the element sizes (null
not permitted).
*/
public void setSizes(int[] sizes)
@@ -156,7 +156,7 @@ public class SizeSequence
/**
* Returns an array containing the sizes for all the elements in the sequence.
- *
+ *
* @return The element sizes.
*/
public int[] getSizes()
@@ -166,9 +166,9 @@ public class SizeSequence
/**
* Returns the position of the specified element.
- *
+ *
* @param index the element index.
- *
+ *
* @return The position.
*/
public int getPosition(int index)
@@ -186,7 +186,7 @@ public class SizeSequence
* Inserts new entries into the sequence at the start
position.
* There are length
new entries each having the specified
* value
.
- *
+ *
* @param start the start element.
* @param length the number of elements to insert.
* @param value the size for each of the new elements.
@@ -197,7 +197,7 @@ public class SizeSequence
System.arraycopy(sizes, 0, newSizes, 0, start);
for (int i = start; i < start + length; i++)
newSizes[i] = value;
- System.arraycopy(sizes, start, newSizes, start + length,
+ System.arraycopy(sizes, start, newSizes, start + length,
sizes.length - start);
sizes = newSizes;
}
@@ -205,7 +205,7 @@ public class SizeSequence
/**
* Removes the element(s) at index start
(the number of elements
* removed is length
).
- *
+ *
* @param start the index of the first element to remove.
* @param length the number of elements to remove.
*/
@@ -218,7 +218,7 @@ public class SizeSequence
int[] newSizes = new int[sizes.length - length];
System.arraycopy(sizes, 0, newSizes, 0, start);
- System.arraycopy(sizes, start + length, newSizes, start,
+ System.arraycopy(sizes, start + length, newSizes, start,
sizes.length - start - length);
sizes = newSizes;
}
diff --git a/libjava/classpath/javax/swing/SortingFocusTraversalPolicy.java b/libjava/classpath/javax/swing/SortingFocusTraversalPolicy.java
index d14ee1d..3c07dbd 100644
--- a/libjava/classpath/javax/swing/SortingFocusTraversalPolicy.java
+++ b/libjava/classpath/javax/swing/SortingFocusTraversalPolicy.java
@@ -47,10 +47,10 @@ import java.util.TreeSet;
/**
* @author Graydon Hoare
* @author Michael Koch
- *
+ *
* @since 1.4
*/
-public class SortingFocusTraversalPolicy
+public class SortingFocusTraversalPolicy
extends InternalFrameFocusTraversalPolicy
{
/**
@@ -75,7 +75,7 @@ public class SortingFocusTraversalPolicy
* @see #getImplicitDownCycleTraversal()
*/
boolean implicitDownCycleTraversal = true;
-
+
/**
* Creates a new SortingFocusTraversalPolicy
with no
* comparator set.
@@ -97,7 +97,7 @@ public class SortingFocusTraversalPolicy
}
/**
- * Decide whether a component is an acceptable focus owner.
+ * Decide whether a component is an acceptable focus owner.
*
* @param comp The component which is a candidate for focus ownership.
*
@@ -107,16 +107,16 @@ public class SortingFocusTraversalPolicy
protected boolean accept(Component comp)
{
return (comp.isVisible()
- && comp.isDisplayable()
- && comp.isEnabled()
- && comp.isFocusable());
+ && comp.isDisplayable()
+ && comp.isEnabled()
+ && comp.isFocusable());
}
/**
* Get the current value of the {@link #comparator} property.
*
* @return the current value of the property
- *
+ *
* @see #setComparator
*/
protected Comparator super Component> getComparator()
@@ -128,7 +128,7 @@ public class SortingFocusTraversalPolicy
* Set the current value of the {@link #comparator} property.
*
* @param comparator the new value of the property
- *
+ *
* @see #getComparator
*/
protected void setComparator(Comparator super Component> comparator)
@@ -139,11 +139,11 @@ public class SortingFocusTraversalPolicy
private TreeSet getSortedCycle(Container root, TreeSet set)
{
if (set == null)
- set = (getComparator() == null
+ set = (getComparator() == null
? new TreeSet()
: new TreeSet(getComparator()));
-
- if (root != null)
+
+ if (root != null)
{
Component[] comps = root.getComponents();
for (int i = 0; i < comps.length; ++i)
@@ -168,23 +168,23 @@ public class SortingFocusTraversalPolicy
* comp
is a focus cycle root, an "implicit DownCycle"
* occurs and the method returns the
* getDefaultComponent(comp)
.
- *
+ *
* @param root the focus cycle root to search for a successor within
* @param comp the component to search for the successor of
*
* @return the component following the specified component under
* the specified root, or null if no such component is found
- *
+ *
* @throws IllegalArgumentException if either argument is null, or
* if the root is not a focus cycle root of the component
*/
- public Component getComponentAfter(Container root,
+ public Component getComponentAfter(Container root,
Component comp)
{
if (comp == null || root == null || !comp.isFocusCycleRoot(root))
throw new IllegalArgumentException();
- if (getImplicitDownCycleTraversal()
+ if (getImplicitDownCycleTraversal()
&& comp instanceof Container
&& ((Container)comp).isFocusCycleRoot())
{
@@ -212,17 +212,17 @@ public class SortingFocusTraversalPolicy
* focus cycle, relative to the order imposed by {@link
* #comparator}. Candidate components are only considered if they are
* accepted by the {@link #accept} method.
- *
+ *
* @param root the focus cycle root to search for a predecessor within
* @param comp the component to search for the predecessor of
*
* @return the component preceding the specified component under the
* specified root, or null if no such component is found
- *
+ *
* @throws IllegalArgumentException if either argument is null, or
* if the root is not a focus cycle root of the component
*/
- public Component getComponentBefore(Container root,
+ public Component getComponentBefore(Container root,
Component comp)
{
if (comp == null || root == null || !comp.isFocusCycleRoot(root))
@@ -256,7 +256,7 @@ public class SortingFocusTraversalPolicy
return getFirstComponent(root);
}
- /**
+ /**
* Return the first focusable component of the focus cycle root
* comp
under the ordering imposed by the {@link
* #comparator} property. Candidate components are only considered if
@@ -279,8 +279,8 @@ public class SortingFocusTraversalPolicy
return (Component) i.next();
return null;
}
-
- /**
+
+ /**
* Return the last focusable component of the focus cycle root
* comp
under the ordering imposed by the {@link
* #comparator} property. Candidate components are only considered if
@@ -310,7 +310,7 @@ public class SortingFocusTraversalPolicy
* property.
*
* @return the current value of the property
- *
+ *
* @see #setImplicitDownCycleTraversal
*/
public boolean getImplicitDownCycleTraversal()
@@ -323,7 +323,7 @@ public class SortingFocusTraversalPolicy
* property.
*
* @param down the new value of the property
- *
+ *
* @see #getImplicitDownCycleTraversal
*/
public void setImplicitDownCycleTraversal(boolean down)
diff --git a/libjava/classpath/javax/swing/SpinnerDateModel.java b/libjava/classpath/javax/swing/SpinnerDateModel.java
index e5ff76f..f0e9d1e 100644
--- a/libjava/classpath/javax/swing/SpinnerDateModel.java
+++ b/libjava/classpath/javax/swing/SpinnerDateModel.java
@@ -45,8 +45,8 @@ import java.util.Date;
import javax.swing.event.ChangeEvent;
/**
- * A date model used by the {@link JSpinner} component. This implements a
- * spinner model for dates, rotating a calendar field such as month, year,
+ * A date model used by the {@link JSpinner} component. This implements a
+ * spinner model for dates, rotating a calendar field such as month, year,
* day, week, hour, minute.
*
* @author Sven de Marothy
@@ -57,21 +57,21 @@ public class SpinnerDateModel extends AbstractSpinnerModel
{
/** The current date. */
private Calendar date;
-
- /**
- * A constraint on the start or earliest permitted date (null
- * for no minimum).
+
+ /**
+ * A constraint on the start or earliest permitted date (null
+ * for no minimum).
*/
private Comparable start;
- /**
- * A constraint on the end or latest permitted date (null
for no
- * maximum).
+ /**
+ * A constraint on the end or latest permitted date (null
for no
+ * maximum).
*/
private Comparable end;
-
+
/**
- * The calendar field used to calculate the previous or next date.
+ * The calendar field used to calculate the previous or next date.
*/
private int calendarField;
@@ -82,7 +82,7 @@ public class SpinnerDateModel extends AbstractSpinnerModel
/**
* Constructs a SpinnerDateModel
using the current date,
- * no start or end limit, and {@link Calendar#DAY_OF_MONTH} as the calendar
+ * no start or end limit, and {@link Calendar#DAY_OF_MONTH} as the calendar
* field.
*/
public SpinnerDateModel()
@@ -92,15 +92,15 @@ public class SpinnerDateModel extends AbstractSpinnerModel
/**
* Constructs a SpinnerDateModel
with the specified value, lower
- * and upper bounds, and which spins the specified calendar field.
+ * and upper bounds, and which spins the specified calendar field.
*
* The start
and end
limits must have a
* compareTo
method that supports instances of {@link Date}, but
* do not themselves need to be instances of {@link Date} (although typically
* they are).
- *
+ *
* @param value the initial value/date (null
not permitted).
- * @param start a constraint that specifies the earliest permitted date
+ * @param start a constraint that specifies the earliest permitted date
* value, or null
for no lower limit.
* @param end a constraint that specifies the latest permitted date value,
* or null
for no upper limit.
@@ -110,7 +110,7 @@ public class SpinnerDateModel extends AbstractSpinnerModel
public SpinnerDateModel(Date value, Comparable start, Comparable end,
int calendarField)
{
- if (value == null)
+ if (value == null)
throw new IllegalArgumentException("Null 'value' argument.");
if (start != null && start.compareTo(value) > 0)
throw new IllegalArgumentException("Require value on or after start.");
@@ -124,9 +124,9 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Returns the {@link Calendar} field used to calculate the previous and
+ * Returns the {@link Calendar} field used to calculate the previous and
* next dates in the sequence.
- *
+ *
* @return The date field code.
*/
public int getCalendarField()
@@ -136,9 +136,9 @@ public class SpinnerDateModel extends AbstractSpinnerModel
/**
* Returns the current date/time.
- *
+ *
* @return The current date/time (never null
).
- *
+ *
* @see #getValue()
*/
public Date getDate()
@@ -147,11 +147,11 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Returns the lower limit on the date/time value, or null
if
+ * Returns the lower limit on the date/time value, or null
if
* there is no minimum date/time.
- *
+ *
* @return The lower limit.
- *
+ *
* @see #setStart(Comparable)
*/
public Comparable getStart()
@@ -160,11 +160,11 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Returns the upper limit on the date/time value, or null
if
+ * Returns the upper limit on the date/time value, or null
if
* there is no maximum date/time.
- *
+ *
* @return The upper limit.
- *
+ *
* @see #setEnd(Comparable)
*/
public Comparable getEnd()
@@ -173,9 +173,9 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Returns the current date in the sequence (this method returns the same as
+ * Returns the current date in the sequence (this method returns the same as
* {@link #getDate()}).
- *
+ *
* @return The current date (never null
).
*/
public Object getValue()
@@ -185,12 +185,12 @@ public class SpinnerDateModel extends AbstractSpinnerModel
/**
* Returns the next date in the sequence, or null
if the
- * next date is past the upper limit (if one is specified). The current date
+ * next date is past the upper limit (if one is specified). The current date
* is not changed.
- *
+ *
* @return The next date, or null
if the current value is
* the latest date represented by the model.
- *
+ *
* @see #getEnd()
*/
public Object getNextValue()
@@ -207,12 +207,12 @@ public class SpinnerDateModel extends AbstractSpinnerModel
/**
* Returns the previous date in the sequence, or null
if the
- * previous date is prior to the lower limit (if one is specified). The
+ * previous date is prior to the lower limit (if one is specified). The
* current date is not changed.
- *
+ *
* @return The previous date, or null
if the current value is
* the earliest date represented by the model.
- *
+ *
* @see #getStart()
*/
public Object getPreviousValue()
@@ -228,13 +228,13 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Sets the date field to change when calculating the next and previous
- * values. It must be a valid {@link Calendar} field, excluding
+ * Sets the date field to change when calculating the next and previous
+ * values. It must be a valid {@link Calendar} field, excluding
* {@link Calendar#ZONE_OFFSET} and {@link Calendar#DST_OFFSET}.
- *
+ *
* @param calendarField the calendar field to set.
- *
- * @throws IllegalArgumentException if calendarField
is not
+ *
+ * @throws IllegalArgumentException if calendarField
is not
* a valid code.
*/
public void setCalendarField(int calendarField)
@@ -252,15 +252,15 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Sets the lower limit for the date/time value and, if the new limit is
- * different to the old limit, sends a {@link ChangeEvent} to all registered
- * listeners. A null
value is interpreted as "no lower limit".
- * No check is made to ensure that the current date/time is on or after the
- * new lower limit - the caller is responsible for ensuring that this
+ * Sets the lower limit for the date/time value and, if the new limit is
+ * different to the old limit, sends a {@link ChangeEvent} to all registered
+ * listeners. A null
value is interpreted as "no lower limit".
+ * No check is made to ensure that the current date/time is on or after the
+ * new lower limit - the caller is responsible for ensuring that this
* relationship holds. In addition, the caller should ensure that
* start
is {@link Serializable}.
- *
- * @param start the new lower limit for the date/time value
+ *
+ * @param start the new lower limit for the date/time value
* (null
permitted).
*/
public void setStart(Comparable start)
@@ -273,14 +273,14 @@ public class SpinnerDateModel extends AbstractSpinnerModel
}
/**
- * Sets the upper limit for the date/time value and, if the new limit is
- * different to the old limit, sends a {@link ChangeEvent} to all registered
- * listeners. A null
value is interpreted as "no upper limit".
- * No check is made to ensure that the current date/time is on or before the
- * new upper limit - the caller is responsible for ensuring that this
+ * Sets the upper limit for the date/time value and, if the new limit is
+ * different to the old limit, sends a {@link ChangeEvent} to all registered
+ * listeners. A null
value is interpreted as "no upper limit".
+ * No check is made to ensure that the current date/time is on or before the
+ * new upper limit - the caller is responsible for ensuring that this
* relationship holds. In addition, the caller should ensure that
* end
is {@link Serializable}.
- *
+ *
* @param end the new upper limit for the date/time value (null
* permitted).
*/
@@ -297,18 +297,18 @@ public class SpinnerDateModel extends AbstractSpinnerModel
* Sets the current date and, if the new value is different to the old
* value, sends a {@link ChangeEvent} to all registered listeners.
*
- * @param value the new date (null
not permitted, must be an
+ * @param value the new date (null
not permitted, must be an
* instance of Date
).
- *
- * @throws IllegalArgumentException if value
is not an instance
+ *
+ * @throws IllegalArgumentException if value
is not an instance
* of Date
.
*/
public void setValue(Object value)
{
if (! (value instanceof Date) || value == null)
throw new IllegalArgumentException("Value not a date.");
-
- if (!date.getTime().equals(value))
+
+ if (!date.getTime().equals(value))
{
date.setTime((Date) value);
fireStateChanged();
diff --git a/libjava/classpath/javax/swing/SpinnerListModel.java b/libjava/classpath/javax/swing/SpinnerListModel.java
index 52ac360..de4926a 100644
--- a/libjava/classpath/javax/swing/SpinnerListModel.java
+++ b/libjava/classpath/javax/swing/SpinnerListModel.java
@@ -111,13 +111,13 @@ public class SpinnerListModel extends AbstractSpinnerModel
* to getValue()
returns the same as list.get(0)
.
*
* @param list The list to use for this model.
- *
+ *
* @throws IllegalArgumentException if the list is null or contains no
* elements.
*
* @see SpinnerListModel#getNextValue()
* @see SpinnerListModel#getValue()
- */
+ */
public SpinnerListModel(List> list)
{
// Retain a reference to the valid list.
@@ -151,9 +151,9 @@ public class SpinnerListModel extends AbstractSpinnerModel
throw new IllegalArgumentException("The supplied array was invalid.");
}
- // Retain a reference to a wrapper around the valid array.
- // The array, in list form, will be tested again here, but we can't really
- // avoid this -- a null value to Arrays.asList will throw a
+ // Retain a reference to a wrapper around the valid array.
+ // The array, in list form, will be tested again here, but we can't really
+ // avoid this -- a null value to Arrays.asList will throw a
// NullPointerException.
setList(Arrays.asList(array));
}
@@ -167,7 +167,7 @@ public class SpinnerListModel extends AbstractSpinnerModel
{
return list;
}
-
+
/**
* Returns the next value from the list, which is the same as the element
* stored at the current index + 1. Null is returned if there are no more
@@ -200,10 +200,10 @@ public class SpinnerListModel extends AbstractSpinnerModel
public Object getPreviousValue()
{
// Check for a previous value.
- if (index > 0)
+ if (index > 0)
// Return the element at the previous position.
return list.get(index - 1);
- else
+ else
// Return null as this is the start of the list.
return null;
}
@@ -266,7 +266,7 @@ public class SpinnerListModel extends AbstractSpinnerModel
* the backing list. Listeners are notified of this change.
* Following the change, getNextValue()
and
* getPreviousValue()
return the objects following
- * and prior to the supplied value, respectively.
+ * and prior to the supplied value, respectively.
*
* @param value The requested new value of the list.
*
diff --git a/libjava/classpath/javax/swing/SpinnerModel.java b/libjava/classpath/javax/swing/SpinnerModel.java
index 4ad962b..6cab34d 100644
--- a/libjava/classpath/javax/swing/SpinnerModel.java
+++ b/libjava/classpath/javax/swing/SpinnerModel.java
@@ -1,4 +1,4 @@
-/* SpinnerModel.java --
+/* SpinnerModel.java --
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -107,5 +107,5 @@ public interface SpinnerModel
* @param listener The listener to remove.
*/
void removeChangeListener(ChangeListener listener);
-
+
}
diff --git a/libjava/classpath/javax/swing/SpinnerNumberModel.java b/libjava/classpath/javax/swing/SpinnerNumberModel.java
index 1abbbe3..af3fea6 100644
--- a/libjava/classpath/javax/swing/SpinnerNumberModel.java
+++ b/libjava/classpath/javax/swing/SpinnerNumberModel.java
@@ -83,7 +83,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
* @param minimum the minimum value
* @param maximum the maximum value
* @param stepSize the step size
- * @throws IllegalArgumentException if minimum <= value <= maximum does
+ * @throws IllegalArgumentException if minimum <= value <= maximum does
* not hold.
*/
public SpinnerNumberModel(double value, double minimum, double maximum,
@@ -100,7 +100,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
* @param minimum the minimum value
* @param maximum the maximum value
* @param stepSize the step size
- * @throws IllegalArgumentException if minimum <= value <= maximum does
+ * @throws IllegalArgumentException if minimum <= value <= maximum does
* not hold.
*/
public SpinnerNumberModel(int value, int minimum, int maximum, int stepSize)
@@ -111,7 +111,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Creates a SpinnerNumberModel
with the given attributes. The
- * caller should ensure that both minimum
and
+ * caller should ensure that both minimum
and
* maximum
are serializable.
*
* @param value the initial value (null
not permitted).
@@ -121,9 +121,9 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
*
* @throws IllegalArgumentException if minimum <= value <= maximum
* does not hold
- * @throws IllegalArgumentException if value
is
+ * @throws IllegalArgumentException if value
is
* null
.
- * @throws IllegalArgumentException if stepSize
is
+ * @throws IllegalArgumentException if stepSize
is
* null
.
*/
public SpinnerNumberModel(Number value, Comparable minimum,
@@ -165,7 +165,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
if (! (value instanceof Number))
throw new IllegalArgumentException("value must be a Number");
- if (!this.value.equals(value))
+ if (!this.value.equals(value))
{
this.value = (Number) value;
fireStateChanged();
@@ -177,7 +177,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
* {@link Number}.
*
* @return The current value.
- *
+ *
* @see #getNumber()
*/
public Object getValue()
@@ -187,10 +187,10 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Returns the next value, or null
if adding the step size to
- * the current value results in a value greater than the maximum value.
+ * the current value results in a value greater than the maximum value.
* The current value is not changed.
*
- * @return The next value, or null
if the current value is the
+ * @return The next value, or null
if the current value is the
* maximum value represented by this model.
*/
public Object getNextValue()
@@ -209,11 +209,11 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
num = new Short((short) (value.shortValue() + stepSize.shortValue()));
else
num = new Byte((byte) (value.byteValue() + stepSize.byteValue()));
-
+
// check upper bound if set
if ((maximum != null) && maximum.compareTo(num) < 0)
num = null;
-
+
return num;
}
@@ -241,7 +241,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
num = new Short((short) (value.shortValue() - stepSize.shortValue()));
else
num = new Byte((byte) (value.byteValue() - stepSize.byteValue()));
-
+
// check lower bound if set
if ((minimum != null) && minimum.compareTo(num) > 0)
num = null;
@@ -261,9 +261,9 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Returns the minimum value, or null
if there is no minimum.
- *
+ *
* @return The minimum value.
- *
+ *
* @see #setMinimum(Comparable)
*/
public Comparable getMinimum()
@@ -273,15 +273,15 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Sets the minimum value and, if the new value is different to the old
- * value, sends a {@link ChangeEvent} to all registered listeners. A
+ * value, sends a {@link ChangeEvent} to all registered listeners. A
* null
value is interpreted as "no minimum value". No check
- * is made to ensure that the new minimum is less than or equal to the
- * current value, the caller is responsible for ensuring that this
+ * is made to ensure that the new minimum is less than or equal to the
+ * current value, the caller is responsible for ensuring that this
* relationship holds. In addition, the caller should ensure that
* newMinimum
is {@link Serializable}.
- *
+ *
* @param newMinimum the new minimum value (null
permitted).
- *
+ *
* @see #getMinimum()
*/
public void setMinimum(Comparable newMinimum)
@@ -295,9 +295,9 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Returns the maximum value, or null
if there is no maximum.
- *
+ *
* @return The maximum value.
- *
+ *
* @see #getMinimum()
* @see #setMaximum(Comparable)
*/
@@ -308,15 +308,15 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Sets the maximum value and, if the new value is different to the old
- * value, sends a {@link ChangeEvent} to all registered listeners. A
+ * value, sends a {@link ChangeEvent} to all registered listeners. A
* null
value is interpreted as "no maximum value". No check
- * is made to ensure that the new maximum is greater than or equal to the
- * current value, the caller is responsible for ensuring that this
+ * is made to ensure that the new maximum is greater than or equal to the
+ * current value, the caller is responsible for ensuring that this
* relationship holds. In addition, the caller should ensure that
* newMaximum
is {@link Serializable}.
- *
+ *
* @param newMaximum the new maximum (null
permitted).
- *
+ *
* @see #getMaximum()
*/
public void setMaximum(Comparable newMaximum)
@@ -330,7 +330,7 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Returns the step size.
- *
+ *
* @return The step size (never null
).
*/
public Number getStepSize()
@@ -341,10 +341,10 @@ public class SpinnerNumberModel extends AbstractSpinnerModel
/**
* Sets the step size and, if the new step size is different to the old
* step size, sends a {@link ChangeEvent} to all registered listeners.
- *
+ *
* @param newStepSize the new step size (null
not permitted).
- *
- * @throws IllegalArgumentException if newStepSize
is
+ *
+ * @throws IllegalArgumentException if newStepSize
is
* null
.
*/
public void setStepSize(Number newStepSize)
diff --git a/libjava/classpath/javax/swing/Spring.java b/libjava/classpath/javax/swing/Spring.java
index 4775259..4cc06e5 100644
--- a/libjava/classpath/javax/swing/Spring.java
+++ b/libjava/classpath/javax/swing/Spring.java
@@ -1,4 +1,4 @@
-/* Spring.java --
+/* Spring.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -156,12 +156,12 @@ public abstract class Spring
*/
public abstract void setValue(int value);
- private int getShrinkRange()
+ private int getShrinkRange()
{
return (getPreferredValue() - getMinimumValue());
}
- private int getExpandRange()
+ private int getExpandRange()
{
return (getMaximumValue() - getPreferredValue());
}
@@ -176,7 +176,7 @@ public abstract class Spring
return (double)(v - p) / r;
}
- void setStrain(double strain)
+ void setStrain(double strain)
{
int r = (strain < 0) ? getShrinkRange() : getExpandRange();
int v = (getPreferredValue() + (int)(strain * r));
@@ -411,7 +411,7 @@ public abstract class Spring
return pref;
return value;
}
-
+
/**
* Sets the current value.
*
@@ -536,7 +536,7 @@ public abstract class Spring
int remainder = val - s1.getValue();
s2.setValue(remainder);
}
-
+
}
@@ -735,7 +735,7 @@ public abstract class Spring
s1.setValue(Math.min(val, p1));
s2.setValue(val);
}
- else
+ else
{
s1.setValue(val);
s2.setValue(Math.min(val, p2));
diff --git a/libjava/classpath/javax/swing/SpringLayout.java b/libjava/classpath/javax/swing/SpringLayout.java
index 2595b19..2be5189 100644
--- a/libjava/classpath/javax/swing/SpringLayout.java
+++ b/libjava/classpath/javax/swing/SpringLayout.java
@@ -1,4 +1,4 @@
-/* SpringLayout.java --
+/* SpringLayout.java --
Copyright (C) 2004, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -110,10 +110,10 @@ public class SpringLayout implements LayoutManager2
/** The Spring for the bottom edge. */
private Spring south;
- /**
+ /**
In each axis the user can set three values, i.e. x, width, east, if all
- three are set, then there's no room for manoeuvre so in those cases the
- third will be described by the below spring which is calculated in terms
+ three are set, then there's no room for manoeuvre so in those cases the
+ third will be described by the below spring which is calculated in terms
of the other two
*/
private Spring v;
@@ -189,7 +189,7 @@ public class SpringLayout implements LayoutManager2
{
Spring retVal = null;
if (edgeName.equals(SpringLayout.NORTH))
- retVal = getY();
+ retVal = getY();
else if (edgeName.equals(SpringLayout.WEST))
retVal = getX();
else if (edgeName.equals(SpringLayout.SOUTH))
@@ -202,7 +202,7 @@ public class SpringLayout implements LayoutManager2
/**
* Returns the constraint for the height of the component.
*
- * @return the height constraint.
+ * @return the height constraint.
*/
public Spring getHeight()
{
@@ -294,7 +294,7 @@ public class SpringLayout implements LayoutManager2
*/
public void setConstraint(String edgeName, Spring s)
{
-
+
if (edgeName.equals(SpringLayout.WEST))
setX(s);
else if (edgeName.equals(SpringLayout.NORTH))
@@ -394,7 +394,7 @@ public class SpringLayout implements LayoutManager2
width.setValue(Spring.UNSET);
if (height != null)
height.setValue(Spring.UNSET);
- if (east != null)
+ if (east != null)
east.setValue(Spring.UNSET);
if (south != null)
south.setValue(Spring.UNSET);
@@ -444,16 +444,16 @@ public class SpringLayout implements LayoutManager2
* The trick to SpringLayout is that the network of Springs needs to
* completely created before the positioning results are generated.
*
- * Using the springs directly during network creation will set their values
- * before the network is completed, Using Deferred Springs during creation of
- * the network allows all the edges to be connected together and the network
- * to be created without resolving the Springs until their results need to be
- * known, at which point the network is complete and the spring addition and
+ * Using the springs directly during network creation will set their values
+ * before the network is completed, Using Deferred Springs during creation of
+ * the network allows all the edges to be connected together and the network
+ * to be created without resolving the Springs until their results need to be
+ * known, at which point the network is complete and the spring addition and
* and substitution calculations will work on a complete and valid network.
*
* @author Caolan McNamara (caolanm@redhat.com)
*/
- private static class DeferredSpring extends Spring
+ private static class DeferredSpring extends Spring
{
private SpringLayout sl;
private String edgeName;
@@ -471,27 +471,27 @@ public class SpringLayout implements LayoutManager2
c = component;
}
- private Spring resolveSpring()
+ private Spring resolveSpring()
{
return sl.getConstraints(c).getConstraint(edgeName);
}
- public int getMaximumValue()
+ public int getMaximumValue()
{
return resolveSpring().getMaximumValue();
}
- public int getMinimumValue()
+ public int getMinimumValue()
{
return resolveSpring().getMinimumValue();
}
- public int getPreferredValue()
+ public int getPreferredValue()
{
return resolveSpring().getPreferredValue();
}
- public int getValue()
+ public int getValue()
{
int nRet = resolveSpring().getValue();
if (nRet == Spring.UNSET)
@@ -499,7 +499,7 @@ public class SpringLayout implements LayoutManager2
return nRet;
}
- public void setValue(int size)
+ public void setValue(int size)
{
resolveSpring().setValue(size);
}
@@ -543,18 +543,18 @@ public class SpringLayout implements LayoutManager2
}
//clip max to a value we can do meaningful calculation with
- public int getMaximumValue()
+ public int getMaximumValue()
{
int widget_width = c.getMaximumSize().width;
return Math.min(Short.MAX_VALUE, widget_width);
}
- public int getMinimumValue()
+ public int getMinimumValue()
{
return c.getMinimumSize().width;
}
- public int getPreferredValue()
+ public int getPreferredValue()
{
return c.getPreferredSize().width;
}
@@ -575,18 +575,18 @@ public class SpringLayout implements LayoutManager2
}
//clip max to a value we can do meaningful calculations with it
- public int getMaximumValue()
+ public int getMaximumValue()
{
int widget_height = c.getMaximumSize().height;
return Math.min(Short.MAX_VALUE, widget_height);
}
- public int getMinimumValue()
+ public int getMinimumValue()
{
return c.getMinimumSize().height;
}
- public int getPreferredValue()
+ public int getPreferredValue()
{
return c.getPreferredSize().height;
}
@@ -635,7 +635,7 @@ public class SpringLayout implements LayoutManager2
/**
* Returns the X alignment of the Container p
.
- *
+ *
* @param p
* the {@link java.awt.Container} for which to determine the X
* alignment.
@@ -676,7 +676,7 @@ public class SpringLayout implements LayoutManager2
c.setHeight(null);
if (c.getEast() == null)
c.setEast(Spring.constant(0, 0, Integer.MAX_VALUE));
- if (c.getSouth() == null)
+ if (c.getSouth() == null)
c.setSouth(Spring.constant(0, 0, Integer.MAX_VALUE));
return c;
@@ -715,12 +715,12 @@ public class SpringLayout implements LayoutManager2
Component c = components[index];
Constraints constraints = getConstraints(c);
-
+
int x = constraints.getX().getValue();
int y = constraints.getY().getValue();
int width = constraints.getWidth().getValue();
int height = constraints.getHeight().getValue();
-
+
c.setBounds(x + offsetX, y + offsetY, width, height);
}
}
@@ -794,7 +794,7 @@ public class SpringLayout implements LayoutManager2
* @param e2 the edge of component 2.
* @param c2 the component 2.
*/
- public void putConstraint(String e1, Component c1, int pad, String e2,
+ public void putConstraint(String e1, Component c1, int pad, String e2,
Component c2)
{
putConstraint(e1, c1, Spring.constant(pad), e2, c2);
@@ -811,7 +811,7 @@ public class SpringLayout implements LayoutManager2
* @param e2 the edge of component 2.
* @param c2 the component 2.
*/
- public void putConstraint(String e1, Component c1, Spring s, String e2,
+ public void putConstraint(String e1, Component c1, Spring s, String e2,
Component c2)
{
Constraints constraints1 = getConstraints(c1);
diff --git a/libjava/classpath/javax/swing/SwingConstants.java b/libjava/classpath/javax/swing/SwingConstants.java
index bed8a467..fccf2ea 100644
--- a/libjava/classpath/javax/swing/SwingConstants.java
+++ b/libjava/classpath/javax/swing/SwingConstants.java
@@ -1,4 +1,4 @@
-/* SwingConstants.java --
+/* SwingConstants.java --
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,7 +48,7 @@ public interface SwingConstants
int LEFT = 2;
int BOTTOM = 3;
int RIGHT = 4;
-
+
int NORTH = 1;
int NORTH_EAST = 2;
int EAST = 3;
@@ -57,10 +57,10 @@ public interface SwingConstants
int SOUTH_WEST = 6;
int WEST = 7;
int NORTH_WEST = 8;
-
+
int HORIZONTAL = 0;
- int VERTICAL = 1;
-
+ int VERTICAL = 1;
+
int LEADING = 10;
int TRAILING = 11;
@@ -74,4 +74,3 @@ public interface SwingConstants
*/
int PREVIOUS = 13;
}
-
diff --git a/libjava/classpath/javax/swing/SwingUtilities.java b/libjava/classpath/javax/swing/SwingUtilities.java
index 6ff0b33..6104732 100644
--- a/libjava/classpath/javax/swing/SwingUtilities.java
+++ b/libjava/classpath/javax/swing/SwingUtilities.java
@@ -74,8 +74,8 @@ import javax.swing.text.View;
public class SwingUtilities
implements SwingConstants
{
- /**
- * This frame should be used as parent for JWindow or JDialog
+ /**
+ * This frame should be used as parent for JWindow or JDialog
* that doesn't an owner
*/
private static OwnerFrame ownerFrame;
@@ -92,7 +92,7 @@ public class SwingUtilities
* of the component's coordinate system, where (0,0) is the
* upper left corner of the component's bounds.
*
- * @param c the component to measure the bounds of (if null
,
+ * @param c the component to measure the bounds of (if null
,
* this method returns null
).
* @param r a carrier to store the return value in (if null
, a
* new Rectangle
instance is created).
@@ -115,11 +115,11 @@ public class SwingUtilities
/**
* Returns the focus owner or null
if comp
is not
* the focus owner or a parent of it.
- *
+ *
* @param comp the focus owner or a parent of it
- *
+ *
* @return the focus owner, or null
- *
+ *
* @deprecated 1.4 Replaced by
* KeyboardFocusManager.getFocusOwner()
.
*/
@@ -127,22 +127,22 @@ public class SwingUtilities
{
// Get real focus owner.
Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager()
- .getFocusOwner();
+ .getFocusOwner();
// Check if comp is the focus owner or a parent of it.
Component tmp = focusOwner;
-
+
while (tmp != null)
{
- if (tmp == comp)
- return focusOwner;
+ if (tmp == comp)
+ return focusOwner;
- tmp = tmp.getParent();
+ tmp = tmp.getParent();
}
-
+
return null;
}
-
+
/**
* Returns the Accessible
child of the specified component
* which appears at the supplied Point
. If there is no
@@ -280,7 +280,7 @@ public class SwingUtilities
* @param comp The component to get the JRootPane of
*
* @return a suitable JRootPane for comp
, or null
- *
+ *
* @see javax.swing.RootPaneContainer#getRootPane
* @see #getAncestorOfClass
*/
@@ -354,7 +354,7 @@ public class SwingUtilities
/**
* Equivalent to calling getAncestorOfClass(Window, comp)
.
*
- * @param comp The component to search for an ancestor window
+ * @param comp The component to search for an ancestor window
*
* @return An ancestral window, or null
if none exists
*/
@@ -387,7 +387,7 @@ public class SwingUtilities
app = (Applet) comp;
comp = comp.getParent();
}
-
+
if (win != null)
return win;
return app;
@@ -395,7 +395,7 @@ public class SwingUtilities
/**
* Return true if a descends from b, in other words if b is an ancestor of a.
- *
+ *
* @param a The child to search the ancestry of
* @param b The potential ancestor to search for
* @return true if a is a descendent of b, false otherwise
@@ -419,7 +419,7 @@ public class SwingUtilities
* (x,y)
. Returns null
when either
* (x,y)
is outside the bounds of parent, or parent is
* null
.
- *
+ *
* @param parent The component to search the descendents of
* @param x Horizontal coordinate to search for
* @param y Vertical coordinate to search for
@@ -520,7 +520,7 @@ public class SwingUtilities
return pt;
}
-
+
public static Point convertPoint(Component source, Point aPoint, Component destination)
{
return convertPoint(source, aPoint.x, aPoint.y, destination);
@@ -704,17 +704,17 @@ public class SwingUtilities
* which is laid out in this label
*/
- public static String layoutCompoundLabel(JComponent c,
+ public static String layoutCompoundLabel(JComponent c,
FontMetrics fm,
- String text,
- Icon icon,
+ String text,
+ Icon icon,
int verticalAlignment,
- int horizontalAlignment,
+ int horizontalAlignment,
int verticalTextPosition,
- int horizontalTextPosition,
+ int horizontalTextPosition,
Rectangle viewR,
- Rectangle iconR,
- Rectangle textR,
+ Rectangle iconR,
+ Rectangle textR,
int textIconGap)
{
@@ -921,8 +921,8 @@ public class SwingUtilities
if (text == null || text.equals(""))
{
textIconGap = 0;
- textR.width = 0;
- textR.height = 0;
+ textR.width = 0;
+ textR.height = 0;
text = "";
}
else
@@ -1070,18 +1070,18 @@ public class SwingUtilities
return clipped;
}
- /**
+ /**
* Calls {@link java.awt.EventQueue#invokeLater} with the
- * specified {@link Runnable}.
+ * specified {@link Runnable}.
*/
public static void invokeLater(Runnable doRun)
{
java.awt.EventQueue.invokeLater(doRun);
}
- /**
+ /**
* Calls {@link java.awt.EventQueue#invokeAndWait} with the
- * specified {@link Runnable}.
+ * specified {@link Runnable}.
*/
public static void invokeAndWait(Runnable doRun)
throws InterruptedException,
@@ -1090,21 +1090,21 @@ public class SwingUtilities
java.awt.EventQueue.invokeAndWait(doRun);
}
- /**
+ /**
* Calls {@link java.awt.EventQueue#isDispatchThread()}.
- *
- * @return true
if the current thread is the current AWT event
+ *
+ * @return true
if the current thread is the current AWT event
* dispatch thread.
*/
public static boolean isEventDispatchThread()
{
return java.awt.EventQueue.isDispatchThread();
}
-
+
/**
* This method paints the given component at the given position and size.
* The component will be reparented to the container given.
- *
+ *
* @param g The Graphics object to draw with.
* @param c The Component to draw
* @param p The Container to reparent to.
@@ -1113,22 +1113,22 @@ public class SwingUtilities
* @param w The width of the drawing area.
* @param h The height of the drawing area.
*/
- public static void paintComponent(Graphics g, Component c, Container p,
+ public static void paintComponent(Graphics g, Component c, Container p,
int x, int y, int w, int h)
- {
+ {
Container parent = c.getParent();
if (parent != null)
parent.remove(c);
if (p != null)
p.add(c);
-
+
Shape savedClip = g.getClip();
-
+
g.setClip(x, y, w, h);
g.translate(x, y);
c.paint(g);
-
+
g.translate(-x, -y);
g.setClip(savedClip);
}
@@ -1136,23 +1136,23 @@ public class SwingUtilities
/**
* This method paints the given component in the given rectangle.
* The component will be reparented to the container given.
- *
+ *
* @param g The Graphics object to draw with.
* @param c The Component to draw
* @param p The Container to reparent to.
* @param r The rectangle that describes the drawing area.
- */
- public static void paintComponent(Graphics g, Component c,
+ */
+ public static void paintComponent(Graphics g, Component c,
Container p, Rectangle r)
{
paintComponent(g, c, p, r.x, r.y, r.width, r.height);
}
-
+
/**
* This method returns the common Frame owner used in JDialogs or
* JWindow when no owner is provided.
*
- * @return The common Frame
+ * @return The common Frame
*/
static Window getOwnerFrame(Window owner)
{
@@ -1188,7 +1188,7 @@ public class SwingUtilities
public static boolean isMiddleMouseButton(MouseEvent event)
{
return ((event.getModifiersEx() & InputEvent.BUTTON2_DOWN_MASK)
- == InputEvent.BUTTON2_DOWN_MASK);
+ == InputEvent.BUTTON2_DOWN_MASK);
}
/**
@@ -1201,9 +1201,9 @@ public class SwingUtilities
public static boolean isRightMouseButton(MouseEvent event)
{
return ((event.getModifiersEx() & InputEvent.BUTTON3_DOWN_MASK)
- == InputEvent.BUTTON3_DOWN_MASK);
+ == InputEvent.BUTTON3_DOWN_MASK);
}
-
+
/**
* This frame should be used when constructing a Window/JDialog without
* a parent. In this case, we are forced to use this frame as a window's
@@ -1214,9 +1214,9 @@ public class SwingUtilities
{
public void setVisible(boolean b)
{
- // Do nothing here.
+ // Do nothing here.
}
-
+
public boolean isShowing()
{
return true;
@@ -1251,9 +1251,9 @@ public class SwingUtilities
* parent-pointer chain, as illustrated:
*
*
- * [{@link javax.swing.JComponent#getActionMap()}]
- * --> [{@link javax.swing.ActionMap}]
- * parent --> [{@link javax.swing.text.JTextComponent.KeymapActionMap}]
+ * [{@link javax.swing.JComponent#getActionMap()}]
+ * --> [{@link javax.swing.ActionMap}]
+ * parent --> [{@link javax.swing.text.JTextComponent.KeymapActionMap}]
* parent --> [{@link javax.swing.plaf.ActionMapUIResource}]
*
*
@@ -1266,7 +1266,7 @@ public class SwingUtilities
* call as a request to remove the UI-managed ActionMap from the
* component's ActionMap parent chain.
*/
- public static void replaceUIActionMap(JComponent component,
+ public static void replaceUIActionMap(JComponent component,
ActionMap uiActionMap)
{
ActionMap child = component.getActionMap();
@@ -1294,9 +1294,9 @@ public class SwingUtilities
* end of the parent-pointer chain, as illustrated:
*
*
- * [{@link javax.swing.JComponent#getInputMap()}]
- * --> [{@link javax.swing.InputMap}]
- * parent --> [{@link javax.swing.text.JTextComponent.KeymapWrapper}]
+ * [{@link javax.swing.JComponent#getInputMap()}]
+ * --> [{@link javax.swing.InputMap}]
+ * parent --> [{@link javax.swing.text.JTextComponent.KeymapWrapper}]
* parent --> [{@link javax.swing.plaf.InputMapUIResource}]
*
*
@@ -1309,8 +1309,8 @@ public class SwingUtilities
* call as a request to remove the UI-managed InputMap from the
* component's InputMap parent chain.
*/
- public static void replaceUIInputMap(JComponent component,
- int condition,
+ public static void replaceUIInputMap(JComponent component,
+ int condition,
InputMap uiInputMap)
{
InputMap child = component.getInputMap(condition);
@@ -1357,7 +1357,7 @@ public class SwingUtilities
int h2 = rectB.height;
// (outer box = rectA)
- // -------------
+ // -------------
// |_____0_____|
// | |rectB| |
// |_1|_____|_2|
@@ -1393,11 +1393,11 @@ public class SwingUtilities
int n = 0;
for (int i = 0; i < 4; i++)
if (r[i] != null)
- n++;
+ n++;
Rectangle[] out = new Rectangle[n];
for (int i = 3; i >= 0; i--)
if (r[i] != null)
- out[--n] = r[i];
+ out[--n] = r[i];
return out;
}
@@ -1441,13 +1441,13 @@ public class SwingUtilities
return rect;
}
-
+
/**
* Calculates the width of a given string.
*
* @param fm the FontMetrics
object to use
* @param str the string
- *
+ *
* @return the width of the the string.
*/
public static int computeStringWidth(FontMetrics fm, String str)
@@ -1551,7 +1551,7 @@ public class SwingUtilities
}
/**
- * Processes key bindings for the component that is associated with the
+ * Processes key bindings for the component that is associated with the
* key event. Note that this method does not make sense for
* JComponent-derived components, except when
* {@link JComponent#processKeyEvent(KeyEvent)} is overridden and super is
@@ -1575,7 +1575,7 @@ public class SwingUtilities
KeyboardManager km = KeyboardManager.getManager();
return km.processKeyStroke(c, s, ev);
}
-
+
/**
* Returns a string representing one of the horizontal alignment codes
* defined in the {@link SwingConstants} interface. The following table
@@ -1609,16 +1609,16 @@ public class SwingUtilities
*
* If the supplied code is not one of those listed, this methods will throw
* an {@link IllegalArgumentException}.
- *
+ *
* @param code the code.
- *
+ *
* @return A string representing the given code.
*/
static String convertHorizontalAlignmentCodeToString(int code)
{
- switch (code)
+ switch (code)
{
- case SwingConstants.CENTER:
+ case SwingConstants.CENTER:
return "CENTER";
case SwingConstants.LEFT:
return "LEFT";
@@ -1632,7 +1632,7 @@ public class SwingUtilities
throw new IllegalArgumentException("Unrecognised code: " + code);
}
}
-
+
/**
* Returns a string representing one of the vertical alignment codes
* defined in the {@link SwingConstants} interface. The following table
@@ -1658,9 +1658,9 @@ public class SwingUtilities
*
* If the supplied code is not one of those listed, this methods will throw
* an {@link IllegalArgumentException}.
- *
+ *
* @param code the code.
- *
+ *
* @return A string representing the given code.
*/
static String convertVerticalAlignmentCodeToString(int code)
@@ -1677,7 +1677,7 @@ public class SwingUtilities
throw new IllegalArgumentException("Unrecognised code: " + code);
}
}
-
+
/**
* Returns a string representing one of the default operation codes
* defined in the {@link WindowConstants} interface. The following table
@@ -1707,12 +1707,12 @@ public class SwingUtilities
*
* If the supplied code is not one of those listed, this method will throw
* an {@link IllegalArgumentException}.
- *
+ *
* @param code the code.
- *
+ *
* @return A string representing the given code.
*/
- static String convertWindowConstantToString(int code)
+ static String convertWindowConstantToString(int code)
{
switch (code)
{
diff --git a/libjava/classpath/javax/swing/Timer.java b/libjava/classpath/javax/swing/Timer.java
index acd1eb4..e9954b4 100644
--- a/libjava/classpath/javax/swing/Timer.java
+++ b/libjava/classpath/javax/swing/Timer.java
@@ -51,7 +51,7 @@ import javax.swing.event.EventListenerList;
* firing ActionEvent
s. All Timers share one (daemon)
* Thread (or java.util.Timer). All events are fired from the event
* queue.
- *
+ *
* @author Ronald Veldema
* @author Audrius Meskauskas (audriusa@Bionformatics.org) - bug fixes
* and documentation comments
@@ -99,7 +99,7 @@ public class Timer
* running, even if there's no task scheduled in it.
*/
private static java.util.Timer timer = new java.util.Timer("swing.Timer",
- true);
+ true);
/**
* If true
, the timer prints a message to
@@ -264,12 +264,12 @@ public class Timer
* firing the first event.
*
* @param d The time gap between the subsequent events, in milliseconds
- *
+ *
* @throws IllegalArgumentException if d
is less than zero.
*/
public void setDelay(int d)
{
- if (d < 0)
+ if (d < 0)
throw new IllegalArgumentException("Invalid delay: " + d);
delay = d;
}
@@ -291,7 +291,7 @@ public class Timer
* subsequent events.
*
* @param i the initial delay, in milliseconds
- *
+ *
* @throws IllegalArgumentException if i
is less than zero.
*/
public void setInitialDelay(int i)
@@ -387,12 +387,12 @@ public class Timer
Task t = task;
if (t == null)
{
- t = new Task();
- if (isRepeats())
- timer.schedule(t, getInitialDelay(), getDelay());
- else
- timer.schedule(t, getInitialDelay());
- task = t;
+ t = new Task();
+ if (isRepeats())
+ timer.schedule(t, getInitialDelay(), getDelay());
+ else
+ timer.schedule(t, getInitialDelay());
+ task = t;
}
}
@@ -404,8 +404,8 @@ public class Timer
Task t = task;
if (t != null)
{
- t.cancel();
- task = null;
+ t.cancel();
+ task = null;
}
}
@@ -468,9 +468,9 @@ public class Timer
{
synchronized(queueLock)
{
- queue++;
- if (queue == 1)
- SwingUtilities.invokeLater(drainer);
+ queue++;
+ if (queue == 1)
+ SwingUtilities.invokeLater(drainer);
}
}
}
diff --git a/libjava/classpath/javax/swing/ToolTipManager.java b/libjava/classpath/javax/swing/ToolTipManager.java
index 152fc03..8a31f79 100644
--- a/libjava/classpath/javax/swing/ToolTipManager.java
+++ b/libjava/classpath/javax/swing/ToolTipManager.java
@@ -219,9 +219,9 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
{
if (! enabled)
{
- enterTimer.stop();
- exitTimer.stop();
- insideTimer.stop();
+ enterTimer.stop();
+ exitTimer.stop();
+ insideTimer.stop();
}
this.enabled = enabled;
@@ -276,7 +276,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
* mouse enters a Component.
*
* @param delay The initial delay before the ToolTip is shown.
- *
+ *
* @throws IllegalArgumentException if delay
is less than zero.
*/
public void setInitialDelay(int delay)
@@ -299,7 +299,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
* Sets the time the ToolTip will be shown before being hidden.
*
* @param delay the delay (in milliseconds) before tool tips are hidden.
- *
+ *
* @throws IllegalArgumentException if delay
is less than zero.
*/
public void setDismissDelay(int delay)
@@ -323,7 +323,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
* Component, the tooltip will be shown immediately.
*
* @param delay The reshow delay (in milliseconds).
- *
+ *
* @throws IllegalArgumentException if delay
is less than zero.
*/
public void setReshowDelay(int delay)
@@ -386,7 +386,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
* This method is called when the mouse exits a JComponent registered with the
* ToolTipManager. When the mouse exits, the tooltip should be hidden
* immediately.
- *
+ *
* @param event
* The MouseEvent.
*/
@@ -421,8 +421,8 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
enterTimer.restart();
else if (insideTimer.isRunning())
{
- insideTimer.stop();
- hideTip();
+ insideTimer.stop();
+ hideTip();
}
}
@@ -517,7 +517,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
Point p = currentPoint;
Point cP = currentComponent.getLocationOnScreen();
Dimension dims = currentTip.getPreferredSize();
-
+
JLayeredPane pane = null;
JRootPane r = ((JRootPane) SwingUtilities.getAncestorOfClass(JRootPane.class,
currentComponent));
@@ -525,12 +525,12 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
pane = r.getLayeredPane();
if (pane == null)
return;
-
+
p.translate(cP.x, cP.y);
adjustLocation(p, pane, dims);
-
+
currentTip.setBounds(0, 0, dims.width, dims.height);
-
+
PopupFactory factory = PopupFactory.getSharedInstance();
popup = factory.getPopup(currentComponent, currentTip, p.x, p.y);
popup.show();
@@ -539,7 +539,7 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
/**
* Adjusts the point to a new location on the component,
* using the currentTip's dimensions.
- *
+ *
* @param p - the point to convert.
* @param c - the component the point is on.
* @param d - the dimensions of the currentTip.
@@ -554,10 +554,10 @@ public class ToolTipManager extends MouseAdapter implements MouseMotionListener
p.y += d.height;
if (p.y + d.height > c.getHeight())
p.y -= d.height;
-
+
return p;
}
-
+
/**
* This method hides the ToolTip.
* This is package-private to avoid an accessor method.
diff --git a/libjava/classpath/javax/swing/TransferHandler.java b/libjava/classpath/javax/swing/TransferHandler.java
index 2766974..abf6e8c 100644
--- a/libjava/classpath/javax/swing/TransferHandler.java
+++ b/libjava/classpath/javax/swing/TransferHandler.java
@@ -172,7 +172,7 @@ public class TransferHandler implements Serializable
super(command);
this.command = command;
}
-
+
public void actionPerformed(ActionEvent event)
{
JComponent component = (JComponent) event.getSource();
@@ -180,42 +180,42 @@ public class TransferHandler implements Serializable
Clipboard clipboard = getClipboard(component);
if (clipboard == null)
- {
- // Access denied!
- Toolkit.getDefaultToolkit().beep();
- return;
- }
+ {
+ // Access denied!
+ Toolkit.getDefaultToolkit().beep();
+ return;
+ }
if (command.equals(COMMAND_COPY))
- transferHandler.exportToClipboard(component, clipboard, COPY);
+ transferHandler.exportToClipboard(component, clipboard, COPY);
else if (command.equals(COMMAND_CUT))
- transferHandler.exportToClipboard(component, clipboard, MOVE);
+ transferHandler.exportToClipboard(component, clipboard, MOVE);
else if (command.equals(COMMAND_PASTE))
- {
- Transferable transferable = clipboard.getContents(null);
+ {
+ Transferable transferable = clipboard.getContents(null);
- if (transferable != null)
- transferHandler.importData(component, transferable);
- }
+ if (transferable != null)
+ transferHandler.importData(component, transferable);
+ }
}
-
+
/**
* Get the system cliboard or null if the caller isn't allowed to
* access the system clipboard.
- *
+ *
* @param component a component, used to get the toolkit.
* @return the clipboard
*/
private static Clipboard getClipboard(JComponent component)
{
try
- {
- return component.getToolkit().getSystemClipboard();
- }
+ {
+ return component.getToolkit().getSystemClipboard();
+ }
catch (SecurityException se)
- {
- return null;
- }
+ {
+ return null;
+ }
}
}
@@ -244,7 +244,7 @@ public class TransferHandler implements Serializable
{
// Nothing to do here.
}
-
+
}
private static class SwingDragHandler
@@ -310,7 +310,7 @@ public class TransferHandler implements Serializable
{
// Nothing to do here.
}
-
+
}
private static final long serialVersionUID = -967749805571669910L;
@@ -318,7 +318,7 @@ public class TransferHandler implements Serializable
private static final String COMMAND_COPY = "copy";
private static final String COMMAND_CUT = "cut";
private static final String COMMAND_PASTE = "paste";
-
+
public static final int NONE = 0;
public static final int COPY = 1;
public static final int MOVE = 2;
@@ -327,13 +327,13 @@ public class TransferHandler implements Serializable
private static Action copyAction = new TransferAction(COMMAND_COPY);
private static Action cutAction = new TransferAction(COMMAND_CUT);
private static Action pasteAction = new TransferAction(COMMAND_PASTE);
-
+
private int sourceActions;
private Icon visualRepresentation;
/**
* The name of the property into/from which this TransferHandler
- * imports/exports.
+ * imports/exports.
*/
private String propertyName;
@@ -426,7 +426,7 @@ public class TransferHandler implements Serializable
* from the specified component, or null if the component doesn't
* have a readable property like the transfer handler
*/
- protected Transferable createTransferable(JComponent c)
+ protected Transferable createTransferable(JComponent c)
{
Transferable transferable = null;
if (propertyName != null)
@@ -499,7 +499,7 @@ public class TransferHandler implements Serializable
*
* @throws IllegalStateException when the clipboard is not available
*/
- public void exportToClipboard(JComponent c, Clipboard clip, int action)
+ public void exportToClipboard(JComponent c, Clipboard clip, int action)
throws IllegalStateException
{
action &= getSourceActions(c);
@@ -519,7 +519,7 @@ public class TransferHandler implements Serializable
}
else
exportDone(c, null, NONE);
- }
+ }
public int getSourceActions(JComponent c)
{
@@ -536,7 +536,7 @@ public class TransferHandler implements Serializable
* component c
by setting the property of this TransferHandler
* on that component. If this succeeds, this method returns
* true
, otherwise false
.
- *
+ *
*
* @param c the component to import into
* @param t the transfer data to import
@@ -544,7 +544,7 @@ public class TransferHandler implements Serializable
* @return true
if the transfer succeeds, false
* otherwise
*/
- public boolean importData(JComponent c, Transferable t)
+ public boolean importData(JComponent c, Transferable t)
{
boolean ok = false;
PropertyDescriptor prop = getPropertyDescriptor(c);
diff --git a/libjava/classpath/javax/swing/UIDefaults.java b/libjava/classpath/javax/swing/UIDefaults.java
index 9766cb0..904b4c2 100644
--- a/libjava/classpath/javax/swing/UIDefaults.java
+++ b/libjava/classpath/javax/swing/UIDefaults.java
@@ -129,8 +129,8 @@ public class UIDefaults extends Hashtable
-1
.
- *
+ *
* @param x the x-position.
- *
+ *
* @return The column index, or -1
.
*/
public int getColumnIndexAtX(int x)
- {
+ {
for (int i = 0; i < tableColumns.size(); ++i)
{
int w = (tableColumns.get(i)).getWidth();
@@ -322,21 +322,21 @@ public class DefaultTableColumnModel
}
/**
- * Sets the selection model that will be used to keep track of the selected
+ * Sets the selection model that will be used to keep track of the selected
* columns.
*
* @param model the selection model (null
not permitted).
- *
- * @throws IllegalArgumentException if model
is
+ *
+ * @throws IllegalArgumentException if model
is
* null
.
- *
+ *
* @see #getSelectionModel()
*/
public void setSelectionModel(ListSelectionModel model)
{
if (model == null)
throw new IllegalArgumentException();
-
+
selectionModel.removeListSelectionListener(this);
selectionModel = model;
selectionModel.addListSelectionListener(this);
@@ -344,9 +344,9 @@ public class DefaultTableColumnModel
/**
* Returns the selection model used to track table column selections.
- *
+ *
* @return The selection model.
- *
+ *
* @see #setSelectionModel(ListSelectionModel)
*/
public ListSelectionModel getSelectionModel()
@@ -358,7 +358,7 @@ public class DefaultTableColumnModel
* Sets the flag that indicates whether or not column selection is allowed.
*
* @param flag the new flag value.
- *
+ *
* @see #getColumnSelectionAllowed()
*/
public void setColumnSelectionAllowed(boolean flag)
@@ -367,11 +367,11 @@ public class DefaultTableColumnModel
}
/**
- * Returns true
if column selection is allowed, and
+ * Returns true
if column selection is allowed, and
* false
if column selection is not allowed.
*
* @return A boolean.
- *
+ *
* @see #setColumnSelectionAllowed(boolean)
*/
public boolean getColumnSelectionAllowed()
@@ -386,12 +386,12 @@ public class DefaultTableColumnModel
*/
public int[] getSelectedColumns()
{
- // FIXME: Implementation of this method was taken from private method
+ // FIXME: Implementation of this method was taken from private method
// JTable.getSelections(), which is used in various places in JTable
// including selected row calculations and cannot be simply removed.
// This design should be improved to illuminate duplication of code.
-
- ListSelectionModel lsm = this.selectionModel;
+
+ ListSelectionModel lsm = this.selectionModel;
int sz = getSelectedColumnCount();
int [] ret = new int[sz];
@@ -405,16 +405,16 @@ public class DefaultTableColumnModel
{
case ListSelectionModel.SINGLE_SELECTION:
ret[0] = lo;
- break;
-
- case ListSelectionModel.SINGLE_INTERVAL_SELECTION:
+ break;
+
+ case ListSelectionModel.SINGLE_INTERVAL_SELECTION:
for (int i = lo; i <= hi; ++i)
ret[j++] = i;
break;
-
- case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
+
+ case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
for (int i = lo; i <= hi; ++i)
- if (lsm.isSelectedIndex(i))
+ if (lsm.isSelectedIndex(i))
ret[j++] = i;
break;
}
@@ -424,23 +424,23 @@ public class DefaultTableColumnModel
/**
* Returns the number of selected columns in the model.
- *
+ *
* @return The selected column count.
- *
+ *
* @see #getSelectionModel()
*/
public int getSelectedColumnCount()
{
- // FIXME: Implementation of this method was taken from private method
+ // FIXME: Implementation of this method was taken from private method
// JTable.countSelections(), which is used in various places in JTable
// including selected row calculations and cannot be simply removed.
// This design should be improved to illuminate duplication of code.
-
+
ListSelectionModel lsm = this.selectionModel;
int lo = lsm.getMinSelectionIndex();
int hi = lsm.getMaxSelectionIndex();
int sum = 0;
-
+
if (lo != -1 && hi != -1)
{
switch (lsm.getSelectionMode())
@@ -448,19 +448,19 @@ public class DefaultTableColumnModel
case ListSelectionModel.SINGLE_SELECTION:
sum = 1;
break;
-
+
case ListSelectionModel.SINGLE_INTERVAL_SELECTION:
sum = hi - lo + 1;
break;
-
- case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
+
+ case ListSelectionModel.MULTIPLE_INTERVAL_SELECTION:
for (int i = lo; i <= hi; ++i)
- if (lsm.isSelectedIndex(i))
+ if (lsm.isSelectedIndex(i))
++sum;
break;
}
}
-
+
return sum;
}
@@ -476,7 +476,7 @@ public class DefaultTableColumnModel
}
/**
- * Deregisters a listener so that it no longer receives notification of
+ * Deregisters a listener so that it no longer receives notification of
* changes to this model.
*
* @param listener the listener to remove
@@ -489,10 +489,10 @@ public class DefaultTableColumnModel
/**
* Returns an array containing the listeners that are registered with the
* model. If there are no listeners, an empty array is returned.
- *
+ *
* @return An array containing the listeners that are registered with the
* model.
- *
+ *
* @see #addColumnModelListener(TableColumnModelListener)
* @since 1.4
*/
@@ -500,34 +500,34 @@ public class DefaultTableColumnModel
{
return (TableColumnModelListener[])
listenerList.getListeners(TableColumnModelListener.class);
- }
+ }
/**
- * Sends the specified {@link TableColumnModelEvent} to all registered
+ * Sends the specified {@link TableColumnModelEvent} to all registered
* listeners, to indicate that a column has been added to the model. The
* event's toIndex
attribute should contain the index of the
- * added column.
- *
+ * added column.
+ *
* @param e the event.
- *
+ *
* @see #addColumn(TableColumn)
*/
protected void fireColumnAdded(TableColumnModelEvent e)
- {
+ {
TableColumnModelListener[] listeners = getColumnModelListeners();
for (int i = 0; i < listeners.length; i++)
- listeners[i].columnAdded(e);
+ listeners[i].columnAdded(e);
}
/**
- * Sends the specified {@link TableColumnModelEvent} to all registered
+ * Sends the specified {@link TableColumnModelEvent} to all registered
* listeners, to indicate that a column has been removed from the model. The
* event's fromIndex
attribute should contain the index of the
- * removed column.
- *
+ * removed column.
+ *
* @param e the event.
- *
+ *
* @see #removeColumn(TableColumn)
*/
protected void fireColumnRemoved(TableColumnModelEvent e)
@@ -535,18 +535,18 @@ public class DefaultTableColumnModel
TableColumnModelListener[] listeners = getColumnModelListeners();
for (int i = 0; i < listeners.length; i++)
- listeners[i].columnRemoved(e);
+ listeners[i].columnRemoved(e);
}
/**
- * Sends the specified {@link TableColumnModelEvent} to all registered
+ * Sends the specified {@link TableColumnModelEvent} to all registered
* listeners, to indicate that a column in the model has been moved. The
* event's fromIndex
attribute should contain the old column
* index, and the toIndex
attribute should contain the new
- * column index.
- *
+ * column index.
+ *
* @param e the event.
- *
+ *
* @see #moveColumn(int, int)
*/
protected void fireColumnMoved(TableColumnModelEvent e)
@@ -554,7 +554,7 @@ public class DefaultTableColumnModel
TableColumnModelListener[] listeners = getColumnModelListeners();
for (int i = 0; i < listeners.length; i++)
- listeners[i].columnMoved(e);
+ listeners[i].columnMoved(e);
}
/**
@@ -562,7 +562,7 @@ public class DefaultTableColumnModel
* to indicate that the column selections have changed.
*
* @param e the event.
- *
+ *
* @see #valueChanged(ListSelectionEvent)
*/
protected void fireColumnSelectionChanged(ListSelectionEvent e)
@@ -573,9 +573,9 @@ public class DefaultTableColumnModel
}
/**
- * Sends a {@link ChangeEvent} to the model's registered listeners to
- * indicate that the column margin was changed.
- *
+ * Sends a {@link ChangeEvent} to the model's registered listeners to
+ * indicate that the column margin was changed.
+ *
* @see #setColumnMargin(int)
*/
protected void fireColumnMarginChanged()
@@ -588,13 +588,13 @@ public class DefaultTableColumnModel
}
/**
- * Returns an array containing the listeners (of the specified type) that
+ * Returns an array containing the listeners (of the specified type) that
* are registered with this model.
- *
- * @param listenerType the listener type (must indicate a subclass of
+ *
+ * @param listenerType the listener type (must indicate a subclass of
* {@link EventListener}, null
not permitted).
*
- * @return An array containing the listeners (of the specified type) that
+ * @return An array containing the listeners (of the specified type) that
* are registered with this model.
*/
public width
property for any column changes, we invalidate
- * the {@link #totalColumnWidth} value here.
+ * the {@link #totalColumnWidth} value here.
*
* @param event the event.
*/
public void propertyChange(PropertyChangeEvent event)
{
if (event.getPropertyName().equals("width"))
- invalidateWidthCache();
+ invalidateWidthCache();
}
/**
- * Receives notification of the change to the list selection model, and
- * responds by calling
+ * Receives notification of the change to the list selection model, and
+ * responds by calling
* {@link #fireColumnSelectionChanged(ListSelectionEvent)}.
- *
+ *
* @param e the list selection event.
- *
+ *
* @see #getSelectionModel()
*/
public void valueChanged(ListSelectionEvent e)
@@ -630,21 +630,21 @@ public class DefaultTableColumnModel
}
/**
- * Creates a default selection model to track the currently selected
+ * Creates a default selection model to track the currently selected
* column(s). This method is called by the constructor and returns a new
* instance of {@link DefaultListSelectionModel}.
*
* @return A new default column selection model.
*/
protected ListSelectionModel createSelectionModel()
- {
+ {
return new DefaultListSelectionModel();
}
/**
* Recalculates the total width of the columns, if the cached value is
* -1
. Otherwise this method does nothing.
- *
+ *
* @see #getTotalColumnWidth()
*/
protected void recalcWidthCache()
@@ -661,7 +661,7 @@ public class DefaultTableColumnModel
/**
* Sets the {@link #totalColumnWidth} field to -1
.
- *
+ *
* @see #recalcWidthCache()
*/
private void invalidateWidthCache()
diff --git a/libjava/classpath/javax/swing/table/DefaultTableModel.java b/libjava/classpath/javax/swing/table/DefaultTableModel.java
index 1b68ce2..e1d5e68 100644
--- a/libjava/classpath/javax/swing/table/DefaultTableModel.java
+++ b/libjava/classpath/javax/swing/table/DefaultTableModel.java
@@ -44,10 +44,10 @@ import java.util.Vector;
import javax.swing.event.TableModelEvent;
/**
- * A two dimensional data structure used to store Object
+ * A two dimensional data structure used to store Object
* instances, usually for display in a JTable
component.
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
*/
public class DefaultTableModel extends AbstractTableModel
implements Serializable
@@ -55,7 +55,7 @@ public class DefaultTableModel extends AbstractTableModel
static final long serialVersionUID = 6680042567037222321L;
/**
- * Storage for the rows in the table (each row is itself
+ * Storage for the rows in the table (each row is itself
* a Vector
).
*/
protected Vector dataVector;
@@ -68,27 +68,27 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Creates an empty table with zero rows and zero columns.
*/
- public DefaultTableModel()
+ public DefaultTableModel()
{
this(0, 0);
}
-
+
/**
* Creates a new table with the specified number of rows and columns.
* All cells in the table are initially empty (set to null
).
- *
+ *
* @param numRows the number of rows.
* @param numColumns the number of columns.
*/
- public DefaultTableModel(int numRows, int numColumns)
+ public DefaultTableModel(int numRows, int numColumns)
{
Vector defaultNames = new Vector(numColumns);
Vector data = new Vector(numRows);
- for (int i = 0; i < numColumns; i++)
+ for (int i = 0; i < numColumns; i++)
{
defaultNames.add(super.getColumnName(i));
- }
- for (int r = 0; r < numRows; r++)
+ }
+ for (int r = 0; r < numRows; r++)
{
Vector tmp = new Vector(numColumns);
tmp.setSize(numColumns);
@@ -96,16 +96,16 @@ public class DefaultTableModel extends AbstractTableModel
}
setDataVector(data, defaultNames);
}
-
+
/**
* Creates a new table with the specified column names and number of
* rows. The number of columns is determined by the number of column
* names supplied.
- *
+ *
* @param columnNames the column names.
* @param numRows the number of rows.
*/
- public DefaultTableModel(Vector columnNames, int numRows)
+ public DefaultTableModel(Vector columnNames, int numRows)
{
if (numRows < 0)
throw new IllegalArgumentException("numRows < 0");
@@ -114,8 +114,8 @@ public class DefaultTableModel extends AbstractTableModel
if (columnNames != null)
numColumns = columnNames.size();
-
- while (0 < numRows--)
+
+ while (0 < numRows--)
{
Vector rowData = new Vector();
rowData.setSize(numColumns);
@@ -126,43 +126,43 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Creates a new table with the specified column names and row count.
- *
+ *
* @param columnNames the column names.
* @param numRows the number of rows.
*/
- public DefaultTableModel(Object[] columnNames, int numRows)
+ public DefaultTableModel(Object[] columnNames, int numRows)
{
this(convertToVector(columnNames), numRows);
}
-
+
/**
* Creates a new table with the specified data values and column names.
- *
+ *
* @param data the data values.
* @param columnNames the column names.
*/
- public DefaultTableModel(Vector data, Vector columnNames)
+ public DefaultTableModel(Vector data, Vector columnNames)
{
setDataVector(data, columnNames);
}
/**
* Creates a new table with the specified data values and column names.
- *
+ *
* @param data the data values.
* @param columnNames the column names.
*/
- public DefaultTableModel(Object[][] data, Object[] columnNames)
+ public DefaultTableModel(Object[][] data, Object[] columnNames)
{
this(convertToVector(data), convertToVector(columnNames));
}
/**
* Returns the vector containing the row data for the table.
- *
+ *
* @return The data vector.
*/
- public Vector getDataVector()
+ public Vector getDataVector()
{
return dataVector;
}
@@ -173,13 +173,13 @@ public class DefaultTableModel extends AbstractTableModel
* number of objects in each row does not match the number of column
* names specified, the row data is truncated or expanded (by adding
* null
values) as required.
- *
+ *
* @param data the data for the table (a vector of row vectors).
* @param columnNames the column names.
- *
+ *
* @throws NullPointerException if either argument is null
.
*/
- public void setDataVector(Vector data, Vector columnNames)
+ public void setDataVector(Vector data, Vector columnNames)
{
if (data == null)
dataVector = new Vector();
@@ -190,87 +190,87 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Sets the data and column identifiers for the table.
- *
+ *
* @param data the data for the table.
* @param columnNames the column names.
- *
+ *
* @throws NullPointerException if either argument is null
.
*/
- public void setDataVector(Object[][] data, Object[] columnNames)
+ public void setDataVector(Object[][] data, Object[] columnNames)
{
- setDataVector(convertToVector(data),
+ setDataVector(convertToVector(data),
convertToVector(columnNames));
}
-
+
/**
* Sends the specified event
to all registered listeners.
- * This method is equivalent to
+ * This method is equivalent to
* {@link AbstractTableModel#fireTableChanged(TableModelEvent)}.
- *
+ *
* @param event the event.
*/
- public void newDataAvailable(TableModelEvent event)
+ public void newDataAvailable(TableModelEvent event)
{
fireTableChanged(event);
}
/**
* Sends the specified event
to all registered listeners.
- * This method is equivalent to
+ * This method is equivalent to
* {@link AbstractTableModel#fireTableChanged(TableModelEvent)}.
- *
+ *
* @param event the event.
*/
- public void newRowsAdded(TableModelEvent event)
+ public void newRowsAdded(TableModelEvent event)
{
fireTableChanged(event);
}
/**
* Sends the specified event
to all registered listeners.
- * This method is equivalent to
+ * This method is equivalent to
* {@link AbstractTableModel#fireTableChanged(TableModelEvent)}.
- *
+ *
* @param event the event.
*/
- public void rowsRemoved(TableModelEvent event)
+ public void rowsRemoved(TableModelEvent event)
{
fireTableChanged(event);
}
/**
* Sets the column identifiers, updates the data rows (truncating
- * or padding each row with null
values) to match the
+ * or padding each row with null
values) to match the
* number of columns, and sends a {@link TableModelEvent} to all
* registered listeners.
- *
+ *
* @param columnIdentifiers the column identifiers.
*/
- public void setColumnIdentifiers(Vector columnIdentifiers)
+ public void setColumnIdentifiers(Vector columnIdentifiers)
{
this.columnIdentifiers = columnIdentifiers;
setColumnCount(columnIdentifiers == null ? 0 : columnIdentifiers.size());
}
-
+
/**
* Sets the column identifiers, updates the data rows (truncating
- * or padding each row with null
values) to match the
+ * or padding each row with null
values) to match the
* number of columns, and sends a {@link TableModelEvent} to all
* registered listeners.
- *
+ *
* @param columnIdentifiers the column identifiers.
*/
- public void setColumnIdentifiers(Object[] columnIdentifiers)
+ public void setColumnIdentifiers(Object[] columnIdentifiers)
{
setColumnIdentifiers(convertToVector(columnIdentifiers));
}
/**
* This method is obsolete, use {@link #setRowCount(int)} instead.
- *
+ *
* @param numRows the number of rows.
*/
- public void setNumRows(int numRows)
+ public void setNumRows(int numRows)
{
setRowCount(numRows);
}
@@ -280,18 +280,18 @@ public class DefaultTableModel extends AbstractTableModel
* than the current number of rows in the table, rows are discarded.
* If rowCount
is greater than the current number of rows in
* the table, new (empty) rows are added.
- *
+ *
* @param rowCount the row count.
*/
- public void setRowCount(int rowCount)
+ public void setRowCount(int rowCount)
{
int existingRowCount = dataVector.size();
- if (rowCount < existingRowCount)
+ if (rowCount < existingRowCount)
{
dataVector.setSize(rowCount);
- fireTableRowsDeleted(rowCount, existingRowCount - 1);
+ fireTableRowsDeleted(rowCount, existingRowCount - 1);
}
- else
+ else
{
int rowsToAdd = rowCount - existingRowCount;
addExtraRows(rowsToAdd, columnIdentifiers.size());
@@ -303,16 +303,16 @@ public class DefaultTableModel extends AbstractTableModel
* Sets the number of columns in the table. Existing rows are truncated
* or padded with null
values to match the new column count.
* A {@link TableModelEvent} is sent to all registered listeners.
- *
+ *
* @param columnCount the column count.
*/
- public void setColumnCount(int columnCount)
+ public void setColumnCount(int columnCount)
{
for (int i = 0; i < dataVector.size(); ++i)
{
((Vector) dataVector.get(i)).setSize(columnCount);
}
- if (columnIdentifiers != null)
+ if (columnIdentifiers != null)
columnIdentifiers.setSize(columnCount);
fireTableStructureChanged();
}
@@ -320,24 +320,24 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Adds a column with the specified name to the table. All cell values
* for the column are initially set to null
.
- *
+ *
* @param columnName the column name (null
permitted).
*/
- public void addColumn(Object columnName)
+ public void addColumn(Object columnName)
{
addColumn(columnName, (Object[]) null);
}
/**
- * Adds a column with the specified name and data values to the table.
- *
+ * Adds a column with the specified name and data values to the table.
+ *
* @param columnName the column name (null
permitted).
* @param columnData the column data.
*/
- public void addColumn(Object columnName, Vector columnData)
+ public void addColumn(Object columnName, Vector columnData)
{
Object[] dataArray = null;
- if (columnData != null)
+ if (columnData != null)
{
int rowCount = dataVector.size();
if (columnData.size() < rowCount)
@@ -349,17 +349,17 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Adds a column with the specified name and data values to the table.
- *
+ *
* @param columnName the column name (null
permitted).
* @param columnData the column data.
*/
- public void addColumn(Object columnName, Object[] columnData)
+ public void addColumn(Object columnName, Object[] columnData)
{
if (columnData != null)
{
// check columnData array for cases where the number of items
// doesn't match the number of rows in the existing table
- if (columnData.length > dataVector.size())
+ if (columnData.length > dataVector.size())
{
int rowsToAdd = columnData.length - dataVector.size();
addExtraRows(rowsToAdd, columnIdentifiers.size());
@@ -382,10 +382,10 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Adds a new row containing the specified data to the table and sends a
* {@link TableModelEvent} to all registered listeners.
- *
+ *
* @param rowData the row data (null
permitted).
*/
- public void addRow(Vector rowData)
+ public void addRow(Vector rowData)
{
int rowIndex = dataVector.size();
dataVector.add(rowData);
@@ -397,21 +397,21 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Adds a new row containing the specified data to the table and sends a
* {@link TableModelEvent} to all registered listeners.
- *
+ *
* @param rowData the row data (null
permitted).
*/
- public void addRow(Object[] rowData)
+ public void addRow(Object[] rowData)
{
addRow(convertToVector(rowData));
}
/**
* Inserts a new row into the table.
- *
+ *
* @param row the row index.
* @param rowData the row data.
*/
- public void insertRow(int row, Vector rowData)
+ public void insertRow(int row, Vector rowData)
{
dataVector.add(row, rowData);
fireTableRowsInserted(row, row);
@@ -419,11 +419,11 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Inserts a new row into the table.
- *
+ *
* @param row the row index.
* @param rowData the row data.
*/
- public void insertRow(int row, Object[] rowData)
+ public void insertRow(int row, Object[] rowData)
{
insertRow(row, convertToVector(rowData));
}
@@ -431,21 +431,21 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Moves the rows from startIndex
to endIndex
* (inclusive) to the specified row.
- *
+ *
* @param startIndex the start row.
* @param endIndex the end row.
* @param toIndex the row to move to.
*/
- public void moveRow(int startIndex, int endIndex, int toIndex)
+ public void moveRow(int startIndex, int endIndex, int toIndex)
{
Vector removed = new Vector();
for (int i = endIndex; i >= startIndex; i--)
{
removed.add(this.dataVector.remove(i));
}
- for (int i = 0; i <= endIndex - startIndex; i++)
+ for (int i = 0; i <= endIndex - startIndex; i++)
{
- dataVector.insertElementAt(removed.get(i), toIndex);
+ dataVector.insertElementAt(removed.get(i), toIndex);
}
int firstRow = Math.min(startIndex, toIndex);
int lastRow = Math.max(endIndex, toIndex + (endIndex - startIndex));
@@ -455,10 +455,10 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Removes a row from the table and sends a {@link TableModelEvent} to
* all registered listeners.
- *
+ *
* @param row the row index.
*/
- public void removeRow(int row)
+ public void removeRow(int row)
{
dataVector.remove(row);
fireTableRowsDeleted(row, row);
@@ -466,20 +466,20 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Returns the number of rows in the model.
- *
+ *
* @return The row count.
*/
- public int getRowCount()
+ public int getRowCount()
{
return dataVector.size();
}
/**
* Returns the number of columns in the model.
- *
+ *
* @return The column count.
*/
- public int getColumnCount()
+ public int getColumnCount()
{
return columnIdentifiers == null ? 0 : columnIdentifiers.size();
}
@@ -489,23 +489,23 @@ public class DefaultTableModel extends AbstractTableModel
* the return value is the result of the .toString() method call on that
* identifier. If the identifier is not explicitly set, the returned value
* is calculated by {@link AbstractTableModel#getColumnName(int)}.
- *
+ *
* @param column the column index.
- *
+ *
* @return The column name.
*/
public String getColumnName(int column)
{
String result = "";
- if (columnIdentifiers == null)
+ if (columnIdentifiers == null)
result = super.getColumnName(column);
- else
+ else
{
if (column < getColumnCount())
{
checkSize();
Object id = columnIdentifiers.get(column);
- if (id != null)
+ if (id != null)
result = id.toString();
else
result = super.getColumnName(column);
@@ -520,40 +520,40 @@ public class DefaultTableModel extends AbstractTableModel
* Returns true
if the specified cell can be modified, and
* false
otherwise. For this implementation, the method
* always returns true
.
- *
+ *
* @param row the row index.
* @param column the column index.
- *
+ *
* @return true
in all cases.
*/
- public boolean isCellEditable(int row, int column)
+ public boolean isCellEditable(int row, int column)
{
return true;
}
/**
* Returns the value at the specified cell in the table.
- *
+ *
* @param row the row index.
* @param column the column index.
- *
- * @return The value (Object
, possibly null
) at
+ *
+ * @return The value (Object
, possibly null
) at
* the specified cell in the table.
*/
- public Object getValueAt(int row, int column)
+ public Object getValueAt(int row, int column)
{
return ((Vector) dataVector.get(row)).get(column);
}
/**
- * Sets the value for the specified cell in the table and sends a
+ * Sets the value for the specified cell in the table and sends a
* {@link TableModelEvent} to all registered listeners.
- *
+ *
* @param value the value (Object
, null
permitted).
* @param row the row index.
* @param column the column index.
*/
- public void setValueAt(Object value, int row, int column)
+ public void setValueAt(Object value, int row, int column)
{
((Vector) dataVector.get(row)).set(column, value);
fireTableCellUpdated(row, column);
@@ -561,31 +561,31 @@ public class DefaultTableModel extends AbstractTableModel
/**
* Converts the data array to a Vector
.
- *
+ *
* @param data the data array (null
permitted).
- *
- * @return A vector (or null
if the data array
+ *
+ * @return A vector (or null
if the data array
* is null
).
*/
- protected static Vector convertToVector(Object[] data)
+ protected static Vector convertToVector(Object[] data)
{
if (data == null)
return null;
Vector vector = new Vector(data.length);
- for (int i = 0; i < data.length; i++)
+ for (int i = 0; i < data.length; i++)
vector.add(data[i]);
- return vector;
+ return vector;
}
-
+
/**
* Converts the data array to a Vector
of rows.
- *
+ *
* @param data the data array (null
permitted).
- *
- * @return A vector (or null
if the data array
+ *
+ * @return A vector (or null
if the data array
* is null
.
*/
- protected static Vector convertToVector(Object[][] data)
+ protected static Vector convertToVector(Object[][] data)
{
if (data == null)
return null;
@@ -603,12 +603,12 @@ public class DefaultTableModel extends AbstractTableModel
*/
private void addExtraRows(int rowsToAdd, int nbColumns)
{
- for (int i = 0; i < rowsToAdd; i++)
+ for (int i = 0; i < rowsToAdd; i++)
{
Vector tmp = new Vector();
tmp.setSize(columnIdentifiers.size());
dataVector.add(tmp);
- }
+ }
}
/**
@@ -621,10 +621,10 @@ public class DefaultTableModel extends AbstractTableModel
{
int columnCount = getColumnCount();
int rowCount = getRowCount();
-
+
if (columnCount > columnIdentifiers.size())
columnIdentifiers.setSize(columnCount);
-
+
if (dataVector != null && rowCount > dataVector.size())
{
int rowsToAdd = rowCount - dataVector.size();
diff --git a/libjava/classpath/javax/swing/table/JTableHeader.java b/libjava/classpath/javax/swing/table/JTableHeader.java
index 4661748..4eb9115 100644
--- a/libjava/classpath/javax/swing/table/JTableHeader.java
+++ b/libjava/classpath/javax/swing/table/JTableHeader.java
@@ -81,23 +81,23 @@ public class JTableHeader extends JComponent
protected class AccessibleJTableHeaderEntry extends AccessibleContext
implements Accessible, AccessibleComponent
{
-
+
private int columnIndex;
-
+
private JTableHeader parent;
-
+
private JTable table;
-
+
public AccessibleJTableHeaderEntry(int c, JTableHeader p, JTable t)
{
columnIndex = c;
parent = p;
table = t;
}
-
+
/**
* Returns the column header renderer.
- *
+ *
* @return The column header renderer.
*/
Component getColumnHeaderRenderer()
@@ -106,14 +106,14 @@ public class JTableHeader extends JComponent
TableCellRenderer r = tc.getHeaderRenderer();
if (r == null)
r = parent.getDefaultRenderer();
- return r.getTableCellRendererComponent(table, tc.headerValue,
+ return r.getTableCellRendererComponent(table, tc.headerValue,
false, false, -1, columnIndex);
}
-
+
/**
- * Returns the accessible context for the column header renderer, or
+ * Returns the accessible context for the column header renderer, or
* null
.
- *
+ *
* @return The accessible context.
*/
AccessibleContext getAccessibleColumnHeaderRenderer()
@@ -123,7 +123,7 @@ public class JTableHeader extends JComponent
return c.getAccessibleContext();
return null;
}
-
+
/**
* @see #removeFocusListener(FocusListener)
*/
@@ -134,7 +134,7 @@ public class JTableHeader extends JComponent
if (c != null)
c.addFocusListener(l);
}
-
+
/**
* @see #removePropertyChangeListener(PropertyChangeListener)
*/
@@ -146,26 +146,26 @@ public class JTableHeader extends JComponent
if (ac != null)
ac.addPropertyChangeListener(l);
}
-
+
public boolean contains(Point p)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
AccessibleComponent c = ac.getAccessibleComponent();
if (c != null)
return c.contains(p);
- else
+ else
return false;
}
-
+
public AccessibleAction getAccessibleAction()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
if (ac instanceof AccessibleAction)
return (AccessibleAction) ac;
- else
+ else
return null;
}
-
+
public Accessible getAccessibleAt(Point p)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -175,53 +175,53 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
/**
* Returns null
as the header entry has no accessible
* children.
- *
+ *
* @return null
.
*/
public Accessible getAccessibleChild(int i)
{
return null;
}
-
+
/**
* Returns the number of accessible children, zero in this case.
- *
+ *
* @return 0
*/
public int getAccessibleChildrenCount()
{
return 0;
}
-
+
/**
* Returns the accessible component for this header entry.
- *
+ *
* @return this
.
*/
public AccessibleComponent getAccessibleComponent()
{
return this;
}
-
+
/**
* Returns the accessible context for this header entry.
- *
+ *
* @return this
.
*/
public AccessibleContext getAccessibleContext()
{
return this;
}
-
+
/**
* Returns the accessible description.
- *
+ *
* @return The accessible description.
- *
+ *
* @see #setAccessibleDescription(String)
*/
public String getAccessibleDescription()
@@ -231,22 +231,22 @@ public class JTableHeader extends JComponent
return ac.getAccessibleDescription();
return accessibleDescription;
}
-
+
/**
* Returns the index of this header entry.
- *
+ *
* @return The index of this header entry.
*/
public int getAccessibleIndexInParent()
{
return columnIndex;
}
-
+
/**
* Returns the accessible name.
- *
+ *
* @return The accessible name.
- *
+ *
* @see #setAccessibleName(String)
*/
public String getAccessibleName()
@@ -256,10 +256,10 @@ public class JTableHeader extends JComponent
return ac.getAccessibleName();
return accessibleName;
}
-
+
/**
* Returns the accessible role for the header entry.
- *
+ *
* @return The accessible role.
*/
public AccessibleRole getAccessibleRole()
@@ -270,43 +270,43 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public AccessibleSelection getAccessibleSelection()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
if (ac instanceof AccessibleValue)
return (AccessibleSelection) ac;
- else
+ else
return null;
}
-
+
public AccessibleStateSet getAccessibleStateSet()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
if (ac != null)
return ac.getAccessibleStateSet();
- else
+ else
return null;
}
-
+
public AccessibleText getAccessibleText()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
if (ac != null)
return ac.getAccessibleText();
- else
+ else
return null;
}
-
+
public AccessibleValue getAccessibleValue()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
if (ac instanceof AccessibleValue)
return (AccessibleValue) ac;
- else
+ else
return null;
}
-
+
public Color getBackground()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -316,7 +316,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Rectangle getBounds()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -326,7 +326,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Cursor getCursor()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -336,7 +336,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Font getFont()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -346,7 +346,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public FontMetrics getFontMetrics(Font f)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -356,7 +356,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Color getForeground()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -366,7 +366,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Locale getLocale()
{
Component c = getColumnHeaderRenderer();
@@ -374,7 +374,7 @@ public class JTableHeader extends JComponent
return c.getLocale();
return null;
}
-
+
public Point getLocation()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -384,7 +384,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Point getLocationOnScreen()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -394,7 +394,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public Dimension getSize()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -404,7 +404,7 @@ public class JTableHeader extends JComponent
else
return null;
}
-
+
public boolean isEnabled()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -414,7 +414,7 @@ public class JTableHeader extends JComponent
else
return false;
}
-
+
public boolean isFocusTraversable()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -424,7 +424,7 @@ public class JTableHeader extends JComponent
else
return false;
}
-
+
public boolean isShowing()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -434,7 +434,7 @@ public class JTableHeader extends JComponent
else
return false;
}
-
+
public boolean isVisible()
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -444,7 +444,7 @@ public class JTableHeader extends JComponent
else
return false;
}
-
+
/**
* @see #addFocusListener(FocusListener)
*/
@@ -455,7 +455,7 @@ public class JTableHeader extends JComponent
if (c != null)
c.removeFocusListener(l);
}
-
+
/**
* @see #addPropertyChangeListener(PropertyChangeListener)
*/
@@ -465,7 +465,7 @@ public class JTableHeader extends JComponent
if (ac != null)
ac.removePropertyChangeListener(l);
}
-
+
/**
* @see #addFocusListener(FocusListener)
*/
@@ -476,7 +476,7 @@ public class JTableHeader extends JComponent
if (c != null)
c.requestFocus();
}
-
+
/**
* @see #getAccessibleDescription()
*/
@@ -488,7 +488,7 @@ public class JTableHeader extends JComponent
else
accessibleDescription = s;
}
-
+
/**
* @see #getAccessibleName()
*/
@@ -498,7 +498,7 @@ public class JTableHeader extends JComponent
if (ac != null)
ac.setAccessibleName(s);
}
-
+
public void setBackground(Color c)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -506,7 +506,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setBackground(c);
}
-
+
public void setBounds(Rectangle r)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -514,7 +514,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setBounds(r);
}
-
+
public void setCursor(Cursor c)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -522,7 +522,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setCursor(c);
}
-
+
public void setEnabled(boolean b)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -530,7 +530,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setEnabled(b);
}
-
+
public void setFont(Font f)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -538,7 +538,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setFont(f);
}
-
+
public void setForeground(Color c)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -546,7 +546,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setForeground(c);
}
-
+
public void setLocation(Point p)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -554,7 +554,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setLocation(p);
}
-
+
public void setSize(Dimension d)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -562,7 +562,7 @@ public class JTableHeader extends JComponent
if (comp != null)
comp.setSize(d);
}
-
+
public void setVisible(boolean b)
{
AccessibleContext ac = getAccessibleColumnHeaderRenderer();
@@ -571,28 +571,28 @@ public class JTableHeader extends JComponent
comp.setVisible(b);
}
}
-
+
public AccessibleRole getAccessibleRole()
{
return AccessibleRole.PANEL;
}
-
+
public int getAccessibleChildrenCount()
{
return table.getColumnCount();
}
-
+
public Accessible getAccessibleChild(int i)
{
return new AccessibleJTableHeaderEntry(i, JTableHeader.this, table);
}
-
+
public Accessible getAccessibleAt(Point p)
{
return getAccessibleChild(columnAtPoint(p));
}
}
-
+
/**
* Use serialVersionUid for interoperability.
*/
@@ -643,7 +643,7 @@ public class JTableHeader extends JComponent
*/
protected boolean updateTableInRealTime;
- TableCellRenderer cellRenderer;
+ TableCellRenderer cellRenderer;
/**
* Creates a new default instance.
@@ -655,21 +655,21 @@ public class JTableHeader extends JComponent
/**
* Creates a new header. If cm
is null
, a new
- * table column model is created by calling
+ * table column model is created by calling
* {@link #createDefaultColumnModel()}.
- *
+ *
* @param cm the table column model (null
permitted).
*/
public JTableHeader(TableColumnModel cm)
{
- columnModel = cm == null ? createDefaultColumnModel() : cm;
+ columnModel = cm == null ? createDefaultColumnModel() : cm;
initializeLocalVars();
updateUI();
}
/**
* Creates a default table column model.
- *
+ *
* @return A default table column model.
*/
protected TableColumnModel createDefaultColumnModel()
@@ -724,7 +724,7 @@ public class JTableHeader extends JComponent
* disabled with {@link #setReorderingAllowed(boolean)}.
*
* @return true if reordering is allowed, false otherwise.
- */
+ */
public boolean getReorderingAllowed()
{
return reorderingAllowed;
@@ -736,7 +736,7 @@ public class JTableHeader extends JComponent
* by default, but can be disabled with {@link #setResizingAllowed(boolean)}.
*
* @return true if resizing is allowed, false otherwise.
- */
+ */
public boolean getResizingAllowed()
{
return resizingAllowed;
@@ -787,7 +787,7 @@ public class JTableHeader extends JComponent
* Set the value of the {@link #columnModel} property.
*
* @param c The new value of the property
- */
+ */
public void setColumnModel(TableColumnModel c)
{
columnModel.removeColumnModelListener(this);
@@ -797,11 +797,11 @@ public class JTableHeader extends JComponent
/**
* Set the column that is currently being dragged. This is used when
- * dragging the column with mouse. Setting to null will stop the
+ * dragging the column with mouse. Setting to null will stop the
* dragging session immediately.
*
* @param draggingIt the column being currently dragged, null if none.
- */
+ */
public void setDraggedColumn(TableColumn draggingIt)
{
draggedColumn = draggingIt;
@@ -811,7 +811,7 @@ public class JTableHeader extends JComponent
* Set the value of the {@link #draggedDistance} property.
*
* @param d The new value of the property
- */
+ */
public void setDraggedDistance(int d)
{
draggedDistance = d;
@@ -821,7 +821,7 @@ public class JTableHeader extends JComponent
* Set the value of the {@link #opaque} property.
*
* @param o The new value of the property
- */
+ */
public void setOpaque(boolean o)
{
opaque = o;
@@ -833,7 +833,7 @@ public class JTableHeader extends JComponent
* disabled with this method.
*
* @param allowed true if reordering is allowed, false otherwise.
- */
+ */
public void setReorderingAllowed(boolean allowed)
{
reorderingAllowed = allowed;
@@ -845,7 +845,7 @@ public class JTableHeader extends JComponent
* by default, but can be disabled using this method.
*
* @param allowed true if resizing is allowed, false otherwise.
- */
+ */
public void setResizingAllowed(boolean allowed)
{
resizingAllowed = allowed;
@@ -857,7 +857,7 @@ public class JTableHeader extends JComponent
* the resizing session immediately.
*
* @param resizingIt the column being currently resized
- */
+ */
public void setResizingColumn(TableColumn resizingIt)
{
resizingColumn = resizingIt;
@@ -867,7 +867,7 @@ public class JTableHeader extends JComponent
* Set the value of the {@link #table} property.
*
* @param t The new value of the property
- */
+ */
public void setTable(JTable t)
{
table = t;
@@ -877,7 +877,7 @@ public class JTableHeader extends JComponent
* Set the value of the {@link #updateTableInRealTime} property.
*
* @param u The new value of the property
- */
+ */
public void setUpdateTableInRealTime(boolean u)
{
updateTableInRealTime = u;
@@ -885,17 +885,17 @@ public class JTableHeader extends JComponent
/**
* Creates a default renderer.
- *
+ *
* @return A default renderer.
*/
protected TableCellRenderer createDefaultRenderer()
{
return new DefaultTableCellRenderer();
}
-
+
/**
* Returns the default table cell renderer.
- *
+ *
* @return The default table cell renderer.
*/
public TableCellRenderer getDefaultRenderer()
@@ -905,19 +905,19 @@ public class JTableHeader extends JComponent
/**
* Sets the default table cell renderer.
- *
+ *
* @param cellRenderer the renderer.
*/
public void setDefaultRenderer(TableCellRenderer cellRenderer)
{
this.cellRenderer = cellRenderer;
}
-
+
/**
* Get the rectangle, occupied by the header of the given column.
- *
+ *
* @param column the column, for that the header area is requested.
- *
+ *
* @return the column header area.
*/
public Rectangle getHeaderRect(int column)
@@ -956,16 +956,16 @@ public class JTableHeader extends JComponent
/**
* Returns the index of the column at the specified point.
- *
+ *
* @param point the point.
- *
+ *
* @return The column index, or -1.
*/
public int columnAtPoint(Point point)
{
if (getBounds().contains(point))
return columnModel.getColumnIndexAtX(point.x);
-
+
return -1;
}
diff --git a/libjava/classpath/javax/swing/table/TableCellEditor.java b/libjava/classpath/javax/swing/table/TableCellEditor.java
index 15070a7..933eb9e 100644
--- a/libjava/classpath/javax/swing/table/TableCellEditor.java
+++ b/libjava/classpath/javax/swing/table/TableCellEditor.java
@@ -47,7 +47,7 @@ import javax.swing.JTable;
* TableCellEditor public interface
* @author Andrew Selkirk
*/
-public interface TableCellEditor extends CellEditor
+public interface TableCellEditor extends CellEditor
{
/**
@@ -59,7 +59,7 @@ public interface TableCellEditor extends CellEditor
* @param column Column of cell
* @return Component
*/
- Component getTableCellEditorComponent(JTable table, Object value,
+ Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected, int row, int column);
}
diff --git a/libjava/classpath/javax/swing/table/TableCellRenderer.java b/libjava/classpath/javax/swing/table/TableCellRenderer.java
index 6c1fecf..da7296d 100644
--- a/libjava/classpath/javax/swing/table/TableCellRenderer.java
+++ b/libjava/classpath/javax/swing/table/TableCellRenderer.java
@@ -46,7 +46,7 @@ import javax.swing.JTable;
* TableCellRenderer public interface
* @author Andrew Selkirk
*/
-public interface TableCellRenderer
+public interface TableCellRenderer
{
/**
@@ -59,7 +59,7 @@ public interface TableCellRenderer
* @param column Column of cell
* @return Component
*/
- Component getTableCellRendererComponent(JTable table, Object value,
+ Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column);
diff --git a/libjava/classpath/javax/swing/table/TableColumn.java b/libjava/classpath/javax/swing/table/TableColumn.java
index fbb877d..8db4bf6 100644
--- a/libjava/classpath/javax/swing/table/TableColumn.java
+++ b/libjava/classpath/javax/swing/table/TableColumn.java
@@ -49,8 +49,8 @@ import javax.swing.event.SwingPropertyChangeSupport;
/**
* Represents the attributes of a column in a table, including the column index,
* width, minimum width, preferred width and maximum width.
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
*/
public class TableColumn
implements Serializable
@@ -59,7 +59,7 @@ public class TableColumn
/**
* The name for the columnWidth
property (this field is
- * obsolete and no longer used). Note also that the typo in the value
+ * obsolete and no longer used). Note also that the typo in the value
* string is deliberate, to match the specification.
*/
public static final String COLUMN_WIDTH_PROPERTY = "columWidth";
@@ -158,9 +158,9 @@ public class TableColumn
}
/**
- * Creates a new TableColumn
that maps to the specified column
+ * Creates a new TableColumn
that maps to the specified column
* in the related table model. The default width is 75
units.
- *
+ *
* @param modelIndex the index of the column in the model
*/
public TableColumn(int modelIndex)
@@ -169,9 +169,9 @@ public class TableColumn
}
/**
- * Creates a new TableColumn
that maps to the specified column
+ * Creates a new TableColumn
that maps to the specified column
* in the related table model, and has the specified width
.
- *
+ *
* @param modelIndex the index of the column in the model
* @param width the width
*/
@@ -181,10 +181,10 @@ public class TableColumn
}
/**
- * Creates a new TableColumn
that maps to the specified column
+ * Creates a new TableColumn
that maps to the specified column
* in the related table model, and has the specified width
,
* cellRenderer
and cellEditor
.
- *
+ *
* @param modelIndex the index of the column in the model
* @param width the width
* @param cellRenderer the cell renderer (null
permitted).
@@ -206,9 +206,9 @@ public class TableColumn
* Sets the index of the column in the related {@link TableModel} that this
* TableColumn
maps to, and sends a {@link PropertyChangeEvent}
* (with the property name 'modelIndex') to all registered listeners.
- *
+ *
* @param modelIndex the column index in the model.
- *
+ *
* @see #getModelIndex()
*/
public void setModelIndex(int modelIndex)
@@ -224,9 +224,9 @@ public class TableColumn
/**
* Returns the index of the column in the related {@link TableModel} that
* this TableColumn
maps to.
- *
+ *
* @return the model index.
- *
+ *
* @see #setModelIndex(int)
*/
public int getModelIndex()
@@ -237,15 +237,15 @@ public class TableColumn
/**
* Sets the identifier for the column and sends a {@link PropertyChangeEvent}
* (with the property name 'identifier') to all registered listeners.
- *
+ *
* @param identifier the identifier (null
permitted).
- *
+ *
* @see #getIdentifier()
*/
public void setIdentifier(Object identifier)
{
if (this.identifier != identifier)
- {
+ {
Object oldValue = this.identifier;
this.identifier = identifier;
changeSupport.firePropertyChange("identifier", oldValue, identifier);
@@ -253,10 +253,10 @@ public class TableColumn
}
/**
- * Returns the identifier for the column, or {@link #getHeaderValue()} if the
+ * Returns the identifier for the column, or {@link #getHeaderValue()} if the
* identifier is null
.
- *
- * @return The identifier (or {@link #getHeaderValue()} if the identifier is
+ *
+ * @return The identifier (or {@link #getHeaderValue()} if the identifier is
* null
).
*/
public Object getIdentifier()
@@ -267,29 +267,29 @@ public class TableColumn
}
/**
- * Sets the header value and sends a {@link PropertyChangeEvent} (with the
+ * Sets the header value and sends a {@link PropertyChangeEvent} (with the
* property name {@link #HEADER_VALUE_PROPERTY}) to all registered listeners.
- *
+ *
* @param headerValue the value of the header (null
permitted).
- *
+ *
* @see #getHeaderValue()
*/
public void setHeaderValue(Object headerValue)
{
if (this.headerValue == headerValue)
return;
-
+
Object oldValue = this.headerValue;
this.headerValue = headerValue;
- changeSupport.firePropertyChange(HEADER_VALUE_PROPERTY, oldValue,
+ changeSupport.firePropertyChange(HEADER_VALUE_PROPERTY, oldValue,
headerValue);
}
/**
* Returns the header value.
- *
+ *
* @return the value of the header.
- *
+ *
* @see #getHeaderValue()
*/
public Object getHeaderValue()
@@ -298,30 +298,30 @@ public class TableColumn
}
/**
- * Sets the renderer for the column header and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * Sets the renderer for the column header and sends a
+ * {@link PropertyChangeEvent} (with the property name
* {@link #HEADER_RENDERER_PROPERTY}) to all registered listeners.
- *
+ *
* @param renderer the header renderer (null
permitted).
- *
+ *
* @see #getHeaderRenderer()
*/
public void setHeaderRenderer(TableCellRenderer renderer)
{
if (headerRenderer == renderer)
return;
-
+
TableCellRenderer oldRenderer = headerRenderer;
headerRenderer = renderer;
- changeSupport.firePropertyChange(HEADER_RENDERER_PROPERTY, oldRenderer,
+ changeSupport.firePropertyChange(HEADER_RENDERER_PROPERTY, oldRenderer,
headerRenderer);
}
/**
* Returns the renderer for the column header.
- *
+ *
* @return The renderer for the column header (possibly null
).
- *
+ *
* @see #setHeaderRenderer(TableCellRenderer)
*/
public TableCellRenderer getHeaderRenderer()
@@ -330,30 +330,30 @@ public class TableColumn
}
/**
- * Sets the renderer for cells in this column and sends a
- * {@link PropertyChangeEvent} (with the property name
+ * Sets the renderer for cells in this column and sends a
+ * {@link PropertyChangeEvent} (with the property name
* {@link #CELL_RENDERER_PROPERTY}) to all registered listeners.
- *
+ *
* @param renderer the cell renderer (null
permitted).
- *
+ *
* @see #getCellRenderer()
*/
public void setCellRenderer(TableCellRenderer renderer)
{
if (cellRenderer == renderer)
return;
-
+
TableCellRenderer oldRenderer = cellRenderer;
cellRenderer = renderer;
- changeSupport.firePropertyChange(CELL_RENDERER_PROPERTY, oldRenderer,
+ changeSupport.firePropertyChange(CELL_RENDERER_PROPERTY, oldRenderer,
cellRenderer);
}
/**
* Returns the renderer for the table cells in this column.
- *
+ *
* @return The cell renderer (possibly null
).
- *
+ *
* @see #setCellRenderer(TableCellRenderer)
*/
public TableCellRenderer getCellRenderer()
@@ -364,9 +364,9 @@ public class TableColumn
/**
* Sets the cell editor for the column and sends a {@link PropertyChangeEvent}
* (with the property name 'cellEditor') to all registered listeners.
- *
+ *
* @param cellEditor the cell editor (null
permitted).
- *
+ *
* @see #getCellEditor()
*/
public void setCellEditor(TableCellEditor cellEditor)
@@ -380,11 +380,11 @@ public class TableColumn
}
/**
- * Returns the cell editor for the column (the default value is
+ * Returns the cell editor for the column (the default value is
* null
).
- *
+ *
* @return The cell editor (possibly null
).
- *
+ *
* @see #setCellEditor(TableCellEditor)
*/
public TableCellEditor getCellEditor()
@@ -393,18 +393,18 @@ public class TableColumn
}
/**
- * Sets the width for the column and sends a {@link PropertyChangeEvent}
+ * Sets the width for the column and sends a {@link PropertyChangeEvent}
* (with the property name 'width') to all registered listeners. If the new
- * width falls outside the range getMinWidth() to getMaxWidth() it is
+ * width falls outside the range getMinWidth() to getMaxWidth() it is
* adjusted to the appropriate boundary value.
- *
+ *
* @param newWidth the width.
- *
+ *
* @see #getWidth()
*/
public void setWidth(int newWidth)
{
- int oldWidth = width;
+ int oldWidth = width;
if (newWidth < minWidth)
width = minWidth;
@@ -425,7 +425,7 @@ public class TableColumn
/**
* Returns the width for the column (the default value is 75
).
- *
+ *
* @return The width.
*
* @see #setWidth(int)
@@ -436,14 +436,14 @@ public class TableColumn
}
/**
- * Sets the preferred width for the column and sends a
- * {@link PropertyChangeEvent} (with the property name 'preferredWidth') to
- * all registered listeners. If necessary, the supplied value will be
- * adjusted to fit in the range {@link #getMinWidth()} to
+ * Sets the preferred width for the column and sends a
+ * {@link PropertyChangeEvent} (with the property name 'preferredWidth') to
+ * all registered listeners. If necessary, the supplied value will be
+ * adjusted to fit in the range {@link #getMinWidth()} to
* {@link #getMaxWidth()}.
- *
+ *
* @param preferredWidth the preferred width.
- *
+ *
* @see #getPreferredWidth()
*/
public void setPreferredWidth(int preferredWidth)
@@ -457,16 +457,16 @@ public class TableColumn
else
this.preferredWidth = preferredWidth;
- changeSupport.firePropertyChange("preferredWidth", oldPrefWidth,
+ changeSupport.firePropertyChange("preferredWidth", oldPrefWidth,
this.preferredWidth);
}
/**
- * Returns the preferred width for the column (the default value is
+ * Returns the preferred width for the column (the default value is
* 75
).
- *
+ *
* @return The preferred width.
- *
+ *
* @see #setPreferredWidth(int)
*/
public int getPreferredWidth()
@@ -475,14 +475,14 @@ public class TableColumn
}
/**
- * Sets the minimum width for the column and sends a
+ * Sets the minimum width for the column and sends a
* {@link PropertyChangeEvent} (with the property name 'minWidth') to all
- * registered listeners. If the current width
and/or
+ * registered listeners. If the current width
and/or
* preferredWidth
are less than the new minimum width, they are
* adjusted accordingly.
- *
+ *
* @param minWidth the minimum width (negative values are treated as 0).
- *
+ *
* @see #getMinWidth()
*/
public void setMinWidth(int minWidth)
@@ -504,9 +504,9 @@ public class TableColumn
/**
* Returns the TableColumn
's minimum width (the default value
* is 15
).
- *
+ *
* @return The minimum width.
- *
+ *
* @see #setMinWidth(int)
*/
public int getMinWidth()
@@ -515,14 +515,14 @@ public class TableColumn
}
/**
- * Sets the maximum width for the column and sends a
+ * Sets the maximum width for the column and sends a
* {@link PropertyChangeEvent} (with the property name 'maxWidth') to all
- * registered listeners. If the current width
and/or
- * preferredWidth
are greater than the new maximum width, they
+ * registered listeners. If the current width
and/or
+ * preferredWidth
are greater than the new maximum width, they
* are adjusted accordingly.
- *
+ *
* @param maxWidth the maximum width.
- *
+ *
* @see #getMaxWidth()
*/
public void setMaxWidth(int maxWidth)
@@ -542,9 +542,9 @@ public class TableColumn
/**
* Returns the maximum width for the column (the default value is
* {@link Integer#MAX_VALUE}).
- *
+ *
* @return The maximum width for the column.
- *
+ *
* @see #setMaxWidth(int)
*/
public int getMaxWidth()
@@ -556,10 +556,10 @@ public class TableColumn
* Sets the flag that controls whether or not the column is resizable, and
* sends a {@link PropertyChangeEvent} (with the property name 'isResizable')
* to all registered listeners.
- *
+ *
* @param isResizable true
if this column is resizable,
* false
otherwise.
- *
+ *
* @see #getResizable()
*/
public void setResizable(boolean isResizable)
@@ -567,17 +567,17 @@ public class TableColumn
if (this.isResizable != isResizable)
{
this.isResizable = isResizable;
- changeSupport.firePropertyChange("isResizable", !this.isResizable,
+ changeSupport.firePropertyChange("isResizable", !this.isResizable,
isResizable);
}
}
/**
* Returns the flag that controls whether or not the column is resizable.
- *
+ *
* @return true
if this column is resizable,
* false
otherwise.
- *
+ *
* @see #setResizable(boolean)
*/
public boolean getResizable()
@@ -594,7 +594,7 @@ public class TableColumn
{
if (headerRenderer == null)
return;
- Component c = headerRenderer.getTableCellRendererComponent(null,
+ Component c = headerRenderer.getTableCellRendererComponent(null,
getHeaderValue(), false, false, 0, 0);
Dimension min = c.getMinimumSize();
Dimension max = c.getMaximumSize();
@@ -624,27 +624,27 @@ public class TableColumn
}
/**
- * Adds a listener so that it receives {@link PropertyChangeEvent}
+ * Adds a listener so that it receives {@link PropertyChangeEvent}
* notifications from this column. The properties defined by the column are:
* width
- see {@link #setWidth(int)};preferredWidth
- see {@link #setPreferredWidth(int)};minWidth
- see {@link #setMinWidth(int)};minWidth
- see {@link #setMinWidth(int)};maxWidth
- see {@link #setMaxWidth(int)};modelIndex
- see {@link #setModelIndex(int)};isResizable
- see {@link #setResizable(boolean)};cellRenderer
- see
+ * cellRenderer
- see
* {@link #setCellRenderer(TableCellRenderer)};cellEditor
- see
+ * cellEditor
- see
* {@link #setCellEditor(TableCellEditor)};headerRenderer
- see
+ * headerRenderer
- see
* {@link #setHeaderRenderer(TableCellRenderer)};headerValue
- see {@link #setHeaderValue(Object)};identifier
- see {@link #setIdentifier(Object)}.null
is ignored).
- *
+ *
* @see #removePropertyChangeListener(PropertyChangeListener)
*/
public synchronized void addPropertyChangeListener(
@@ -654,11 +654,11 @@ public class TableColumn
}
/**
- * Removes a listener so that it no longer receives
- * {@link PropertyChangeEvent} notifications from this column. If
- * listener
is not registered with the column, or is
+ * Removes a listener so that it no longer receives
+ * {@link PropertyChangeEvent} notifications from this column. If
+ * listener
is not registered with the column, or is
* null
, this method does nothing.
- *
+ *
* @param listener the listener to remove (null
is ignored).
*/
public synchronized void removePropertyChangeListener(
@@ -670,9 +670,9 @@ public class TableColumn
/**
* Returns the property change listeners for this TableColumn
.
* An empty array is returned if there are currently no listeners registered.
- *
+ *
* @return The property change listeners registered with this column.
- *
+ *
* @since 1.4
*/
public PropertyChangeListener[] getPropertyChangeListeners()
@@ -683,7 +683,7 @@ public class TableColumn
/**
* Creates and returns a default renderer for the column header (in this case,
* a new instance of {@link DefaultTableCellRenderer}).
- *
+ *
* @return A default renderer for the column header.
*/
protected TableCellRenderer createDefaultHeaderRenderer()
diff --git a/libjava/classpath/javax/swing/table/TableColumnModel.java b/libjava/classpath/javax/swing/table/TableColumnModel.java
index 7e8a70c..9a95f92 100644
--- a/libjava/classpath/javax/swing/table/TableColumnModel.java
+++ b/libjava/classpath/javax/swing/table/TableColumnModel.java
@@ -49,17 +49,17 @@ import javax.swing.event.TableColumnModelListener;
/**
* The interface used by {@link JTable} to access the columns in the table
* view.
- *
+ *
* @author Andrew Selkirk
*/
public interface TableColumnModel
{
/**
* Adds a column to the model.
- *
+ *
* @param column the new column (null
not permitted).
- *
- * @throws IllegalArgumentException if column
is
+ *
+ * @throws IllegalArgumentException if column
is
* null
.
*/
void addColumn(TableColumn column);
@@ -67,14 +67,14 @@ public interface TableColumnModel
/**
* Removes a column from the model. If column
is not defined
* in the model, this method does nothing.
- *
+ *
* @param column TableColumn
*/
void removeColumn(TableColumn column);
/**
* Moves a column.
- *
+ *
* @param columnIndex Index of column to move
* @param newIndex New index of column
*/
@@ -83,23 +83,23 @@ public interface TableColumnModel
/**
* Sets the column margin and sends a {@link ChangeEvent} to all registered
* {@link TableColumnModelListener}s registered with the model.
- *
+ *
* @param margin the column margin.
- *
+ *
* @see #getColumnMargin()
*/
void setColumnMargin(int margin);
/**
* Returns the number of columns in the model.
- *
+ *
* @return The column count.
*/
int getColumnCount();
/**
* Returns an enumeration of the columns in the model.
- *
+ *
* @return An enumeration of the columns in the model.
*/
Enumerationnull
not permitted).
- *
+ *
* @return The index of the {@link TableColumn} with the given identifier.
- *
- * @throws IllegalArgumentException if identifier
is
+ *
+ * @throws IllegalArgumentException if identifier
is
* null
or there is no column with that identifier.
*/
int getColumnIndex(Object identifier);
/**
* Returns the TableColumn
at the specified index.
- *
+ *
* @param columnIndex the column index.
- *
+ *
* @return The table column.
*/
TableColumn getColumn(int columnIndex);
/**
* Returns the column margin.
- *
+ *
* @return The column margin.
- *
+ *
* @see #setColumnMargin(int)
*/
int getColumnMargin();
@@ -143,11 +143,11 @@ public interface TableColumnModel
* -1
.
- *
+ *
* @param xPosition the x-position.
- *
+ *
* @return The column index, or -1
.
*/
int getColumnIndexAtX(int xPosition);
@@ -164,17 +164,17 @@ public interface TableColumnModel
* Sets the flag that indicates whether or not column selection is allowed.
*
* @param allowed the new flag value.
- *
+ *
* @see #getColumnSelectionAllowed()
*/
void setColumnSelectionAllowed(boolean allowed);
/**
- * Returns true
if column selection is allowed, and
+ * Returns true
if column selection is allowed, and
* false
if column selection is not allowed.
*
* @return A boolean.
- *
+ *
* @see #setColumnSelectionAllowed(boolean)
*/
boolean getColumnSelectionAllowed();
@@ -187,29 +187,29 @@ public interface TableColumnModel
/**
* Returns the number of selected columns in the model.
- *
+ *
* @return The selected column count.
- *
+ *
* @see #getSelectionModel()
*/
int getSelectedColumnCount();
/**
- * Sets the selection model that will be used to keep track of the selected
+ * Sets the selection model that will be used to keep track of the selected
* columns.
*
* @param model the selection model (null
not permitted).
- *
- * @throws IllegalArgumentException if model
is
+ *
+ * @throws IllegalArgumentException if model
is
* null
.
*/
void setSelectionModel(ListSelectionModel model);
/**
* Returns the selection model used to track table column selections.
- *
+ *
* @return The selection model.
- *
+ *
* @see #setSelectionModel(ListSelectionModel)
*/
ListSelectionModel getSelectionModel();
@@ -223,9 +223,9 @@ public interface TableColumnModel
void addColumnModelListener(TableColumnModelListener listener);
/**
- * Deregisters a listener, so that it will no longer receive
+ * Deregisters a listener, so that it will no longer receive
* {@link TableColumnModelEvent} notifications.
- *
+ *
* @param listener the listener.
*/
void removeColumnModelListener(TableColumnModelListener listener);
diff --git a/libjava/classpath/javax/swing/table/TableModel.java b/libjava/classpath/javax/swing/table/TableModel.java
index 7629fa4..d8fb713 100644
--- a/libjava/classpath/javax/swing/table/TableModel.java
+++ b/libjava/classpath/javax/swing/table/TableModel.java
@@ -40,48 +40,48 @@ package javax.swing.table;
import javax.swing.event.TableModelListener;
/**
- * A TableModel
is a two dimensional data structure that
+ * A TableModel
is a two dimensional data structure that
* can store arbitrary Object
instances, usually for the
- * purpose of display in a {@link javax.swing.JTable} component. Individual
- * objects can be accessed by specifying the row index and column index for
+ * purpose of display in a {@link javax.swing.JTable} component. Individual
+ * objects can be accessed by specifying the row index and column index for
* the object. Each column in the model has a name associated with it.
*
* The {@link DefaultTableModel} class provides one implementation of
* this interface.
- *
+ *
* @author Andrew Selkirk
*/
public interface TableModel
{
/**
* Returns the number of rows in the model.
- *
+ *
* @return The row count.
*/
int getRowCount();
/**
* Returns the number of columns in the model.
- *
+ *
* @return The column count
*/
int getColumnCount();
/**
* Returns the name of a column in the model.
- *
+ *
* @param columnIndex the column index.
- *
+ *
* @return The column name.
*/
String getColumnName(int columnIndex);
/**
* Returns the Class
for all Object
instances
- * in the specified column.
- *
+ * in the specified column.
+ *
* @param columnIndex the column index.
- *
+ *
* @return The class.
*/
Class> getColumnClass(int columnIndex);
@@ -89,10 +89,10 @@ public interface TableModel
/**
* Returns true
if the cell is editable, and false
* otherwise.
- *
+ *
* @param rowIndex the row index.
* @param columnIndex the column index.
- *
+ *
* @return true
if editable, false
otherwise.
*/
boolean isCellEditable(int rowIndex, int columnIndex);
@@ -100,17 +100,17 @@ public interface TableModel
/**
* Returns the value (Object
) at a particular cell in the
* table.
- *
+ *
* @param rowIndex the row index.
* @param columnIndex the column index.
- *
+ *
* @return The value at the specified cell.
*/
Object getValueAt(int rowIndex, int columnIndex);
/**
- * Sets the value at a particular cell in the table.
- *
+ * Sets the value at a particular cell in the table.
+ *
* @param aValue the value (null
permitted).
* @param rowIndex the row index.
* @param columnIndex the column index.
@@ -120,14 +120,14 @@ public interface TableModel
/**
* Adds a listener to the model. The listener will receive notification
* of updates to the model.
- *
+ *
* @param listener the listener.
*/
void addTableModelListener(TableModelListener listener);
/**
* Removes a listener from the model.
- *
+ *
* @param listener the listener.
*/
void removeTableModelListener(TableModelListener listener);
diff --git a/libjava/classpath/javax/swing/text/AbstractDocument.java b/libjava/classpath/javax/swing/text/AbstractDocument.java
index 29b20b3..25915bb 100644
--- a/libjava/classpath/javax/swing/text/AbstractDocument.java
+++ b/libjava/classpath/javax/swing/text/AbstractDocument.java
@@ -149,22 +149,22 @@ public abstract class AbstractDocument implements Document, Serializable
* Manages event listeners for this Document
.
*/
protected EventListenerList listenerList = new EventListenerList();
-
+
/**
* Stores the current writer thread. Used for locking.
- */
+ */
private Thread currentWriter = null;
-
+
/**
* The number of readers. Used for locking.
*/
private int numReaders = 0;
-
+
/**
* The number of current writers. If this is > 1 then the same thread entered
* the write lock more than once.
*/
- private int numWriters = 0;
+ private int numWriters = 0;
/** An instance of a DocumentFilter.FilterBypass which allows calling
* the insert, remove and replace method without checking for an installed
@@ -234,17 +234,17 @@ public abstract class AbstractDocument implements Document, Serializable
writeUnlock();
}
}
-
+
/** Returns the DocumentFilter.FilterBypass instance for this
* document and create it if it does not exist yet.
- *
+ *
* @return This document's DocumentFilter.FilterBypass instance.
*/
private DocumentFilter.FilterBypass getBypass()
{
if (bypass == null)
bypass = new Bypass();
-
+
return bypass;
}
@@ -283,7 +283,7 @@ public abstract class AbstractDocument implements Document, Serializable
* @see BranchElement
*/
protected Element createBranchElement(Element parent,
- AttributeSet attributes)
+ AttributeSet attributes)
{
return new BranchElement(parent, attributes);
}
@@ -303,7 +303,7 @@ public abstract class AbstractDocument implements Document, Serializable
* @see LeafElement
*/
protected Element createLeafElement(Element parent, AttributeSet attributes,
- int start, int end)
+ int start, int end)
{
return new LeafElement(parent, attributes, start, end);
}
@@ -413,7 +413,7 @@ public abstract class AbstractDocument implements Document, Serializable
Object val = getProperty(AsyncLoadPriority);
int prio = -1;
if (val != null)
- prio = ((Integer) val).intValue();
+ prio = ((Integer) val).intValue();
return prio;
}
@@ -621,13 +621,13 @@ public abstract class AbstractDocument implements Document, Serializable
/**
* Inserts a String into this Document
at the specified
* position and assigning the specified attributes to it.
- *
+ *
*
If a {@link DocumentFilter} is installed in this document, the * corresponding method of the filter object is called.
- * + * *The method has no effect when text
is null
* or has a length of zero.
Document
.
- *
+ *
* If a {@link DocumentFilter} is installed in this document, the
* corresponding method of the filter object is called. The
* DocumentFilter
is called even if length
* is zero. This is different from {@link #replace}.
Note: When length
is zero or below the call is not
* forwarded to the underlying {@link AbstractDocument.Content} instance
* of this document and no exception is thrown.
Document
with
* another piece of content.
- *
+ *
* If a {@link DocumentFilter} is installed in this document, the * corresponding method of the filter object is called.
- * + * *The method has no effect if length
is zero (and
* only zero) and, at the same time, text
is
* null
or has zero length.
AttributeSet
,
* false
otherwise
*/
- public boolean isEqual(AttributeSet attrs)
+ public boolean isEqual(AttributeSet attrs)
{
return attributes.isEqual(attrs);
}
@@ -2066,7 +2066,7 @@ public abstract class AbstractDocument implements Document, Serializable
+ "must not be thrown "
+ "here.");
err.initCause(ex);
- throw err;
+ throw err;
}
b.append("]\n");
}
@@ -2137,7 +2137,7 @@ public abstract class AbstractDocument implements Document, Serializable
for (int index = 0; index < numChildren; ++index)
tmp.add(children[index]);
-
+
return tmp.elements();
}
@@ -2337,11 +2337,11 @@ public abstract class AbstractDocument implements Document, Serializable
// as beginning from first element each time.
for (int index = 0; index < numChildren; ++index)
{
- Element elem = children[index];
+ Element elem = children[index];
- if ((elem.getStartOffset() <= position)
- && (position < elem.getEndOffset()))
- return elem;
+ if ((elem.getStartOffset() <= position)
+ && (position < elem.getEndOffset()))
+ return elem;
}
return null;
@@ -2359,7 +2359,7 @@ public abstract class AbstractDocument implements Document, Serializable
int delta = elements.length - length;
int copyFrom = offset + length; // From where to copy.
int copyTo = copyFrom + delta; // Where to copy to.
- int numMove = numChildren - copyFrom; // How many elements are moved.
+ int numMove = numChildren - copyFrom; // How many elements are moved.
if (numChildren + delta > children.length)
{
// Gotta grow the array.
@@ -2386,7 +2386,7 @@ public abstract class AbstractDocument implements Document, Serializable
public String toString()
{
return ("BranchElement(" + getName() + ") "
- + getStartOffset() + "," + getEndOffset() + "\n");
+ + getStartOffset() + "," + getEndOffset() + "\n");
}
}
@@ -2403,7 +2403,7 @@ public abstract class AbstractDocument implements Document, Serializable
* The threshold that indicates when we switch to using a Hashtable.
*/
private static final int THRESHOLD = 10;
-
+
/** The starting offset of the change. */
private int offset;
@@ -2417,7 +2417,7 @@ public abstract class AbstractDocument implements Document, Serializable
* Maps Element
to their change records. This is only
* used when the changes array gets too big. We can use an
* (unsync'ed) HashMap here, since changes to this are (should) always
- * be performed inside a write lock.
+ * be performed inside a write lock.
*/
private HashMap changes;
@@ -2435,7 +2435,7 @@ public abstract class AbstractDocument implements Document, Serializable
* @param type the type of change
*/
public DefaultDocumentEvent(int offset, int length,
- DocumentEvent.EventType type)
+ DocumentEvent.EventType type)
{
this.offset = offset;
this.length = length;
@@ -2548,7 +2548,7 @@ public abstract class AbstractDocument implements Document, Serializable
}
return change;
}
-
+
/**
* Returns a String description of the change event. This returns the
* toString method of the Vector of edits.
@@ -2558,7 +2558,7 @@ public abstract class AbstractDocument implements Document, Serializable
return edits.toString();
}
}
-
+
/**
* An implementation of {@link DocumentEvent.ElementChange} to be added
* to {@link DefaultDocumentEvent}s.
@@ -2588,7 +2588,7 @@ public abstract class AbstractDocument implements Document, Serializable
* The added elements.
*/
private Element[] added;
-
+
/**
* Creates a new ElementEdit
.
*
@@ -2598,7 +2598,7 @@ public abstract class AbstractDocument implements Document, Serializable
* @param added the added elements
*/
public ElementEdit(Element elem, int index,
- Element[] removed, Element[] added)
+ Element[] removed, Element[] added)
{
this.elem = elem;
this.index = index;
@@ -2811,7 +2811,7 @@ public abstract class AbstractDocument implements Document, Serializable
public String toString()
{
return ("LeafElement(" + getName() + ") "
- + getStartOffset() + "," + getEndOffset() + "\n");
+ + getStartOffset() + "," + getEndOffset() + "\n");
}
}
@@ -2900,7 +2900,7 @@ public abstract class AbstractDocument implements Document, Serializable
{
AbstractDocument.this.replaceImpl(offset, length, string, attrs);
}
-
+
}
-
+
}
diff --git a/libjava/classpath/javax/swing/text/AbstractWriter.java b/libjava/classpath/javax/swing/text/AbstractWriter.java
index 8d5a607..e7df26e 100644
--- a/libjava/classpath/javax/swing/text/AbstractWriter.java
+++ b/libjava/classpath/javax/swing/text/AbstractWriter.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -66,7 +66,7 @@ public abstract class AbstractWriter
// Number of characters we have currently written.
private int lineLength;
// True if we can apply line wrapping.
- private boolean canWrapLines; // FIXME default?
+ private boolean canWrapLines; // FIXME default?
// The number of spaces per indentation level.
private int indentSpace = 2;
// The current indentation level.
@@ -167,7 +167,7 @@ public abstract class AbstractWriter
/**
* This method must be overridden by a concrete subclass. It is
* responsible for iterating over the Elements of the Document and
- * writing them out.
+ * writing them out.
*/
protected abstract void write() throws IOException, BadLocationException;
@@ -182,9 +182,9 @@ public abstract class AbstractWriter
{
if (! elt.isLeaf())
throw new BadLocationException("Element is not a leaf",
- elt.getStartOffset());
- return document.getText(elt.getStartOffset(),
- elt.getEndOffset() - elt.getStartOffset());
+ elt.getStartOffset());
+ return document.getText(elt.getStartOffset(),
+ elt.getEndOffset() - elt.getStartOffset());
}
/**
@@ -239,37 +239,37 @@ public abstract class AbstractWriter
{
if (getCanWrapLines())
{
- // FIXME: should we be handling newlines specially here?
- for (int i = 0; i < len; )
- {
- int start_i = i;
- // Find next space.
- while (i < len && data[start + i] != ' ')
- ++i;
- if (i < len && lineLength + i - start_i >= maxLineLength)
- writeLineSeparator();
- else if (i < len)
- {
- // Write the trailing space.
- ++i;
- }
- // Write out the text.
- output(data, start + start_i, start + i - start_i);
- }
+ // FIXME: should we be handling newlines specially here?
+ for (int i = 0; i < len; )
+ {
+ int start_i = i;
+ // Find next space.
+ while (i < len && data[start + i] != ' ')
+ ++i;
+ if (i < len && lineLength + i - start_i >= maxLineLength)
+ writeLineSeparator();
+ else if (i < len)
+ {
+ // Write the trailing space.
+ ++i;
+ }
+ // Write out the text.
+ output(data, start + start_i, start + i - start_i);
+ }
}
else
{
- int saved_i = start;
- for (int i = start; i < start + len; ++i)
- {
- if (data[i] == NEWLINE)
- {
- output(data, saved_i, i - saved_i);
- writeLineSeparator();
- }
- }
- if (saved_i < start + len - 1)
- output(data, saved_i, start + len - saved_i);
+ int saved_i = start;
+ for (int i = start; i < start + len; ++i)
+ {
+ if (data[i] == NEWLINE)
+ {
+ output(data, saved_i, i - saved_i);
+ writeLineSeparator();
+ }
+ }
+ if (saved_i < start + len - 1)
+ output(data, saved_i, start + len - saved_i);
}
}
@@ -284,9 +284,9 @@ public abstract class AbstractWriter
int spaces = indentLevel * indentSpace;
if (spaces > 0)
{
- char[] v = new char[spaces];
- Arrays.fill(v, ' ');
- write(v, 0, v.length);
+ char[] v = new char[spaces];
+ Arrays.fill(v, ' ');
+ write(v, 0, v.length);
}
indented = true;
}
@@ -318,7 +318,7 @@ public abstract class AbstractWriter
int eltStart = elt.getStartOffset();
int eltEnd = elt.getEndOffset();
return ((eltStart >= startOffset && eltStart < endOffset)
- || (eltEnd >= startOffset && eltEnd < endOffset));
+ || (eltEnd >= startOffset && eltEnd < endOffset));
}
/**
@@ -472,10 +472,10 @@ public abstract class AbstractWriter
Enumeration e = attrs.getAttributeNames();
while (e.hasMoreElements())
{
- Object name = e.nextElement();
- Object val = attrs.getAttribute(name);
- write(name + "=" + val);
- writeLineSeparator();
+ Object name = e.nextElement();
+ Object val = attrs.getAttribute(name);
+ write(name + "=" + val);
+ writeLineSeparator();
}
}
}
diff --git a/libjava/classpath/javax/swing/text/AsyncBoxView.java b/libjava/classpath/javax/swing/text/AsyncBoxView.java
index 327c2b8..aca77aa 100644
--- a/libjava/classpath/javax/swing/text/AsyncBoxView.java
+++ b/libjava/classpath/javax/swing/text/AsyncBoxView.java
@@ -160,7 +160,7 @@ public class AsyncBoxView
*
* @param index the index of the child view
* @param a the current allocation of this view
- *
+ *
* @return the current allocation for a child view
*/
public synchronized Shape getChildAllocation(int index, Shape a)
@@ -216,7 +216,7 @@ public class AsyncBoxView
/**
* Returns the current allocation of the child view with the specified
* index. Note that this will not update any location information.
- *
+ *
* @param index the index of the requested child view
*
* @return the current allocation of the child view with the specified
@@ -428,7 +428,7 @@ public class AsyncBoxView
* Returns the child view for which this ChildState
represents
* the layout state.
*
- * @return the child view for this child state object
+ * @return the child view for this child state object
*/
public View getChildView()
{
@@ -1002,7 +1002,7 @@ public class AsyncBoxView
replace(0, 0, added);
}
}
-
+
/**
* Returns the span along an axis that is taken up by the insets.
*
@@ -1355,14 +1355,14 @@ public class AsyncBoxView
return;
}
}
- int index = getViewIndexAtPosition(view.getStartOffset(),
+ int index = getViewIndexAtPosition(view.getStartOffset(),
Position.Bias.Forward);
ChildState cs = getChildState(index);
cs.preferenceChanged(width, height);
LayoutQueue q = getLayoutQueue();
q.addTask(cs);
q.addTask(flushTask);
- }
+ }
}
/**
@@ -1375,7 +1375,7 @@ public class AsyncBoxView
* @param e the document event
* @param a the current allocation of this view
*/
- protected void updateLayout(DocumentEvent.ElementChange ec,
+ protected void updateLayout(DocumentEvent.ElementChange ec,
DocumentEvent e, Shape a)
{
if (ec != null)
@@ -1385,8 +1385,8 @@ public class AsyncBoxView
locator.childChanged(cs);
}
}
-
-
+
+
/**
* Returns the ChildState
object associated with the child view
* at the specified index
.
@@ -1416,7 +1416,7 @@ public class AsyncBoxView
/**
* Returns the child view index of the view that represents the specified
* position in the document model.
- *
+ *
* @param pos the position in the model
* @param b the bias
*
diff --git a/libjava/classpath/javax/swing/text/AttributeSet.java b/libjava/classpath/javax/swing/text/AttributeSet.java
index 2d39881..a596cd4 100644
--- a/libjava/classpath/javax/swing/text/AttributeSet.java
+++ b/libjava/classpath/javax/swing/text/AttributeSet.java
@@ -1,4 +1,4 @@
-/* AttributeSet.java --
+/* AttributeSet.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -52,7 +52,7 @@ import java.util.Enumeration;
* @author Roman Kennke (roman@kennke.org)
*/
public interface AttributeSet
-{
+{
/**
* Used as keys to identify character-run attributes.
*/
@@ -191,5 +191,5 @@ public interface AttributeSet
* are equal to the attributes in this AttributeSet
,
* false
otherwise
*/
- boolean isEqual(AttributeSet attr);
+ boolean isEqual(AttributeSet attr);
}
diff --git a/libjava/classpath/javax/swing/text/BoxView.java b/libjava/classpath/javax/swing/text/BoxView.java
index 0754d9b..325364d 100644
--- a/libjava/classpath/javax/swing/text/BoxView.java
+++ b/libjava/classpath/javax/swing/text/BoxView.java
@@ -155,8 +155,8 @@ public class BoxView
* automatically when any of the child view changes its preferences
* via {@link #preferenceChanged(View, boolean, boolean)}.
*
- * The layout will be updated the next time when
- * {@link #setSize(float, float)} is called, typically from within the
+ * The layout will be updated the next time when
+ * {@link #setSize(float, float)} is called, typically from within the
* {@link #paint(Graphics, Shape)} method.
*
* Valid values for the axis are {@link View#X_AXIS} and
@@ -387,7 +387,7 @@ public class BoxView
int totalDescentMin = 0;
int totalDescentPref = 0;
int totalDescentMax = 0;
-
+
int count = getViewCount();
for (int i = 0; i < count; i++)
{
@@ -578,7 +578,7 @@ public class BoxView
return res;
}
-
+
/**
* Returns true
if the specified point lies before the
@@ -699,7 +699,7 @@ public class BoxView
* Computes the allocation for a child View
. The parameter
* a
stores the allocation of this CompositeView
* and is then adjusted to hold the allocation of the child view.
- *
+ *
* @param index
* the index of the child View
* @param a
@@ -957,13 +957,13 @@ public class BoxView
updateRequirements(axis);
return requirements[axis].alignment;
}
-
+
/**
* Called by a child View when its preferred span has changed.
- *
+ *
* @param width indicates that the preferred width of the child changed.
* @param height indicates that the preferred height of the child changed.
- * @param child the child View.
+ * @param child the child View.
*/
public void preferenceChanged(View child, boolean width, boolean height)
{
@@ -979,7 +979,7 @@ public class BoxView
}
super.preferenceChanged(child, width, height);
}
-
+
/**
* Maps the document model position pos
to a Shape
* in the view coordinate space. This method overrides CompositeView's
diff --git a/libjava/classpath/javax/swing/text/Caret.java b/libjava/classpath/javax/swing/text/Caret.java
index d641190..06972f9 100644
--- a/libjava/classpath/javax/swing/text/Caret.java
+++ b/libjava/classpath/javax/swing/text/Caret.java
@@ -1,4 +1,4 @@
-/* Caret.java --
+/* Caret.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -77,7 +77,7 @@ public interface Caret
* @param c the text component to install this caret to
*/
void install(JTextComponent c);
-
+
/**
* Deinstalls this Caret
from the specified text component.
* This usually involves removing listeners from the text component.
@@ -105,7 +105,7 @@ public interface Caret
* @param rate the new blink rate to set
*/
void setBlinkRate(int rate);
-
+
/**
* Returns the current position of this Caret
within the
* Document
.
@@ -125,7 +125,7 @@ public interface Caret
* @see #moveDot(int)
*/
void setDot(int dot);
-
+
/**
* Moves the dot
location without touching the
* mark
. This is used when making a selection.
@@ -135,7 +135,7 @@ public interface Caret
* @see #setDot(int)
*/
void moveDot(int dot);
-
+
/**
* Returns the current position of the mark
. The
* mark
marks the location in the Document
that
@@ -145,7 +145,7 @@ public interface Caret
* @return the current position of the mark
*/
int getMark();
-
+
/**
* Returns the current visual position of this Caret
.
*
@@ -194,7 +194,7 @@ public interface Caret
* Caret
, false
hides it.
*
* @param v the visibility to set
- */
+ */
void setVisible(boolean v);
/**
@@ -203,5 +203,5 @@ public interface Caret
*
* @param g the graphics context to render to
*/
- void paint(Graphics g);
+ void paint(Graphics g);
}
diff --git a/libjava/classpath/javax/swing/text/ComponentView.java b/libjava/classpath/javax/swing/text/ComponentView.java
index 8de4de6..3680b42 100644
--- a/libjava/classpath/javax/swing/text/ComponentView.java
+++ b/libjava/classpath/javax/swing/text/ComponentView.java
@@ -1,4 +1,4 @@
-/* ComponentView.java --
+/* ComponentView.java --
Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -459,7 +459,7 @@ public class ComponentView extends View
}
}
}
-
+
/**
* Maps coordinates from the View
's space into a position
* in the document model.
diff --git a/libjava/classpath/javax/swing/text/CompositeView.java b/libjava/classpath/javax/swing/text/CompositeView.java
index 570fc95..ae3c79d 100644
--- a/libjava/classpath/javax/swing/text/CompositeView.java
+++ b/libjava/classpath/javax/swing/text/CompositeView.java
@@ -309,7 +309,7 @@ public abstract class CompositeView
* listed valid values
*/
public Shape modelToView(int p1, Position.Bias b1,
- int p2, Position.Bias b2, Shape a)
+ int p2, Position.Bias b2, Shape a)
throws BadLocationException
{
// TODO: This is most likely not 100% ok, figure out what else is to
@@ -346,7 +346,7 @@ public abstract class CompositeView
* of the caret when navigating around the document with the arrow keys. This
* is a convenience method for {@link #getNextNorthSouthVisualPositionFrom}
* and {@link #getNextEastWestVisualPositionFrom}.
- *
+ *
* @param pos
* the model position to start search from
* @param b
@@ -662,7 +662,7 @@ public abstract class CompositeView
// This limitation is described as PR 27345.
int index = getViewIndex(pos, b);
View v = null;
-
+
if (index == -1)
return pos;
@@ -673,7 +673,7 @@ public abstract class CompositeView
// provided.
if (index <= 0)
return pos;
-
+
v = getView(index - 1);
break;
case SOUTH:
@@ -681,13 +681,13 @@ public abstract class CompositeView
// provided.
if (index >= getViewCount() - 1)
return pos;
-
+
v = getView(index + 1);
break;
default:
throw new IllegalArgumentException();
}
-
+
return v.getNextVisualPositionFrom(pos, b, a, direction, biasRet);
}
@@ -738,9 +738,9 @@ public abstract class CompositeView
//
// This limitation is described as PR 27346.
int index;
-
+
View v = null;
-
+
switch (direction)
{
case EAST:
@@ -749,7 +749,7 @@ public abstract class CompositeView
// provided.
if (index == -1)
return pos;
-
+
v = getView(index);
break;
case WEST:
@@ -758,13 +758,13 @@ public abstract class CompositeView
// provided.
if (index == -1)
return pos;
-
+
v = getView(index);
break;
default:
throw new IllegalArgumentException();
}
-
+
return v.getNextVisualPositionFrom(pos,
b,
a,
diff --git a/libjava/classpath/javax/swing/text/DefaultCaret.java b/libjava/classpath/javax/swing/text/DefaultCaret.java
index c4c2580..acfcdb3 100644
--- a/libjava/classpath/javax/swing/text/DefaultCaret.java
+++ b/libjava/classpath/javax/swing/text/DefaultCaret.java
@@ -70,15 +70,15 @@ import javax.swing.text.Position.Bias;
public class DefaultCaret extends Rectangle
implements Caret, FocusListener, MouseListener, MouseMotionListener
{
-
+
/** A text component in the current VM which currently has a
* text selection or null
.
- */
+ */
static JTextComponent componentWithSelection;
/** An implementation of NavigationFilter.FilterBypass which delegates
- * to the corresponding methods of the DefaultCaret
.
- *
+ * to the corresponding methods of the DefaultCaret
.
+ *
* @author Robert Schuster (robertschuster@fsfe.org)
*/
class Bypass extends NavigationFilter.FilterBypass
@@ -98,9 +98,9 @@ public class DefaultCaret extends Rectangle
{
DefaultCaret.this.setDotImpl(dot);
}
-
+
}
-
+
/**
* Controls the blinking of the caret.
*
@@ -116,11 +116,11 @@ public class DefaultCaret extends Rectangle
* the caret visible one iteration longer.
*/
boolean ignoreNextEvent;
-
+
/**
* Receives notification when the blink timer fires and updates the visible
* state of the caret.
- *
+ *
* @param event the action event
*/
public void actionPerformed(ActionEvent event)
@@ -138,7 +138,7 @@ public class DefaultCaret extends Rectangle
/**
* Listens for changes in the text component's document and updates the
* caret accordingly.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
private class DocumentHandler implements DocumentListener
@@ -162,10 +162,10 @@ public class DefaultCaret extends Rectangle
*/
public void insertUpdate(DocumentEvent event)
{
- if (policy == ALWAYS_UPDATE ||
- (SwingUtilities.isEventDispatchThread() &&
+ if (policy == ALWAYS_UPDATE ||
+ (SwingUtilities.isEventDispatchThread() &&
policy == UPDATE_WHEN_ON_EDT))
- {
+ {
int dot = getDot();
setDot(dot + event.getLength());
}
@@ -216,14 +216,14 @@ public class DefaultCaret extends Rectangle
*/
public void propertyChange(PropertyChangeEvent e)
{
- String name = e.getPropertyName();
-
+ String name = e.getPropertyName();
+
if (name.equals("document"))
{
Document oldDoc = (Document) e.getOldValue();
if (oldDoc != null)
oldDoc.removeDocumentListener(documentListener);
-
+
Document newDoc = (Document) e.getNewValue();
if (newDoc != null)
newDoc.addDocumentListener(documentListener);
@@ -238,19 +238,19 @@ public class DefaultCaret extends Rectangle
active = (((Boolean) e.getNewValue()).booleanValue()
&& textComponent.isEditable());
}
-
+
}
-
+
}
/** The serialization UID (compatible with JDK1.5). */
private static final long serialVersionUID = 4325555698756477346L;
-
+
/**
* Indicates the Caret position should always be updated after Document
* changes even if the updates are not performed on the Event Dispatching
* thread.
- *
+ *
* @since 1.5
*/
public static final int ALWAYS_UPDATE = 2;
@@ -259,22 +259,22 @@ public class DefaultCaret extends Rectangle
* Indicates the Caret position should not be changed unless the Document
* length becomes less than the Caret position, in which case the Caret
* is moved to the end of the Document.
- *
+ *
* @since 1.5
*/
public static final int NEVER_UPDATE = 1;
-
- /**
+
+ /**
* Indicates the Caret position should be updated only if Document changes
* are made on the Event Dispatcher thread.
- *
+ *
* @since 1.5
*/
public static final int UPDATE_WHEN_ON_EDT = 0;
-
+
/** Keeps track of the current update policy **/
int policy = UPDATE_WHEN_ON_EDT;
-
+
/**
* The ChangeEvent
that is fired by {@link #fireStateChanged()}.
*/
@@ -297,7 +297,7 @@ public class DefaultCaret extends Rectangle
/**
* The text component in which this caret is installed.
- *
+ *
* (Package private to avoid synthetic accessor method.)
*/
JTextComponent textComponent;
@@ -332,11 +332,11 @@ public class DefaultCaret extends Rectangle
* package private to avoid an accessor method.
*/
boolean visible = false;
-
+
/** Indicates whether the text component where the caret is installed is
* editable and enabled. If either of these properties is false
* the caret is not drawn.
- */
+ */
boolean active = true;
/**
@@ -345,7 +345,7 @@ public class DefaultCaret extends Rectangle
private Object highlightEntry;
private Timer blinkTimer;
-
+
private BlinkTimerListener blinkListener;
/**
@@ -362,10 +362,10 @@ public class DefaultCaret extends Rectangle
{
// Nothing to do here.
}
-
+
/** Returns the caret's NavigationFilter.FilterBypass
instance
* and creates it if it does not yet exist.
- *
+ *
* @return The caret's NavigationFilter.FilterBypass
instance.
*/
private NavigationFilter.FilterBypass getBypass()
@@ -375,17 +375,17 @@ public class DefaultCaret extends Rectangle
/**
* Sets the Caret update policy.
- *
+ *
* @param policy the new policy. Valid values are:
* ALWAYS_UPDATE: always update the Caret position, even when Document
* updates don't occur on the Event Dispatcher thread.
* NEVER_UPDATE: don't update the Caret position unless the Document
* length becomes less than the Caret position (then update the
* Caret to the end of the Document).
- * UPDATE_WHEN_ON_EDT: update the Caret position when the
- * Document updates occur on the Event Dispatcher thread. This is the
+ * UPDATE_WHEN_ON_EDT: update the Caret position when the
+ * Document updates occur on the Event Dispatcher thread. This is the
* default.
- *
+ *
* @since 1.5
* @throws IllegalArgumentException if policy is not one of the above.
*/
@@ -393,15 +393,15 @@ public class DefaultCaret extends Rectangle
{
if (policy != ALWAYS_UPDATE && policy != NEVER_UPDATE
&& policy != UPDATE_WHEN_ON_EDT)
- throw new
+ throw new
IllegalArgumentException
("policy must be ALWAYS_UPDATE, NEVER__UPDATE, or UPDATE_WHEN_ON_EDT");
this.policy = policy;
}
-
+
/**
* Gets the caret update policy.
- *
+ *
* @return the caret update policy.
* @since 1.5
*/
@@ -409,11 +409,11 @@ public class DefaultCaret extends Rectangle
{
return policy;
}
-
+
/**
* Moves the caret position when the mouse is dragged over the text
* component, modifying the selectiony.
- *
+ *
* When the text component where the caret is installed is disabled, * the selection is not change but you can still scroll the text and * update the caret's location.
@@ -462,9 +462,9 @@ public class DefaultCaret extends Rectangle // Do not modify selection if component is disabled. if (!textComponent.isEnabled()) return; - + int count = event.getClickCount(); - + if (event.getButton() == MouseEvent.BUTTON1 && count >= 2) { int newDot = getComponent().viewToModel(event.getPoint()); @@ -480,7 +480,7 @@ public class DefaultCaret extends Rectangle else { int wordStart = Utilities.getWordStart(t, newDot); - + // When the mouse points at the offset of the first character // in a word Utilities().getPreviousWord will not return that // word but we want to select that. We have to use @@ -495,7 +495,7 @@ public class DefaultCaret extends Rectangle int nextWord = Utilities.getNextWord(t, newDot); int previousWord = Utilities.getPreviousWord(t, newDot); int previousWordEnd = Utilities.getWordEnd(t, previousWord); - + // If the user clicked in the space between two words, // then select the space. if (newDot >= previousWordEnd && newDot <= nextWord) @@ -517,7 +517,7 @@ public class DefaultCaret extends Rectangle // TODO: Swallowing ok here? } } - + } /** @@ -552,7 +552,7 @@ public class DefaultCaret extends Rectangle */ public void mousePressed(MouseEvent event) { - + // The implementation assumes that consuming the event makes the AWT event // mechanism forget about this event instance and not transfer focus. // By observing how the RI reacts the following behavior has been @@ -617,14 +617,14 @@ public class DefaultCaret extends Rectangle { if (textComponent.isEditable()) { - setVisible(true); + setVisible(true); updateTimerStatus(); } } /** * Sets the caret toinvisible
.
- *
+ *
* @param event the FocusEvent
*/
public void focusLost(FocusEvent event)
@@ -632,13 +632,13 @@ public class DefaultCaret extends Rectangle
if (textComponent.isEditable() && event.isTemporary() == false)
{
setVisible(false);
-
+
// Stop the blinker, if running.
if (blinkTimer != null && blinkTimer.isRunning())
blinkTimer.stop();
}
}
-
+
/**
* Install (if not present) and start the timer, if the caret must blink. The
* caret does not blink if it is invisible, or the component is disabled or
@@ -724,11 +724,11 @@ public class DefaultCaret extends Rectangle
propertyChangeListener = new PropertyChangeHandler();
textComponent.addPropertyChangeListener(propertyChangeListener);
documentListener = new DocumentHandler();
-
+
Document doc = textComponent.getDocument();
if (doc != null)
doc.addDocumentListener(documentListener);
-
+
active = textComponent.isEditable() && textComponent.isEnabled();
repaint();
@@ -769,21 +769,21 @@ public class DefaultCaret extends Rectangle
{
return mark;
}
-
+
private void clearHighlight()
{
Highlighter highlighter = textComponent.getHighlighter();
-
+
if (highlighter == null)
return;
-
+
if (selectionVisible)
{
try
{
if (highlightEntry != null)
highlighter.changeHighlight(highlightEntry, 0, 0);
-
+
// Free the global variable which stores the text component with an active
// selection.
if (componentWithSelection == textComponent)
@@ -808,22 +808,22 @@ public class DefaultCaret extends Rectangle
private void handleHighlight()
{
Highlighter highlighter = textComponent.getHighlighter();
-
+
if (highlighter == null)
return;
-
+
int p0 = Math.min(dot, mark);
int p1 = Math.max(dot, mark);
-
+
if (selectionVisible)
{
- try
- {
- if (highlightEntry == null)
- highlightEntry = highlighter.addHighlight(p0, p1, getSelectionPainter());
- else
- highlighter.changeHighlight(highlightEntry, p0, p1);
-
+ try
+ {
+ if (highlightEntry == null)
+ highlightEntry = highlighter.addHighlight(p0, p1, getSelectionPainter());
+ else
+ highlighter.changeHighlight(highlightEntry, p0, p1);
+
// If another component currently has a text selection clear that selection
// first.
if (componentWithSelection != null)
@@ -833,21 +833,21 @@ public class DefaultCaret extends Rectangle
c.setDot(c.getDot());
}
componentWithSelection = textComponent;
-
- }
- catch (BadLocationException e)
- {
- // This should never happen.
- throw new InternalError();
- }
+
+ }
+ catch (BadLocationException e)
+ {
+ // This should never happen.
+ throw new InternalError();
+ }
}
else
{
- if (highlightEntry != null)
- {
- highlighter.removeHighlight(highlightEntry);
- highlightEntry = null;
- }
+ if (highlightEntry != null)
+ {
+ highlighter.removeHighlight(highlightEntry);
+ highlightEntry = null;
+ }
}
}
@@ -861,7 +861,7 @@ public class DefaultCaret extends Rectangle
{
if (selectionVisible == v)
return;
-
+
selectionVisible = v;
handleHighlight();
repaint();
@@ -1049,7 +1049,7 @@ public class DefaultCaret extends Rectangle
*
* If the underlying text component has a {@link NavigationFilter} * installed the caret will call the corresponding method of that object.
- * + * * @param dot the location where to move the dot * * @see #setDot(int) @@ -1062,7 +1062,7 @@ public class DefaultCaret extends Rectangle else moveDotImpl(dot); } - + void moveDotImpl(int dot) { if (dot >= 0) @@ -1071,7 +1071,7 @@ public class DefaultCaret extends Rectangle if (doc != null) this.dot = Math.min(dot, doc.getLength()); this.dot = Math.max(this.dot, 0); - + handleHighlight(); appear(); @@ -1082,10 +1082,10 @@ public class DefaultCaret extends Rectangle * Sets the current position of thisCaret
within the
* Document
. This also sets the mark
to the new
* location.
- *
+ *
* If the underlying text component has a {@link NavigationFilter} * installed the caret will call the corresponding method of that object.
- * + * * @param dot * the new position to be set * @see #moveDot(int) @@ -1098,27 +1098,27 @@ public class DefaultCaret extends Rectangle else setDotImpl(dot); } - + void setDotImpl(int dot) { if (dot >= 0) - { + { Document doc = textComponent.getDocument(); if (doc != null) this.dot = Math.min(dot, doc.getLength()); this.dot = Math.max(this.dot, 0); this.mark = this.dot; - + clearHighlight(); - + appear(); } } - + /** * Show the caret (may be hidden due blinking) and adjust the timer not to * hide it (possibly immediately). - * + * * @author Audrius Meskauskas (AudriusA@Bioinformatics.org) */ void appear() @@ -1137,7 +1137,7 @@ public class DefaultCaret extends Rectangle visible = true; Rectangle area = null; - int dot = getDot(); + int dot = getDot(); try { area = getComponent().modelToView(dot); @@ -1158,7 +1158,7 @@ public class DefaultCaret extends Rectangle } } repaint(); - } + } /** * Returnstrue
if this Caret
is blinking,
@@ -1195,7 +1195,7 @@ public class DefaultCaret extends Rectangle
* Caret
, false
hides it.
*
* @param v the visibility to set
- */
+ */
public void setVisible(boolean v)
{
if (v != visible)
@@ -1203,17 +1203,17 @@ public class DefaultCaret extends Rectangle
visible = v;
updateTimerStatus();
Rectangle area = null;
- int dot = getDot();
+ int dot = getDot();
try
- {
+ {
area = getComponent().modelToView(dot);
}
catch (BadLocationException e)
{
- AssertionError ae;
- ae = new AssertionError("Unexpected bad caret location: " + dot);
- ae.initCause(e);
- throw ae;
+ AssertionError ae;
+ ae = new AssertionError("Unexpected bad caret location: " + dot);
+ ae.initCause(e);
+ throw ae;
}
if (area != null)
damage(area);
@@ -1258,7 +1258,7 @@ public class DefaultCaret extends Rectangle
// Should not happen.
throw new InternalError("Caret location not within document range.");
}
-
+
repaint();
}
@@ -1283,5 +1283,5 @@ public class DefaultCaret extends Rectangle
blinkTimer = new Timer(getBlinkRate(), blinkListener);
blinkTimer.setRepeats(true);
}
-
+
}
diff --git a/libjava/classpath/javax/swing/text/DefaultEditorKit.java b/libjava/classpath/javax/swing/text/DefaultEditorKit.java
index 0d999a3..b3b7e60 100644
--- a/libjava/classpath/javax/swing/text/DefaultEditorKit.java
+++ b/libjava/classpath/javax/swing/text/DefaultEditorKit.java
@@ -79,11 +79,11 @@ public class DefaultEditorKit extends EditorKit
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getPreviousWord(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.moveDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -109,11 +109,11 @@ public class DefaultEditorKit extends EditorKit
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getNextWord(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.moveDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -132,17 +132,17 @@ public class DefaultEditorKit extends EditorKit
{
super(selectionBeginWordAction);
}
-
+
public void actionPerformed(ActionEvent event)
{
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getWordStart(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.moveDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -154,24 +154,24 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
static class SelectionEndWordAction extends TextAction
{
SelectionEndWordAction()
{
super(selectionEndWordAction);
}
-
+
public void actionPerformed(ActionEvent event)
{
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getWordEnd(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.moveDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -183,24 +183,24 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
static class BeginWordAction extends TextAction
{
BeginWordAction()
{
super(beginWordAction);
}
-
+
public void actionPerformed(ActionEvent event)
{
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getWordStart(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.setDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -212,24 +212,24 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
static class EndWordAction extends TextAction
{
EndWordAction()
{
super(endWordAction);
}
-
+
public void actionPerformed(ActionEvent event)
{
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getWordEnd(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.setDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -255,11 +255,11 @@ public class DefaultEditorKit extends EditorKit
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getPreviousWord(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.setDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -285,11 +285,11 @@ public class DefaultEditorKit extends EditorKit
try
{
JTextComponent t = getTextComponent(event);
-
+
if (t != null)
{
int offs = Utilities.getNextWord(t, t.getCaretPosition());
-
+
Caret c = t.getCaret();
c.setDot(offs);
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
@@ -320,7 +320,7 @@ public class DefaultEditorKit extends EditorKit
c.setDot(0);
c.moveDot(offs);
try
- {
+ {
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
}
catch(BadLocationException ble)
@@ -347,7 +347,7 @@ public class DefaultEditorKit extends EditorKit
Caret c = t.getCaret();
c.moveDot(0);
try
- {
+ {
c.setMagicCaretPosition(t.modelToView(0).getLocation());
}
catch(BadLocationException ble)
@@ -375,7 +375,7 @@ public class DefaultEditorKit extends EditorKit
Caret c = t.getCaret();
c.moveDot(offs);
try
- {
+ {
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
}
catch(BadLocationException ble)
@@ -385,11 +385,11 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
static class SelectionBeginLineAction
extends TextAction
{
-
+
SelectionBeginLineAction()
{
super(selectionBeginLineAction);
@@ -440,14 +440,14 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
static class SelectLineAction extends TextAction
{
SelectLineAction()
{
super(selectLineAction);
}
-
+
public void actionPerformed(ActionEvent event)
{
JTextComponent t = getTextComponent(event);
@@ -469,14 +469,14 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
static class SelectWordAction extends TextAction
{
SelectWordAction()
{
super(selectWordAction);
}
-
+
public void actionPerformed(ActionEvent event)
{
JTextComponent t = getTextComponent(event);
@@ -497,11 +497,11 @@ public class DefaultEditorKit extends EditorKit
else
{
// Current cursor position is not on the first character
- // in a word.
+ // in a word.
int nextWord = Utilities.getNextWord(t, dot);
int previousWord = Utilities.getPreviousWord(t, dot);
int previousWordEnd = Utilities.getWordEnd(t, previousWord);
-
+
// Cursor position is in the space between two words. In such a
// situation just select the space.
if (dot >= previousWordEnd && dot <= nextWord)
@@ -542,7 +542,7 @@ public class DefaultEditorKit extends EditorKit
{
c.moveDot(offs);
}
-
+
}
static class SelectionUpAction
@@ -614,7 +614,7 @@ public class DefaultEditorKit extends EditorKit
{
c.setDot(offs);
}
-
+
}
static class ForwardAction
@@ -629,7 +629,7 @@ public class DefaultEditorKit extends EditorKit
{
c.setDot(offs);
}
-
+
}
static class BackwardAction
@@ -644,7 +644,7 @@ public class DefaultEditorKit extends EditorKit
{
c.setDot(offs);
}
-
+
}
static class DeletePrevCharAction
@@ -664,7 +664,7 @@ public class DefaultEditorKit extends EditorKit
{
int pos = t.getSelectionStart();
int len = t.getSelectionEnd() - pos;
-
+
if (len > 0)
t.getDocument().remove(pos, len);
else if (pos > 0)
@@ -701,12 +701,12 @@ public class DefaultEditorKit extends EditorKit
{
int pos = t.getSelectionStart();
int len = t.getSelectionEnd() - pos;
-
+
if (len > 0)
t.getDocument().remove(pos, len);
else if (pos < t.getDocument().getLength())
t.getDocument().remove(pos, 1);
-
+
Caret c = t.getCaret();
c.setDot(pos);
c.setMagicCaretPosition(t.modelToView(pos).getLocation());
@@ -783,7 +783,7 @@ public class DefaultEditorKit extends EditorKit
static class BeginAction extends TextAction
{
-
+
BeginAction()
{
super(beginAction);
@@ -810,7 +810,7 @@ public class DefaultEditorKit extends EditorKit
static class EndAction extends TextAction
{
-
+
EndAction()
{
super(endAction);
@@ -825,7 +825,7 @@ public class DefaultEditorKit extends EditorKit
Caret c = t.getCaret();
c.setDot(offs);
try
- {
+ {
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
}
catch(BadLocationException ble)
@@ -835,7 +835,7 @@ public class DefaultEditorKit extends EditorKit
}
}
}
-
+
/**
* Creates a beep on the PC speaker.
*
@@ -962,12 +962,12 @@ public class DefaultEditorKit extends EditorKit
* event is received and no keymap entry exists for that. The purpose
* of this action is to filter out a couple of characters. This includes
* the control characters and characters with the ALT-modifier.
- *
+ *
* If an event does not get filtered, it is inserted into the document
* of the text component. If there is some text selected in the text
* component, this text will be replaced.
*/
- public static class DefaultKeyTypedAction
+ public static class DefaultKeyTypedAction
extends TextAction
{
@@ -1008,7 +1008,7 @@ public class DefaultEditorKit extends EditorKit
}
}
}
- }
+ }
}
/**
@@ -1481,9 +1481,9 @@ public class DefaultEditorKit extends EditorKit
* The Action
s that are supported by the
* DefaultEditorKit
.
*/
- private static Action[] defaultActions =
+ private static Action[] defaultActions =
new Action[] {
- // These classes are public because they are so in the RI.
+ // These classes are public because they are so in the RI.
new BeepAction(),
new CopyAction(),
new CutAction(),
@@ -1492,29 +1492,29 @@ public class DefaultEditorKit extends EditorKit
new InsertContentAction(),
new InsertTabAction(),
new PasteAction(),
-
+
// These are (package-)private inner classes.
new DeleteNextCharAction(),
new DeletePrevCharAction(),
new BeginLineAction(),
new SelectionBeginLineAction(),
-
+
new EndLineAction(),
new SelectionEndLineAction(),
-
+
new BackwardAction(),
new SelectionBackwardAction(),
new ForwardAction(),
new SelectionForwardAction(),
-
+
new UpAction(),
new SelectionUpAction(),
new DownAction(),
new SelectionDownAction(),
-
+
new NextWordAction(),
new SelectionNextWordAction(),
@@ -1523,16 +1523,16 @@ public class DefaultEditorKit extends EditorKit
new BeginAction(),
new SelectionBeginAction(),
-
+
new EndAction(),
new SelectionEndAction(),
-
+
new BeginWordAction(),
new SelectionBeginWordAction(),
-
+
new EndWordAction(),
new SelectionEndWordAction(),
-
+
new SelectAllAction(),
new SelectLineAction(),
new SelectWordAction()
@@ -1640,12 +1640,12 @@ public class DefaultEditorKit extends EditorKit
while ((line = reader.readLine()) != null)
{
- content.append(line);
- content.append("\n");
+ content.append(line);
+ content.append("\n");
}
-
+
document.insertString(offset, content.substring(0, content.length() - 1),
- SimpleAttributeSet.EMPTY);
+ SimpleAttributeSet.EMPTY);
}
/**
@@ -1680,7 +1680,7 @@ public class DefaultEditorKit extends EditorKit
* @param offset the beginning offset from where to write
* @param len the length of the fragment to write
*
- * @throws BadLocationException if offset
is an
+ * @throws BadLocationException if offset
is an
* invalid location inside document
.
* @throws IOException if something goes wrong while writing to
* out
diff --git a/libjava/classpath/javax/swing/text/DefaultFormatter.java b/libjava/classpath/javax/swing/text/DefaultFormatter.java
index bf7c02a..cd9829d 100644
--- a/libjava/classpath/javax/swing/text/DefaultFormatter.java
+++ b/libjava/classpath/javax/swing/text/DefaultFormatter.java
@@ -54,7 +54,7 @@ import javax.swing.JFormattedTextField;
* a value, the value class must provide a single argument constructor that
* takes a String object as argument value. If no such constructor is found,
* the String itself is passed back by #stringToValue.
- *
+ *
* @author Roman Kennke (roman@kennke.org)
*/
public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
@@ -89,7 +89,7 @@ public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
checkValidInput();
commitIfAllowed();
}
-
+
/**
* Invoked when text is inserted into a text component.
*
@@ -115,7 +115,7 @@ public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
/**
* Invoked when text is replaced in a text component.
- *
+ *
* @param bypass the FilterBypass to use to mutate the document
* @param offset the start position of the modification
* @param length the length of the removed text
@@ -176,9 +176,9 @@ public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
{
// if that happens, something serious must be wrong
AssertionError ae;
- ae = new AssertionError("values must be parseable");
- ae.initCause(pe);
- throw ae;
+ ae = new AssertionError("values must be parseable");
+ ae.initCause(pe);
+ throw ae;
}
}
}
@@ -238,7 +238,7 @@ public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
* one of the mentioned methods in order to customize behaviour.
*
* @param ftf the {@link JFormattedTextField} in which this formatter
- * is installed
+ * is installed
*/
public void install(JFormattedTextField ftf)
{
@@ -287,7 +287,7 @@ public class DefaultFormatter extends JFormattedTextField.AbstractFormatter
/**
* Sets the value of the overwriteMode
property.
- *
+ *
* If that is set to true
then newly inserted characters
* overwrite existing values, otherwise the characters are inserted like
* normal. The default is true
.
diff --git a/libjava/classpath/javax/swing/text/DefaultFormatterFactory.java b/libjava/classpath/javax/swing/text/DefaultFormatterFactory.java
index 84a1676..a6a9def 100644
--- a/libjava/classpath/javax/swing/text/DefaultFormatterFactory.java
+++ b/libjava/classpath/javax/swing/text/DefaultFormatterFactory.java
@@ -45,19 +45,19 @@ import javax.swing.JFormattedTextField.AbstractFormatter;
import javax.swing.JFormattedTextField.AbstractFormatterFactory;
/**
- * This class is Swing's only concrete implementation of
+ * This class is Swing's only concrete implementation of
* JFormattedTextField.AbstractFormatterFactory. It holds several
- * formatters and determines the best one to be used based on the
+ * formatters and determines the best one to be used based on the
* passed-in value from the text field.
- *
+ *
* @author Anthony Balkissoon abalkiss at redhat dot com
* @since 1.4
*/
public class DefaultFormatterFactory extends AbstractFormatterFactory implements
Serializable
{
- /**
- * The default formatter.
+ /**
+ * The default formatter.
**/
AbstractFormatter defaultFormatter;
@@ -69,14 +69,14 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
AbstractFormatter editFormatter;
/**
- * The formatter to use when the JFormattedTextField doesn't havefocus and
- * either the value isn't null or the value is null but no
+ * The formatter to use when the JFormattedTextField doesn't havefocus and
+ * either the value isn't null or the value is null but no
* nullFormatter
has been specified.
*/
AbstractFormatter displayFormatter;
/**
- * The formatter to use when the value of the JFormattedTextField is null.
+ * The formatter to use when the value of the JFormattedTextField is null.
*/
AbstractFormatter nullFormatter;
@@ -102,7 +102,7 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
* Creates a new DefaultFormatterFactory with the specified formatters.
* @param defaultFormat the formatter to use if no other appropriate non-null
* formatted can be found.
- * @param displayFormat the formatter to use if the JFormattedTextField
+ * @param displayFormat the formatter to use if the JFormattedTextField
* doesn't have focus and either the value is not null or the value is null
* but no nullFormatter
has been specified.
*/
@@ -117,7 +117,7 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
* Creates a new DefaultFormatterFactory with the specified formatters.
* @param defaultFormat the formatter to use if no other appropriate non-null
* formatted can be found.
- * @param displayFormat the formatter to use if the JFormattedTextField
+ * @param displayFormat the formatter to use if the JFormattedTextField
* doesn't have focus and either the value is not null or the value is null
* but no nullFormatter
has been specified.
* @param editFormat the formatter to use if the JFormattedTextField has
@@ -137,13 +137,13 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
* Creates a new DefaultFormatterFactory with the specified formatters.
* @param defaultFormat the formatter to use if no other appropriate non-null
* formatted can be found.
- * @param displayFormat the formatter to use if the JFormattedTextField
+ * @param displayFormat the formatter to use if the JFormattedTextField
* doesn't have focus and either the value is not null or the value is null
* but no nullFormatter
has been specified.
* @param editFormat the formatter to use if the JFormattedTextField has
* focus and either the value is not null or the value is null but not
* nullFormatter
has been specified.
- * @param nullFormat the formatter to use when the value of the
+ * @param nullFormat the formatter to use when the value of the
* JFormattedTextField is null.
*/
public DefaultFormatterFactory(AbstractFormatter defaultFormat,
@@ -158,9 +158,9 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
}
/**
- * Returns the formatted to be used if no other appropriate non-null
+ * Returns the formatted to be used if no other appropriate non-null
* formatter can be found.
- * @return the formatted to be used if no other appropriate non-null
+ * @return the formatted to be used if no other appropriate non-null
* formatter can be found.
*/
public AbstractFormatter getDefaultFormatter()
@@ -169,7 +169,7 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
}
/**
- * Sets the formatted to be used if no other appropriate non-null formatter
+ * Sets the formatted to be used if no other appropriate non-null formatter
* can be found.
* @param defaultFormatter the formatted to be used if no other appropriate
* non-null formatter can be found.
@@ -180,13 +180,13 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
}
/**
- * Gets the displayFormatter
. This is the formatter to use if
- * the JFormattedTextField is not being edited and either the value is not
- * null or the value is null and no nullFormatter has been
+ * Gets the displayFormatter
. This is the formatter to use if
+ * the JFormattedTextField is not being edited and either the value is not
+ * null or the value is null and no nullFormatter has been
* specified.
- * @return the formatter to use if
- * the JFormattedTextField is not being edited and either the value is not
- * null or the value is null and no nullFormatter has been
+ * @return the formatter to use if
+ * the JFormattedTextField is not being edited and either the value is not
+ * null or the value is null and no nullFormatter has been
* specified.
*/
public AbstractFormatter getDisplayFormatter()
@@ -195,9 +195,9 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
}
/**
- * Sets the displayFormatter
. This is the formatter to use if
- * the JFormattedTextField is not being edited and either the value is not
- * null or the value is null and no nullFormatter has been
+ * Sets the displayFormatter
. This is the formatter to use if
+ * the JFormattedTextField is not being edited and either the value is not
+ * null or the value is null and no nullFormatter has been
* specified.
* @param displayFormatter the formatter to use.
*/
@@ -208,10 +208,10 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
/**
* Gets the editFormatter
. This is the formatter to use if the
- * JFormattedTextField is being edited and either the value is not null or
+ * JFormattedTextField is being edited and either the value is not null or
* the value is null and no nullFormatter has been specified.
* @return the formatter to use if the JFormattedTextField is being edited
- * and the value is not null or the value is null but no nullFormatted has
+ * and the value is not null or the value is null but no nullFormatted has
* been specified.
*/
public AbstractFormatter getEditFormatter()
@@ -221,7 +221,7 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
/**
* Sets the editFormatter
. This is the formatter to use if the
- * JFormattedTextField is being edited and either the value is not null or
+ * JFormattedTextField is being edited and either the value is not null or
* the value is null and no nullFormatter has been specified.
* @param editFormatter the formatter to use.
*/
@@ -250,11 +250,11 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
}
/**
- * Returns the appropriate formatter based on the state of
+ * Returns the appropriate formatter based on the state of
* tf
. If tf is null we return null, otherwise
* we return one of the following:
- * 1. Returns nullFormatter
if tf.getValue()
is
- * null and nullFormatter
is not.
+ * 1. Returns nullFormatter
if tf.getValue()
is
+ * null and nullFormatter
is not.
* 2. Returns editFormatter
if tf.hasFocus()
is
* true and editFormatter
is not null.
* 3. Returns displayFormatter
if tf.hasFocus()
is
@@ -265,7 +265,7 @@ public class DefaultFormatterFactory extends AbstractFormatterFactory implements
{
if (tf == null)
return null;
-
+
if (tf.getValue() == null && nullFormatter != null)
return nullFormatter;
diff --git a/libjava/classpath/javax/swing/text/DefaultHighlighter.java b/libjava/classpath/javax/swing/text/DefaultHighlighter.java
index 69563e4..a4264d3 100644
--- a/libjava/classpath/javax/swing/text/DefaultHighlighter.java
+++ b/libjava/classpath/javax/swing/text/DefaultHighlighter.java
@@ -51,7 +51,7 @@ import javax.swing.plaf.TextUI;
/**
* The default highlight for Swing text components. It highlights text
- * by filling the background with a rectangle.
+ * by filling the background with a rectangle.
*/
public class DefaultHighlighter extends LayeredHighlighter
{
@@ -59,7 +59,7 @@ public class DefaultHighlighter extends LayeredHighlighter
extends LayerPainter
{
private Color color;
-
+
public DefaultHighlightPainter(Color c)
{
super();
@@ -72,11 +72,11 @@ public class DefaultHighlighter extends LayeredHighlighter
}
public void paint(Graphics g, int p0, int p1, Shape bounds,
- JTextComponent t)
+ JTextComponent t)
{
if (p0 == p1)
return;
-
+
Rectangle rect = bounds.getBounds();
Color col = getColor();
@@ -85,13 +85,13 @@ public class DefaultHighlighter extends LayeredHighlighter
g.setColor(col);
TextUI ui = t.getUI();
-
+
try
{
Rectangle l0 = ui.modelToView(t, p0, null);
Rectangle l1 = ui.modelToView(t, p1, null);
-
+
// Note: The computed locations may lie outside of the allocation
// area if the text is scrolled.
@@ -101,8 +101,8 @@ public class DefaultHighlighter extends LayeredHighlighter
// Paint only inside the allocation area.
SwingUtilities.computeIntersection(rect.x, rect.y, rect.width,
- rect.height, l1);
-
+ rect.height, l1);
+
g.fillRect(l1.x, l1.y, l1.width, l1.height);
}
else
@@ -115,62 +115,62 @@ public class DefaultHighlighter extends LayeredHighlighter
// 3. The final line is painted from the left border to the
// position of p1.
- int firstLineWidth = rect.x + rect.width - l0.x;
- g.fillRect(l0.x, l0.y, firstLineWidth, l0.height);
- if (l0.y + l0.height != l1.y)
- {
- g.fillRect(rect.x, l0.y + l0.height, rect.width,
- l1.y - l0.y - l0.height);
- }
- g.fillRect(rect.x, l1.y, l1.x - rect.x, l1.height);
- }
+ int firstLineWidth = rect.x + rect.width - l0.x;
+ g.fillRect(l0.x, l0.y, firstLineWidth, l0.height);
+ if (l0.y + l0.height != l1.y)
+ {
+ g.fillRect(rect.x, l0.y + l0.height, rect.width,
+ l1.y - l0.y - l0.height);
+ }
+ g.fillRect(rect.x, l1.y, l1.x - rect.x, l1.height);
+ }
}
catch (BadLocationException ex)
{
- // Can't render. Comment out for debugging.
- // ex.printStackTrace();
+ // Can't render. Comment out for debugging.
+ // ex.printStackTrace();
}
}
public Shape paintLayer(Graphics g, int p0, int p1, Shape bounds,
- JTextComponent c, View view)
+ JTextComponent c, View view)
{
Color col = getColor();
if (col == null)
- col = c.getSelectionColor();
+ col = c.getSelectionColor();
g.setColor(col);
Rectangle rect = null;
if (p0 == view.getStartOffset() && p1 == view.getEndOffset())
- {
- // Paint complete bounds region.
+ {
+ // Paint complete bounds region.
rect = bounds instanceof Rectangle ? (Rectangle) bounds
- : bounds.getBounds();
- }
+ : bounds.getBounds();
+ }
else
- {
- // Only partly inside the view.
+ {
+ // Only partly inside the view.
try
- {
+ {
Shape s = view.modelToView(p0, Position.Bias.Forward,
- p1, Position.Bias.Backward,
- bounds);
- rect = s instanceof Rectangle ? (Rectangle) s : s.getBounds();
- }
- catch (BadLocationException ex)
- {
- // Can't render the highlight.
- }
- }
+ p1, Position.Bias.Backward,
+ bounds);
+ rect = s instanceof Rectangle ? (Rectangle) s : s.getBounds();
+ }
+ catch (BadLocationException ex)
+ {
+ // Can't render the highlight.
+ }
+ }
if (rect != null)
- {
+ {
g.fillRect(rect.x, rect.y, rect.width, rect.height);
- }
+ }
return rect;
}
}
-
+
private class HighlightEntry implements Highlighter.Highlight
{
Position p0;
@@ -228,28 +228,28 @@ public class DefaultHighlighter extends LayeredHighlighter
* and manages the paint rectangle.
*/
void paintLayeredHighlight(Graphics g, int p0, int p1, Shape bounds,
- JTextComponent tc, View view)
+ JTextComponent tc, View view)
{
p0 = Math.max(getStartOffset(), p0);
p1 = Math.min(getEndOffset(), p1);
Highlighter.HighlightPainter painter = getPainter();
if (painter instanceof LayerPainter)
- {
- LayerPainter layerPainter = (LayerPainter) painter;
- Shape area = layerPainter.paintLayer(g, p0, p1, bounds, tc, view);
- Rectangle rect;
- if (area instanceof Rectangle && paintRect != null)
- rect = (Rectangle) area;
- else
- rect = area.getBounds();
-
- if (paintRect.width == 0 || paintRect.height == 0)
- paintRect = rect.getBounds();
- else
- paintRect = SwingUtilities.computeUnion(rect.x, rect.y, rect.width,
- rect.height, paintRect);
- }
+ {
+ LayerPainter layerPainter = (LayerPainter) painter;
+ Shape area = layerPainter.paintLayer(g, p0, p1, bounds, tc, view);
+ Rectangle rect;
+ if (area instanceof Rectangle && paintRect != null)
+ rect = (Rectangle) area;
+ else
+ rect = area.getBounds();
+
+ if (paintRect.width == 0 || paintRect.height == 0)
+ paintRect = rect.getBounds();
+ else
+ paintRect = SwingUtilities.computeUnion(rect.x, rect.y, rect.width,
+ rect.height, paintRect);
+ }
}
}
@@ -258,11 +258,11 @@ public class DefaultHighlighter extends LayeredHighlighter
*/
public static final LayeredHighlighter.LayerPainter DefaultPainter =
new DefaultHighlightPainter(null);
-
+
private JTextComponent textComponent;
private ArrayList highlights = new ArrayList();
private boolean drawsLayeredHighlights = true;
-
+
public DefaultHighlighter()
{
// Nothing to do here.
@@ -277,13 +277,13 @@ public class DefaultHighlighter extends LayeredHighlighter
{
drawsLayeredHighlights = newValue;
}
-
+
private void checkPositions(int p0, int p1)
throws BadLocationException
{
if (p0 < 0)
throw new BadLocationException("DefaultHighlighter", p0);
-
+
if (p1 < p0)
throw new BadLocationException("DefaultHighlighter", p1);
}
@@ -313,9 +313,9 @@ public class DefaultHighlighter extends LayeredHighlighter
else
entry = new HighlightEntry(pos0, pos1, painter);
highlights.add(entry);
-
+
textComponent.getUI().damageRange(textComponent, p0, p1);
-
+
return entry;
}
@@ -324,16 +324,16 @@ public class DefaultHighlighter extends LayeredHighlighter
HighlightEntry entry = (HighlightEntry) tag;
if (entry instanceof LayerHighlightEntry)
{
- LayerHighlightEntry lEntry = (LayerHighlightEntry) entry;
- Rectangle paintRect = lEntry.paintRect;
- textComponent.repaint(paintRect.x, paintRect.y, paintRect.width,
- paintRect.height);
+ LayerHighlightEntry lEntry = (LayerHighlightEntry) entry;
+ Rectangle paintRect = lEntry.paintRect;
+ textComponent.repaint(paintRect.x, paintRect.y, paintRect.width,
+ paintRect.height);
}
else
{
- textComponent.getUI().damageRange(textComponent,
- entry.getStartOffset(),
- entry.getEndOffset());
+ textComponent.getUI().damageRange(textComponent,
+ entry.getStartOffset(),
+ entry.getEndOffset());
}
highlights.remove(tag);
@@ -380,14 +380,14 @@ public class DefaultHighlighter extends LayeredHighlighter
TextUI ui = textComponent.getUI();
ui.damageRange(textComponent, p0, p1);
}
-
+
}
highlights.clear();
}
public Highlighter.Highlight[] getHighlights()
{
- return (Highlighter.Highlight[])
+ return (Highlighter.Highlight[])
highlights.toArray(new Highlighter.Highlight[highlights.size()]);
}
@@ -439,22 +439,22 @@ public class DefaultHighlighter extends LayeredHighlighter
{
for (Iterator i = highlights.iterator(); i.hasNext();)
{
- Object o = i.next();
- if (o instanceof LayerHighlightEntry)
- {
- LayerHighlightEntry entry = (LayerHighlightEntry) o;
- int start = entry.getStartOffset();
- int end = entry.getEndOffset();
- if ((p0 < start && p1 > start) || (p0 >= start && p0 < end))
- entry.paintLayeredHighlight(g, p0, p1, viewBounds, editor, view);
- }
+ Object o = i.next();
+ if (o instanceof LayerHighlightEntry)
+ {
+ LayerHighlightEntry entry = (LayerHighlightEntry) o;
+ int start = entry.getStartOffset();
+ int end = entry.getEndOffset();
+ if ((p0 < start && p1 > start) || (p0 >= start && p0 < end))
+ entry.paintLayeredHighlight(g, p0, p1, viewBounds, editor, view);
+ }
}
}
public void paint(Graphics g)
{
int size = highlights.size();
-
+
// Check if there are any highlights.
if (size == 0)
return;
@@ -466,11 +466,11 @@ public class DefaultHighlighter extends LayeredHighlighter
insets.top,
textComponent.getWidth() - insets.left - insets.right,
textComponent.getHeight() - insets.top - insets.bottom);
-
+
for (int index = 0; index < size; ++index)
{
- HighlightEntry entry = (HighlightEntry) highlights.get(index);
- if (! (entry instanceof LayerHighlightEntry))
+ HighlightEntry entry = (HighlightEntry) highlights.get(index);
+ if (! (entry instanceof LayerHighlightEntry))
entry.painter.paint(g, entry.getStartOffset(), entry.getEndOffset(),
bounds, textComponent);
}
diff --git a/libjava/classpath/javax/swing/text/DefaultStyledDocument.java b/libjava/classpath/javax/swing/text/DefaultStyledDocument.java
index 8c70a8a..9021a19 100644
--- a/libjava/classpath/javax/swing/text/DefaultStyledDocument.java
+++ b/libjava/classpath/javax/swing/text/DefaultStyledDocument.java
@@ -62,7 +62,7 @@ import javax.swing.undo.UndoableEdit;
* single root, which has one or more {@link AbstractDocument.BranchElement}s
* as paragraph nodes and each paragraph node having one or more
* {@link AbstractDocument.LeafElement}s as content nodes.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Roman Kennke (roman@kennke.org)
*/
@@ -72,7 +72,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* An {@link UndoableEdit} that can undo attribute changes to an element.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
public static class AttributeUndoableEdit extends AbstractUndoableEdit
@@ -100,7 +100,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Creates a new AttributeUndoableEdit
.
- *
+ *
* @param el
* the element that changes attributes
* @param newAtts
@@ -233,7 +233,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Creates a new ElementSpec
with no content, length or
* offset. This is most useful for start and end tags.
- *
+ *
* @param a
* the attributes for the element to be created
* @param type
@@ -248,7 +248,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
* Creates a new ElementSpec
that specifies the length but
* not the offset of an element. Such ElementSpec
s are
* processed sequentially from a known starting point.
- *
+ *
* @param a
* the attributes for the element to be created
* @param type
@@ -263,7 +263,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Creates a new ElementSpec
with document content.
- *
+ *
* @param a
* the attributes for the element to be created
* @param type
@@ -287,7 +287,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Sets the type of the element.
- *
+ *
* @param type
* the type of the element to be set
*/
@@ -298,7 +298,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the type of the element.
- *
+ *
* @return the type of the element
*/
public short getType()
@@ -308,7 +308,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Sets the direction of the element.
- *
+ *
* @param dir
* the direction of the element to be set
*/
@@ -319,7 +319,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the direction of the element.
- *
+ *
* @return the direction of the element
*/
public short getDirection()
@@ -329,7 +329,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the attributes of the element.
- *
+ *
* @return the attributes of the element
*/
public AttributeSet getAttributes()
@@ -339,7 +339,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the actual content of the element.
- *
+ *
* @return the actual content of the element
*/
public char[] getArray()
@@ -349,7 +349,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the offset of the content.
- *
+ *
* @return the offset of the content
*/
public int getOffset()
@@ -359,7 +359,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the length of the content.
- *
+ *
* @return the length of the content
*/
public int getLength()
@@ -371,7 +371,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
* Returns a String representation of this ElementSpec
* describing the type, direction and length of this
* ElementSpec
.
- *
+ *
* @return a String representation of this ElementSpec
*/
public String toString()
@@ -534,7 +534,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Creates a new ElementBuffer
for the specified
* root
element.
- *
+ *
* @param root
* the root element for this ElementBuffer
*/
@@ -545,7 +545,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the root element of this ElementBuffer
.
- *
+ *
* @return the root element of this ElementBuffer
*/
public Element getRootElement()
@@ -556,7 +556,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Removes the content. This method sets some internal parameters and
* delegates the work to {@link #removeUpdate}.
- *
+ *
* @param offs
* the offset from which content is remove
* @param len
@@ -583,7 +583,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
private boolean removeElements(Element elem, int rmOffs0, int rmOffs1)
{
- boolean ret = false;
+ boolean ret = false;
if (! elem.isLeaf())
{
// Update stack for changes.
@@ -874,7 +874,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
* created as necessary. This also updates the
* DefaultDocumentEvent
to reflect the structural changes.
* The bulk work is delegated to {@link #changeUpdate()}.
- *
+ *
* @param offset
* the start index of the interval to be changed
* @param length
@@ -967,7 +967,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
* Inserts new Element
in the document at the specified
* position. Most of the work is done by {@link #insertUpdate}, after some
* fields have been prepared for it.
- *
+ *
* @param offset
* the location in the document at which the content is inserted
* @param length
@@ -982,11 +982,11 @@ public class DefaultStyledDocument extends AbstractDocument implements
DefaultDocumentEvent ev)
{
if (length > 0)
- {
- prepareEdit(offset, length);
- insertUpdate(data);
- finishEdit(ev);
- }
+ {
+ prepareEdit(offset, length);
+ insertUpdate(data);
+ finishEdit(ev);
+ }
}
/**
@@ -1003,14 +1003,14 @@ public class DefaultStyledDocument extends AbstractDocument implements
this.length = length;
if (edits == null)
- edits = new ArrayList();
+ edits = new ArrayList();
else
- edits.clear();
+ edits.clear();
if (elementStack == null)
- elementStack = new Stack();
+ elementStack = new Stack();
else
- elementStack.clear();
+ elementStack.clear();
fracturedParent = null;
fracturedChild = null;
@@ -1029,7 +1029,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
// This for loop applies all the changes that were made and updates the
// DocumentEvent.
for (Iterator i = edits.iterator(); i.hasNext();)
- {
+ {
Edit edits = (Edit) i.next();
Element[] removed = new Element[edits.removed.size()];
removed = (Element[]) edits.removed.toArray(removed);
@@ -1040,14 +1040,14 @@ public class DefaultStyledDocument extends AbstractDocument implements
parent.replace(index, removed.length, added);
ElementEdit ee = new ElementEdit(parent, index, removed, added);
ev.addEdit(ee);
- }
+ }
edits.clear();
elementStack.clear();
}
/**
* Inserts new content.
- *
+ *
* @param data the element specifications for the elements to be inserted
*/
protected void insertUpdate(ElementSpec[] data)
@@ -1130,7 +1130,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
p < data.length && data[p].getType() == ElementSpec.EndTagType;
p++)
;
-
+
Edit edit = insertPath[insertPath.length - p - 1];
edit.index--;
edit.removed.add(0, edit.e.getElement(edit.index));
@@ -1162,7 +1162,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
{
if (elementStack.isEmpty())
return;
-
+
Edit edit = (Edit) elementStack.peek();
switch (spec.getType())
{
@@ -1223,7 +1223,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Inserts the first tag into the document.
- *
+ *
* @param data -
* the data to be inserted.
*/
@@ -1301,7 +1301,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Inserts a content element into the document structure.
- *
+ *
* @param tag -
* the element spec
*/
@@ -1342,7 +1342,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
edit.removed.add(first);
}
}
- else
+ else
{
Element leaf = createLeafElement(edit.e, tag.getAttributes(), pos,
pos + len);
@@ -1350,13 +1350,13 @@ public class DefaultStyledDocument extends AbstractDocument implements
}
pos += len;
-
+
}
/**
* This method fractures bottomost leaf in the elementStack. This
* happens when the first inserted tag is not content.
- *
+ *
* @param data
* the ElementSpecs used for the entire insertion
*/
@@ -1644,12 +1644,12 @@ public class DefaultStyledDocument extends AbstractDocument implements
ec.added.add(e);
e = createLeafElement(ec.e, child.getAttributes(),
pos, child.getEndOffset());
-
+
ec.added.add(e);
}
}
return splitEnd;
-
+
}
}
@@ -1672,7 +1672,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the name of the element. This method always returns
* "section".
- *
+ *
* @return the name of the element
*/
public String getName()
@@ -1684,7 +1684,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Receives notification when any of the document's style changes and calls
* {@link DefaultStyledDocument#styleChanged(Style)}.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
private class StyleChangeListener implements ChangeListener
@@ -1693,7 +1693,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Receives notification when any of the document's style changes and calls
* {@link DefaultStyledDocument#styleChanged(Style)}.
- *
+ *
* @param event
* the change event
*/
@@ -1734,7 +1734,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Creates a new DefaultStyledDocument
that uses the specified
* {@link StyleContext}.
- *
+ *
* @param context
* the StyleContext
to use
*/
@@ -1746,7 +1746,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Creates a new DefaultStyledDocument
that uses the specified
* {@link StyleContext} and {@link Content} buffer.
- *
+ *
* @param content
* the Content
buffer to use
* @param context
@@ -1790,7 +1790,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Create the default root element for this kind of Document
.
- *
+ *
* @return the default root element for this kind of Document
*/
protected AbstractDocument.AbstractElement createDefaultRoot()
@@ -1814,7 +1814,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the Element
that corresponds to the character at the
* specified position.
- *
+ *
* @param position
* the position of which we query the corresponding
* Element
@@ -1836,7 +1836,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Extracts a background color from a set of attributes.
- *
+ *
* @param attributes
* the attributes from which to get a background color
* @return the background color that correspond to the attributes
@@ -1849,7 +1849,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the default root element.
- *
+ *
* @return the default root element
*/
public Element getDefaultRootElement()
@@ -1859,7 +1859,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Extracts a font from a set of attributes.
- *
+ *
* @param attributes
* the attributes from which to get a font
* @return the font that correspond to the attributes
@@ -1872,7 +1872,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Extracts a foreground color from a set of attributes.
- *
+ *
* @param attributes
* the attributes from which to get a foreground color
* @return the foreground color that correspond to the attributes
@@ -1885,7 +1885,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns the logical Style
for the specified position.
- *
+ *
* @param position
* the position from which to query to logical style
* @return the logical Style
for the specified position
@@ -1907,7 +1907,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
* element is returned. That is the last paragraph if
* position >= endIndex
or the first paragraph if
* position < startIndex
.
- *
+ *
* @param position
* the position for which to query the paragraph element
* @return the paragraph element for the specified position
@@ -1925,7 +1925,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Looks up and returns a named Style
.
- *
+ *
* @param nm
* the name of the Style
* @return the found Style
of null
if no such
@@ -1939,7 +1939,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Removes a named Style
from the style hierarchy.
- *
+ *
* @param nm
* the name of the Style
to be removed
*/
@@ -1952,7 +1952,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Sets text attributes for the fragment specified by offset
* and length
.
- *
+ *
* @param offset
* the start offset of the fragment
* @param length
@@ -2015,7 +2015,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Sets the logical style for the paragraph at the specified position.
- *
+ *
* @param position
* the position at which the logical style is added
* @param style
@@ -2056,7 +2056,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Sets text attributes for the paragraph at the specified fragment.
- *
+ *
* @param offset
* the beginning of the fragment
* @param length
@@ -2115,7 +2115,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Called in response to content insert actions. This is used to update the
* element structure.
- *
+ *
* @param ev
* the DocumentEvent
describing the change
* @param attr
@@ -2310,7 +2310,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
}
if (e != null)
-
+
{
// e is now the common parent.
// Insert the end tags.
@@ -2342,7 +2342,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* A helper method to set up the ElementSpec buffer for the special case of an
* insertion occurring immediately after a newline.
- *
+ *
* @param specs
* the ElementSpec buffer to initialize.
*/
@@ -2369,7 +2369,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
* forwarded to the {@link ElementBuffer} of this document. Any changes to the
* document structure are added to the specified document event and sent to
* registered listeners.
- *
+ *
* @param ev
* the document event that records the changes to the document
*/
@@ -2381,7 +2381,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Returns an enumeration of all style names.
- *
+ *
* @return an enumeration of all style names
*/
public Enumeration> getStyleNames()
@@ -2392,7 +2392,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Called when any of this document's styles changes.
- *
+ *
* @param style
* the style that changed
*/
@@ -2403,7 +2403,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Inserts a bulk of structured content at once.
- *
+ *
* @param offset
* the offset at which the content should be inserted
* @param data
@@ -2469,7 +2469,7 @@ public class DefaultStyledDocument extends AbstractDocument implements
/**
* Initializes the DefaultStyledDocument
with the specified
* data.
- *
+ *
* @param data
* the specification of the content with which the document is
* initialized
diff --git a/libjava/classpath/javax/swing/text/DocumentFilter.java b/libjava/classpath/javax/swing/text/DocumentFilter.java
index f86f41c..1f7e8a6 100644
--- a/libjava/classpath/javax/swing/text/DocumentFilter.java
+++ b/libjava/classpath/javax/swing/text/DocumentFilter.java
@@ -48,21 +48,21 @@ public class DocumentFilter
}
public abstract Document getDocument();
-
+
public abstract void insertString(int offset, String string,
- AttributeSet attr)
+ AttributeSet attr)
throws BadLocationException;
-
+
public abstract void remove(int offset, int length)
throws BadLocationException;
-
+
public abstract void replace(int offset, int length, String string,
- AttributeSet attrs)
+ AttributeSet attrs)
throws BadLocationException;
}
-
+
public void insertString(DocumentFilter.FilterBypass fb, int offset,
- String string, AttributeSet attr)
+ String string, AttributeSet attr)
throws BadLocationException
{
fb.insertString(offset, string, attr);
@@ -75,7 +75,7 @@ public class DocumentFilter
}
public void replace(DocumentFilter.FilterBypass fb, int offset, int length,
- String text, AttributeSet attr)
+ String text, AttributeSet attr)
throws BadLocationException
{
fb.replace(offset, length, text, attr);
diff --git a/libjava/classpath/javax/swing/text/EditorKit.java b/libjava/classpath/javax/swing/text/EditorKit.java
index 8719aee..62b4a64 100644
--- a/libjava/classpath/javax/swing/text/EditorKit.java
+++ b/libjava/classpath/javax/swing/text/EditorKit.java
@@ -51,7 +51,7 @@ import javax.swing.JEditorPane;
public abstract class EditorKit implements Cloneable, Serializable
{
private static final long serialVersionUID = -5044124649345887822L;
-
+
public EditorKit()
{
// Nothing to do here.
diff --git a/libjava/classpath/javax/swing/text/Element.java b/libjava/classpath/javax/swing/text/Element.java
index eb53ee9..83d8835 100644
--- a/libjava/classpath/javax/swing/text/Element.java
+++ b/libjava/classpath/javax/swing/text/Element.java
@@ -1,4 +1,4 @@
-/* Element.java --
+/* Element.java --
Copyright (C) 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/swing/text/ElementIterator.java b/libjava/classpath/javax/swing/text/ElementIterator.java
index 112d55e..141137e2 100644
--- a/libjava/classpath/javax/swing/text/ElementIterator.java
+++ b/libjava/classpath/javax/swing/text/ElementIterator.java
@@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
-
+
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -49,7 +49,7 @@ import java.util.Stack;
public class ElementIterator implements Cloneable
{
/**
- * Uses to track the iteration on the stack.
+ * Uses to track the iteration on the stack.
*/
private class ElementRef
{
@@ -110,12 +110,12 @@ public class ElementIterator implements Cloneable
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException _)
{
- // Can't happen.
- return null;
+ // Can't happen.
+ return null;
}
}
diff --git a/libjava/classpath/javax/swing/text/EmptyAttributeSet.java b/libjava/classpath/javax/swing/text/EmptyAttributeSet.java
index 98fb882..92263bc 100644
--- a/libjava/classpath/javax/swing/text/EmptyAttributeSet.java
+++ b/libjava/classpath/javax/swing/text/EmptyAttributeSet.java
@@ -108,7 +108,7 @@ final class EmptyAttributeSet
{
throw new NoSuchElementException("No more elements");
}
-
+
};
}
diff --git a/libjava/classpath/javax/swing/text/FieldView.java b/libjava/classpath/javax/swing/text/FieldView.java
index e357a1e..c47bef9 100644
--- a/libjava/classpath/javax/swing/text/FieldView.java
+++ b/libjava/classpath/javax/swing/text/FieldView.java
@@ -1,4 +1,4 @@
-/* FieldView.java --
+/* FieldView.java --
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,36 +56,36 @@ import javax.swing.event.DocumentEvent;
public class FieldView extends PlainView
{
BoundedRangeModel horizontalVisibility;
-
+
/** Caches the preferred span of the X axis. It is invalidated by
* setting it to -1f. This is done when text in the document
* is inserted, removed or changed. The value is corrected as
- * soon as calculateHorizontalSpan() is called.
+ * soon as calculateHorizontalSpan() is called.
*/
float cachedSpan = -1f;
public FieldView(Element elem)
{
super(elem);
-
+
}
-
+
/** Checks whether the given container is a JTextField. If so
* it retrieves the textfield's horizontalVisibility instance.
- *
+ *
* This method should be only called when the view's container
* is valid. Naturally that would be the setParent() method however
* that method is not overridden in the RI and that is why we chose
* paint() instead.
- */
+ */
private void checkContainer()
{
Container c = getContainer();
-
+
if (c instanceof JTextField)
{
horizontalVisibility = ((JTextField) c).getHorizontalVisibility();
-
+
// Provokes a repaint when the BoundedRangeModel's values change
// (which is what the RI does).
horizontalVisibility.addChangeListener(new ChangeListener(){
@@ -98,25 +98,25 @@ public class FieldView extends PlainView
// and needs to be recalculated (e.g. a different font setting is
// not taken into account).
calculateHorizontalSpan();
-
+
// Initializes the BoundedRangeModel properly.
updateVisibility();
}
-
+
}
-
+
private void updateVisibility()
{
JTextField tf = (JTextField) getContainer();
Insets insets = tf.getInsets();
int width = tf.getWidth() - insets.left - insets.right;
-
+
horizontalVisibility.setMaximum(Math.max((int) ((cachedSpan != -1f)
? cachedSpan
: calculateHorizontalSpan()),
width));
-
+
horizontalVisibility.setExtent(width - 1);
}
@@ -140,7 +140,7 @@ public class FieldView extends PlainView
// Return null when the original allocation is null (like the RI).
if (shape == null)
return null;
-
+
Rectangle rectIn = shape.getBounds();
// vertical adjustment
int height = (int) getPreferredSpan(Y_AXIS);
@@ -177,7 +177,7 @@ public class FieldView extends PlainView
x = rectIn.x;
break;
}
-
+
return new Rectangle(x, y, width, height);
}
@@ -192,13 +192,13 @@ public class FieldView extends PlainView
if (cachedSpan != -1f)
return cachedSpan;
-
+
return calculateHorizontalSpan();
}
-
+
/** Calculates and sets the horizontal span and stores the value
* in cachedSpan.
- */
+ */
private float calculateHorizontalSpan()
{
Segment s = getLineBuffer();
@@ -209,15 +209,15 @@ public class FieldView extends PlainView
elem.getDocument().getText(elem.getStartOffset(),
elem.getEndOffset() - 1,
s);
-
+
return cachedSpan = Utilities.getTabbedTextWidth(s, getFontMetrics(), 0, this, s.offset);
}
catch (BadLocationException e)
{
- // Should never happen
- AssertionError ae = new AssertionError();
- ae.initCause(e);
- throw ae;
+ // Should never happen
+ AssertionError ae = new AssertionError();
+ ae.initCause(e);
+ throw ae;
}
}
@@ -225,21 +225,21 @@ public class FieldView extends PlainView
{
return axis == X_AXIS ? 1 : 0;
}
-
+
public Shape modelToView(int pos, Shape a, Position.Bias bias)
throws BadLocationException
{
Shape newAlloc = adjustAllocation(a);
return super.modelToView(pos, newAlloc, bias);
}
-
+
public void paint(Graphics g, Shape s)
{
if (horizontalVisibility == null)
checkContainer();
Shape newAlloc = adjustAllocation(s);
-
+
Shape clip = g.getClip();
if (clip != null)
{
@@ -262,18 +262,18 @@ public class FieldView extends PlainView
super.paint(g, newAlloc);
g.setClip(clip);
-
+
}
public void insertUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)
{
cachedSpan = -1f;
-
+
if (horizontalVisibility != null)
updateVisibility();
-
+
Shape newAlloc = adjustAllocation(shape);
-
+
super.insertUpdate(ev, newAlloc, vf);
getContainer().repaint();
}
@@ -281,7 +281,7 @@ public class FieldView extends PlainView
public void removeUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)
{
cachedSpan = -1f;
-
+
if (horizontalVisibility != null)
updateVisibility();
@@ -293,7 +293,7 @@ public class FieldView extends PlainView
public void changedUpdate(DocumentEvent ev, Shape shape, ViewFactory vf)
{
cachedSpan = -1f;
-
+
if (horizontalVisibility != null)
updateVisibility();
@@ -306,5 +306,5 @@ public class FieldView extends PlainView
{
return super.viewToModel(fx, fy, adjustAllocation(a), bias);
}
-
+
}
diff --git a/libjava/classpath/javax/swing/text/FlowView.java b/libjava/classpath/javax/swing/text/FlowView.java
index c2bed39..a9a8083 100644
--- a/libjava/classpath/javax/swing/text/FlowView.java
+++ b/libjava/classpath/javax/swing/text/FlowView.java
@@ -216,7 +216,7 @@ public abstract class FlowView extends BoxView
* the logical view. If the available space is exhausted,
* {@link #adjustRow(FlowView, int, int, int)} is called to fit the row into
* the available span.
- *
+ *
* @param fv the flow view for which we perform the layout
* @param rowIndex the index of the row
* @param pos the model position for the beginning of the row
@@ -616,7 +616,7 @@ public abstract class FlowView extends BoxView
{
int axis = getAxis();
int flowAxis;
-
+
if (axis == X_AXIS)
flowAxis = Y_AXIS;
else
@@ -697,7 +697,7 @@ public abstract class FlowView extends BoxView
protected void layout(int width, int height)
{
int flowAxis = getFlowAxis();
- int span;
+ int span;
if (flowAxis == X_AXIS)
span = (int) width;
else
diff --git a/libjava/classpath/javax/swing/text/GapContent.java b/libjava/classpath/javax/swing/text/GapContent.java
index 08a318d..2e68fb5 100644
--- a/libjava/classpath/javax/swing/text/GapContent.java
+++ b/libjava/classpath/javax/swing/text/GapContent.java
@@ -64,7 +64,7 @@ import javax.swing.undo.UndoableEdit;
public class GapContent
implements AbstractDocument.Content, Serializable
{
-
+
/**
* A {@link Position} implementation for GapContent
.
*/
@@ -80,7 +80,7 @@ public class GapContent
/**
* Returns the current offset of this Position within the content.
- *
+ *
* @return the current offset of this Position within the content.
*/
public int getOffset()
@@ -94,7 +94,7 @@ public class GapContent
* the actual offset of the position. This is pulled out of the
* GapContentPosition object so that the mark and position can be handled
* independently, and most important, so that the GapContentPosition can
- * be garbage collected while we still hold a reference to the Mark object.
+ * be garbage collected while we still hold a reference to the Mark object.
*/
private class Mark
extends WeakReference
@@ -149,7 +149,7 @@ public class GapContent
/**
* Stores a reference to a mark that can be resetted to the original value
- * after a mark has been moved. This is used for undoing actions.
+ * after a mark has been moved. This is used for undoing actions.
*/
private class UndoPosRef
{
@@ -213,7 +213,7 @@ public class GapContent
throw new CannotUndoException();
}
}
-
+
public void redo () throws CannotUndoException
{
super.redo();
@@ -231,9 +231,9 @@ public class GapContent
throw new CannotRedoException();
}
}
-
+
}
-
+
private class UndoRemove extends AbstractUndoableEdit
{
public int where;
@@ -265,7 +265,7 @@ public class GapContent
throw new CannotUndoException();
}
}
-
+
public void redo () throws CannotUndoException
{
super.redo();
@@ -280,7 +280,7 @@ public class GapContent
throw new CannotRedoException();
}
}
-
+
}
/** The serialization UID (compatible with JDK1.5). */
@@ -348,7 +348,7 @@ public class GapContent
/**
* Creates a new GapContent object with a specified initial size.
- *
+ *
* @param size the initial size of the buffer
*/
public GapContent(int size)
@@ -365,9 +365,9 @@ public class GapContent
/**
* Allocates an array of the specified length that can then be used as
* buffer.
- *
+ *
* @param size the size of the array to be allocated
- *
+ *
* @return the allocated array
*/
protected Object allocateArray(int size)
@@ -377,7 +377,7 @@ public class GapContent
/**
* Returns the length of the allocated buffer array.
- *
+ *
* @return the length of the allocated buffer array
*/
protected int getArrayLength()
@@ -387,7 +387,7 @@ public class GapContent
/**
* Returns the length of the content.
- *
+ *
* @return the length of the content
*/
public int length()
@@ -397,12 +397,12 @@ public class GapContent
/**
* Inserts a string at the specified position.
- *
+ *
* @param where the position where the string is inserted
* @param str the string that is to be inserted
- *
+ *
* @return an UndoableEdit object
- *
+ *
* @throws BadLocationException if where
is not a valid
* location in the buffer
*/
@@ -429,12 +429,12 @@ public class GapContent
/**
* Removes a piece of content at th specified position.
- *
+ *
* @param where the position where the content is to be removed
* @param nitems number of characters to be removed
- *
+ *
* @return an UndoableEdit object
- *
+ *
* @throws BadLocationException if where
is not a valid
* location in the buffer
*/
@@ -442,11 +442,11 @@ public class GapContent
{
// check arguments
int length = length();
-
+
if ((where + nitems) >= length)
throw new BadLocationException("where + nitems cannot be greater"
+ " than the content length", where + nitems);
-
+
String removedText = getString(where, nitems);
UndoRemove undoRemove = new UndoRemove(where, removedText);
replace(where, nitems, null, 0);
@@ -456,10 +456,10 @@ public class GapContent
/**
* Returns a piece of content as String.
- *
+ *
* @param where the start location of the fragment
* @param len the length of the fragment
- *
+ *
* @throws BadLocationException if where
or
* where + len
are no valid locations in the buffer
*/
@@ -487,15 +487,15 @@ public class GapContent
/**
* Fetches a piece of content and stores it in a {@link Segment} object.
- *
+ *
* If the requested piece of text spans the gap, the content is copied into a
* new array. If it doesn't then it is contiguous and the actual content
* store is returned.
- *
+ *
* @param where the start location of the fragment
* @param len the length of the fragment
* @param txt the Segment object to store the fragment in
- *
+ *
* @throws BadLocationException if where
or
* where + len
are no valid locations in the buffer
*/
@@ -515,7 +515,7 @@ public class GapContent
if (len < 0)
throw new BadLocationException("negative length not allowed: ", len);
- // Optimized to copy only when really needed.
+ // Optimized to copy only when really needed.
if (where + len <= gapStart)
{
// Simple case: completely before gap.
@@ -556,11 +556,11 @@ public class GapContent
/**
* Creates and returns a mark at the specified position.
- *
+ *
* @param offset the position at which to create the mark
- *
+ *
* @return the create Position object for the mark
- *
+ *
* @throws BadLocationException if the offset is not a valid position in the
* buffer
*/
@@ -597,7 +597,7 @@ public class GapContent
marks.add(insertIndex, m);
}
// Otherwise use the found position.
-
+
return pos;
}
@@ -606,7 +606,7 @@ public class GapContent
* segment before the gap as it is and the segment after the gap at the end
* of the new buffer array. This does change the gapEnd mark but not the
* gapStart mark.
- *
+ *
* @param newSize the new size of the gap
*/
protected void shiftEnd(int newSize)
@@ -641,7 +641,7 @@ public class GapContent
/**
* Shifts the gap to the specified position.
- *
+ *
* @param newGapStart the new start position of the gap
*/
protected void shiftGap(int newGapStart)
@@ -746,14 +746,14 @@ public class GapContent
m.mark = newGapEnd;
}
-
+
gapEnd = newGapEnd;
resetMarksAtZero();
}
/**
* Returns the allocated buffer array.
- *
+ *
* @return the allocated buffer array
*/
protected final Object getArray()
@@ -763,7 +763,7 @@ public class GapContent
/**
* Replaces a portion of the storage with the specified items.
- *
+ *
* @param position the position at which to remove items
* @param rmSize the number of items to remove
* @param addItems the items to add at location
@@ -915,7 +915,7 @@ public class GapContent
}
return v;
}
-
+
/**
* Resets all Position
that have an offset of 0
,
* to also have an array index of 0
. This might be necessary
diff --git a/libjava/classpath/javax/swing/text/GlyphView.java b/libjava/classpath/javax/swing/text/GlyphView.java
index 6bc2a38..3f4ccf9 100644
--- a/libjava/classpath/javax/swing/text/GlyphView.java
+++ b/libjava/classpath/javax/swing/text/GlyphView.java
@@ -110,7 +110,7 @@ public class GlyphView extends View implements TabableView, Cloneable
/**
* Determines the model offset, so that the text between p0
* and this offset fits within the span starting at x
with
- * the length of len
.
+ * the length of len
.
*
* @param v the glyph view
* @param p0 the starting offset in the model
@@ -403,7 +403,7 @@ public class GlyphView extends View implements TabableView, Cloneable
: Position.Bias.Backward;
return pos + v.getStartOffset();
}
-
+
}
/**
@@ -424,7 +424,7 @@ public class GlyphView extends View implements TabableView, Cloneable
float height = fontMetrics.getHeight();
return height;
}
-
+
/**
* Paints the glyphs.
*
@@ -562,7 +562,7 @@ public class GlyphView extends View implements TabableView, Cloneable
/**
* Determines the model offset, so that the text between p0
* and this offset fits within the span starting at x
with
- * the length of len
.
+ * the length of len
.
*
* @param v the glyph view
* @param p0 the starting offset in the model
@@ -739,7 +739,7 @@ public class GlyphView extends View implements TabableView, Cloneable
g.fillRect(r.x, r.y, r.width, r.height);
}
-
+
// Paint layered highlights if there are any.
if (tc != null)
{
@@ -972,11 +972,11 @@ public class GlyphView extends View implements TabableView, Cloneable
}
catch (BadLocationException ex)
{
- AssertionError ae;
+ AssertionError ae;
ae = new AssertionError("BadLocationException should not be "
- + "thrown here. p0 = " + p0 + ", p1 = " + p1);
- ae.initCause(ex);
- throw ae;
+ + "thrown here. p0 = " + p0 + ", p1 = " + p1);
+ ae.initCause(ex);
+ throw ae;
}
return cached;
diff --git a/libjava/classpath/javax/swing/text/Highlighter.java b/libjava/classpath/javax/swing/text/Highlighter.java
index 91f3b79..b4b671a 100644
--- a/libjava/classpath/javax/swing/text/Highlighter.java
+++ b/libjava/classpath/javax/swing/text/Highlighter.java
@@ -57,7 +57,7 @@ public interface Highlighter
{
void paint(Graphics g, int p0, int p1, Shape bounds, JTextComponent c);
}
-
+
void install(JTextComponent c);
void deinstall(JTextComponent c);
@@ -76,4 +76,3 @@ public interface Highlighter
void paint(Graphics g);
}
-
diff --git a/libjava/classpath/javax/swing/text/InternationalFormatter.java b/libjava/classpath/javax/swing/text/InternationalFormatter.java
index 1de5ca2..8dcd03a 100644
--- a/libjava/classpath/javax/swing/text/InternationalFormatter.java
+++ b/libjava/classpath/javax/swing/text/InternationalFormatter.java
@@ -206,7 +206,7 @@ public class InternationalFormatter
* one of the mentioned methods in order to customize behaviour.
*
* @param ftf the {@link JFormattedTextField} in which this formatter
- * is installed
+ * is installed
*/
public void install(JFormattedTextField ftf)
{
diff --git a/libjava/classpath/javax/swing/text/JTextComponent.java b/libjava/classpath/javax/swing/text/JTextComponent.java
index 24035e3..a118cf8 100644
--- a/libjava/classpath/javax/swing/text/JTextComponent.java
+++ b/libjava/classpath/javax/swing/text/JTextComponent.java
@@ -246,7 +246,7 @@ public abstract class JTextComponent extends JComponent
{
return this;
}
-
+
/**
* Handle a text insertion event and fire an
* AccessibleContext.ACCESSIBLE_TEXT_PROPERTY property change
@@ -313,7 +313,7 @@ public abstract class JTextComponent extends JComponent
public Rectangle getCharacterBounds(int index)
{
// This is basically the same as BasicTextUI.modelToView().
-
+
Rectangle bounds = null;
if (index >= 0 && index < doc.getLength() - 1)
{
@@ -368,12 +368,12 @@ public abstract class JTextComponent extends JComponent
return JTextComponent.this.getText().length();
}
- /**
+ /**
* Gets the character attributes of the character at index. If
* the index is out of bounds, null is returned.
*
* @param index - index of the character
- *
+ *
* @return the character's attributes
*/
public AttributeSet getCharacterAttribute(int index)
@@ -402,24 +402,24 @@ public abstract class JTextComponent extends JComponent
/**
* Gets the text located at index. null is returned if the index
* or part is invalid.
- *
+ *
* @param part - {@link #CHARACTER}, {@link #WORD}, or {@link #SENTENCE}
* @param index - index of the part
- *
+ *
* @return the part of text at that index, or null
*/
public String getAtIndex(int part, int index)
{
return getAtIndexImpl(part, index, 0);
}
-
+
/**
* Gets the text located after index. null is returned if the index
* or part is invalid.
- *
+ *
* @param part - {@link #CHARACTER}, {@link #WORD}, or {@link #SENTENCE}
* @param index - index after the part
- *
+ *
* @return the part of text after that index, or null
*/
public String getAfterIndex(int part, int index)
@@ -430,10 +430,10 @@ public abstract class JTextComponent extends JComponent
/**
* Gets the text located before index. null is returned if the index
* or part is invalid.
- *
+ *
* @param part - {@link #CHARACTER}, {@link #WORD}, or {@link #SENTENCE}
* @param index - index before the part
- *
+ *
* @return the part of text before that index, or null
*/
public String getBeforeIndex(int part, int index)
@@ -518,20 +518,20 @@ public abstract class JTextComponent extends JComponent
/**
* Returns the number of actions for this object. The zero-th
* object represents the default action.
- *
+ *
* @return the number of actions (0-based).
*/
public int getAccessibleActionCount()
{
return getActions().length;
}
-
+
/**
* Returns the description of the i-th action. Null is returned if
* i is out of bounds.
- *
+ *
* @param i - the action to get the description for
- *
+ *
* @return description of the i-th action
*/
public String getAccessibleActionDescription(int i)
@@ -542,13 +542,13 @@ public abstract class JTextComponent extends JComponent
desc = (String) actions[i].getValue(Action.NAME);
return desc;
}
-
+
/**
- * Performs the i-th action. Nothing happens if i is
+ * Performs the i-th action. Nothing happens if i is
* out of bounds.
*
* @param i - the action to perform
- *
+ *
* @return true if the action was performed successfully
*/
public boolean doAccessibleAction(int i)
@@ -564,7 +564,7 @@ public abstract class JTextComponent extends JComponent
}
return ret;
}
-
+
/**
* Sets the text contents.
*
@@ -727,7 +727,7 @@ public abstract class JTextComponent extends JComponent
* objects, by delegation to the underlying {@link Keymap}.
*
* KeymapActionMap extends {@link ActionMap} also holds a reference to
- * the underlying {@link Keymap} but only appears to use it for listing
+ * the underlying {@link Keymap} but only appears to use it for listing
* its keys.
*
* KeymapActionMap maps all {@link Action} objects to
@@ -774,7 +774,7 @@ public abstract class JTextComponent extends JComponent
public KeyStroke[] keys()
{
KeyStroke[] superKeys = super.keys();
- KeyStroke[] mapKeys = map.getBoundKeyStrokes();
+ KeyStroke[] mapKeys = map.getBoundKeyStrokes();
KeyStroke[] bothKeys = new KeyStroke[superKeys.length + mapKeys.length];
for (int i = 0; i < superKeys.length; ++i)
bothKeys[i] = superKeys[i];
@@ -824,22 +824,22 @@ public abstract class JTextComponent extends JComponent
return map.getBoundKeyStrokes().length + super.size();
}
- public Object[] keys()
+ public Object[] keys()
{
Object[] superKeys = super.keys();
- Object[] mapKeys = map.getBoundKeyStrokes();
+ Object[] mapKeys = map.getBoundKeyStrokes();
Object[] bothKeys = new Object[superKeys.length + mapKeys.length];
for (int i = 0; i < superKeys.length; ++i)
bothKeys[i] = superKeys[i];
for (int i = 0; i < mapKeys.length; ++i)
bothKeys[i + superKeys.length] = mapKeys[i];
- return bothKeys;
+ return bothKeys;
}
public Object[] allKeys()
{
Object[] superKeys = super.allKeys();
- Object[] mapKeys = map.getBoundKeyStrokes();
+ Object[] mapKeys = map.getBoundKeyStrokes();
Object[] bothKeys = new Object[superKeys.length + mapKeys.length];
for (int i = 0; i < superKeys.length; ++i)
bothKeys[i] = superKeys[i];
@@ -929,10 +929,10 @@ public abstract class JTextComponent extends JComponent
i = 0;
e = map.keys();
while (e.hasMoreElements())
- {
+ {
KeyStroke k = (KeyStroke) e.nextElement();
if (map.get(k).equals(a))
- ret[i++] = k;
+ ret[i++] = k;
}
return ret;
}
@@ -978,21 +978,21 @@ public abstract class JTextComponent extends JComponent
public boolean canImport(JComponent component, DataFlavor[] flavors)
{
JTextComponent textComponent = (JTextComponent) component;
-
+
if (! (textComponent.isEnabled()
- && textComponent.isEditable()
- && flavors != null))
+ && textComponent.isEditable()
+ && flavors != null))
return false;
for (int i = 0; i < flavors.length; ++i)
- if (flavors[i].equals(DataFlavor.stringFlavor))
- return true;
+ if (flavors[i].equals(DataFlavor.stringFlavor))
+ return true;
return false;
}
-
+
public void exportToClipboard(JComponent component, Clipboard clipboard,
- int action)
+ int action)
{
JTextComponent textComponent = (JTextComponent) component;
int start = textComponent.getSelectionStart();
@@ -1017,7 +1017,7 @@ public abstract class JTextComponent extends JComponent
// Ignore this and do nothing.
}
}
-
+
public int getSourceActions()
{
return NONE;
@@ -1034,7 +1034,7 @@ public abstract class JTextComponent extends JComponent
for (int i = 0; i < flavors.length; ++i)
if (flavors[i].equals(DataFlavor.stringFlavor))
flavor = flavors[i];
-
+
if (flavor == null)
return false;
@@ -1059,10 +1059,10 @@ public abstract class JTextComponent extends JComponent
}
private static final long serialVersionUID = -8796518220218978795L;
-
+
public static final String DEFAULT_KEYMAP = "default";
public static final String FOCUS_ACCELERATOR_KEY = "focusAcceleratorKey";
-
+
private static DefaultTransferHandler defaultTransferHandler;
private static Hashtable keymaps = new Hashtable();
private Keymap keymap;
@@ -1096,7 +1096,7 @@ public abstract class JTextComponent extends JComponent
* @see #addKeymap
* @see #getKeymap()
* @see #keymaps
- */
+ */
public static Keymap removeKeymap(String n)
{
Keymap km = (Keymap) keymaps.get(n);
@@ -1110,7 +1110,7 @@ public abstract class JTextComponent extends JComponent
* in which case the new Keymap will not be added to the global
* Keymap table. The parent may also be null
, which is
* harmless.
- *
+ *
* @param n The name of the new Keymap, or null
* @param parent The parent of the new Keymap, or null
*
@@ -1137,7 +1137,7 @@ public abstract class JTextComponent extends JComponent
* @see #setKeymap
* @see #keymap
*/
- public Keymap getKeymap()
+ public Keymap getKeymap()
{
return keymap;
}
@@ -1151,26 +1151,26 @@ public abstract class JTextComponent extends JComponent
* @see #getKeymap()
* @see #keymap
*/
- public void setKeymap(Keymap k)
+ public void setKeymap(Keymap k)
{
// phase 1: replace the KeymapWrapper entry in the InputMap chain.
// the goal here is to always maintain the following ordering:
//
// [InputMap]? -> [KeymapWrapper]? -> [InputMapUIResource]*
- //
+ //
// that is to say, component-specific InputMaps need to remain children
// of Keymaps, and Keymaps need to remain children of UI-installed
// InputMaps (and the order of each group needs to be preserved, of
// course).
-
+
KeymapWrapper kw = (k == null ? null : new KeymapWrapper(k));
InputMap childInputMap = getInputMap(JComponent.WHEN_FOCUSED);
if (childInputMap == null)
setInputMap(JComponent.WHEN_FOCUSED, kw);
else
{
- while (childInputMap.getParent() != null
+ while (childInputMap.getParent() != null
&& !(childInputMap.getParent() instanceof KeymapWrapper)
&& !(childInputMap.getParent() instanceof InputMapUIResource))
childInputMap = childInputMap.getParent();
@@ -1178,7 +1178,7 @@ public abstract class JTextComponent extends JComponent
// option 1: there is nobody to replace at the end of the chain
if (childInputMap.getParent() == null)
childInputMap.setParent(kw);
-
+
// option 2: there is already a KeymapWrapper in the chain which
// needs replacing (possibly with its own parents, possibly without)
else if (childInputMap.getParent() instanceof KeymapWrapper)
@@ -1212,7 +1212,7 @@ public abstract class JTextComponent extends JComponent
setActionMap(kam);
else
{
- while (childActionMap.getParent() != null
+ while (childActionMap.getParent() != null
&& !(childActionMap.getParent() instanceof KeymapActionMap)
&& !(childActionMap.getParent() instanceof ActionMapUIResource))
childActionMap = childActionMap.getParent();
@@ -1220,7 +1220,7 @@ public abstract class JTextComponent extends JComponent
// option 1: there is nobody to replace at the end of the chain
if (childActionMap.getParent() == null)
childActionMap.setParent(kam);
-
+
// option 2: there is already a KeymapActionMap in the chain which
// needs replacing (possibly with its own parents, possibly without)
else if (childActionMap.getParent() instanceof KeymapActionMap)
@@ -1269,8 +1269,8 @@ public abstract class JTextComponent extends JComponent
* @see Action#getValue
* @see KeyBinding#actionName
*/
- public static void loadKeymap(Keymap map,
- JTextComponent.KeyBinding[] bindings,
+ public static void loadKeymap(Keymap map,
+ JTextComponent.KeyBinding[] bindings,
Action[] actions)
{
Hashtable acts = new Hashtable(actions.length);
@@ -1298,12 +1298,12 @@ public abstract class JTextComponent extends JComponent
{
return getUI().getEditorKit(this).getActions();
}
-
+
// These are package-private to avoid an accessor method.
Document doc;
Caret caret;
boolean editable;
-
+
private Highlighter highlighter;
private Color caretColor;
private Color disabledTextColor;
@@ -1445,10 +1445,10 @@ public abstract class JTextComponent extends JComponent
{
int start = getSelectionStart();
int offset = getSelectionEnd() - start;
-
+
if (offset <= 0)
return null;
-
+
try
{
return doc.getText(start, offset);
@@ -1565,7 +1565,7 @@ public abstract class JTextComponent extends JComponent
{
if (editable == newValue)
return;
-
+
boolean oldValue = editable;
editable = newValue;
firePropertyChange("editable", oldValue, newValue);
@@ -1590,13 +1590,13 @@ public abstract class JTextComponent extends JComponent
{
if (caret != null)
caret.deinstall(this);
-
+
Caret oldCaret = caret;
caret = newCaret;
if (caret != null)
caret.install(this);
-
+
firePropertyChange("caret", oldCaret, newCaret);
}
@@ -1698,13 +1698,13 @@ public abstract class JTextComponent extends JComponent
{
if (highlighter != null)
highlighter.deinstall(this);
-
+
Highlighter oldHighlighter = highlighter;
highlighter = newHighlighter;
if (highlighter != null)
highlighter.install(this);
-
+
firePropertyChange("highlighter", oldHighlighter, newHighlighter);
}
@@ -1757,7 +1757,7 @@ public abstract class JTextComponent extends JComponent
public void select(int start, int end)
{
int length = doc.getLength();
-
+
start = Math.max(start, 0);
start = Math.min(start, length);
@@ -1803,7 +1803,7 @@ public abstract class JTextComponent extends JComponent
// Set dot to new position,
dot = start + content.length();
setCaretPosition(dot);
-
+
// and update it's magic position.
caret.setMagicCaretPosition(modelToView(dot).getLocation());
}
@@ -1969,7 +1969,7 @@ public abstract class JTextComponent extends JComponent
focusAccelerator = newKey;
firePropertyChange(FOCUS_ACCELERATOR_KEY, oldKey, newKey);
}
-
+
public char getFocusAccelerator()
{
return focusAccelerator;
@@ -1990,7 +1990,7 @@ public abstract class JTextComponent extends JComponent
{
navigationFilter = filter;
}
-
+
/**
* Read and set the content this component. If not overridden, the
* method reads the component content as a plain text.
diff --git a/libjava/classpath/javax/swing/text/Keymap.java b/libjava/classpath/javax/swing/text/Keymap.java
index c3f61d8..e1b305f 100644
--- a/libjava/classpath/javax/swing/text/Keymap.java
+++ b/libjava/classpath/javax/swing/text/Keymap.java
@@ -1,4 +1,4 @@
-/* Keymap.java --
+/* Keymap.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,19 +42,17 @@ import javax.swing.KeyStroke;
public interface Keymap
{
- void addActionForKeyStroke(KeyStroke key, Action a);
- Action getAction(KeyStroke key);
- Action[] getBoundActions();
- KeyStroke[] getBoundKeyStrokes();
- Action getDefaultAction();
- KeyStroke[] getKeyStrokesForAction(Action a);
- String getName();
- Keymap getResolveParent();
- boolean isLocallyDefined(KeyStroke key);
- void removeBindings();
- void removeKeyStrokeBinding(KeyStroke keys);
- void setDefaultAction(Action a);
+ void addActionForKeyStroke(KeyStroke key, Action a);
+ Action getAction(KeyStroke key);
+ Action[] getBoundActions();
+ KeyStroke[] getBoundKeyStrokes();
+ Action getDefaultAction();
+ KeyStroke[] getKeyStrokesForAction(Action a);
+ String getName();
+ Keymap getResolveParent();
+ boolean isLocallyDefined(KeyStroke key);
+ void removeBindings();
+ void removeKeyStrokeBinding(KeyStroke keys);
+ void setDefaultAction(Action a);
void setResolveParent(Keymap parent);
}
-
-
diff --git a/libjava/classpath/javax/swing/text/LayeredHighlighter.java b/libjava/classpath/javax/swing/text/LayeredHighlighter.java
index dcaf1c50..3eac26b 100644
--- a/libjava/classpath/javax/swing/text/LayeredHighlighter.java
+++ b/libjava/classpath/javax/swing/text/LayeredHighlighter.java
@@ -47,10 +47,10 @@ public abstract class LayeredHighlighter
implements Highlighter.HighlightPainter
{
public abstract Shape paintLayer(Graphics g, int p0, int p1,
- Shape viewBounds, JTextComponent editor,
- View view);
+ Shape viewBounds, JTextComponent editor,
+ View view);
}
-
+
public abstract void paintLayeredHighlights(Graphics g, int p0, int p1,
Shape viewBounds,
JTextComponent editor, View view);
diff --git a/libjava/classpath/javax/swing/text/LayoutQueue.java b/libjava/classpath/javax/swing/text/LayoutQueue.java
index b0c84b9..10fadd5 100644
--- a/libjava/classpath/javax/swing/text/LayoutQueue.java
+++ b/libjava/classpath/javax/swing/text/LayoutQueue.java
@@ -67,8 +67,8 @@ public class LayoutQueue
{
synchronized (list)
{
- list.addLast(task);
- list.notify();
+ list.addLast(task);
+ list.notify();
}
}
@@ -81,20 +81,20 @@ public class LayoutQueue
{
synchronized (list)
{
- while (list.size() == 0)
- {
- try
- {
- list.wait();
- }
- catch (InterruptedException _)
- {
- // This seemed like a good idea, but it has not been
- // tested on the JDK.
- return null;
- }
- }
- return (Runnable) list.removeFirst();
+ while (list.size() == 0)
+ {
+ try
+ {
+ list.wait();
+ }
+ catch (InterruptedException _)
+ {
+ // This seemed like a good idea, but it has not been
+ // tested on the JDK.
+ return null;
+ }
+ }
+ return (Runnable) list.removeFirst();
}
}
diff --git a/libjava/classpath/javax/swing/text/MaskFormatter.java b/libjava/classpath/javax/swing/text/MaskFormatter.java
index 4ebf65b..c8f631a 100644
--- a/libjava/classpath/javax/swing/text/MaskFormatter.java
+++ b/libjava/classpath/javax/swing/text/MaskFormatter.java
@@ -1,4 +1,4 @@
-/* MaskFormatter.java --
+/* MaskFormatter.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,53 +59,53 @@ public class MaskFormatter extends DefaultFormatter
private static final char LETTER_CHAR = '?';
private static final char ANYTHING_CHAR = '*';
private static final char HEX_CHAR = 'H';
-
+
/** The mask for this MaskFormatter **/
private String mask;
-
- /**
- * A String made up of the characters that are not valid for input for
- * this MaskFormatter.
+
+ /**
+ * A String made up of the characters that are not valid for input for
+ * this MaskFormatter.
*/
private String invalidChars;
-
- /**
- * A String made up of the characters that are valid for input for
- * this MaskFormatter.
+
+ /**
+ * A String made up of the characters that are valid for input for
+ * this MaskFormatter.
*/
private String validChars;
-
- /** A String used in place of missing chracters if the value does not
+
+ /** A String used in place of missing chracters if the value does not
* completely fill in the spaces in the mask.
*/
private String placeHolder;
-
- /** A character used in place of missing characters if the value does
+
+ /** A character used in place of missing characters if the value does
* not completely fill in the spaces in the mask.
*/
private char placeHolderChar = ' ';
-
+
/**
* Whether or not stringToValue should return literal characters in the mask.
*/
private boolean valueContainsLiteralCharacters = true;
-
+
/** A String used for easy access to valid HEX characters **/
private static String hexString = "0123456789abcdefABCDEF";
-
+
/** An int to hold the length of the mask, accounting for escaped characters **/
int maskLength = 0;
-
+
public MaskFormatter ()
{
// Override super's default behaviour, in MaskFormatter the default
// is not to allow invalid values
setAllowsInvalid(false);
}
-
+
/**
* Creates a MaskFormatter with the specified mask.
- * @specnote doesn't actually throw a ParseException although it
+ * @specnote doesn't actually throw a ParseException although it
* is declared to do so
* @param mask
* @throws java.text.ParseException
@@ -115,7 +115,7 @@ public class MaskFormatter extends DefaultFormatter
this();
setMask (mask);
}
-
+
/**
* Returns the mask used in this MaskFormatter.
* @return the mask used in this MaskFormatter.
@@ -124,7 +124,7 @@ public class MaskFormatter extends DefaultFormatter
{
return mask;
}
-
+
/**
* Returns a String containing the characters that are not valid for input
* for this MaskFormatter.
@@ -134,19 +134,19 @@ public class MaskFormatter extends DefaultFormatter
{
return invalidChars;
}
-
+
/**
* Sets characters that are not valid for input. If
* invalidCharacters
is non-null then no characters contained
* in it will be allowed to be input.
- *
+ *
* @param invalidCharacters the String specifying invalid characters.
*/
public void setInvalidCharacters (String invalidCharacters)
{
this.invalidChars = invalidCharacters;
}
-
+
/**
* Returns a String containing the characters that are valid for input
* for this MaskFormatter.
@@ -156,12 +156,12 @@ public class MaskFormatter extends DefaultFormatter
{
return validChars;
}
-
+
/**
* Sets characters that are valid for input. If
* validCharacters
is non-null then no characters that are
* not contained in it will be allowed to be input.
- *
+ *
* @param validCharacters the String specifying valid characters.
*/
public void setValidCharacters (String validCharacters)
@@ -170,7 +170,7 @@ public class MaskFormatter extends DefaultFormatter
}
/**
- * Returns the place holder String that is used in place of missing
+ * Returns the place holder String that is used in place of missing
* characters when the value doesn't completely fill in the spaces
* in the mask.
* @return the place holder String.
@@ -179,18 +179,18 @@ public class MaskFormatter extends DefaultFormatter
{
return placeHolder;
}
-
+
/**
* Sets the string to use if the value does not completely fill in the mask.
* If this is null, the place holder character will be used instead.
- * @param placeholder the String to use if the value doesn't completely
+ * @param placeholder the String to use if the value doesn't completely
* fill in the mask.
*/
public void setPlaceholder (String placeholder)
{
this.placeHolder = placeholder;
}
-
+
/**
* Returns the character used in place of missing characters when the
* value doesn't completely fill the mask.
@@ -200,42 +200,42 @@ public class MaskFormatter extends DefaultFormatter
{
return placeHolderChar;
}
-
+
/**
* Sets the char to use if the value does not completely fill in the mask.
- * This is only used if the place holder String has not been set or does
+ * This is only used if the place holder String has not been set or does
* not completely fill in the mask.
- * @param placeholder the char to use if the value doesn't completely
+ * @param placeholder the char to use if the value doesn't completely
* fill in the mask.
*/
public void setPlaceholderCharacter (char placeholder)
{
this.placeHolderChar = placeholder;
}
-
+
/**
- * Returns true if stringToValue should return the literal
+ * Returns true if stringToValue should return the literal
* characters in the mask.
- * @return true if stringToValue should return the literal
+ * @return true if stringToValue should return the literal
* characters in the mask
*/
public boolean getValueContainsLiteralCharacters()
{
return valueContainsLiteralCharacters;
}
-
+
/**
* Determines whether stringToValue will return literal characters or not.
- * @param containsLiteralChars if true, stringToValue will return the
+ * @param containsLiteralChars if true, stringToValue will return the
* literal characters in the mask, otherwise it will not.
*/
public void setValueContainsLiteralCharacters (boolean containsLiteralChars)
{
this.valueContainsLiteralCharacters = containsLiteralChars;
}
-
+
/**
- * Sets the mask for this MaskFormatter.
+ * Sets the mask for this MaskFormatter.
* @specnote doesn't actually throw a ParseException even though it is
* declared to do so
* @param mask the new mask for this MaskFormatter
@@ -247,14 +247,14 @@ public class MaskFormatter extends DefaultFormatter
// Update the cached maskLength.
int end = mask.length() - 1;
- maskLength = 0;
+ maskLength = 0;
for (int i = 0; i <= end; i++)
{
// Handle escape characters properly - they don't add to the maskLength
// but 2 escape characters in a row is really one escape character and
// one literal single quote, so that does add 1 to the maskLength.
if (mask.charAt(i) == '\'')
- {
+ {
// Escape characters at the end of the mask don't do anything.
if (i != end)
maskLength++;
@@ -264,14 +264,14 @@ public class MaskFormatter extends DefaultFormatter
maskLength++;
}
}
-
+
/**
* Installs this MaskFormatter on the JFormattedTextField.
- * Invokes valueToString to convert the current value from the
+ * Invokes valueToString to convert the current value from the
* JFormattedTextField to a String, then installs the Actions from
- * getActions, the DocumentFilter from getDocumentFilter, and the
+ * getActions, the DocumentFilter from getDocumentFilter, and the
* NavigationFilter from getNavigationFilter.
- *
+ *
* If valueToString throws a ParseException, this method sets the text
* to an empty String and marks the JFormattedTextField as invalid.
*/
@@ -293,14 +293,14 @@ public class MaskFormatter extends DefaultFormatter
}
}
}
-
+
/**
* Parses the text using the mask, valid characters, and invalid characters
* to determine the appropriate Object to return. This strips the literal
* characters if necessary and invokes super.stringToValue. If the paramter
- * is invalid for the current mask and valid/invalid character sets this
+ * is invalid for the current mask and valid/invalid character sets this
* method will throw a ParseException.
- *
+ *
* @param value the String to parse
* @throws ParseException if value doesn't match the mask and valid/invalid
* character sets
@@ -309,7 +309,7 @@ public class MaskFormatter extends DefaultFormatter
{
return super.stringToValue(convertStringToValue(value));
}
-
+
private String convertStringToValue(String value)
throws ParseException
{
@@ -347,7 +347,7 @@ public class MaskFormatter extends DefaultFormatter
valueChar = placeHolderChar;
}
- // This switch block on the mask character checks that the character
+ // This switch block on the mask character checks that the character
// within value
at that point is valid according to the
// mask and also converts to upper/lowercase as needed.
switch (maskChar)
@@ -393,7 +393,7 @@ public class MaskFormatter extends DefaultFormatter
i++;
break;
case ESCAPE_CHAR:
- // Escape character, check the next character to make sure that
+ // Escape character, check the next character to make sure that
// the literals match
j++;
if (j < length)
@@ -427,7 +427,7 @@ public class MaskFormatter extends DefaultFormatter
/**
* Returns a String representation of the Object value based on the mask.
- *
+ *
* @param value the value to convert
* @throws ParseException if value is invalid for this mask and valid/invalid
* character sets
@@ -437,7 +437,7 @@ public class MaskFormatter extends DefaultFormatter
String string = value != null ? value.toString() : "";
return convertValueToString(string);
}
-
+
/**
* This method takes in a String and runs it through the mask to make
* sure that it is valid. If convert
is true, it also
@@ -483,7 +483,7 @@ public class MaskFormatter extends DefaultFormatter
valueChar = placeHolderChar;
}
- // This switch block on the mask character checks that the character
+ // This switch block on the mask character checks that the character
// within value
at that point is valid according to the
// mask and also converts to upper/lowercase as needed.
switch (maskChar)
@@ -529,7 +529,7 @@ public class MaskFormatter extends DefaultFormatter
i++;
break;
case ESCAPE_CHAR:
- // Escape character, check the next character to make sure that
+ // Escape character, check the next character to make sure that
// the literals match
j++;
if (j < length)
diff --git a/libjava/classpath/javax/swing/text/MutableAttributeSet.java b/libjava/classpath/javax/swing/text/MutableAttributeSet.java
index 5dd2406..eb52be5 100644
--- a/libjava/classpath/javax/swing/text/MutableAttributeSet.java
+++ b/libjava/classpath/javax/swing/text/MutableAttributeSet.java
@@ -40,10 +40,10 @@ package javax.swing.text;
import java.util.Enumeration;
/**
- * An {@link AttributeSet} that supports modification of the stored
+ * An {@link AttributeSet} that supports modification of the stored
* attributes.
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
* @since 1.2
*/
public interface MutableAttributeSet extends AttributeSet
@@ -52,54 +52,54 @@ public interface MutableAttributeSet extends AttributeSet
* Adds an attribute with the given name
and value
* to the set. If the set already contains an attribute with the given
* name
, the attribute value is updated.
- *
+ *
* @param name the attribute name (null
not permitted).
* @param value the value (null
not permitted).
- *
+ *
* @throws NullPointerException if either argument is null
.
*/
void addAttribute(Object name, Object value);
/**
* Adds all the attributes from attributes
to this set.
- *
+ *
* @param attributes the set of attributes to add (null
not
* permitted).
- *
- * @throws NullPointerException if attributes
is
+ *
+ * @throws NullPointerException if attributes
is
* null
.
*/
void addAttributes(AttributeSet attributes);
/**
- * Removes the attribute with the specified name
, if this
+ * Removes the attribute with the specified name
, if this
* attribute is defined. This method will only remove an attribute from
* this set, not from the resolving parent.
- *
+ *
* @param name the attribute name (null
not permitted).
- *
+ *
* @throws NullPointerException if name
is null
.
*/
void removeAttribute(Object name);
/**
* Removes the attributes listed in names
.
- *
+ *
* @param names the attribute names (null
not permitted).
- *
- * @throws NullPointerException if names
is null
+ *
+ * @throws NullPointerException if names
is null
* or contains any null
values.
*/
void removeAttributes(Enumeration> names);
/**
- * Removes attributes from this set if they are found in the
+ * Removes attributes from this set if they are found in the
* given set. Only attributes whose key AND value are removed.
- * Removes attributes only from this set, not from the resolving parent.
- * Since the resolving parent is stored as an attribute, if
+ * Removes attributes only from this set, not from the resolving parent.
+ * Since the resolving parent is stored as an attribute, if
* attributes
has the same resolving parent as this set, the
* parent will be removed from this set.
- *
+ *
* @param attributes the attributes (null
not permitted).
*/
void removeAttributes(AttributeSet attributes);
@@ -107,10 +107,10 @@ public interface MutableAttributeSet extends AttributeSet
/**
* Sets the reolving parent for this set. When looking up an attribute, if
* it is not found in this set, then the resolving parent is also used for
- * the lookup.
- *
+ * the lookup.
+ *
* @param parent the parent attribute set (null
not permitted).
- *
+ *
* @throws NullPointerException if parent
is null
.
*/
void setResolveParent(AttributeSet parent);
diff --git a/libjava/classpath/javax/swing/text/NavigationFilter.java b/libjava/classpath/javax/swing/text/NavigationFilter.java
index ea9b29d..647ac70 100644
--- a/libjava/classpath/javax/swing/text/NavigationFilter.java
+++ b/libjava/classpath/javax/swing/text/NavigationFilter.java
@@ -51,20 +51,20 @@ public class NavigationFilter
public abstract void moveDot(int dot, Position.Bias bias);
public abstract void setDot(int dot, Position.Bias bias);
}
-
+
public NavigationFilter()
{
// Do nothing here.
}
public void moveDot(NavigationFilter.FilterBypass fb, int dot,
- Position.Bias bias)
+ Position.Bias bias)
{
fb.moveDot(dot, bias);
}
public void setDot(NavigationFilter.FilterBypass fb, int dot,
- Position.Bias bias)
+ Position.Bias bias)
{
fb.setDot(dot, bias);
}
diff --git a/libjava/classpath/javax/swing/text/NumberFormatter.java b/libjava/classpath/javax/swing/text/NumberFormatter.java
index a858ff4..ce5eef9 100644
--- a/libjava/classpath/javax/swing/text/NumberFormatter.java
+++ b/libjava/classpath/javax/swing/text/NumberFormatter.java
@@ -1,4 +1,4 @@
-/* NumberFormatter.java --
+/* NumberFormatter.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,22 +45,22 @@ import java.text.NumberFormat;
* NumberFormatter
is an {@link InternationalFormatter}
* that implements value to string and string to value conversion via
* an instance of {@link NumberFormat}.
- *
+ *
* @author Anthony Balkissoon abalkiss at redhat dot com
* @since 1.4
*/
public class NumberFormatter extends InternationalFormatter
{
-
+
/**
- * Creates a NumberFormatter with the default NumberFormat from
- * NumberFormat.getNumberInstance().
+ * Creates a NumberFormatter with the default NumberFormat from
+ * NumberFormat.getNumberInstance().
*/
public NumberFormatter ()
{
this (NumberFormat.getNumberInstance());
}
-
+
/**
* Creates a NumberFormatter with the specified NumberFormat.
* @param format the NumberFormat to use for this NumberFormatter.
@@ -70,11 +70,11 @@ public class NumberFormatter extends InternationalFormatter
super(format);
setFormat(format);
}
-
+
/**
* Sets the NumberFormat that this NumberFormatter will use to determine
* legal values for editing and displaying.
- *
+ *
* @param format the Format to use to determine legal values.
*/
public void setFormat (Format format)
diff --git a/libjava/classpath/javax/swing/text/ParagraphView.java b/libjava/classpath/javax/swing/text/ParagraphView.java
index f2795e2..4d4c7a0 100644
--- a/libjava/classpath/javax/swing/text/ParagraphView.java
+++ b/libjava/classpath/javax/swing/text/ParagraphView.java
@@ -297,7 +297,7 @@ public class ParagraphView extends FlowView implements TabExpander
/**
* Sets the justification of the paragraph.
*
- * @param j the justification to set
+ * @param j the justification to set
*/
protected void setJustification(int j)
{
diff --git a/libjava/classpath/javax/swing/text/PasswordView.java b/libjava/classpath/javax/swing/text/PasswordView.java
index 9d4c86a..62b1419 100644
--- a/libjava/classpath/javax/swing/text/PasswordView.java
+++ b/libjava/classpath/javax/swing/text/PasswordView.java
@@ -1,4 +1,4 @@
-/* PasswordView.java --
+/* PasswordView.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -155,7 +155,7 @@ public class PasswordView
/**
* Determines the preferred span for this view along an axis.
- *
+ *
* @param axis to get the preferred span of
* @return the preferred span of the axis
*/
@@ -196,7 +196,7 @@ public class PasswordView
* @param a - the allocated region to render into
* @param b - typesafe enumeration to indicate bias to a position in the model.
* @return the bounding box of the given position
- * @throws BadLocationException if the given position does not
+ * @throws BadLocationException if the given position does not
* represent a valid location in the associated document
*/
public Shape modelToView(int pos, Shape a, Position.Bias b)
@@ -206,7 +206,7 @@ public class PasswordView
// Ensure metrics are up-to-date.
updateMetrics();
-
+
// Get rectangle of the line containing position.
int lineIndex = getElement().getElementIndex(pos);
Rectangle rect = lineToRect(newAlloc, lineIndex);
@@ -234,16 +234,16 @@ public class PasswordView
}
/**
- * Provides a mapping from the view coordinate space to the logical
+ * Provides a mapping from the view coordinate space to the logical
* coordinate space of the model.
- *
+ *
* @param fx - the X coordinate >= 0.0f
* @param fy - the Y coordinate >= 0.0f
- * @param a - the allocated region to render into
+ * @param a - the allocated region to render into
* @param bias - typesafe enumeration to indicate bias to a position in the model.
- * @return the location within the model that best represents
+ * @return the location within the model that best represents
* the given point in the view
- *
+ *
*/
public int viewToModel(float fx, float fy, Shape a, Position.Bias[] bias)
{
diff --git a/libjava/classpath/javax/swing/text/PlainDocument.java b/libjava/classpath/javax/swing/text/PlainDocument.java
index 730a619..070c760 100644
--- a/libjava/classpath/javax/swing/text/PlainDocument.java
+++ b/libjava/classpath/javax/swing/text/PlainDocument.java
@@ -52,7 +52,7 @@ import java.util.ArrayList;
public class PlainDocument extends AbstractDocument
{
private static final long serialVersionUID = 4758290289196893664L;
-
+
public static final String lineLimitAttribute = "lineLimit";
public static final String tabSizeAttribute = "tabSize";
@@ -62,7 +62,7 @@ public class PlainDocument extends AbstractDocument
* createDefaultRoot() (when overridden by a subclass).
*/
private Element rootElement;
-
+
public PlainDocument()
{
this(new GapContent());
@@ -80,7 +80,7 @@ public class PlainDocument extends AbstractDocument
private void reindex()
{
Element[] lines;
- try
+ try
{
String str = content.getString(0, content.length());
@@ -91,10 +91,10 @@ public class PlainDocument extends AbstractDocument
elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, i + 1));
j = i + 1;
}
-
+
if (j < content.length())
elts.add(createLeafElement(rootElement, SimpleAttributeSet.EMPTY, j, content.length()));
-
+
lines = new Element[elts.size()];
for (int i = 0; i < elts.size(); ++i)
lines[i] = (Element) elts.get(i);
@@ -116,7 +116,7 @@ public class PlainDocument extends AbstractDocument
Element[] array = new Element[1];
array[0] = createLeafElement(root, null, 0, 1);
root.replace(0, 0, array);
-
+
return root;
}
@@ -239,9 +239,9 @@ public class PlainDocument extends AbstractDocument
removed = new Element [i2 - i1 + 1];
for (int i = i1; i <= i2; i++)
removed[i-i1] = rootElement.getElement(i);
-
+
int start = rootElement.getElement(i1).getStartOffset();
- int end = rootElement.getElement(i2).getEndOffset();
+ int end = rootElement.getElement(i2).getEndOffset();
added[0] = createLeafElement(rootElement,
SimpleAttributeSet.EMPTY,
start, end);
diff --git a/libjava/classpath/javax/swing/text/PlainView.java b/libjava/classpath/javax/swing/text/PlainView.java
index e048d5f..16112fd 100644
--- a/libjava/classpath/javax/swing/text/PlainView.java
+++ b/libjava/classpath/javax/swing/text/PlainView.java
@@ -1,4 +1,4 @@
-/* PlainView.java --
+/* PlainView.java --
Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,7 +59,7 @@ public class PlainView extends View implements TabExpander
* The color that is used to draw disabled text fields.
*/
Color disabledColor;
-
+
/**
* While painting this is the textcomponent's current start index
* of the selection.
@@ -73,13 +73,13 @@ public class PlainView extends View implements TabExpander
int selectionEnd;
Font font;
-
+
/** The length of the longest line in the Document **/
float maxLineLength = -1;
-
+
/** The longest line in the Document **/
Element longestLine = null;
-
+
protected FontMetrics metrics;
/**
@@ -112,12 +112,12 @@ public class PlainView extends View implements TabExpander
if (this.font != font)
{
- this.font = font;
- metrics = component.getFontMetrics(font);
+ this.font = font;
+ metrics = component.getFontMetrics(font);
tabSize = getTabSize() * metrics.charWidth('m');
}
}
-
+
/**
* @since 1.4
*/
@@ -125,11 +125,11 @@ public class PlainView extends View implements TabExpander
{
// Ensure metrics are up-to-date.
updateMetrics();
-
+
Rectangle rect = a instanceof Rectangle ? (Rectangle) a : a.getBounds();
int fontHeight = metrics.getHeight();
return new Rectangle(rect.x, rect.y + (line * fontHeight),
- rect.width, fontHeight);
+ rect.width, fontHeight);
}
public Shape modelToView(int position, Shape a, Position.Bias b)
@@ -137,7 +137,7 @@ public class PlainView extends View implements TabExpander
{
// Ensure metrics are up-to-date.
updateMetrics();
-
+
Document document = getDocument();
// Get rectangle of the line containing position.
@@ -151,7 +151,7 @@ public class PlainView extends View implements TabExpander
Segment segment = getLineBuffer();
document.getText(lineStart, position - lineStart, segment);
int xoffset = Utilities.getTabbedTextWidth(segment, metrics, tabBase,
- this, lineStart);
+ this, lineStart);
// Calc the real rectangle.
rect.x += xoffset;
@@ -160,7 +160,7 @@ public class PlainView extends View implements TabExpander
return rect;
}
-
+
/**
* Draws a line of text. The X and Y coordinates specify the start of
* the baseline of the line.
@@ -177,7 +177,7 @@ public class PlainView extends View implements TabExpander
Element line = getElement().getElement(lineIndex);
int startOffset = line.getStartOffset();
int endOffset = line.getEndOffset() - 1;
-
+
if (selectionStart <= startOffset)
// Selection starts before the line ...
if (selectionEnd <= startOffset)
@@ -265,7 +265,7 @@ public class PlainView extends View implements TabExpander
{
// Ensure metrics are up-to-date.
updateMetrics();
-
+
JTextComponent textComponent = (JTextComponent) getContainer();
selectedColor = textComponent.getSelectedTextColor();
@@ -324,7 +324,7 @@ public class PlainView extends View implements TabExpander
* Returns the tab size of a tab. Checks the Document's
* properties for PlainDocument.tabSizeAttribute and returns it if it is
* defined, otherwise returns 8.
- *
+ *
* @return the tab size.
*/
protected int getTabSize()
@@ -339,7 +339,7 @@ public class PlainView extends View implements TabExpander
* Returns the next tab stop position after a given reference position.
*
* This implementation ignores the tabStop
argument.
- *
+ *
* @param x the current x position in pixels
* @param tabStop the position within the text stream that the tab occured at
*/
@@ -351,7 +351,7 @@ public class PlainView extends View implements TabExpander
int numTabs = (((int) x) - tabBase) / tabSize;
next = tabBase + (numTabs + 1) * tabSize;
}
- return next;
+ return next;
}
/**
@@ -363,7 +363,7 @@ public class PlainView extends View implements TabExpander
// if the longest line is cached, return the cached value
if (maxLineLength != -1)
return maxLineLength;
-
+
// otherwise we have to go through all the lines and find it
Element el = getElement();
Segment seg = getLineBuffer();
@@ -380,13 +380,13 @@ public class PlainView extends View implements TabExpander
catch (BadLocationException ex)
{
AssertionError ae = new AssertionError("Unexpected bad location");
- ae.initCause(ex);
- throw ae;
+ ae.initCause(ex);
+ throw ae;
}
-
+
if (seg == null || seg.array == null || seg.count == 0)
continue;
-
+
int width = metrics.charsWidth(seg.array, seg.offset, seg.count);
if (width > span)
{
@@ -397,7 +397,7 @@ public class PlainView extends View implements TabExpander
maxLineLength = span;
return maxLineLength;
}
-
+
public float getPreferredSpan(int axis)
{
if (axis != X_AXIS && axis != Y_AXIS)
@@ -419,7 +419,7 @@ public class PlainView extends View implements TabExpander
span = metrics.getHeight() * el.getElementCount();
break;
}
-
+
return span;
}
@@ -483,14 +483,14 @@ public class PlainView extends View implements TabExpander
pos = -1;
}
}
-
+
}
}
// Bias is always forward.
b[0] = Position.Bias.Forward;
return pos;
- }
-
+ }
+
/**
* Since insertUpdate and removeUpdate each deal with children
* Elements being both added and removed, they both have to perform
@@ -592,7 +592,7 @@ public class PlainView extends View implements TabExpander
/**
* This method is called when something is inserted into the Document
* that this View is displaying.
- *
+ *
* @param changes the DocumentEvent for the changes.
* @param a the allocation of the View
* @param f the ViewFactory used to rebuild
@@ -605,7 +605,7 @@ public class PlainView extends View implements TabExpander
/**
* This method is called when something is removed from the Document
* that this View is displaying.
- *
+ *
* @param changes the DocumentEvent for the changes.
* @param a the allocation of the View
* @param f the ViewFactory used to rebuild
@@ -614,28 +614,28 @@ public class PlainView extends View implements TabExpander
{
updateDamage(changes, a, f);
}
-
+
/**
- * This method is called when attributes were changed in the
+ * This method is called when attributes were changed in the
* Document in a location that this view is responsible for.
*/
public void changedUpdate (DocumentEvent changes, Shape a, ViewFactory f)
{
updateDamage(changes, a, f);
}
-
+
/**
* Repaint the given line range. This is called from insertUpdate,
- * changedUpdate, and removeUpdate when no new lines were added
- * and no lines were removed, to repaint the line that was
+ * changedUpdate, and removeUpdate when no new lines were added
+ * and no lines were removed, to repaint the line that was
* modified.
- *
+ *
* @param line0 the start of the range
* @param line1 the end of the range
* @param a the rendering region of the host
* @param host the Component that uses this View (used to call repaint
* on that Component)
- *
+ *
* @since 1.4
*/
protected void damageLineRange (int line0, int line1, Shape a, Component host)
@@ -656,7 +656,7 @@ public class PlainView extends View implements TabExpander
rec0.height, rec1);
host.repaint(repaintRec.x, repaintRec.y, repaintRec.width,
repaintRec.height);
- }
+ }
}
/**
@@ -722,4 +722,3 @@ public class PlainView extends View implements TabExpander
lineEl.getStartOffset());
}
}
-
diff --git a/libjava/classpath/javax/swing/text/Position.java b/libjava/classpath/javax/swing/text/Position.java
index d02eb83..56c8b6e 100644
--- a/libjava/classpath/javax/swing/text/Position.java
+++ b/libjava/classpath/javax/swing/text/Position.java
@@ -1,4 +1,4 @@
-/* Position.java --
+/* Position.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,7 +46,7 @@ public interface Position
public static final Bias Forward = new Bias("Forward");
private String name;
-
+
private Bias(String n)
{
name = n;
@@ -57,6 +57,6 @@ public interface Position
return name;
}
}
-
+
int getOffset();
}
diff --git a/libjava/classpath/javax/swing/text/Segment.java b/libjava/classpath/javax/swing/text/Segment.java
index 63c5fa0..7486ab3 100644
--- a/libjava/classpath/javax/swing/text/Segment.java
+++ b/libjava/classpath/javax/swing/text/Segment.java
@@ -45,16 +45,16 @@ import java.text.CharacterIterator;
public class Segment implements Cloneable, CharacterIterator
{
private boolean partialReturn;
-
+
/** The current index. */
private int current;
-
+
/** Storage for the characters (may contain additional characters). */
public char[] array;
-
+
/** The number of characters in the segment. */
public int count;
-
+
/** The offset of the first character in the segment. */
public int offset;
@@ -68,7 +68,7 @@ public class Segment implements Cloneable, CharacterIterator
/**
* Creates a new Segment
.
- *
+ *
* @param array the underlying character data.
* @param offset the offset of the first character in the segment.
* @param count the number of characters in the segment.
@@ -79,38 +79,38 @@ public class Segment implements Cloneable, CharacterIterator
this.offset = offset;
this.count = count;
}
-
+
/**
* Clones the segment (note that the underlying character array is not cloned,
* just the reference to it).
- *
+ *
* @return A clone of the segment.
*/
public Object clone()
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException e)
{
- return null;
+ return null;
}
}
/**
* Returns the character at the current index. If the segment consists of
- * zero characters, or the current index has passed the end of the
+ * zero characters, or the current index has passed the end of the
* characters in the segment, this method returns {@link #DONE}.
- *
+ *
* @return The character at the current index.
*/
public char current()
{
if (count == 0
- || current >= getEndIndex())
+ || current >= getEndIndex())
return DONE;
-
+
return array[current];
}
@@ -118,8 +118,8 @@ public class Segment implements Cloneable, CharacterIterator
* Sets the current index to the first character in the segment and returns
* that character. If the segment contains zero characters, this method
* returns {@link #DONE}.
- *
- * @return The first character in the segment, or {@link #DONE} if the
+ *
+ * @return The first character in the segment, or {@link #DONE} if the
* segment contains zero characters.
*/
public char first()
@@ -133,7 +133,7 @@ public class Segment implements Cloneable, CharacterIterator
/**
* Returns the index of the first character in the segment.
- *
+ *
* @return The index of the first character.
*/
public int getBeginIndex()
@@ -142,10 +142,10 @@ public class Segment implements Cloneable, CharacterIterator
}
/**
- * Returns the end index for the segment (one position beyond the last
- * character in the segment - note that this can be outside the range of the
+ * Returns the end index for the segment (one position beyond the last
+ * character in the segment - note that this can be outside the range of the
* underlying character array).
- *
+ *
* @return The end index for the segment.
*/
public int getEndIndex()
@@ -155,7 +155,7 @@ public class Segment implements Cloneable, CharacterIterator
/**
* Returns the index of the current character in the segment.
- *
+ *
* @return The index of the current character.
*/
public int getIndex()
@@ -164,12 +164,12 @@ public class Segment implements Cloneable, CharacterIterator
}
/**
- * Sets the current index to point to the last character in the segment and
- * returns that character. If the segment contains zero characters, the
- * current index is set to {@link #getEndIndex()} and this method returns
+ * Sets the current index to point to the last character in the segment and
+ * returns that character. If the segment contains zero characters, the
+ * current index is set to {@link #getEndIndex()} and this method returns
* {@link #DONE}.
- *
- * @return The last character in the segment, or {@link #DONE} if the
+ *
+ * @return The last character in the segment, or {@link #DONE} if the
* segment contains zero characters.
*/
public char last()
@@ -179,20 +179,20 @@ public class Segment implements Cloneable, CharacterIterator
current = getEndIndex();
return DONE;
}
-
+
current = getEndIndex() - 1;
return array[current];
}
/**
- * Sets the current index to point to the next character in the segment and
+ * Sets the current index to point to the next character in the segment and
* returns that character. If the next character position is past the end of
* the segment, the index is set to {@link #getEndIndex()} and the method
- * returns {@link #DONE}. If the segment contains zero characters, this
+ * returns {@link #DONE}. If the segment contains zero characters, this
* method returns {@link #DONE}.
- *
+ *
* @return The next character in the segment or {@link #DONE} (if the next
- * character position is past the end of the segment or if the
+ * character position is past the end of the segment or if the
* segment contains zero characters).
*/
public char next()
@@ -202,30 +202,30 @@ public class Segment implements Cloneable, CharacterIterator
if ((current + 1) >= getEndIndex())
{
- current = getEndIndex();
- return DONE;
+ current = getEndIndex();
+ return DONE;
}
-
+
current++;
return array[current];
}
/**
- * Sets the current index to point to the previous character in the segment
- * and returns that character. If the current index is equal to
- * {@link #getBeginIndex()}, or if the segment contains zero characters, this
+ * Sets the current index to point to the previous character in the segment
+ * and returns that character. If the current index is equal to
+ * {@link #getBeginIndex()}, or if the segment contains zero characters, this
* method returns {@link #DONE}.
- *
- * @return The previous character in the segment or {@link #DONE} (if the
- * current character position is at the beginning of the segment or
+ *
+ * @return The previous character in the segment or {@link #DONE} (if the
+ * current character position is at the beginning of the segment or
* if the segment contains zero characters).
*/
public char previous()
{
if (count == 0
- || current == getBeginIndex())
+ || current == getBeginIndex())
return DONE;
-
+
current--;
return array[current];
}
@@ -233,20 +233,20 @@ public class Segment implements Cloneable, CharacterIterator
/**
* Sets the current index and returns the character at that position (or
* {@link #DONE} if the index is equal to {@link #getEndIndex()}.
- *
+ *
* @param position the current position.
- *
+ *
* @return The character at the specified position
, or
- * {@link #DONE} if position
is equal to
+ * {@link #DONE} if position
is equal to
* {@link #getEndIndex()}.
- *
+ *
* @throws IllegalArgumentException if position
is not in the
* range {@link #getBeginIndex()} to {@link #getEndIndex()}.
*/
public char setIndex(int position)
{
if (position < getBeginIndex()
- || position > getEndIndex())
+ || position > getEndIndex())
throw new IllegalArgumentException("position: " + position
+ ", beginIndex: " + getBeginIndex()
+ ", endIndex: " + getEndIndex()
@@ -256,15 +256,15 @@ public class Segment implements Cloneable, CharacterIterator
if (position == getEndIndex())
return DONE;
-
+
return array[current];
}
/**
- * Returns a String
containing the same characters as this
+ * Returns a String
containing the same characters as this
* Segment
.
- *
- * @return A String
containing the same characters as this
+ *
+ * @return A String
containing the same characters as this
* Segment
.
*/
public String toString()
@@ -274,19 +274,19 @@ public class Segment implements Cloneable, CharacterIterator
/**
* Sets the partial return flag.
- *
+ *
* @param p the new value of the flag.
- *
+ *
* @since 1.4
*/
public void setPartialReturn(boolean p)
{
partialReturn = p;
}
-
+
/**
* Returns the partial return flag.
- *
+ *
* @return The partial return flag.
* @since 1.4
*/
diff --git a/libjava/classpath/javax/swing/text/SimpleAttributeSet.java b/libjava/classpath/javax/swing/text/SimpleAttributeSet.java
index 701fa8a..0229901 100644
--- a/libjava/classpath/javax/swing/text/SimpleAttributeSet.java
+++ b/libjava/classpath/javax/swing/text/SimpleAttributeSet.java
@@ -66,13 +66,13 @@ public class SimpleAttributeSet
{
tab = new Hashtable();
}
-
+
/**
* Creates a new SimpleAttributeSet
with the same attributes
* and resolve parent as the specified set.
- *
+ *
* @param a the attributes (null
not permitted).
- *
+ *
* @throws NullPointerException if a
is null
.
*/
public SimpleAttributeSet(AttributeSet a)
@@ -85,10 +85,10 @@ public class SimpleAttributeSet
* Adds an attribute with the given name
and value
* to the set. If the set already contains an attribute with the given
* name
, the attribute value is updated.
- *
+ *
* @param name the attribute name (null
not permitted).
* @param value the value (null
not permitted).
- *
+ *
* @throws NullPointerException if either argument is null
.
*/
public void addAttribute(Object name, Object value)
@@ -98,11 +98,11 @@ public class SimpleAttributeSet
/**
* Adds all the attributes from attributes
to this set.
- *
+ *
* @param attributes the set of attributes to add (null
not
* permitted).
- *
- * @throws NullPointerException if attributes
is
+ *
+ * @throws NullPointerException if attributes
is
* null
.
*/
public void addAttributes(AttributeSet attributes)
@@ -118,7 +118,7 @@ public class SimpleAttributeSet
/**
* Returns a clone of the attribute set.
- *
+ *
* @return A clone of the attribute set.
*/
public Object clone()
@@ -159,7 +159,7 @@ public class SimpleAttributeSet
return false;
}
}
-
+
/**
* Returns true if the given name and value are found in this AttributeSet.
* Does not check the resolve parent.
@@ -169,7 +169,7 @@ public class SimpleAttributeSet
*/
boolean containsAttributeLocally(Object name, Object value)
{
- return tab.containsKey(name)
+ return tab.containsKey(name)
&& tab.get(name).equals(value);
}
@@ -190,7 +190,7 @@ public class SimpleAttributeSet
Object name = e.nextElement();
Object val = attributes.getAttribute(name);
if (! containsAttribute(name, val))
- return false;
+ return false;
}
return true;
}
@@ -207,33 +207,33 @@ public class SimpleAttributeSet
/**
* Checks this set for equality with an arbitrary object.
- *
+ *
* @param obj the object (null
permitted).
- *
+ *
* @return true
if this set is equal to obj
, and
- * false
otherwise.
+ * false
otherwise.
*/
public boolean equals(Object obj)
{
- return
+ return
(obj instanceof AttributeSet)
&& this.isEqual((AttributeSet) obj);
}
/**
- * Returns the value of the specified attribute, or null
if
+ * Returns the value of the specified attribute, or null
if
* there is no attribute with that name. If the attribute is not defined
* directly in this set, the parent hierarchy (if there is one) will be
* used.
- *
+ *
* @param name the attribute (null
not permitted).
- *
+ *
* @throws NullPointerException if name
is null
.
*/
public Object getAttribute(Object name)
{
Object val = tab.get(name);
- if (val != null)
+ if (val != null)
return val;
AttributeSet p = getResolveParent();
@@ -245,10 +245,10 @@ public class SimpleAttributeSet
/**
* Returns the number of attributes stored in this set, plus 1 if a parent
- * has been specified (the reference to the parent is stored as a special
+ * has been specified (the reference to the parent is stored as a special
* attribute). The attributes stored in the parent do NOT contribute
* to the count.
- *
+ *
* @return The attribute count.
*/
public int getAttributeCount()
@@ -258,7 +258,7 @@ public class SimpleAttributeSet
/**
* Returns an enumeration of the attribute names.
- *
+ *
* @return An enumeration of the attribute names.
*/
public Enumeration> getAttributeNames()
@@ -268,9 +268,9 @@ public class SimpleAttributeSet
/**
* Returns the resolving parent.
- *
+ *
* @return The resolving parent (possibly null
).
- *
+ *
* @see #setResolveParent(AttributeSet)
*/
public AttributeSet getResolveParent()
@@ -280,7 +280,7 @@ public class SimpleAttributeSet
/**
* Returns a hash code for this instance.
- *
+ *
* @return A hash code.
*/
public int hashCode()
@@ -292,7 +292,7 @@ public class SimpleAttributeSet
* Returns true
if the given attribute is defined in this set,
* and false
otherwise. The parent attribute set is not
* checked.
- *
+ *
* @param attrName the attribute name (null
not permitted).
*/
public boolean isDefined(Object attrName)
@@ -301,28 +301,28 @@ public class SimpleAttributeSet
}
/**
- * Returns true
if the set contains no attributes, and
- * false
otherwise. Note that the resolving parent is
- * stored as an attribute, so this method will return false
if
+ * Returns true
if the set contains no attributes, and
+ * false
otherwise. Note that the resolving parent is
+ * stored as an attribute, so this method will return false
if
* a resolving parent is set.
- *
- * @return true
if the set contains no attributes, and
+ *
+ * @return true
if the set contains no attributes, and
* false
otherwise.
*/
public boolean isEmpty()
{
- return tab.isEmpty();
+ return tab.isEmpty();
}
/**
* Returns true if the given set has the same number of attributes
* as this set and containsAttributes(attr)
returns
* true
.
- *
+ *
* @param attr the attribute set (null
not permitted).
- *
+ *
* @return A boolean.
- *
+ *
* @throws NullPointerException if attr
is null
.
*/
public boolean isEqual(AttributeSet attr)
@@ -330,14 +330,14 @@ public class SimpleAttributeSet
return getAttributeCount() == attr.getAttributeCount()
&& this.containsAttributes(attr);
}
-
+
/**
- * Removes the attribute with the specified name
, if this
+ * Removes the attribute with the specified name
, if this
* attribute is defined. This method will only remove an attribute from
* this set, not from the resolving parent.
- *
+ *
* @param name the attribute name (null
not permitted).
- *
+ *
* @throws NullPointerException if name
is null
.
*/
public void removeAttribute(Object name)
@@ -346,13 +346,13 @@ public class SimpleAttributeSet
}
/**
- * Removes attributes from this set if they are found in the
+ * Removes attributes from this set if they are found in the
* given set. Only attributes whose key AND value are removed.
- * Removes attributes only from this set, not from the resolving parent.
- * Since the resolving parent is stored as an attribute, if
+ * Removes attributes only from this set, not from the resolving parent.
+ * Since the resolving parent is stored as an attribute, if
* attributes
has the same resolving parent as this set, the
* parent will be removed from this set.
- *
+ *
* @param attributes the attributes (null
not permitted).
*/
public void removeAttributes(AttributeSet attributes)
@@ -363,16 +363,16 @@ public class SimpleAttributeSet
Object name = e.nextElement();
Object val = attributes.getAttribute(name);
if (containsAttributeLocally(name, val))
- removeAttribute(name);
+ removeAttribute(name);
}
}
/**
* Removes the attributes listed in names
.
- *
+ *
* @param names the attribute names (null
not permitted).
- *
- * @throws NullPointerException if names
is null
+ *
+ * @throws NullPointerException if names
is null
* or contains any null
values.
*/
public void removeAttributes(Enumeration> names)
@@ -380,7 +380,7 @@ public class SimpleAttributeSet
while (names.hasMoreElements())
{
removeAttribute(names.nextElement());
- }
+ }
}
/**
@@ -388,28 +388,28 @@ public class SimpleAttributeSet
* it is not found in this set, then the resolving parent is also used for
* the lookup.
*
- * Note that the parent is stored as an attribute, and will contribute 1 to
- * the count returned by {@link #getAttributeCount()}.
- *
+ * Note that the parent is stored as an attribute, and will contribute 1 to
+ * the count returned by {@link #getAttributeCount()}.
+ *
* @param parent the parent attribute set (null
not permitted).
- *
+ *
* @throws NullPointerException if parent
is null
.
- *
+ *
* @see #setResolveParent(AttributeSet)
*/
public void setResolveParent(AttributeSet parent)
{
addAttribute(ResolveAttribute, parent);
}
-
+
/**
* Returns a string representation of this instance, typically used for
* debugging purposes.
- *
+ *
* @return A string representation of this instance.
*/
public String toString()
{
return tab.toString();
- }
+ }
}
diff --git a/libjava/classpath/javax/swing/text/StringContent.java b/libjava/classpath/javax/swing/text/StringContent.java
index 4a3f9d7..a017de1 100644
--- a/libjava/classpath/javax/swing/text/StringContent.java
+++ b/libjava/classpath/javax/swing/text/StringContent.java
@@ -54,15 +54,15 @@ import javax.swing.undo.UndoableEdit;
* An implementation of the AbstractDocument.Content
* interface useful for small documents or debugging. The character
* content is a simple character array. It's not really efficient.
- *
+ *
*
Do not use this class for large size.
*/
-public final class StringContent
+public final class StringContent
implements AbstractDocument.Content, Serializable
{
/**
* Stores a reference to a mark that can be resetted to the original value
- * after a mark has been moved. This is used for undoing actions.
+ * after a mark has been moved. This is used for undoing actions.
*/
private class UndoPosRef
{
@@ -102,7 +102,7 @@ public final class StringContent
* the actual offset of the position. This is pulled out of the
* GapContentPosition object so that the mark and position can be handled
* independently, and most important, so that the StickyPosition can
- * be garbage collected while we still hold a reference to the Mark object.
+ * be garbage collected while we still hold a reference to the Mark object.
*/
private class Mark
{
@@ -148,7 +148,7 @@ public final class StringContent
private class InsertUndo extends AbstractUndoableEdit
{
private int start;
-
+
private int length;
private String redoContent;
@@ -177,7 +177,7 @@ public final class StringContent
throw new CannotUndoException();
}
}
-
+
public void redo()
{
super.redo();
@@ -303,8 +303,8 @@ public final class StringContent
/**
* Creates a new instance containing the string "\n".
- *
- * @param initialLength the initial length of the underlying character
+ *
+ * @param initialLength the initial length of the underlying character
* array used to store the content.
*/
public StringContent(int initialLength)
@@ -337,10 +337,10 @@ public final class StringContent
* Creates a position reference for the character at the given offset. The
* position offset will be automatically updated when new characters are
* inserted into or removed from the content.
- *
+ *
* @param offset the character offset.
- *
- * @throws BadLocationException if offset is outside the bounds of the
+ *
+ * @throws BadLocationException if offset is outside the bounds of the
* content.
*/
public Position createPosition(int offset) throws BadLocationException
@@ -351,26 +351,26 @@ public final class StringContent
StickyPosition sp = new StickyPosition(offset);
return sp;
}
-
+
/**
* Returns the length of the string content, including the '\n' character at
* the end.
- *
+ *
* @return The length of the string content.
*/
public int length()
{
return count;
}
-
+
/**
- * Inserts str
at the given position and returns an
+ * Inserts str
at the given position and returns an
* {@link UndoableEdit} that enables undo/redo support.
- *
- * @param where the insertion point (must be less than
+ *
+ * @param where the insertion point (must be less than
* length()
).
* @param str the string to insert (null
not permitted).
- *
+ *
* @return An object that can undo the insertion.
*/
public UndoableEdit insertString(int where, String str)
@@ -402,23 +402,23 @@ public final class StringContent
InsertUndo iundo = new InsertUndo(where, insert.length);
return iundo;
}
-
+
/**
- * Removes the specified range of characters and returns an
+ * Removes the specified range of characters and returns an
* {@link UndoableEdit} that enables undo/redo support.
- *
+ *
* @param where the starting index.
* @param nitems the number of characters.
- *
+ *
* @return An object that can undo the removal.
- *
+ *
* @throws BadLocationException if the character range extends outside the
* bounds of the content OR includes the last character.
*/
public UndoableEdit remove(int where, int nitems) throws BadLocationException
{
checkLocation(where, nitems + 1);
- RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where,
+ RemoveUndo rundo = new RemoveUndo(where, new String(this.content, where,
nitems));
replace(where, nitems, EMPTY);
@@ -464,15 +464,15 @@ public final class StringContent
}
/**
- * Returns a new String
containing the characters in the
+ * Returns a new String
containing the characters in the
* specified range.
- *
+ *
* @param where the start index.
* @param len the number of characters.
- *
+ *
* @return A string.
- *
- * @throws BadLocationException if the requested range of characters extends
+ *
+ * @throws BadLocationException if the requested range of characters extends
* outside the bounds of the content.
*/
public String getString(int where, int len) throws BadLocationException
@@ -482,21 +482,21 @@ public final class StringContent
checkLocation(where, len);
return new String(this.content, where, len);
}
-
+
/**
- * Updates txt
to contain a direct reference to the underlying
+ * Updates txt
to contain a direct reference to the underlying
* character array.
- *
+ *
* @param where the index of the first character.
* @param len the number of characters.
- * @param txt a carrier for the return result (null
not
+ * @param txt a carrier for the return result (null
not
* permitted).
- *
- * @throws BadLocationException if the requested character range is not
+ *
+ * @throws BadLocationException if the requested character range is not
* within the bounds of the content.
* @throws NullPointerException if txt
is null
.
*/
- public void getChars(int where, int len, Segment txt)
+ public void getChars(int where, int len, Segment txt)
throws BadLocationException
{
if (where + len > count)
@@ -523,13 +523,13 @@ public final class StringContent
}
}
- /**
+ /**
* A utility method that checks the validity of the specified character
* range.
- *
+ *
* @param where the first character in the range.
* @param len the number of characters in the range.
- *
+ *
* @throws BadLocationException if the specified range is not within the
* bounds of the content.
*/
@@ -567,4 +567,3 @@ public final class StringContent
}
}
}
-
diff --git a/libjava/classpath/javax/swing/text/Style.java b/libjava/classpath/javax/swing/text/Style.java
index 851ac02..8010828 100644
--- a/libjava/classpath/javax/swing/text/Style.java
+++ b/libjava/classpath/javax/swing/text/Style.java
@@ -1,4 +1,4 @@
-/* Style.java --
+/* Style.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/swing/text/StyleConstants.java b/libjava/classpath/javax/swing/text/StyleConstants.java
index 4e5005c..bdc6371 100644
--- a/libjava/classpath/javax/swing/text/StyleConstants.java
+++ b/libjava/classpath/javax/swing/text/StyleConstants.java
@@ -45,35 +45,35 @@ import java.util.ArrayList;
import javax.swing.Icon;
/**
- * Represents standard attribute keys. This class also contains a set of
- * useful static utility methods for querying and populating an
+ * Represents standard attribute keys. This class also contains a set of
+ * useful static utility methods for querying and populating an
* {@link AttributeSet}.
- *
+ *
* @since 1.2
*/
public class StyleConstants
{
- /**
- * A value representing left alignment for the
- * {@link ParagraphConstants#Alignment} attribute.
+ /**
+ * A value representing left alignment for the
+ * {@link ParagraphConstants#Alignment} attribute.
*/
public static final int ALIGN_LEFT = 0;
- /**
- * A value representing center alignment for the
- * {@link ParagraphConstants#Alignment} attribute.
+ /**
+ * A value representing center alignment for the
+ * {@link ParagraphConstants#Alignment} attribute.
*/
public static final int ALIGN_CENTER = 1;
- /**
- * A value representing right alignment for the
- * {@link ParagraphConstants#Alignment} attribute.
+ /**
+ * A value representing right alignment for the
+ * {@link ParagraphConstants#Alignment} attribute.
*/
public static final int ALIGN_RIGHT = 2;
- /**
- * A value representing ful justification for the
- * {@link ParagraphConstants#Alignment} attribute.
+ /**
+ * A value representing ful justification for the
+ * {@link ParagraphConstants#Alignment} attribute.
*/
public static final int ALIGN_JUSTIFIED = 3;
@@ -82,72 +82,72 @@ public class StyleConstants
/** An alias for {@link CharacterConstants#BidiLevel}. */
public static final Object BidiLevel = CharacterConstants.BidiLevel;
-
+
/** An alias for {@link CharacterConstants#Bold}. */
public static final Object Bold = CharacterConstants.Bold;
-
+
/** An alias for {@link CharacterConstants#ComponentAttribute}. */
- public static final Object ComponentAttribute
+ public static final Object ComponentAttribute
= CharacterConstants.ComponentAttribute;
-
+
/** An alias for {@link CharacterConstants#Family}. */
public static final Object Family = CharacterConstants.Family;
-
+
/** An alias for {@link CharacterConstants#Family}. */
- public static final Object FontFamily = CharacterConstants.Family;
-
+ public static final Object FontFamily = CharacterConstants.Family;
+
/** An alias for {@link CharacterConstants#Size}. */
public static final Object FontSize = CharacterConstants.Size;
-
+
/** An alias for {@link CharacterConstants#Foreground}. */
public static final Object Foreground = CharacterConstants.Foreground;
-
+
/** An alias for {@link CharacterConstants#IconAttribute}. */
public static final Object IconAttribute = CharacterConstants.IconAttribute;
-
+
/** An alias for {@link CharacterConstants#Italic}. */
public static final Object Italic = CharacterConstants.Italic;
-
+
/** An alias for {@link CharacterConstants#Size}. */
public static final Object Size = CharacterConstants.Size;
-
+
/** An alias for {@link CharacterConstants#StrikeThrough}. */
public static final Object StrikeThrough = CharacterConstants.StrikeThrough;
-
+
/** An alias for {@link CharacterConstants#Subscript}. */
public static final Object Subscript = CharacterConstants.Subscript;
-
+
/** An alias for {@link CharacterConstants#Superscript}. */
public static final Object Superscript = CharacterConstants.Superscript;
-
+
/** An alias for {@link CharacterConstants#Underline}. */
public static final Object Underline = CharacterConstants.Underline;
/** An alias for {@link ParagraphConstants#Alignment}. */
public static final Object Alignment = ParagraphConstants.Alignment;
-
+
/** An alias for {@link ParagraphConstants#FirstLineIndent}. */
- public static final Object FirstLineIndent
+ public static final Object FirstLineIndent
= ParagraphConstants.FirstLineIndent;
-
+
/** An alias for {@link ParagraphConstants#LeftIndent}. */
public static final Object LeftIndent = ParagraphConstants.LeftIndent;
-
+
/** An alias for {@link ParagraphConstants#LineSpacing}. */
public static final Object LineSpacing = ParagraphConstants.LineSpacing;
-
+
/** An alias for {@link ParagraphConstants#Orientation}. */
public static final Object Orientation = ParagraphConstants.Orientation;
-
+
/** An alias for {@link ParagraphConstants#RightIndent}. */
public static final Object RightIndent = ParagraphConstants.RightIndent;
-
+
/** An alias for {@link ParagraphConstants#SpaceAbove}. */
public static final Object SpaceAbove = ParagraphConstants.SpaceAbove;
-
+
/** An alias for {@link ParagraphConstants#SpaceBelow}. */
public static final Object SpaceBelow = ParagraphConstants.SpaceBelow;
-
+
/** An alias for {@link ParagraphConstants#TabSet}. */
public static final Object TabSet = ParagraphConstants.TabSet;
@@ -155,13 +155,13 @@ public class StyleConstants
public static final String IconElementName = "icon";
- public static final Object ComposedTextAttribute
+ public static final Object ComposedTextAttribute
= new StyleConstants("composed text");
-
+
public static final Object ModelAttribute = new StyleConstants("model");
-
+
public static final Object NameAttribute = new StyleConstants("name");
-
+
public static final Object ResolveAttribute = new StyleConstants("resolver");
/**
@@ -174,7 +174,7 @@ public class StyleConstants
// Package-private to avoid accessor constructor for use by
// subclasses.
- StyleConstants(String k)
+ StyleConstants(String k)
{
keyname = k;
if (keys == null)
@@ -184,7 +184,7 @@ public class StyleConstants
/**
* Returns a string representation of the attribute key.
- *
+ *
* @return A string representation of the attribute key.
*/
public String toString()
@@ -193,15 +193,15 @@ public class StyleConstants
}
/**
- * Returns the alignment specified in the given attributes, or
+ * Returns the alignment specified in the given attributes, or
* {@link #ALIGN_LEFT} if no alignment is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
- * @return The alignment (typically one of {@link #ALIGN_LEFT},
- * {@link #ALIGN_RIGHT}, {@link #ALIGN_CENTER} or
+ *
+ * @return The alignment (typically one of {@link #ALIGN_LEFT},
+ * {@link #ALIGN_RIGHT}, {@link #ALIGN_CENTER} or
* {@link #ALIGN_JUSTIFIED}).
- *
+ *
* @see #setAlignment(MutableAttributeSet, int)
*/
public static int getAlignment(AttributeSet a)
@@ -210,38 +210,38 @@ public class StyleConstants
if (i != null)
return i.intValue();
else
- return ALIGN_LEFT;
- }
+ return ALIGN_LEFT;
+ }
/**
* Returns the background color specified in the given attributes, or
* {@link Color#BLACK} if no background color is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The background color.
- *
+ *
* @see #setBackground(MutableAttributeSet, Color)
*/
public static Color getBackground(AttributeSet a)
{
Color c = (Color) a.getAttribute(Background);
- if (c != null)
+ if (c != null)
return c;
else
return Color.BLACK;
- }
+ }
/**
- * Returns the bidi level specified in the given attributes, or
+ * Returns the bidi level specified in the given attributes, or
* 0
if no bidi level is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The bidi level.
- *
+ *
* @see #setBidiLevel(MutableAttributeSet, int)
- */
+ */
public static int getBidiLevel(AttributeSet a)
{
Integer i = (Integer) a.getAttribute(BidiLevel);
@@ -249,18 +249,18 @@ public class StyleConstants
return i.intValue();
else
return 0;
- }
+ }
/**
- * Returns the component specified in the given attributes, or
+ * Returns the component specified in the given attributes, or
* null
if no component is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The component (possibly null
).
- *
+ *
* @see #setComponent(MutableAttributeSet, Component)
- */
+ */
public static Component getComponent(AttributeSet a)
{
Component c = (Component) a.getAttribute(ComponentAttribute);
@@ -268,18 +268,18 @@ public class StyleConstants
return c;
else
return null;
- }
+ }
/**
- * Returns the indentation specified in the given attributes, or
+ * Returns the indentation specified in the given attributes, or
* 0.0f
if no indentation is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The indentation.
- *
+ *
* @see #setFirstLineIndent(MutableAttributeSet, float)
- */
+ */
public static float getFirstLineIndent(AttributeSet a)
{
Float f = (Float) a.getAttribute(FirstLineIndent);
@@ -287,18 +287,18 @@ public class StyleConstants
return f.floatValue();
else
return 0.0f;
- }
+ }
/**
- * Returns the font family specified in the given attributes, or
+ * Returns the font family specified in the given attributes, or
* Monospaced
if no font family is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The font family.
- *
+ *
* @see #setFontFamily(MutableAttributeSet, String)
- */
+ */
public static String getFontFamily(AttributeSet a)
{
String ff = (String) a.getAttribute(FontFamily);
@@ -306,18 +306,18 @@ public class StyleConstants
return ff;
else
return "Monospaced";
- }
+ }
/**
- * Returns the font size specified in the given attributes, or
+ * Returns the font size specified in the given attributes, or
* 12
if no font size is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The font size.
- *
+ *
* @see #setFontSize(MutableAttributeSet, int)
- */
+ */
public static int getFontSize(AttributeSet a)
{
Integer i = (Integer) a.getAttribute(FontSize);
@@ -325,16 +325,16 @@ public class StyleConstants
return i.intValue();
else
return 12;
- }
+ }
/**
* Returns the foreground color specified in the given attributes, or
* {@link Color#BLACK} if no foreground color is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The foreground color.
- *
+ *
* @see #setForeground(MutableAttributeSet, Color)
*/
public static Color getForeground(AttributeSet a)
@@ -344,33 +344,33 @@ public class StyleConstants
return c;
else
return Color.BLACK;
- }
+ }
/**
- * Returns the icon specified in the given attributes, or
+ * Returns the icon specified in the given attributes, or
* null
if no icon is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The icon (possibly null
).
- *
+ *
* @see #setIcon(MutableAttributeSet, Icon)
- */
+ */
public static Icon getIcon(AttributeSet a)
{
return (Icon) a.getAttribute(IconAttribute);
- }
+ }
/**
- * Returns the left indentation specified in the given attributes, or
+ * Returns the left indentation specified in the given attributes, or
* 0.0f
if no left indentation is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The left indentation.
- *
+ *
* @see #setLeftIndent(MutableAttributeSet, float)
- */
+ */
public static float getLeftIndent(AttributeSet a)
{
Float f = (Float) a.getAttribute(LeftIndent);
@@ -378,18 +378,18 @@ public class StyleConstants
return f.floatValue();
else
return 0.0f;
- }
+ }
/**
- * Returns the line spacing specified in the given attributes, or
+ * Returns the line spacing specified in the given attributes, or
* 0.0f
if no line spacing is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The line spacing.
- *
+ *
* @see #setLineSpacing(MutableAttributeSet, float)
- */
+ */
public static float getLineSpacing(AttributeSet a)
{
Float f = (Float) a.getAttribute(LineSpacing);
@@ -397,18 +397,18 @@ public class StyleConstants
return f.floatValue();
else
return 0.0f;
- }
+ }
/**
- * Returns the right indentation specified in the given attributes, or
+ * Returns the right indentation specified in the given attributes, or
* 0.0f
if no right indentation is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The right indentation.
- *
+ *
* @see #setRightIndent(MutableAttributeSet, float)
- */
+ */
public static float getRightIndent(AttributeSet a)
{
Float f = (Float) a.getAttribute(RightIndent);
@@ -416,37 +416,37 @@ public class StyleConstants
return f.floatValue();
else
return 0.0f;
- }
+ }
/**
- * Returns the 'space above' specified in the given attributes, or
+ * Returns the 'space above' specified in the given attributes, or
* 0.0f
if no 'space above' is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The 'space above'.
- *
+ *
* @see #setSpaceAbove(MutableAttributeSet, float)
- */
+ */
public static float getSpaceAbove(AttributeSet a)
{
Float f = (Float) a.getAttribute(SpaceAbove);
if (f != null)
return f.floatValue();
- else
+ else
return 0.0f;
- }
+ }
/**
- * Returns the 'space below' specified in the given attributes, or
+ * Returns the 'space below' specified in the given attributes, or
* 0.0f
if no 'space below' is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The 'space below'.
- *
+ *
* @see #setSpaceBelow(MutableAttributeSet, float)
- */
+ */
public static float getSpaceBelow(AttributeSet a)
{
Float f = (Float) a.getAttribute(SpaceBelow);
@@ -454,34 +454,34 @@ public class StyleConstants
return f.floatValue();
else
return 0.0f;
- }
+ }
/**
- * Returns the tab set specified in the given attributes, or
+ * Returns the tab set specified in the given attributes, or
* null
if no tab set is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The tab set.
- *
+ *
* @see #setTabSet(MutableAttributeSet, javax.swing.text.TabSet)
- */
+ */
public static javax.swing.text.TabSet getTabSet(AttributeSet a)
{
// I'm guessing that the fully qualified class name is to differentiate
// between the TabSet class and the TabSet (attribute) instance on some
// compiler...
return (javax.swing.text.TabSet) a.getAttribute(StyleConstants.TabSet);
- }
+ }
/**
- * Returns the value of the bold flag in the given attributes, or
+ * Returns the value of the bold flag in the given attributes, or
* false
if no bold flag is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The bold flag.
- *
+ *
* @see #setBold(MutableAttributeSet, boolean)
*/
public static boolean isBold(AttributeSet a)
@@ -491,16 +491,16 @@ public class StyleConstants
return b.booleanValue();
else
return false;
- }
+ }
/**
- * Returns the value of the italic flag in the given attributes, or
+ * Returns the value of the italic flag in the given attributes, or
* false
if no italic flag is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The italic flag.
- *
+ *
* @see #setItalic(MutableAttributeSet, boolean)
*/
public static boolean isItalic(AttributeSet a)
@@ -510,16 +510,16 @@ public class StyleConstants
return b.booleanValue();
else
return false;
- }
+ }
/**
- * Returns the value of the strike-through flag in the given attributes, or
+ * Returns the value of the strike-through flag in the given attributes, or
* false
if no strike-through flag is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The strike-through flag.
- *
+ *
* @see #setStrikeThrough(MutableAttributeSet, boolean)
*/
public static boolean isStrikeThrough(AttributeSet a)
@@ -529,16 +529,16 @@ public class StyleConstants
return b.booleanValue();
else
return false;
- }
+ }
/**
- * Returns the value of the subscript flag in the given attributes, or
+ * Returns the value of the subscript flag in the given attributes, or
* false
if no subscript flag is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The subscript flag.
- *
+ *
* @see #setSubscript(MutableAttributeSet, boolean)
*/
public static boolean isSubscript(AttributeSet a)
@@ -548,16 +548,16 @@ public class StyleConstants
return b.booleanValue();
else
return false;
- }
+ }
/**
- * Returns the value of the superscript flag in the given attributes, or
+ * Returns the value of the superscript flag in the given attributes, or
* false
if no superscript flag is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The superscript flag.
- *
+ *
* @see #setSuperscript(MutableAttributeSet, boolean)
*/
public static boolean isSuperscript(AttributeSet a)
@@ -565,18 +565,18 @@ public class StyleConstants
Boolean b = (Boolean) a.getAttribute(Superscript);
if (b != null)
return b.booleanValue();
- else
+ else
return false;
- }
+ }
/**
- * Returns the value of the underline flag in the given attributes, or
+ * Returns the value of the underline flag in the given attributes, or
* false
if no underline flag is specified.
- *
+ *
* @param a the attribute set (null
not permitted).
- *
+ *
* @return The underline flag.
- *
+ *
* @see #setUnderline(MutableAttributeSet, boolean)
*/
public static boolean isUnderline(AttributeSet a)
@@ -586,140 +586,140 @@ public class StyleConstants
return b.booleanValue();
else
return false;
- }
+ }
/**
* Adds an alignment attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
- * @param align the alignment (typically one of
- * {@link StyleConstants#ALIGN_LEFT},
- * {@link StyleConstants#ALIGN_RIGHT},
- * {@link StyleConstants#ALIGN_CENTER} or
+ * @param align the alignment (typically one of
+ * {@link StyleConstants#ALIGN_LEFT},
+ * {@link StyleConstants#ALIGN_RIGHT},
+ * {@link StyleConstants#ALIGN_CENTER} or
* {@link StyleConstants#ALIGN_JUSTIFIED}).
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #getAlignment(AttributeSet)
*/
public static void setAlignment(MutableAttributeSet a, int align)
{
a.addAttribute(Alignment, new Integer(align));
- }
+ }
/**
* Adds a background attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param bg the background (null
not permitted).
- *
+ *
* @throws NullPointerException if either argument is null
.
- *
+ *
* @see #getBackground(AttributeSet)
*/
public static void setBackground(MutableAttributeSet a, Color bg)
{
a.addAttribute(Background, bg);
- }
+ }
/**
* Adds a bidi-level attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param lev the level.
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #getBidiLevel(AttributeSet)
*/
public static void setBidiLevel(MutableAttributeSet a, int lev)
{
a.addAttribute(BidiLevel, new Integer(lev));
- }
+ }
/**
* Adds a bold attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param b the new value of the bold attribute.
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #isBold(AttributeSet)
*/
public static void setBold(MutableAttributeSet a, boolean b)
{
a.addAttribute(Bold, Boolean.valueOf(b));
- }
-
+ }
+
/**
* Adds a component attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param c the component (null
not permitted).
- *
+ *
* @throws NullPointerException if either argument is null
.
- *
+ *
* @see #getComponent(AttributeSet)
*/
public static void setComponent(MutableAttributeSet a, Component c)
{
a.addAttribute(ComponentAttribute, c);
- }
+ }
/**
* Adds a first line indentation attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param i the indentation.
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #getFirstLineIndent(AttributeSet)
*/
public static void setFirstLineIndent(MutableAttributeSet a, float i)
{
a.addAttribute(FirstLineIndent, new Float(i));
- }
+ }
/**
* Adds a font family attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param fam the font family name (null
not permitted).
- *
+ *
* @throws NullPointerException if either argument is null
.
- *
+ *
* @see #getFontFamily(AttributeSet)
*/
public static void setFontFamily(MutableAttributeSet a, String fam)
{
a.addAttribute(FontFamily, fam);
- }
+ }
/**
* Adds a font size attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param s the font size (in points).
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #getFontSize(AttributeSet)
*/
public static void setFontSize(MutableAttributeSet a, int s)
{
a.addAttribute(FontSize, new Integer(s));
- }
+ }
/**
* Adds a foreground color attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param fg the foreground color (null
not permitted).
- *
+ *
* @throws NullPointerException if either argument is null
.
- *
+ *
* @see #getForeground(AttributeSet)
*/
public static void setForeground(MutableAttributeSet a, Color fg)
@@ -729,12 +729,12 @@ public class StyleConstants
/**
* Adds an icon attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param c the icon (null
not permitted).
- *
+ *
* @throws NullPointerException if either argument is null
.
- *
+ *
* @see #getIcon(AttributeSet)
*/
public static void setIcon(MutableAttributeSet a, Icon c)
@@ -742,174 +742,174 @@ public class StyleConstants
a.addAttribute(AbstractDocument.ElementNameAttribute, IconElementName);
a.addAttribute(IconAttribute, c);
}
-
+
/**
* Adds an italic attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param b the new value of the italic attribute.
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #isItalic(AttributeSet)
*/
public static void setItalic(MutableAttributeSet a, boolean b)
{
a.addAttribute(Italic, Boolean.valueOf(b));
}
-
+
/**
* Adds a left indentation attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param i the indentation.
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #getLeftIndent(AttributeSet)
*/
public static void setLeftIndent(MutableAttributeSet a, float i)
{
a.addAttribute(LeftIndent, new Float(i));
- }
+ }
/**
* Adds a line spacing attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param i the line spacing.
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #getLineSpacing(AttributeSet)
*/
public static void setLineSpacing(MutableAttributeSet a, float i)
{
a.addAttribute(LineSpacing, new Float(i));
- }
+ }
/**
* Adds a right indentation attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param i the right indentation.
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #getRightIndent(AttributeSet)
*/
public static void setRightIndent(MutableAttributeSet a, float i)
{
a.addAttribute(RightIndent, new Float(i));
- }
+ }
/**
* Adds a 'space above' attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param i the space above attribute value.
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #getSpaceAbove(AttributeSet)
*/
public static void setSpaceAbove(MutableAttributeSet a, float i)
{
a.addAttribute(SpaceAbove, new Float(i));
- }
+ }
/**
* Adds a 'space below' attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param i the space below attribute value.
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #getSpaceBelow(AttributeSet)
*/
public static void setSpaceBelow(MutableAttributeSet a, float i)
{
a.addAttribute(SpaceBelow, new Float(i));
- }
+ }
/**
* Adds a strike-through attribue to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param b the strike-through attribute value.
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #isStrikeThrough(AttributeSet)
*/
public static void setStrikeThrough(MutableAttributeSet a, boolean b)
{
a.addAttribute(StrikeThrough, Boolean.valueOf(b));
- }
+ }
/**
* Adds a subscript attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param b the subscript attribute value.
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #isSubscript(AttributeSet)
*/
public static void setSubscript(MutableAttributeSet a, boolean b)
{
a.addAttribute(Subscript, Boolean.valueOf(b));
- }
+ }
/**
* Adds a superscript attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param b the superscript attribute value.
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #isSuperscript(AttributeSet)
*/
public static void setSuperscript(MutableAttributeSet a, boolean b)
{
a.addAttribute(Superscript, Boolean.valueOf(b));
- }
+ }
/**
* Adds a {@link TabSet} attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param tabs the tab set (null
not permitted).
- *
+ *
* @throws NullPointerException if either argument is null
.
- *
+ *
* @see #getTabSet(AttributeSet)
*/
- public static void setTabSet(MutableAttributeSet a,
+ public static void setTabSet(MutableAttributeSet a,
javax.swing.text.TabSet tabs)
{
a.addAttribute(StyleConstants.TabSet, tabs);
- }
+ }
/**
* Adds an underline attribute to the specified set.
- *
+ *
* @param a the attribute set (null
not permitted).
* @param b the underline attribute value.
- *
+ *
* @throws NullPointerException if a
is null
.
- *
+ *
* @see #isUnderline(AttributeSet)
*/
public static void setUnderline(MutableAttributeSet a, boolean b)
{
a.addAttribute(Underline, Boolean.valueOf(b));
- }
+ }
- // The remainder are so-called "typesafe enumerations" which
+ // The remainder are so-called "typesafe enumerations" which
// alias subsets of the above constants.
/**
@@ -921,56 +921,56 @@ public class StyleConstants
{
/**
* Private constructor prevents new instances being created.
- *
+ *
* @param k the key name.
*/
- private CharacterConstants(String k)
+ private CharacterConstants(String k)
{
super(k);
}
-
+
/** An alias for {@link ColorConstants#Background}. */
public static final Object Background = ColorConstants.Background;
-
+
/** A key for the bidi level character attribute. */
public static final Object BidiLevel = new CharacterConstants("bidiLevel");
-
+
/** An alias for {@link FontConstants#Bold}. */
public static final Object Bold = FontConstants.Bold;
-
+
/** A key for the component character attribute. */
- public static final Object ComponentAttribute
+ public static final Object ComponentAttribute
= new CharacterConstants("component");
-
+
/** An alias for {@link FontConstants#Family}. */
public static final Object Family = FontConstants.Family;
-
+
/** An alias for {@link FontConstants#Size}. */
public static final Object Size = FontConstants.Size;
-
+
/** An alias for {@link ColorConstants#Foreground}. */
public static final Object Foreground = ColorConstants.Foreground;
-
+
/** A key for the icon character attribute. */
public static final Object IconAttribute = new CharacterConstants("icon");
-
+
/** A key for the italic character attribute. */
public static final Object Italic = FontConstants.Italic;
-
+
/** A key for the strike through character attribute. */
- public static final Object StrikeThrough
+ public static final Object StrikeThrough
= new CharacterConstants("strikethrough");
-
+
/** A key for the subscript character attribute. */
public static final Object Subscript = new CharacterConstants("subscript");
-
+
/** A key for the superscript character attribute. */
- public static final Object Superscript
+ public static final Object Superscript
= new CharacterConstants("superscript");
-
+
/** A key for the underline character attribute. */
public static final Object Underline = new CharacterConstants("underline");
-
+
}
/**
@@ -982,14 +982,14 @@ public class StyleConstants
{
/**
* Private constructor prevents new instances being created.
- *
+ *
* @param k the key name.
*/
- private ColorConstants(String k)
+ private ColorConstants(String k)
{
super(k);
}
-
+
/** A key for the foreground color attribute. */
public static final Object Foreground = new ColorConstants("foreground");
@@ -1006,23 +1006,23 @@ public class StyleConstants
{
/**
* Private constructor prevents new instances being created.
- *
+ *
* @param k the key name.
*/
- private FontConstants(String k)
+ private FontConstants(String k)
{
super(k);
}
-
+
/** A key for the bold font attribute. */
public static final Object Bold = new FontConstants("bold");
/** A key for the family font attribute. */
public static final Object Family = new FontConstants("family");
-
+
/** A key for the italic font attribute. */
public static final Object Italic = new FontConstants("italic");
-
+
/** A key for the size font attribute. */
public static final Object Size = new FontConstants("size");
}
@@ -1036,48 +1036,48 @@ public class StyleConstants
{
/**
* Private constructor prevents new instances being created.
- *
+ *
* @param k the key name.
*/
- private ParagraphConstants(String k)
+ private ParagraphConstants(String k)
{
super(k);
}
-
+
/** A key for the alignment paragraph attribute. */
public static final Object Alignment = new ParagraphConstants("Alignment");
/** A key for the first line indentation paragraph attribute. */
- public static final Object FirstLineIndent
+ public static final Object FirstLineIndent
= new ParagraphConstants("FirstLineIndent");
-
+
/** A key for the left indentation paragraph attribute. */
- public static final Object LeftIndent
+ public static final Object LeftIndent
= new ParagraphConstants("LeftIndent");
-
+
/** A key for the line spacing paragraph attribute. */
- public static final Object LineSpacing
+ public static final Object LineSpacing
= new ParagraphConstants("LineSpacing");
-
+
/** A key for the orientation paragraph attribute. */
- public static final Object Orientation
+ public static final Object Orientation
= new ParagraphConstants("Orientation");
-
+
/** A key for the right indentation paragraph attribute. */
- public static final Object RightIndent
+ public static final Object RightIndent
= new ParagraphConstants("RightIndent");
-
+
/** A key for the 'space above' paragraph attribute. */
- public static final Object SpaceAbove
+ public static final Object SpaceAbove
= new ParagraphConstants("SpaceAbove");
-
+
/** A key for the 'space below' paragraph attribute. */
- public static final Object SpaceBelow
+ public static final Object SpaceBelow
= new ParagraphConstants("SpaceBelow");
-
+
/** A key for the tabset paragraph attribute. */
public static final Object TabSet = new ParagraphConstants("TabSet");
-
+
}
}
diff --git a/libjava/classpath/javax/swing/text/StyleContext.java b/libjava/classpath/javax/swing/text/StyleContext.java
index 4dded0d..2953988 100644
--- a/libjava/classpath/javax/swing/text/StyleContext.java
+++ b/libjava/classpath/javax/swing/text/StyleContext.java
@@ -60,7 +60,7 @@ import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.EventListenerList;
-public class StyleContext
+public class StyleContext
implements Serializable, AbstractDocument.AttributeContext
{
/** The serialization UID (compatible with JDK1.5). */
@@ -74,7 +74,7 @@ public class StyleContext
protected transient ChangeEvent changeEvent;
protected EventListenerList listenerList;
-
+
private transient AttributeSet attributes;
public NamedStyle()
@@ -115,12 +115,12 @@ public class StyleContext
{
listenerList.add(ChangeListener.class, l);
}
-
+
public void removeChangeListener(ChangeListener l)
{
listenerList.remove(ChangeListener.class, l);
}
-
+
public T[] getListeners(Class listenerType)
{
return listenerList.getListeners(listenerType);
@@ -159,7 +159,7 @@ public class StyleContext
{
return attributes.containsAttribute(name, value);
}
-
+
public boolean containsAttributes(AttributeSet attrs)
{
return attributes.containsAttributes(attrs);
@@ -172,7 +172,7 @@ public class StyleContext
copy.attributes = attributes.copyAttributes();
return copy;
}
-
+
public Object getAttribute(Object attrName)
{
return attributes.getAttribute(attrName);
@@ -187,10 +187,10 @@ public class StyleContext
{
return attributes.getAttributeNames();
}
-
+
public boolean isDefined(Object attrName)
{
- return attributes.isDefined(attrName);
+ return attributes.isDefined(attrName);
}
public boolean isEqual(AttributeSet attr)
@@ -219,7 +219,7 @@ public class StyleContext
public AttributeSet getResolveParent()
{
- return attributes.getResolveParent();
+ return attributes.getResolveParent();
}
public void setResolveParent(AttributeSet parent)
@@ -229,7 +229,7 @@ public class StyleContext
else
removeAttribute(StyleConstants.ResolveAttribute);
}
-
+
public String toString()
{
return "NamedStyle:" + getName() + " " + attributes;
@@ -250,7 +250,7 @@ public class StyleContext
readAttributeSet(s, this);
}
}
-
+
public class SmallAttributeSet
implements AttributeSet
{
@@ -321,7 +321,7 @@ public class StyleContext
}
return eq;
}
-
+
public Object getAttribute(Object key)
{
Object att = null;
@@ -334,7 +334,7 @@ public class StyleContext
att = attrs[i + 1];
}
- // Check the resolve parent, unless we're looking for the
+ // Check the resolve parent, unless we're looking for the
// ResolveAttribute, which must not be looked up
if (att == null)
{
@@ -342,7 +342,7 @@ public class StyleContext
if (parent != null)
att = parent.getAttribute(key);
}
-
+
return att;
}
@@ -352,18 +352,18 @@ public class StyleContext
}
public Enumeration> getAttributeNames()
- {
- return new Enumeration()
+ {
+ return new Enumeration()
{
int i = 0;
- public boolean hasMoreElements()
- {
- return i < attrs.length;
+ public boolean hasMoreElements()
+ {
+ return i < attrs.length;
}
- public Object nextElement()
- {
- i += 2;
- return attrs[i-2];
+ public Object nextElement()
+ {
+ i += 2;
+ return attrs[i-2];
}
};
}
@@ -387,7 +387,7 @@ public class StyleContext
}
return false;
}
-
+
public boolean isEqual(AttributeSet attr)
{
boolean eq;
@@ -400,7 +400,7 @@ public class StyleContext
&& this.containsAttributes(attr);
return eq;
}
-
+
public String toString()
{
StringBuilder sb = new StringBuilder();
@@ -446,7 +446,7 @@ public class StyleContext
* The name of the default style.
*/
public static final String DEFAULT_STYLE = "default";
-
+
static Hashtable sharedAttributeSets = new Hashtable();
static Hashtable sharedFonts = new Hashtable();
@@ -486,7 +486,7 @@ public class StyleContext
{
return new SmallAttributeSet(a);
}
-
+
protected MutableAttributeSet createLargeAttributeSet(AttributeSet a)
{
return new SimpleAttributeSet(a);
@@ -506,7 +506,7 @@ public class StyleContext
{
return styles.getChangeListeners();
}
-
+
public Style addStyle(String name, Style parent)
{
Style newStyle = new NamedStyle(name, parent);
@@ -534,7 +534,7 @@ public class StyleContext
{
return (Style) styles.getAttribute(name);
}
-
+
/**
* Get the names of the style. The returned enumeration always
* contains at least one member, the default style.
@@ -572,7 +572,7 @@ public class StyleContext
//
// We keep a static cache mapping SimpleFontSpecs to java.awt.Fonts, so
// that we reuse Fonts between styles and style contexts.
- //
+ //
private static class SimpleFontSpec
{
@@ -600,7 +600,7 @@ public class StyleContext
return family.hashCode() + style + size;
}
}
-
+
public Font getFont(AttributeSet attr)
{
String family = StyleConstants.getFontFamily(attr);
@@ -608,7 +608,7 @@ public class StyleContext
if (StyleConstants.isBold(attr))
style += Font.BOLD;
if (StyleConstants.isItalic(attr))
- style += Font.ITALIC;
+ style += Font.ITALIC;
int size = StyleConstants.getFontSize(attr);
return getFont(family, style, size);
}
@@ -625,7 +625,7 @@ public class StyleContext
return tmp;
}
}
-
+
public FontMetrics getFontMetrics(Font f)
{
return Toolkit.getDefaultToolkit().getFontMetrics(f);
@@ -641,7 +641,7 @@ public class StyleContext
return StyleConstants.getBackground(a);
}
- protected int getCompressionThreshold()
+ protected int getCompressionThreshold()
{
return compressionThreshold;
}
@@ -749,7 +749,7 @@ public class StyleContext
}
public synchronized AttributeSet removeAttributes(AttributeSet old,
- Enumeration> names)
+ Enumeration> names)
{
AttributeSet ret;
if (old.getAttributeCount() <= getCompressionThreshold())
@@ -771,7 +771,7 @@ public class StyleContext
/**
* Gets the object previously registered with registerStaticAttributeKey.
- *
+ *
* @param key - the key that was registered.
* @return the object previously registered with registerStaticAttributeKey.
*/
@@ -781,11 +781,11 @@ public class StyleContext
return null;
return readAttributeKeys.get(key);
}
-
+
/**
* Returns the String that key will be registered with
* registerStaticAttributeKey.
- *
+ *
* @param key - the key that will be registered.
* @return the string the key will be registered with.
*/
@@ -799,7 +799,7 @@ public class StyleContext
* attempt to restore keys that were static objects by considering only the
* keys that have were registered with registerStaticAttributeKey. The
* attributes retrieved will be placed into the given set.
- *
+ *
* @param in - the stream to read from
* @param a - the set of attributes
* @throws ClassNotFoundException - may be encountered when reading from
@@ -827,12 +827,12 @@ public class StyleContext
a.addAttribute(key, val);
}
}
-
+
/**
* Serialize an attribute set in a way that is compatible with it
* being read in again by {@link #readAttributeSet(ObjectInputStream, MutableAttributeSet)}.
* In particular registered static keys are transformed properly.
- *
+ *
* @param out - stream to write to
* @param a - the attribute set
* @throws IOException - any I/O error
@@ -872,9 +872,9 @@ public class StyleContext
}
/**
- * Handles reading in the attributes.
+ * Handles reading in the attributes.
* @see #readAttributeSet(ObjectInputStream, MutableAttributeSet)
- *
+ *
* @param in - the stream to read from
* @param a - the set of attributes
* @throws ClassNotFoundException - may be encountered when reading from stream
@@ -889,7 +889,7 @@ public class StyleContext
/**
* Handles writing of the given attributes.
* @see #writeAttributeSet(ObjectOutputStream, AttributeSet)
- *
+ *
* @param out - stream to write to
* @param a - the attribute set
* @throws IOException - any I/O error
diff --git a/libjava/classpath/javax/swing/text/StyledDocument.java b/libjava/classpath/javax/swing/text/StyledDocument.java
index 168e1b1..49e471c 100644
--- a/libjava/classpath/javax/swing/text/StyledDocument.java
+++ b/libjava/classpath/javax/swing/text/StyledDocument.java
@@ -42,8 +42,8 @@ import java.awt.Font;
/**
* StyledDocument
- * @author Andrew Selkirk
- * @version 1.0
+ * @author Andrew Selkirk
+ * @version 1.0
*/
public interface StyledDocument extends Document
{
diff --git a/libjava/classpath/javax/swing/text/StyledEditorKit.java b/libjava/classpath/javax/swing/text/StyledEditorKit.java
index 5686943..744585f 100644
--- a/libjava/classpath/javax/swing/text/StyledEditorKit.java
+++ b/libjava/classpath/javax/swing/text/StyledEditorKit.java
@@ -364,8 +364,8 @@ public class StyledEditorKit extends DefaultEditorKit
{
Document doc = editor.getDocument();
if (!(doc instanceof StyledDocument))
- throw new AssertionError("The Document for StyledEditorKits is "
- + "expected to be a StyledDocument.");
+ throw new AssertionError("The Document for StyledEditorKits is "
+ + "expected to be a StyledDocument.");
return (StyledDocument) doc;
}
@@ -382,8 +382,8 @@ public class StyledEditorKit extends DefaultEditorKit
{
EditorKit kit = editor.getEditorKit();
if (!(kit instanceof StyledEditorKit))
- throw new AssertionError("The EditorKit for StyledDocuments is "
- + "expected to be a StyledEditorKit.");
+ throw new AssertionError("The EditorKit for StyledDocuments is "
+ + "expected to be a StyledEditorKit.");
return (StyledEditorKit) kit;
}
@@ -406,33 +406,33 @@ public class StyledEditorKit extends DefaultEditorKit
{
Document doc = editor.getDocument();
if (doc instanceof StyledDocument)
- {
- StyledDocument styleDoc = (StyledDocument) editor.getDocument();
- EditorKit kit = editor.getEditorKit();
- if (!(kit instanceof StyledEditorKit))
- {
- StyledEditorKit styleKit = (StyledEditorKit) kit;
- int start = editor.getSelectionStart();
- int end = editor.getSelectionEnd();
- int dot = editor.getCaret().getDot();
- if (start == dot && end == dot)
- {
- // If there is no selection, then we only update the
- // input attributes.
- MutableAttributeSet inputAttributes =
- styleKit.getInputAttributes();
- inputAttributes.addAttributes(atts);
- }
- else
- styleDoc.setParagraphAttributes(start, end, atts, replace);
- }
- else
- throw new AssertionError("The EditorKit for StyledTextActions "
- + "is expected to be a StyledEditorKit");
- }
+ {
+ StyledDocument styleDoc = (StyledDocument) editor.getDocument();
+ EditorKit kit = editor.getEditorKit();
+ if (!(kit instanceof StyledEditorKit))
+ {
+ StyledEditorKit styleKit = (StyledEditorKit) kit;
+ int start = editor.getSelectionStart();
+ int end = editor.getSelectionEnd();
+ int dot = editor.getCaret().getDot();
+ if (start == dot && end == dot)
+ {
+ // If there is no selection, then we only update the
+ // input attributes.
+ MutableAttributeSet inputAttributes =
+ styleKit.getInputAttributes();
+ inputAttributes.addAttributes(atts);
+ }
+ else
+ styleDoc.setParagraphAttributes(start, end, atts, replace);
+ }
+ else
+ throw new AssertionError("The EditorKit for StyledTextActions "
+ + "is expected to be a StyledEditorKit");
+ }
else
- throw new AssertionError("The Document for StyledTextActions is "
- + "expected to be a StyledDocument.");
+ throw new AssertionError("The Document for StyledTextActions is "
+ + "expected to be a StyledDocument.");
}
}
@@ -466,15 +466,15 @@ public class StyledEditorKit extends DefaultEditorKit
String name = element.getName();
View view = null;
if (name.equals(AbstractDocument.ContentElementName))
- view = new LabelView(element);
+ view = new LabelView(element);
else if (name.equals(AbstractDocument.ParagraphElementName))
- view = new ParagraphView(element);
+ view = new ParagraphView(element);
else if (name.equals(AbstractDocument.SectionElementName))
- view = new BoxView(element, View.Y_AXIS);
+ view = new BoxView(element, View.Y_AXIS);
else if (name.equals(StyleConstants.ComponentElementName))
- view = new ComponentView(element);
+ view = new ComponentView(element);
else if (name.equals(StyleConstants.IconElementName))
- view = new IconView(element);
+ view = new IconView(element);
else
throw new AssertionError("Unknown Element type: "
+ element.getClass().getName() + " : "
@@ -499,14 +499,14 @@ public class StyledEditorKit extends DefaultEditorKit
{
Object source = ev.getSource();
if (!(source instanceof JTextComponent))
- throw new AssertionError("CaretEvents are expected to come from a"
- + "JTextComponent.");
+ throw new AssertionError("CaretEvents are expected to come from a"
+ + "JTextComponent.");
JTextComponent text = (JTextComponent) source;
Document doc = text.getDocument();
if (!(doc instanceof StyledDocument))
- throw new AssertionError("The Document used by StyledEditorKits is"
- + "expected to be a StyledDocument");
+ throw new AssertionError("The Document used by StyledEditorKits is"
+ + "expected to be a StyledDocument");
StyledDocument styleDoc = (StyledDocument) doc;
currentRun = styleDoc.getCharacterElement(ev.getDot());
@@ -571,7 +571,7 @@ public class StyledEditorKit extends DefaultEditorKit
public Action[] getActions()
{
Action[] actions1 = super.getActions();
- Action[] myActions = new Action[] {
+ Action[] myActions = new Action[] {
new FontSizeAction("font-size-8", 8),
new FontSizeAction("font-size-10", 10),
new FontSizeAction("font-size-12", 12),
@@ -698,7 +698,7 @@ public class StyledEditorKit extends DefaultEditorKit
* @param set the inputAttributes to copy the attributes to
*/
protected void createInputAttributes(Element element,
- MutableAttributeSet set)
+ MutableAttributeSet set)
{
// FIXME: Filter out component, icon and element name attributes.
set.removeAttributes(set);
diff --git a/libjava/classpath/javax/swing/text/TabExpander.java b/libjava/classpath/javax/swing/text/TabExpander.java
index d70dd46..a1e4571 100644
--- a/libjava/classpath/javax/swing/text/TabExpander.java
+++ b/libjava/classpath/javax/swing/text/TabExpander.java
@@ -40,4 +40,4 @@ package javax.swing.text;
public interface TabExpander
{
float nextTabStop(float x, int tabOffset);
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/swing/text/TabSet.java b/libjava/classpath/javax/swing/text/TabSet.java
index c08a650..c325965 100644
--- a/libjava/classpath/javax/swing/text/TabSet.java
+++ b/libjava/classpath/javax/swing/text/TabSet.java
@@ -54,28 +54,28 @@ public class TabSet implements Serializable
/**
* Creates a new TabSet
containing the specified tab stops.
- *
+ *
* @param t the tab stops (null
permitted).
*/
- public TabSet(TabStop[] t)
+ public TabSet(TabStop[] t)
{
if (t != null)
tabs = (TabStop[]) t.clone();
- else
+ else
tabs = new TabStop[0];
}
-
+
/**
* Returns the tab stop with the specified index.
- *
+ *
* @param i the index.
- *
+ *
* @return The tab stop.
- *
- * @throws IllegalArgumentException if i
is not in the range
+ *
+ * @throws IllegalArgumentException if i
is not in the range
* 0
to getTabCount() - 1
.
*/
- public TabStop getTab(int i)
+ public TabStop getTab(int i)
{
if (i < 0 || i >= tabs.length)
throw new IllegalArgumentException("Index out of bounds.");
@@ -84,38 +84,38 @@ public class TabSet implements Serializable
/**
* Returns the tab following the specified location.
- *
+ *
* @param location the location.
- *
+ *
* @return The tab following the specified location (or null
).
*/
- public TabStop getTabAfter(float location)
+ public TabStop getTabAfter(float location)
{
int idx = getTabIndexAfter(location);
if (idx == -1)
return null;
else
- return tabs[idx];
+ return tabs[idx];
}
/**
* Returns the number of tab stops in this tab set.
- *
+ *
* @return The number of tab stops in this tab set.
*/
- public int getTabCount()
+ public int getTabCount()
{
return tabs.length;
}
/**
* Returns the index of the specified tab, or -1 if the tab is not found.
- *
+ *
* @param tab the tab (null
permitted).
- *
+ *
* @return The index of the specified tab, or -1.
*/
- public int getTabIndex(TabStop tab)
+ public int getTabIndex(TabStop tab)
{
for (int i = 0; i < tabs.length; ++i)
if (tabs[i] == tab)
@@ -125,12 +125,12 @@ public class TabSet implements Serializable
/**
* Returns the index of the tab at or after the specified location.
- *
+ *
* @param location the tab location.
- *
+ *
* @return The index of the tab stop, or -1.
*/
- public int getTabIndexAfter(float location)
+ public int getTabIndexAfter(float location)
{
for (int i = 0; i < tabs.length; i++)
{
@@ -139,15 +139,15 @@ public class TabSet implements Serializable
}
return -1;
}
-
+
/**
* Tests this TabSet
for equality with an arbitrary object.
- *
+ *
* @param obj the object (null
permitted).
- *
+ *
* @return true
if this TabSet
is equal to
* obj
, and false
otherwise.
- *
+ *
* @since 1.5
*/
public boolean equals(Object obj)
@@ -167,15 +167,15 @@ public class TabSet implements Serializable
}
return true;
}
-
+
/**
* Returns a hash code for this TabSet
.
- *
+ *
* @return A hash code.
- *
+ *
* @since 1.5
*/
- public int hashCode()
+ public int hashCode()
{
// this hash code won't match Sun's, but that shouldn't matter...
int result = 193;
@@ -191,7 +191,7 @@ public class TabSet implements Serializable
/**
* Returns a string representation of this TabSet
.
- *
+ *
* @return A string representation of this TabSet
.
*/
public String toString()
diff --git a/libjava/classpath/javax/swing/text/TabStop.java b/libjava/classpath/javax/swing/text/TabStop.java
index f4c3f85..03a5611 100644
--- a/libjava/classpath/javax/swing/text/TabStop.java
+++ b/libjava/classpath/javax/swing/text/TabStop.java
@@ -66,23 +66,23 @@ public class TabStop implements Serializable
/**
* Creates a new TabStop
for the specified tab position.
- *
+ *
* @param pos the tab position.
*/
- public TabStop(float pos)
+ public TabStop(float pos)
{
this(pos, ALIGN_LEFT, LEAD_NONE);
}
-
+
/**
* Creates a new TabStop
with the specified attributes.
- *
+ *
* @param pos the tab position.
- * @param align the alignment (one of {@link #ALIGN_LEFT},
- * {@link #ALIGN_CENTER}, {@link #ALIGN_RIGHT}, {@link #ALIGN_DECIMAL}
+ * @param align the alignment (one of {@link #ALIGN_LEFT},
+ * {@link #ALIGN_CENTER}, {@link #ALIGN_RIGHT}, {@link #ALIGN_DECIMAL}
* or {@link #ALIGN_BAR}).
- * @param leader the leader (one of {@link #LEAD_NONE}, {@link #LEAD_DOTS},
- * {@link #LEAD_EQUALS}, {@link #LEAD_HYPHENS}, {@link #LEAD_THICKLINE}
+ * @param leader the leader (one of {@link #LEAD_NONE}, {@link #LEAD_DOTS},
+ * {@link #LEAD_EQUALS}, {@link #LEAD_HYPHENS}, {@link #LEAD_THICKLINE}
* or {@link #LEAD_UNDERLINE}).
*/
public TabStop(float pos, int align, int leader)
@@ -91,16 +91,16 @@ public class TabStop implements Serializable
this.align = align;
this.leader = leader;
}
-
+
/**
* Tests this TabStop
for equality with an arbitrary object.
- *
+ *
* @param other the other object (null
permitted).
- *
- * @return true
if this TabStop
is equal to
+ *
+ * @return true
if this TabStop
is equal to
* the specified object, and false
otherwise.
*/
- public boolean equals(Object other)
+ public boolean equals(Object other)
{
return (other != null)
&& (other instanceof TabStop)
@@ -110,55 +110,55 @@ public class TabStop implements Serializable
}
/**
- * Returns the tab alignment. This should be one of {@link #ALIGN_LEFT},
- * {@link #ALIGN_CENTER}, {@link #ALIGN_RIGHT}, {@link #ALIGN_DECIMAL} or
+ * Returns the tab alignment. This should be one of {@link #ALIGN_LEFT},
+ * {@link #ALIGN_CENTER}, {@link #ALIGN_RIGHT}, {@link #ALIGN_DECIMAL} or
* {@link #ALIGN_BAR}.
- *
+ *
* @return The tab alignment.
*/
- public int getAlignment()
+ public int getAlignment()
{
return align;
}
/**
- * Returns the leader type. This should be one of {@link #LEAD_NONE},
- * {@link #LEAD_DOTS}, {@link #LEAD_EQUALS}, {@link #LEAD_HYPHENS},
+ * Returns the leader type. This should be one of {@link #LEAD_NONE},
+ * {@link #LEAD_DOTS}, {@link #LEAD_EQUALS}, {@link #LEAD_HYPHENS},
* {@link #LEAD_THICKLINE} or {@link #LEAD_UNDERLINE}.
- *
+ *
* @return The leader type.
*/
- public int getLeader()
+ public int getLeader()
{
return leader;
}
/**
* Returns the tab position.
- *
+ *
* @return The tab position.
*/
- public float getPosition()
+ public float getPosition()
{
return pos;
}
/**
* Returns a hash code for this TabStop
.
- *
+ *
* @return A hash code.
*/
- public int hashCode()
+ public int hashCode()
{
return (int) pos + (int) leader + (int) align;
}
/**
* Returns a string describing this TabStop
.
- *
+ *
* @return A string describing this TabStop
.
*/
- public String toString()
+ public String toString()
{
String prefix = "";
switch (align)
@@ -174,7 +174,7 @@ public class TabStop implements Serializable
case ALIGN_DECIMAL:
prefix = "decimal ";
break;
-
+
case ALIGN_BAR:
prefix = "bar ";
break;
@@ -182,8 +182,8 @@ public class TabStop implements Serializable
default:
break;
}
-
- return prefix + "tab @" + pos
+
+ return prefix + "tab @" + pos
+ ((leader == LEAD_NONE) ? "" : " (w/leaders)");
}
diff --git a/libjava/classpath/javax/swing/text/TabableView.java b/libjava/classpath/javax/swing/text/TabableView.java
index 2a96ea9..e50270b 100644
--- a/libjava/classpath/javax/swing/text/TabableView.java
+++ b/libjava/classpath/javax/swing/text/TabableView.java
@@ -1,4 +1,4 @@
-/* TabableView.java --
+/* TabableView.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/swing/text/TableView.java b/libjava/classpath/javax/swing/text/TableView.java
index 2dcb9eb..bdf5004 100644
--- a/libjava/classpath/javax/swing/text/TableView.java
+++ b/libjava/classpath/javax/swing/text/TableView.java
@@ -51,7 +51,7 @@ import javax.swing.event.DocumentEvent;
* horizontal boxes containing the actuall cells of the table. These cells
* can be arbitrary view implementations and are fetched via the
* {@link ViewFactory} returned by {@link View#getViewFactory}.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
public abstract class TableView
@@ -416,7 +416,7 @@ public abstract class TableView
/**
* Calculates the requirements of this view for the minor (== horizontal)
* axis.
- *
+ *
* This is reimplemented to calculate the requirements as the sum of the
* size requirements of the columns.
*
diff --git a/libjava/classpath/javax/swing/text/TextAction.java b/libjava/classpath/javax/swing/text/TextAction.java
index 49c49cb..70e19ef1d 100644
--- a/libjava/classpath/javax/swing/text/TextAction.java
+++ b/libjava/classpath/javax/swing/text/TextAction.java
@@ -67,9 +67,9 @@ public abstract class TextAction extends AbstractAction
* Returns the JTextComponent
object associated with the given
* ActionEvent
. If the source of the event is not a
* JTextComponent
the currently focused text component is returned.
- *
+ *
* @param event the action event
- *
+ *
* @return the JTextComponent
*/
protected final JTextComponent getTextComponent(ActionEvent event)
@@ -88,7 +88,7 @@ public abstract class TextAction extends AbstractAction
/**
* Creates a new array of Action
containing both given arrays.
- *
+ *
* @param list1 the first action array
* @param list2 the second action array
*
@@ -112,7 +112,7 @@ public abstract class TextAction extends AbstractAction
actions.put(name != null ? name : "", a);
}
Action[] augmented = new Action[actions.size()];
-
+
int i = 0;
for (Iterator it = actions.values().iterator(); it.hasNext(); i++)
augmented[i] = it.next();
@@ -122,7 +122,7 @@ public abstract class TextAction extends AbstractAction
/**
* Returns the current focused JTextComponent
object.
- *
+ *
* @return the JTextComponent
*/
protected final JTextComponent getFocusedComponent()
@@ -135,21 +135,21 @@ public abstract class TextAction extends AbstractAction
textComp = (JTextComponent) focused;
return textComp;
}
-
+
/** Abstract helper class which implements everything needed for an
* Action implementation in DefaultEditorKit
which
- * does horizontal movement (and selection).
+ * does horizontal movement (and selection).
*/
abstract static class HorizontalMovementAction extends TextAction
{
int dir;
-
+
HorizontalMovementAction(String name, int direction)
{
super(name);
dir = direction;
}
-
+
public void actionPerformed(ActionEvent event)
{
JTextComponent t = getTextComponent(event);
@@ -161,34 +161,34 @@ public abstract class TextAction extends AbstractAction
= Utilities.getNextVisualPositionFrom(t,
t.getCaretPosition(),
dir);
-
+
Caret c = t.getCaret();
-
+
actionPerformedImpl(c, offs);
-
+
c.setMagicCaretPosition(t.modelToView(offs).getLocation());
}
}
catch(BadLocationException ble)
{
- throw
+ throw
(InternalError) new InternalError("Illegal offset").initCause(ble);
}
-
+
}
-
+
protected abstract void actionPerformedImpl(Caret c, int offs)
throws BadLocationException;
}
-
+
/** Abstract helper class which implements everything needed for an
* Action implementation in DefaultEditorKit
which
* does vertical movement (and selection).
- */
+ */
abstract static class VerticalMovementAction extends TextAction
{
int dir;
-
+
VerticalMovementAction(String name, int direction)
{
super(name);
@@ -215,26 +215,26 @@ public abstract class TextAction extends AbstractAction
}
else
pos = c.getDot();
-
+
pos = Utilities.getNextVisualPositionFrom(t,
t.getCaretPosition(),
dir);
-
+
if (pos > -1)
actionPerformedImpl(c, pos);
}
}
- catch(BadLocationException ble)
+ catch(BadLocationException ble)
{
- throw
+ throw
(InternalError) new InternalError("Illegal offset").initCause(ble);
}
}
-
+
protected abstract void actionPerformedImpl(Caret c, int offs)
throws BadLocationException;
-
+
}
-
-
+
+
}
diff --git a/libjava/classpath/javax/swing/text/Utilities.java b/libjava/classpath/javax/swing/text/Utilities.java
index d49d806..6221392 100644
--- a/libjava/classpath/javax/swing/text/Utilities.java
+++ b/libjava/classpath/javax/swing/text/Utilities.java
@@ -97,7 +97,7 @@ public class Utilities
int pos = s.offset;
int len = 0;
-
+
int end = s.offset + s.count;
for (int offset = s.offset; offset < end; ++offset)
@@ -138,7 +138,7 @@ public class Utilities
g.drawChars(buffer, pos, len, pixelX, y);
pixelX += metrics.charsWidth(buffer, pos, len);
}
-
+
return pixelX;
}
@@ -171,21 +171,21 @@ public class Utilities
int count = 0;
for (int offset = s.offset; offset < end; offset++)
{
- switch (buffer[offset])
- {
- case '\t':
- // In case we have a tab, we just 'jump' over the tab.
- // When we have no tab expander we just use the width of 'm'.
- if (e != null)
- pixelX = (int) e.nextTabStop(pixelX,
- startOffset + offset - s.offset);
- else
- pixelX += metrics.charWidth(' ');
- break;
- case '\n':
- // In case we have a newline, we must 'draw'
- // the buffer and jump on the next line.
- pixelX += metrics.charsWidth(buffer, offset - count, count);
+ switch (buffer[offset])
+ {
+ case '\t':
+ // In case we have a tab, we just 'jump' over the tab.
+ // When we have no tab expander we just use the width of 'm'.
+ if (e != null)
+ pixelX = (int) e.nextTabStop(pixelX,
+ startOffset + offset - s.offset);
+ else
+ pixelX += metrics.charWidth(' ');
+ break;
+ case '\n':
+ // In case we have a newline, we must 'draw'
+ // the buffer and jump on the next line.
+ pixelX += metrics.charsWidth(buffer, offset - count, count);
count = 0;
break;
default:
@@ -234,12 +234,12 @@ public class Utilities
int found = s.count;
int currentX = x0;
int nextX = currentX;
-
+
int end = s.offset + s.count;
for (int pos = s.offset; pos < end && found == s.count; pos++)
{
char nextChar = s.array[pos];
-
+
if (nextChar != '\t')
nextX += fm.charWidth(nextChar);
else
@@ -249,7 +249,7 @@ public class Utilities
else
nextX += ((int) te.nextTabStop(nextX, p0 + pos - s.offset));
}
-
+
if (x >= currentX && x < nextX)
{
// Found position.
@@ -295,10 +295,10 @@ public class Utilities
{
return getTabbedTextOffset(s, fm, x0, x, te, p0, true);
}
-
+
/**
* Finds the start of the next word for the given offset.
- *
+ *
* @param c
* the text component
* @param offs
@@ -315,7 +315,7 @@ public class Utilities
String text = c.getText();
BreakIterator wb = BreakIterator.getWordInstance();
wb.setText(text);
-
+
int last = wb.following(offs);
int current = wb.next();
int cp;
@@ -325,7 +325,7 @@ public class Utilities
for (int i = last; i < current; i++)
{
cp = text.codePointAt(i);
-
+
// Return the last found bound if there is a letter at the current
// location or is not whitespace (meaning it is a number or
// punctuation). The first case means that 'last' denotes the
@@ -338,13 +338,13 @@ public class Utilities
last = current;
current = wb.next();
}
-
+
throw new BadLocationException("no more words", offs);
}
/**
* Finds the start of the previous word for the given offset.
- *
+ *
* @param c
* the text component
* @param offs
@@ -357,10 +357,10 @@ public class Utilities
throws BadLocationException
{
String text = c.getText();
-
+
if (offs <= 0 || offs > text.length())
throw new BadLocationException("invalid offset specified", offs);
-
+
BreakIterator wb = BreakIterator.getWordInstance();
wb.setText(text);
int last = wb.preceding(offs);
@@ -372,7 +372,7 @@ public class Utilities
for (int i = last; i < offs; i++)
{
cp = text.codePointAt(i);
-
+
// Return the last found bound if there is a letter at the current
// location or is not whitespace (meaning it is a number or
// punctuation). The first case means that 'last' denotes the
@@ -385,10 +385,10 @@ public class Utilities
last = current;
current = wb.previous();
}
-
+
return 0;
}
-
+
/**
* Finds the start of a word for the given location.
* @param c the text component
@@ -400,10 +400,10 @@ public class Utilities
throws BadLocationException
{
String text = c.getText();
-
+
if (offs < 0 || offs > text.length())
throw new BadLocationException("invalid offset specified", offs);
-
+
BreakIterator wb = BreakIterator.getWordInstance();
wb.setText(text);
@@ -412,7 +412,7 @@ public class Utilities
return wb.preceding(offs);
}
-
+
/**
* Finds the end of a word for the given location.
* @param c the text component
@@ -425,20 +425,20 @@ public class Utilities
{
if (offs < 0 || offs >= c.getText().length())
throw new BadLocationException("invalid offset specified", offs);
-
+
String text = c.getText();
BreakIterator wb = BreakIterator.getWordInstance();
wb.setText(text);
return wb.following(offs);
}
-
+
/**
- * Get the model position of the end of the row that contains the
+ * Get the model position of the end of the row that contains the
* specified model position. Return null if the given JTextComponent
* does not have a size.
* @param c the JTextComponent
* @param offs the model position
- * @return the model position of the end of the row containing the given
+ * @return the model position of the end of the row containing the given
* offset
* @throws BadLocationException if the offset is invalid
*/
@@ -473,12 +473,12 @@ public class Utilities
}
}
}
-
+
/**
* Get the model position of the start of the row that contains the specified
* model position. Return null if the given JTextComponent does not have a
* size.
- *
+ *
* @param c the JTextComponent
* @param offs the model position
* @return the model position of the start of the row containing the given
@@ -516,7 +516,7 @@ public class Utilities
}
}
}
-
+
/**
* Determine where to break the text in the given Segment, attempting to find
* a word boundary.
@@ -612,23 +612,23 @@ public class Utilities
throws BadLocationException
{
int offs = getRowStart(c, offset);
-
+
if(offs == -1)
return -1;
// Effectively calculates the y value of the previous line.
Point pt = c.modelToView(offs-1).getLocation();
-
+
pt.x = x;
-
+
// Calculate a simple fitting offset.
offs = c.viewToModel(pt);
-
+
// Find out the real x positions of the calculated character and its
// neighbour.
int offsX = c.modelToView(offs).getLocation().x;
int offsXNext = c.modelToView(offs+1).getLocation().x;
-
+
// Chose the one which is nearer to us and return its offset.
if (Math.abs(offsX-x) <= Math.abs(offsXNext-x))
return offs;
@@ -653,12 +653,12 @@ public class Utilities
throws BadLocationException
{
int offs = getRowEnd(c, offset);
-
+
if(offs == -1)
return -1;
Point pt = null;
-
+
// Note: Some views represent the position after the last
// typed character others do not. Converting offset 3 in "a\nb"
// in a PlainView will return a valid rectangle while in a
@@ -673,12 +673,12 @@ public class Utilities
{
return offset;
}
-
+
pt.x = x;
-
+
// Calculate a simple fitting offset.
offs = c.viewToModel(pt);
-
+
if (offs == c.getDocument().getLength())
return offs;
@@ -686,29 +686,29 @@ public class Utilities
// neighbour.
int offsX = c.modelToView(offs).getLocation().x;
int offsXNext = c.modelToView(offs+1).getLocation().x;
-
+
// Chose the one which is nearer to us and return its offset.
if (Math.abs(offsX-x) <= Math.abs(offsXNext-x))
return offs;
else
return offs+1;
}
-
+
/** This is an internal helper method which is used by the
* javax.swing.text
package. It simply delegates the
* call to a method with the same name on the NavigationFilter
* of the provided JTextComponent
(if it has one) or its UI.
- *
+ *
* If the underlying method throws a BadLocationException
it
* will be swallowed and the initial offset is returned.
*/
static int getNextVisualPositionFrom(JTextComponent t, int offset, int direction)
{
NavigationFilter nf = t.getNavigationFilter();
-
+
try
{
- return (nf != null)
+ return (nf != null)
? nf.getNextVisualPositionFrom(t,
offset,
Bias.Forward,
@@ -724,7 +724,7 @@ public class Utilities
{
return offset;
}
-
+
}
-
+
}
diff --git a/libjava/classpath/javax/swing/text/View.java b/libjava/classpath/javax/swing/text/View.java
index c63ddbc..e3c7957 100644
--- a/libjava/classpath/javax/swing/text/View.java
+++ b/libjava/classpath/javax/swing/text/View.java
@@ -1,4 +1,4 @@
-/* View.java --
+/* View.java --
Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,7 +56,7 @@ public abstract class View implements SwingConstants
public static final int X_AXIS = 0;
public static final int Y_AXIS = 1;
-
+
private Element elt;
private View parent;
@@ -104,12 +104,12 @@ public abstract class View implements SwingConstants
this.parent = parent;
}
-
+
public View getParent()
{
return parent;
}
-
+
public Container getContainer()
{
View parent = getParent();
@@ -118,12 +118,12 @@ public abstract class View implements SwingConstants
else
return parent.getContainer();
}
-
+
public Document getDocument()
{
return getElement().getDocument();
}
-
+
public Element getElement()
{
return elt;
@@ -189,12 +189,12 @@ public abstract class View implements SwingConstants
min = getPreferredSpan(axis);
return min;
}
-
+
public void setSize(float width, float height)
{
// The default implementation does nothing.
}
-
+
/**
* Returns the alignment of this view along the baseline of the parent view.
* An alignment of 0.0
will align this view with the left edge
@@ -218,7 +218,7 @@ public abstract class View implements SwingConstants
{
return getElement().getAttributes();
}
-
+
public boolean isVisible()
{
return true;
@@ -228,7 +228,7 @@ public abstract class View implements SwingConstants
{
return 0;
}
-
+
public View getView(int index)
{
return null;
@@ -274,7 +274,7 @@ public abstract class View implements SwingConstants
public void remove(int index)
{
- replace(index, 1, null);
+ replace(index, 1, null);
}
public View createFragment(int p0, int p1)
@@ -297,7 +297,7 @@ public abstract class View implements SwingConstants
{
return null;
}
-
+
/**
* @since 1.4
*/
@@ -305,7 +305,7 @@ public abstract class View implements SwingConstants
{
return -1;
}
-
+
/**
* @since 1.4
*/
@@ -674,15 +674,15 @@ public abstract class View implements SwingConstants
* listed valid values
*/
public Shape modelToView(int p1, Position.Bias b1,
- int p2, Position.Bias b2, Shape a)
+ int p2, Position.Bias b2, Shape a)
throws BadLocationException
{
if (b1 != Position.Bias.Forward && b1 != Position.Bias.Backward)
throw new IllegalArgumentException
- ("b1 must be either Position.Bias.Forward or Position.Bias.Backward");
+ ("b1 must be either Position.Bias.Forward or Position.Bias.Backward");
if (b2 != Position.Bias.Forward && b2 != Position.Bias.Backward)
throw new IllegalArgumentException
- ("b2 must be either Position.Bias.Forward or Position.Bias.Backward");
+ ("b2 must be either Position.Bias.Forward or Position.Bias.Backward");
Shape s1 = modelToView(p1, a, b1);
// Special case for p2 == end index.
@@ -867,7 +867,7 @@ public abstract class View implements SwingConstants
ret = parent.viewToModel(r.x, r.y - 1, a, biasRet);
break;
case SOUTH:
- // Try to find a suitable offset by examining the area below.
+ // Try to find a suitable offset by examining the area below.
parent = getParent();
r = parent.modelToView(pos, a, b).getBounds();
ret = parent.viewToModel(r.x + r.width, r.y + r.height, a, biasRet);
@@ -875,7 +875,7 @@ public abstract class View implements SwingConstants
default:
throw new IllegalArgumentException("Illegal value for d");
}
-
+
return ret;
}
}
diff --git a/libjava/classpath/javax/swing/text/ViewFactory.java b/libjava/classpath/javax/swing/text/ViewFactory.java
index 0794880..cb57bd8 100644
--- a/libjava/classpath/javax/swing/text/ViewFactory.java
+++ b/libjava/classpath/javax/swing/text/ViewFactory.java
@@ -1,4 +1,4 @@
-/* ViewFactory.java --
+/* ViewFactory.java --
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/swing/text/WrappedPlainView.java b/libjava/classpath/javax/swing/text/WrappedPlainView.java
index 00e12b1..f2a6c92 100644
--- a/libjava/classpath/javax/swing/text/WrappedPlainView.java
+++ b/libjava/classpath/javax/swing/text/WrappedPlainView.java
@@ -1,4 +1,4 @@
-/* WrappedPlainView.java --
+/* WrappedPlainView.java --
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -56,31 +56,31 @@ public class WrappedPlainView extends BoxView implements TabExpander
{
/** The color for selected text **/
Color selectedColor;
-
+
/** The color for unselected text **/
Color unselectedColor;
-
+
/** The color for disabled components **/
Color disabledColor;
-
+
/**
* Stores the font metrics. This is package private to avoid synthetic
* accessor method.
*/
FontMetrics metrics;
-
+
/** Whether or not to wrap on word boundaries **/
boolean wordWrap;
-
+
/** A ViewFactory that creates WrappedLines **/
ViewFactory viewFactory = new WrappedLineCreator();
-
+
/** The start of the selected text **/
int selectionStart;
-
+
/** The end of the selected text **/
int selectionEnd;
-
+
/** The height of the line (used while painting) **/
int lineHeight;
@@ -98,18 +98,18 @@ public class WrappedPlainView extends BoxView implements TabExpander
* The instance returned by {@link #getLineBuffer()}.
*/
private transient Segment lineBuffer;
-
+
public WrappedPlainView (Element elem)
{
this (elem, false);
}
-
+
public WrappedPlainView (Element elem, boolean wordWrap)
{
super (elem, Y_AXIS);
- this.wordWrap = wordWrap;
- }
-
+ this.wordWrap = wordWrap;
+ }
+
/**
* Provides access to the Segment used for retrievals from the Document.
* @return the Segment.
@@ -120,12 +120,12 @@ public class WrappedPlainView extends BoxView implements TabExpander
lineBuffer = new Segment();
return lineBuffer;
}
-
+
/**
* Returns the next tab stop position after a given reference position.
*
* This implementation ignores the tabStop
argument.
- *
+ *
* @param x the current x position in pixels
* @param tabStop the position within the text stream that the tab occured at
*/
@@ -139,12 +139,12 @@ public class WrappedPlainView extends BoxView implements TabExpander
}
return next;
}
-
+
/**
- * Returns the tab size for the Document based on
+ * Returns the tab size for the Document based on
* PlainDocument.tabSizeAttribute, defaulting to 8 if this property is
* not defined
- *
+ *
* @return the tab size.
*/
protected int getTabSize()
@@ -154,7 +154,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
return 8;
return ((Integer)tabSize).intValue();
}
-
+
/**
* Draws a line of text, suppressing white space at the end and expanding
* tabs. Calls drawSelectedText and drawUnselectedText.
@@ -175,37 +175,37 @@ public class WrappedPlainView extends BoxView implements TabExpander
// - start of range is selected, end of range is unselected
// - start of range is unselected, end of range is selected
// - middle of range is selected, start and end of range is unselected
-
- // entire range unselected:
- if ((selectionStart == selectionEnd) ||
+
+ // entire range unselected:
+ if ((selectionStart == selectionEnd) ||
(p0 > selectionEnd || p1 < selectionStart))
drawUnselectedText(g, x, y, p0, p1);
-
+
// entire range selected
else if (p0 >= selectionStart && p1 <= selectionEnd)
drawSelectedText(g, x, y, p0, p1);
-
+
// start of range selected, end of range unselected
else if (p0 >= selectionStart)
{
x = drawSelectedText(g, x, y, p0, selectionEnd);
drawUnselectedText(g, x, y, selectionEnd, p1);
}
-
+
// start of range unselected, end of range selected
else if (selectionStart > p0 && selectionEnd > p1)
{
x = drawUnselectedText(g, x, y, p0, selectionStart);
drawSelectedText(g, x, y, selectionStart, p1);
}
-
+
// middle of range selected
else if (selectionStart > p0)
{
x = drawUnselectedText(g, x, y, p0, selectionStart);
x = drawSelectedText(g, x, y, selectionStart, selectionEnd);
drawUnselectedText(g, x, y, selectionEnd, p1);
- }
+ }
}
catch (BadLocationException ble)
{
@@ -214,14 +214,14 @@ public class WrappedPlainView extends BoxView implements TabExpander
}
/**
- * Renders the range of text as selected text. Just paints the text
+ * Renders the range of text as selected text. Just paints the text
* in the color specified by the host component. Assumes the highlighter
* will render the selected background.
* @param g the graphics context
* @param x the starting X coordinate
* @param y the starting Y coordinate
* @param p0 the starting model location
- * @param p1 the ending model location
+ * @param p1 the ending model location
* @return the X coordinate of the end of the text
* @throws BadLocationException if the given range is invalid
*/
@@ -246,7 +246,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
*/
protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1)
throws BadLocationException
- {
+ {
JTextComponent textComponent = (JTextComponent) getContainer();
if (textComponent.isEnabled())
g.setColor(unselectedColor);
@@ -256,8 +256,8 @@ public class WrappedPlainView extends BoxView implements TabExpander
Segment segment = getLineBuffer();
getDocument().getText(p0, p1 - p0, segment);
return Utilities.drawTabbedText(segment, x, y, g, this, p0);
- }
-
+ }
+
/**
* Loads the children to initiate the view. Called by setParent.
* Creates a WrappedLine for each child Element.
@@ -268,17 +268,17 @@ public class WrappedPlainView extends BoxView implements TabExpander
int numChildren = root.getElementCount();
if (numChildren == 0)
return;
-
+
View[] children = new View[numChildren];
for (int i = 0; i < numChildren; i++)
children[i] = new WrappedLine(root.getElement(i));
replace(0, 0, children);
}
-
+
/**
* Calculates the break position for the text between model positions
* p0 and p1. Will break on word boundaries or character boundaries
- * depending on the break argument given in construction of this
+ * depending on the break argument given in construction of this
* WrappedPlainView. Used by the nested WrappedLine class to determine
* when to start the next logical line.
* @param p0 the start model position
@@ -307,16 +307,16 @@ public class WrappedPlainView extends BoxView implements TabExpander
false);
return pos;
}
-
+
void updateMetrics()
{
Container component = getContainer();
metrics = component.getFontMetrics(component.getFont());
tabSize = getTabSize()* metrics.charWidth('m');
}
-
+
/**
- * Determines the preferred span along the given axis. Implemented to
+ * Determines the preferred span along the given axis. Implemented to
* cache the font metrics and then call the super classes method.
*/
public float getPreferredSpan (int axis)
@@ -324,9 +324,9 @@ public class WrappedPlainView extends BoxView implements TabExpander
updateMetrics();
return super.getPreferredSpan(axis);
}
-
+
/**
- * Determines the minimum span along the given axis. Implemented to
+ * Determines the minimum span along the given axis. Implemented to
* cache the font metrics and then call the super classes method.
*/
public float getMinimumSpan (int axis)
@@ -334,9 +334,9 @@ public class WrappedPlainView extends BoxView implements TabExpander
updateMetrics();
return super.getMinimumSpan(axis);
}
-
+
/**
- * Determines the maximum span along the given axis. Implemented to
+ * Determines the maximum span along the given axis. Implemented to
* cache the font metrics and then call the super classes method.
*/
public float getMaximumSpan (int axis)
@@ -344,7 +344,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
updateMetrics();
return super.getMaximumSpan(axis);
}
-
+
/**
* Called when something was inserted. Overridden so that
* the view factory creates WrappedLine views.
@@ -361,7 +361,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
if (v != null)
v.insertUpdate(e, r, f);
}
-
+
/**
* Called when something is removed. Overridden so that
* the view factory creates WrappedLine views.
@@ -378,7 +378,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
if (v != null)
v.removeUpdate(e, r, f);
}
-
+
/**
* Called when the portion of the Document that this View is responsible
* for changes. Overridden so that the view factory creates
@@ -425,9 +425,9 @@ public class WrappedPlainView extends BoxView implements TabExpander
public View create(Element elem)
{
return new WrappedLine(elem);
- }
+ }
}
-
+
/**
* Renders the Element
that is associated with this
* View
. Caches the metrics and then calls
@@ -444,7 +444,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
JTextComponent comp = (JTextComponent)getContainer();
// Ensure metrics are up-to-date.
updateMetrics();
-
+
selectionStart = comp.getSelectionStart();
selectionEnd = comp.getSelectionEnd();
@@ -457,7 +457,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
super.paint(g, a);
}
-
+
/**
* Sets the size of the View. Implemented to update the metrics
* and then call super method.
@@ -469,12 +469,12 @@ public class WrappedPlainView extends BoxView implements TabExpander
preferenceChanged(null, true, true);
super.setSize(width, height);
}
-
+
class WrappedLine extends View
- {
+ {
/** Used to cache the number of lines for this View **/
int numLines = 1;
-
+
public WrappedLine(Element elem)
{
super(elem);
@@ -518,26 +518,26 @@ public class WrappedPlainView extends BoxView implements TabExpander
this);
else
lh.paintLayeredHighlights(g, currStart, currEnd, s, tc, this);
-
+
}
drawLine(currStart, currEnd, g, rect.x, rect.y + metrics.getAscent());
-
- rect.y += lineHeight;
+
+ rect.y += lineHeight;
if (currEnd == currStart)
currStart ++;
else
currStart = currEnd;
-
+
count++;
-
+
}
-
+
if (count != numLines)
{
numLines = count;
preferenceChanged(this, false, true);
}
-
+
}
/**
@@ -546,7 +546,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
* accordingly.
*/
private int determineNumLines()
- {
+ {
int nLines = 0;
int end = getEndOffset();
for (int i = getStartOffset(); i < end;)
@@ -555,7 +555,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
// careful: check that there's no off-by-one problem here
// depending on which position calculateBreakPosition returns
int breakPoint = calculateBreakPosition(i, end);
-
+
if (breakPoint == i)
i = breakPoint + 1;
else
@@ -563,12 +563,12 @@ public class WrappedPlainView extends BoxView implements TabExpander
}
return nLines;
}
-
+
/**
* Determines the preferred span for this view along the given axis.
- *
+ *
* @param axis the axis (either X_AXIS or Y_AXIS)
- *
+ *
* @return the preferred span along the given axis.
* @throws IllegalArgumentException if axis is not X_AXIS or Y_AXIS
*/
@@ -582,19 +582,19 @@ public class WrappedPlainView extends BoxView implements TabExpander
updateMetrics();
return numLines * metrics.getHeight();
}
-
+
throw new IllegalArgumentException("Invalid axis for getPreferredSpan: "
+ axis);
}
-
+
/**
* Provides a mapping from model space to view space.
- *
+ *
* @param pos the position in the model
* @param a the region into which the view is rendered
* @param b the position bias (forward or backward)
- *
- * @return a box in view space that represents the given position
+ *
+ * @return a box in view space that represents the given position
* in model space
* @throws BadLocationException if the given model position is invalid
*/
@@ -602,26 +602,26 @@ public class WrappedPlainView extends BoxView implements TabExpander
throws BadLocationException
{
Rectangle rect = a.getBounds();
-
+
// Throwing a BadLocationException is an observed behavior of the RI.
if (rect.isEmpty())
throw new BadLocationException("Unable to calculate view coordinates "
+ "when allocation area is empty.", pos);
-
+
Segment s = getLineBuffer();
int lineHeight = metrics.getHeight();
-
- // Return a rectangle with width 1 and height equal to the height
+
+ // Return a rectangle with width 1 and height equal to the height
// of the text
rect.height = lineHeight;
rect.width = 1;
int currLineStart = getStartOffset();
int end = getEndOffset();
-
+
if (pos < currLineStart || pos >= end)
throw new BadLocationException("invalid offset", pos);
-
+
while (true)
{
int currLineEnd = calculateBreakPosition(currLineStart, end);
@@ -629,7 +629,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
// the width of the text from currLineStart to pos and add that
// to rect.x
if (pos >= currLineStart && pos < currLineEnd)
- {
+ {
try
{
getDocument().getText(currLineStart, pos - currLineStart, s);
@@ -645,7 +645,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
}
// Increment rect.y so we're checking the next logical line
rect.y += lineHeight;
-
+
// Increment currLineStart to the model position of the start
// of the next logical line
if (currLineEnd == currLineStart)
@@ -658,12 +658,12 @@ public class WrappedPlainView extends BoxView implements TabExpander
/**
* Provides a mapping from view space to model space.
- *
+ *
* @param x the x coordinate in view space
* @param y the y coordinate in view space
* @param a the region into which the view is rendered
* @param b the position bias (forward or backward)
- *
+ *
* @return the location in the model that best represents the
* given point in view space
*/
@@ -672,19 +672,19 @@ public class WrappedPlainView extends BoxView implements TabExpander
Segment s = getLineBuffer();
Rectangle rect = a.getBounds();
int currLineStart = getStartOffset();
-
+
// Although calling modelToView with the last possible offset will
// cause a BadLocationException in CompositeView it is allowed
// to return that offset in viewToModel.
int end = getEndOffset();
-
+
int lineHeight = metrics.getHeight();
if (y < rect.y)
return currLineStart;
if (y > rect.y + rect.height)
return end - 1;
-
+
// Note: rect.x and rect.width do not represent the width of painted
// text but the area where text *may* be painted. This means the width
// is most of the time identical to the component's width.
@@ -705,7 +705,7 @@ public class WrappedPlainView extends BoxView implements TabExpander
{
// Shouldn't happen
}
-
+
int offset = Utilities.getTabbedTextOffset(s, metrics, rect.x,
(int) x,
WrappedPlainView.this,
@@ -719,27 +719,27 @@ public class WrappedPlainView extends BoxView implements TabExpander
}
// Increment rect.y so we're checking the next logical line
rect.y += lineHeight;
-
+
// Increment currLineStart to the model position of the start
// of the next logical line.
currLineStart = currLineEnd;
}
-
+
return end;
- }
-
+ }
+
/**
* This method is called from insertUpdate and removeUpdate.
- *
+ *
* If the number of lines in the document has changed, just repaint
- * the whole thing (note, could improve performance by not repainting
- * anything above the changes). If the number of lines hasn't changed,
+ * the whole thing (note, could improve performance by not repainting
+ * anything above the changes). If the number of lines hasn't changed,
* just repaint the given Rectangle.
- *
+ *
* Note that the Rectangle
argument may be null
- * when the allocation area is empty.
- *
+ * when the allocation area is empty.
+ *
* @param a the Rectangle to repaint if the number of lines hasn't changed
*/
void updateDamage (Rectangle a)
@@ -754,11 +754,11 @@ public class WrappedPlainView extends BoxView implements TabExpander
else if (a != null)
getContainer().repaint(a.x, a.y, a.width, a.height);
}
-
+
/**
* This method is called when something is inserted into the Document
* that this View is displaying.
- *
+ *
* @param changes the DocumentEvent for the changes.
* @param a the allocation of the View
* @param f the ViewFactory used to rebuild
@@ -766,13 +766,13 @@ public class WrappedPlainView extends BoxView implements TabExpander
public void insertUpdate (DocumentEvent changes, Shape a, ViewFactory f)
{
Rectangle r = a instanceof Rectangle ? (Rectangle) a : a.getBounds();
- updateDamage(r);
+ updateDamage(r);
}
-
+
/**
* This method is called when something is removed from the Document
* that this View is displaying.
- *
+ *
* @param changes the DocumentEvent for the changes.
* @param a the allocation of the View
* @param f the ViewFactory used to rebuild
@@ -787,9 +787,9 @@ public class WrappedPlainView extends BoxView implements TabExpander
// makes View.forwardUpdate() skip this method call.
// However this seems to cause no trouble and as it reduces the
// number of method calls it can stay this way.
-
+
Rectangle r = a instanceof Rectangle ? (Rectangle) a : a.getBounds();
- updateDamage(r);
+ updateDamage(r);
}
}
}
diff --git a/libjava/classpath/javax/swing/text/html/BRView.java b/libjava/classpath/javax/swing/text/html/BRView.java
index 7d0d516..6f465c9 100644
--- a/libjava/classpath/javax/swing/text/html/BRView.java
+++ b/libjava/classpath/javax/swing/text/html/BRView.java
@@ -48,14 +48,14 @@ class BRView
{
/**
* Creates the new BR view.
- *
+ *
* @param elem the HTML element, representing the view.
*/
public BRView(Element elem)
{
super(elem);
}
-
+
/**
* Always return ForcedBreakWeight for the X_AXIS, BadBreakWeight for the
* Y_AXIS.
diff --git a/libjava/classpath/javax/swing/text/html/BlockView.java b/libjava/classpath/javax/swing/text/html/BlockView.java
index b05c983..1c33971 100644
--- a/libjava/classpath/javax/swing/text/html/BlockView.java
+++ b/libjava/classpath/javax/swing/text/html/BlockView.java
@@ -1,4 +1,4 @@
-/* BlockView.java --
+/* BlockView.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -159,9 +159,9 @@ public class BlockView extends BoxView
private HashMap positionInfo;
/**
- * Creates a new view that represents an html box.
+ * Creates a new view that represents an html box.
* This can be used for a number of elements.
- *
+ *
* @param elem - the element to create a view for
* @param axis - either View.X_AXIS or View.Y_AXIS
*/
@@ -176,26 +176,26 @@ public class BlockView extends BoxView
* Creates the parent view for this. It is called before
* any other methods, if the parent view is working properly.
* Implemented to forward to the superclass and call
- * setPropertiesFromAttributes to set the paragraph
+ * setPropertiesFromAttributes to set the paragraph
* properties.
- *
+ *
* @param parent - the new parent, or null if the view
- * is being removed from a parent it was added to.
+ * is being removed from a parent it was added to.
*/
public void setParent(View parent)
{
super.setParent(parent);
-
+
if (parent != null)
setPropertiesFromAttributes();
}
-
+
/**
* Calculates the requirements along the major axis.
* This is implemented to call the superclass and then
* adjust it if the CSS width or height attribute is specified
* and applicable.
- *
+ *
* @param axis - the axis to check the requirements for.
* @param r - the SizeRequirements. If null, one is created.
* @return the new SizeRequirements object.
@@ -205,7 +205,7 @@ public class BlockView extends BoxView
{
if (r == null)
r = new SizeRequirements();
-
+
if (setCSSSpan(r, axis))
{
// If we have set the span from CSS, then we need to adjust
@@ -229,7 +229,7 @@ public class BlockView extends BoxView
* This is implemented to call the superclass and then
* adjust it if the CSS width or height attribute is specified
* and applicable.
- *
+ *
* @param axis - the axis to check the requirements for.
* @param r - the SizeRequirements. If null, one is created.
* @return the new SizeRequirements object.
@@ -239,7 +239,7 @@ public class BlockView extends BoxView
{
if (r == null)
r = new SizeRequirements();
-
+
if (setCSSSpan(r, axis))
{
// If we have set the span from CSS, then we need to adjust
@@ -277,7 +277,7 @@ public class BlockView extends BoxView
/**
* Sets the span on the SizeRequirements object according to the
* according CSS span value, when it is set.
- *
+ *
* @param r the size requirements
* @param axis the axis
*
@@ -325,14 +325,14 @@ public class BlockView extends BoxView
* perpendicular to the axis that it represents). The results
* of the layout are placed in the given arrays which are
* the allocations to the children along the minor axis.
- *
- * @param targetSpan - the total span given to the view, also
+ *
+ * @param targetSpan - the total span given to the view, also
* used to layout the children.
* @param axis - the minor axis
* @param offsets - the offsets from the origin of the view for
* all the child views. This is a return value and is filled in by this
* function.
- * @param spans - the span of each child view. This is a return value and is
+ * @param spans - the span of each child view. This is a return value and is
* filled in by this function.
*/
protected void layoutMinorAxis(int targetSpan, int axis,
@@ -469,7 +469,7 @@ public class BlockView extends BoxView
* Paints using the given graphics configuration and shape.
* This delegates to the css box painter to paint the
* border and background prior to the interior.
- *
+ *
* @param g - Graphics configuration
* @param a - the Shape to render into.
*/
@@ -487,7 +487,7 @@ public class BlockView extends BoxView
/**
* Fetches the attributes to use when painting.
- *
+ *
* @return the attributes of this model.
*/
public AttributeSet getAttributes()
@@ -496,10 +496,10 @@ public class BlockView extends BoxView
attributes = getStyleSheet().getViewAttributes(this);
return attributes;
}
-
+
/**
* Gets the resize weight.
- *
+ *
* @param axis - the axis to get the resize weight for.
* @return the resize weight.
* @throws IllegalArgumentException - for an invalid axis
@@ -513,10 +513,10 @@ public class BlockView extends BoxView
return 1;
throw new IllegalArgumentException("Invalid Axis");
}
-
+
/**
* Gets the alignment.
- *
+ *
* @param axis - the axis to get the alignment for.
* @return the alignment.
*/
@@ -537,11 +537,11 @@ public class BlockView extends BoxView
}
throw new IllegalArgumentException("Invalid Axis");
}
-
+
/**
* Gives notification from the document that attributes were
* changed in a location that this view is responsible for.
- *
+ *
* @param ev - the change information
* @param a - the current shape of the view
* @param f - the factory to use to rebuild if the view has children.
@@ -550,7 +550,7 @@ public class BlockView extends BoxView
Shape a, ViewFactory f)
{
super.changedUpdate(ev, a, f);
-
+
// If more elements were added, then need to set the properties for them
int currPos = ev.getOffset();
if (currPos <= getStartOffset()
@@ -560,10 +560,10 @@ public class BlockView extends BoxView
/**
* Determines the preferred span along the axis.
- *
+ *
* @param axis - the view to get the preferred span for.
* @return the span the view would like to be painted into >=0/
- * The view is usually told to paint into the span that is returned,
+ * The view is usually told to paint into the span that is returned,
* although the parent may choose to resize or break the view.
* @throws IllegalArgumentException - for an invalid axis
*/
@@ -573,13 +573,13 @@ public class BlockView extends BoxView
return super.getPreferredSpan(axis);
throw new IllegalArgumentException("Invalid Axis");
}
-
+
/**
* Determines the minimum span along the axis.
- *
+ *
* @param axis - the axis to get the minimum span for.
* @return the span the view would like to be painted into >=0/
- * The view is usually told to paint into the span that is returned,
+ * The view is usually told to paint into the span that is returned,
* although the parent may choose to resize or break the view.
* @throws IllegalArgumentException - for an invalid axis
*/
@@ -589,13 +589,13 @@ public class BlockView extends BoxView
return super.getMinimumSpan(axis);
throw new IllegalArgumentException("Invalid Axis");
}
-
+
/**
* Determines the maximum span along the axis.
- *
+ *
* @param axis - the axis to get the maximum span for.
* @return the span the view would like to be painted into >=0/
- * The view is usually told to paint into the span that is returned,
+ * The view is usually told to paint into the span that is returned,
* although the parent may choose to resize or break the view.
* @throws IllegalArgumentException - for an invalid axis
*/
@@ -605,7 +605,7 @@ public class BlockView extends BoxView
return super.getMaximumSpan(axis);
throw new IllegalArgumentException("Invalid Axis");
}
-
+
/**
* Updates any cached values that come from attributes.
*/
@@ -640,7 +640,7 @@ public class BlockView extends BoxView
/**
* Gets the default style sheet.
- *
+ *
* @return the style sheet
*/
protected StyleSheet getStyleSheet()
diff --git a/libjava/classpath/javax/swing/text/html/CSS.java b/libjava/classpath/javax/swing/text/html/CSS.java
index 77f94a6..0a77bdf 100644
--- a/libjava/classpath/javax/swing/text/html/CSS.java
+++ b/libjava/classpath/javax/swing/text/html/CSS.java
@@ -455,7 +455,7 @@ public class CSS implements Serializable
*
* @param attr the attribute string
* @param inherited if the attribute should be inherited or not
- * @param def a default value; may be null
+ * @param def a default value; may be null
*/
Attribute(String attr, boolean inherited, String def)
{
@@ -463,7 +463,7 @@ public class CSS implements Serializable
isInherited = inherited;
defaultValue = def;
if( attributeMap == null)
- attributeMap = new HashMap();
+ attributeMap = new HashMap();
attributeMap.put( attr, this );
}
diff --git a/libjava/classpath/javax/swing/text/html/CSSBorder.java b/libjava/classpath/javax/swing/text/html/CSSBorder.java
index fff6b01..23fcdcc 100644
--- a/libjava/classpath/javax/swing/text/html/CSSBorder.java
+++ b/libjava/classpath/javax/swing/text/html/CSSBorder.java
@@ -308,7 +308,7 @@ class CSSBorder
// Right border.
paintBorderLine(g, x + width - right / 2, y, x + width - right / 2,
y + height, topStyle, right, rightColor, true);
-
+
}
private void paintBorderLine(Graphics g, int x1, int y1, int x2, int y2,
diff --git a/libjava/classpath/javax/swing/text/html/CSSParser.java b/libjava/classpath/javax/swing/text/html/CSSParser.java
index d49ac3a..5024c7b 100644
--- a/libjava/classpath/javax/swing/text/html/CSSParser.java
+++ b/libjava/classpath/javax/swing/text/html/CSSParser.java
@@ -43,18 +43,18 @@ import java.io.*;
/**
* Parses a CSS document. This works by way of a delegate that implements the
* CSSParserCallback interface. The delegate is notified of the following
- * events:
- * - Import statement: handleImport
- * - Selectors handleSelector. This is invoked for each string. For example if
- * the Reader contained p, bar , a {}, the delegate would be notified 4 times,
- * for 'p,' 'bar' ',' and 'a'.
- * - When a rule starts, startRule
+ * events:
+ * - Import statement: handleImport
+ * - Selectors handleSelector. This is invoked for each string. For example if
+ * the Reader contained p, bar , a {}, the delegate would be notified 4 times,
+ * for 'p,' 'bar' ',' and 'a'.
+ * - When a rule starts, startRule
* - Properties in the rule via the handleProperty. This
* is invoked one per property/value key, eg font size: foo;, would cause the
- * delegate to be notified once with a value of 'font size'.
- * - Values in the rule via the handleValue, this is notified for the total value.
+ * delegate to be notified once with a value of 'font size'.
+ * - Values in the rule via the handleValue, this is notified for the total value.
* - When a rule ends, endRule
- *
+ *
* @author Lillian Angel (langel@redhat.com)
*/
class CSSParser
@@ -68,7 +68,7 @@ class CSSParser
{
/**
* Handles the import statment in the document.
- *
+ *
* @param imp - the import string
*/
public abstract void handleImport(String imp);
@@ -85,21 +85,21 @@ class CSSParser
/**
* Handles the selector of a rule.
- *
+ *
* @param selector - the selector in the rule
*/
public abstract void handleSelector(String selector);
/**
* Handles the properties in the document.
- *
+ *
* @param property - the property in the document.
*/
public abstract void handleProperty(String property);
/**
* Handles the values in the document.
- *
+ *
* @param value - the value to handle.
*/
public abstract void handleValue(String value);
@@ -212,7 +212,7 @@ class CSSParser
/**
* Appends a character to the token buffer.
- *
+ *
* @param c - the character to append
*/
private void append(char c)
@@ -233,7 +233,7 @@ class CSSParser
/**
* Fetches the next token.
- *
+ *
* @param c - the character to fetch.
* @return the location
* @throws IOException - any i/o error encountered while reading
@@ -276,7 +276,7 @@ class CSSParser
/**
* Reads a character from the stream.
- *
+ *
* @return the number of characters read or -1 if end of stream is reached.
* @throws IOException - any i/o encountered while reading
*/
@@ -293,19 +293,19 @@ class CSSParser
/**
* Parses the the contents of the reader using the
* callback.
- *
+ *
* @param reader - the reader to read from
* @param callback - the callback instance
* @param parsingDeclaration - true if parsing a declaration
* @throws IOException - any i/o error from the reader
*/
- void parse(Reader reader, CSSParser.CSSParserCallback callback,
+ void parse(Reader reader, CSSParser.CSSParserCallback callback,
boolean parsingDeclaration)
throws IOException
{
this.reader = reader;
this.callback = callback;
-
+
try
{
if (!parsingDeclaration)
@@ -322,7 +322,7 @@ class CSSParser
/**
* Skips any white space, returning the character after the white space.
- *
+ *
* @return the character after the whitespace
* @throws IOException - any i/o error from the reader
*/
@@ -337,7 +337,7 @@ class CSSParser
return next;
next = tempNext;
}
-
+
// Its all whitespace
return END;
}
@@ -345,7 +345,7 @@ class CSSParser
/**
* Gets the next statement, returning false if the end is reached.
* A statement is either an At-rule, or a ruleset.
- *
+ *
* @return false if the end is reached
* @throws IOException - any i/o error from the reader
*/
@@ -368,7 +368,7 @@ class CSSParser
parseAtRule();
else
parseRuleSet();
- break;
+ break;
case END:
return false;
}
@@ -377,28 +377,28 @@ class CSSParser
/**
* Parses an @ rule, stopping at a matching brace pair, or ;.
- *
+ *
* @throws IOException - any i/o error from the reader
*/
private void parseAtRule() throws IOException
- {
- // An At-Rule begins with the "@" character followed immediately by a keyword.
- // Following the keyword separated by a space is an At-rule statement appropriate
- // to the At-keyword used. If the At-Rule is a simple declarative statement
- // (charset, import, fontdef), it is terminated by a semi-colon (";".)
- // If the At-Rule is a conditional or informative statement (media, page, font-face),
- // it is followed by optional arguments and then a style declaration block inside matching
- // curly braces ("{", "}".) At-Rules are sometimes nestable, depending on the context.
+ {
+ // An At-Rule begins with the "@" character followed immediately by a keyword.
+ // Following the keyword separated by a space is an At-rule statement appropriate
+ // to the At-keyword used. If the At-Rule is a simple declarative statement
+ // (charset, import, fontdef), it is terminated by a semi-colon (";".)
+ // If the At-Rule is a conditional or informative statement (media, page, font-face),
+ // it is followed by optional arguments and then a style declaration block inside matching
+ // curly braces ("{", "}".) At-Rules are sometimes nestable, depending on the context.
// If any part of an At-Rule is not understood, it should be ignored.
-
+
// FIXME: Not Implemented
- // call handleimport
+ // call handleimport
}
/**
- * Parses the next rule set, which is a selector followed by a declaration
+ * Parses the next rule set, which is a selector followed by a declaration
* block.
- *
+ *
* @throws IOException - any i/o error from the reader
*/
private void parseRuleSet() throws IOException
@@ -411,9 +411,9 @@ class CSSParser
}
/**
- * Parses a set of selectors, returning false if the end of the stream is
+ * Parses a set of selectors, returning false if the end of the stream is
* reached.
- *
+ *
* @return false if the end of stream is reached
* @throws IOException - any i/o error from the reader
*/
@@ -421,13 +421,13 @@ class CSSParser
{
// FIXME: Not Implemented
// call handleselector
- return false;
+ return false;
}
/**
* Parses a declaration block. Which a number of declarations followed by a
* })].
- *
+ *
* @throws IOException - any i/o error from the reader
*/
private void parseDeclarationBlock() throws IOException
@@ -439,7 +439,7 @@ class CSSParser
/**
* Parses a single declaration, which is an identifier a : and another identifier.
* This returns the last token seen.
- *
+ *
* @returns the last token
* @throws IOException - any i/o error from the reader
*/
@@ -447,13 +447,13 @@ class CSSParser
{
// call handleValue
// FIXME: Not Implemented
- return 0;
+ return 0;
}
/**
* Parses identifiers until c is encountered, returning the ending token,
* which will be IDENTIFIER if c is found.
- *
+ *
* @param c - the stop character
* @param wantsBlocks - true if blocks are wanted
* @return the ending token
@@ -469,7 +469,7 @@ class CSSParser
/**
* Parses till a matching block close is encountered. This is only appropriate
* to be called at the top level (no nesting).
- *
+ *
* @param i - FIXME
* @throws IOException - any i/o error from the reader
*/
@@ -481,7 +481,7 @@ class CSSParser
/**
* Gets an identifier, returning true if the length of the string is greater
* than 0, stopping when c, whitespace, or one of {}()[] is hit.
- *
+ *
* @param c - the stop character
* @return returns true if the length of the string > 0
* @throws IOException - any i/o error from the reader
@@ -494,7 +494,7 @@ class CSSParser
/**
* Reads till c is encountered, escaping characters as necessary.
- *
+ *
* @param c - the stop character
* @throws IOException - any i/o error from the reader
*/
@@ -505,7 +505,7 @@ class CSSParser
/**
* Parses a comment block.
- *
+ *
* @throws IOException - any i/o error from the reader
*/
private void readComment() throws IOException
@@ -516,7 +516,7 @@ class CSSParser
/**
* Called when a block start is encountered ({[.
- *
+ *
* @param start of block
*/
private void startBlock(int start)
@@ -526,7 +526,7 @@ class CSSParser
/**
* Called when an end block is encountered )]}
- *
+ *
* @param end of block
*/
private void endBlock(int end)
@@ -536,18 +536,18 @@ class CSSParser
/**
* Checks if currently in a block.
- *
+ *
* @return true if currently in a block.
*/
private boolean inBlock()
{
// FIXME: Not Implemented
- return false;
+ return false;
}
/**
* Supports one character look ahead, this will throw if called twice in a row.
- *
+ *
* @param c - the character to push.
* @throws IOException - if called twice in a row
*/
@@ -559,5 +559,3 @@ class CSSParser
pushedChar = c;
}
}
-
-
diff --git a/libjava/classpath/javax/swing/text/html/FormView.java b/libjava/classpath/javax/swing/text/html/FormView.java
index ef362bd..61c568f 100644
--- a/libjava/classpath/javax/swing/text/html/FormView.java
+++ b/libjava/classpath/javax/swing/text/html/FormView.java
@@ -96,7 +96,7 @@ import javax.swing.text.StyleConstants;
* JList in JScrollPane
* select, size unspecified or == 1 JComboBox
* textarea, text JTextArea in JScrollPane
- * input, file JTextField
+ * input, file JTextField
*
*
* @author Roman Kennke (kennke@aicas.com)
@@ -352,7 +352,7 @@ public class FormView
/**
* If the value attribute of an <input type="submit">>
* tag is not specified, then this string is used.
- *
+ *
* @deprecated As of JDK1.3 the value is fetched from the UIManager property
* FormView.submitButtonText
.
*/
@@ -362,7 +362,7 @@ public class FormView
/**
* If the value attribute of an <input type="reset">>
* tag is not specified, then this string is used.
- *
+ *
* @deprecated As of JDK1.3 the value is fetched from the UIManager property
* FormView.resetButtonText
.
*/
@@ -638,7 +638,7 @@ public class FormView
}
else
{
- data = name + ".x=" + p.x + "&" + name + ".y=" + p.y;
+ data = name + ".x=" + p.x + "&" + name + ".y=" + p.y;
}
return data;
}
diff --git a/libjava/classpath/javax/swing/text/html/HRuleView.java b/libjava/classpath/javax/swing/text/html/HRuleView.java
index 3bae5eb..9be1eff 100644
--- a/libjava/classpath/javax/swing/text/html/HRuleView.java
+++ b/libjava/classpath/javax/swing/text/html/HRuleView.java
@@ -55,15 +55,15 @@ class HRuleView extends InlineView
{
/**
* The null view, indicating, that nothing should be painted ahead the
- * breaking point.
+ * breaking point.
*/
View nullView;
-
+
/**
* The height of the horizontal dash area.
*/
static int HEIGHT = 4;
-
+
/**
* The imaginary invisible view that stays after end of line after the
* breaking procedure. It occupies on character.
@@ -74,7 +74,7 @@ class HRuleView extends InlineView
* The break offset that becomes the views start offset.
*/
int breakOffset;
-
+
/**
* Return the end offset that is always one char after the break offset.
*/
@@ -82,7 +82,7 @@ class HRuleView extends InlineView
{
return breakOffset + 1;
}
-
+
/**
* Return the start offset that has been passed in a constructor.
*/
@@ -90,10 +90,10 @@ class HRuleView extends InlineView
{
return breakOffset;
}
-
+
/**
* Create the new instance of this view.
- *
+ *
* @param element the element (inherited from the HR view)
* @param offset the position where the HR view has been broken
*/
@@ -103,7 +103,7 @@ class HRuleView extends InlineView
breakOffset = offset;
}
}
-
+
/**
* Creates the new HR view.
*/
@@ -120,11 +120,11 @@ class HRuleView extends InlineView
public int getBreakWeight(int axis, float pos, float len)
{
if (axis == X_AXIS && ((getEndOffset() - getStartOffset()) > 1))
- return ForcedBreakWeight;
+ return ForcedBreakWeight;
else
- return BadBreakWeight;
+ return BadBreakWeight;
}
-
+
/**
* Draws the double line, upped black and the lower light gray.
*/
@@ -143,7 +143,7 @@ class HRuleView extends InlineView
g.setColor(Color.black);
g.drawLine(x, y++, w, h++);
- g.setColor(Color.lightGray);
+ g.setColor(Color.lightGray);
g.drawLine(x, y, w, h);
}
@@ -160,7 +160,7 @@ class HRuleView extends InlineView
else
return this;
}
-
+
/**
* Returns the width of the container for the horizontal axis and the
* thickness of the dash area for the vertical axis.
@@ -176,7 +176,7 @@ class HRuleView extends InlineView
return 640;
}
else
- return HEIGHT;
+ return HEIGHT;
}
/**
diff --git a/libjava/classpath/javax/swing/text/html/HTMLDocument.java b/libjava/classpath/javax/swing/text/html/HTMLDocument.java
index f3d3ce3..9545be4 100644
--- a/libjava/classpath/javax/swing/text/html/HTMLDocument.java
+++ b/libjava/classpath/javax/swing/text/html/HTMLDocument.java
@@ -76,7 +76,7 @@ import javax.swing.text.html.HTML.Tag;
* data structure when it is needed to parse HTML and then obtain the content of
* the certain types of tags. This class also has methods for modifying the HTML
* content.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
* @author Anthony Balkissoon (abalkiss@redhat.com)
* @author Lillian Angel (langel@redhat.com)
@@ -85,7 +85,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
/** A key for document properies. The value for the key is
* a Vector of Strings of comments not found in the body.
- */
+ */
public static final String AdditionalComments = "AdditionalComments";
URL baseURL = null;
boolean preservesUnknownTags = true;
@@ -110,22 +110,22 @@ public class HTMLDocument extends DefaultStyledDocument
{
this(new GapContent(BUFFER_SIZE_DEFAULT), new StyleSheet());
}
-
+
/**
- * Constructs an HTML document with the default content storage
+ * Constructs an HTML document with the default content storage
* implementation and the specified style/attribute storage mechanism.
- *
+ *
* @param styles - the style sheet
*/
public HTMLDocument(StyleSheet styles)
{
this(new GapContent(BUFFER_SIZE_DEFAULT), styles);
}
-
+
/**
- * Constructs an HTML document with the given content storage implementation
+ * Constructs an HTML document with the given content storage implementation
* and the given style/attribute storage mechanism.
- *
+ *
* @param c - the document's content
* @param styles - the style sheet
*/
@@ -133,21 +133,21 @@ public class HTMLDocument extends DefaultStyledDocument
{
super(c, styles);
}
-
+
/**
- * Gets the style sheet with the document display rules (CSS) that were specified
+ * Gets the style sheet with the document display rules (CSS) that were specified
* in the HTML document.
- *
+ *
* @return - the style sheet
*/
public StyleSheet getStyleSheet()
{
return (StyleSheet) getAttributeContext();
}
-
+
/**
* This method creates a root element for the new document.
- *
+ *
* @return the new default root
*/
protected AbstractElement createDefaultRoot()
@@ -180,12 +180,12 @@ public class HTMLDocument extends DefaultStyledDocument
return html;
}
-
+
/**
* This method returns an HTMLDocument.RunElement object attached to
- * parent representing a run of text from p0 to p1. The run has
+ * parent representing a run of text from p0 to p1. The run has
* attributes described by a.
- *
+ *
* @param parent - the parent element
* @param a - the attributes for the element
* @param p0 - the beginning of the range >= 0
@@ -202,7 +202,7 @@ public class HTMLDocument extends DefaultStyledDocument
/**
* This method returns an HTMLDocument.BlockElement object representing the
* attribute set a and attached to parent.
- *
+ *
* @param parent - the parent element
* @param a - the attributes for the element
*
@@ -212,20 +212,20 @@ public class HTMLDocument extends DefaultStyledDocument
{
return new BlockElement(parent, a);
}
-
+
/**
* Returns the parser used by this HTMLDocument to insert HTML.
- *
+ *
* @return the parser used by this HTMLDocument to insert HTML.
*/
public HTMLEditorKit.Parser getParser()
{
- return parser;
+ return parser;
}
-
+
/**
* Sets the parser used by this HTMLDocument to insert HTML.
- *
+ *
* @param p the parser to use
*/
public void setParser (HTMLEditorKit.Parser p)
@@ -235,25 +235,25 @@ public class HTMLDocument extends DefaultStyledDocument
/**
* Sets the number of tokens to buffer before trying to display the
* Document.
- *
+ *
* @param n the number of tokens to buffer
*/
public void setTokenThreshold (int n)
{
tokenThreshold = n;
}
-
+
/**
* Returns the number of tokens that are buffered before the document
* is rendered.
- *
+ *
* @return the number of tokens buffered
*/
public int getTokenThreshold ()
{
return tokenThreshold;
}
-
+
/**
* Returns the location against which to resolve relative URLs.
* This is the document's URL if the document was loaded from a URL.
@@ -264,7 +264,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
return baseURL;
}
-
+
/**
* Sets the location against which to resolve relative URLs.
* @param u the new base URL
@@ -274,7 +274,7 @@ public class HTMLDocument extends DefaultStyledDocument
baseURL = u;
getStyleSheet().setBase(u);
}
-
+
/**
* Returns whether or not the parser preserves unknown HTML tags.
* @return true if the parser preserves unknown tags
@@ -283,7 +283,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
return preservesUnknownTags;
}
-
+
/**
* Sets the behaviour of the parser when it encounters unknown HTML tags.
* @param preservesTags true if the parser should preserve unknown tags.
@@ -292,7 +292,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
preservesUnknownTags = preservesTags;
}
-
+
/**
* An iterator to iterate through LeafElements in the document.
*/
@@ -308,7 +308,7 @@ public class HTMLDocument extends DefaultStyledDocument
tag = t;
it = new ElementIterator(doc);
}
-
+
/**
* Return the attributes for the tag associated with this iteartor
* @return the AttributeSet
@@ -464,7 +464,7 @@ public class HTMLDocument extends DefaultStyledDocument
{
int start = el.getStartOffset();
int end = el.getEndOffset();
-
+
StringBuilder html = new StringBuilder();
html.append("AttributeSet
(null if none found).
*/
public abstract AttributeSet getAttributes();
-
+
/**
* Get the end of the range for the current occurrence of the tag
* being defined and having the same attributes.
* @return the end of the range
*/
public abstract int getEndOffset();
-
+
/**
* Get the start of the range for the current occurrence of the tag
* being defined and having the same attributes.
* @return the start of the range (-1 if it can't be found).
*/
public abstract int getStartOffset();
-
+
/**
* Move the iterator forward.
*/
public abstract void next();
-
+
/**
* Indicates whether or not the iterator currently represents an occurrence
* of the tag.
@@ -537,33 +537,33 @@ public class HTMLDocument extends DefaultStyledDocument
* tag.
*/
public abstract boolean isValid();
-
+
/**
* Type of tag this iterator represents.
* @return the tag.
*/
public abstract HTML.Tag getTag();
}
-
+
public class BlockElement extends AbstractDocument.BranchElement
{
public BlockElement (Element parent, AttributeSet a)
{
super(parent, a);
}
-
+
/**
- * Gets the resolving parent. Since HTML attributes are not
+ * Gets the resolving parent. Since HTML attributes are not
* inherited at the model level, this returns null.
*/
public AttributeSet getResolveParent()
{
return null;
}
-
+
/**
* Gets the name of the element.
- *
+ *
* @return the name of the element if it exists, null otherwise.
*/
public String getName()
@@ -579,29 +579,29 @@ public class HTMLDocument extends DefaultStyledDocument
}
/**
- * RunElement represents a section of text that has a set of
+ * RunElement represents a section of text that has a set of
* HTML character level attributes assigned to it.
*/
public class RunElement extends AbstractDocument.LeafElement
{
-
+
/**
* Constructs an element that has no children. It represents content
* within the document.
- *
+ *
* @param parent - parent of this
* @param a - elements attributes
* @param start - the start offset >= 0
- * @param end - the end offset
+ * @param end - the end offset
*/
public RunElement(Element parent, AttributeSet a, int start, int end)
{
super(parent, a, start, end);
}
-
+
/**
* Gets the name of the element.
- *
+ *
* @return the name of the element if it exists, null otherwise.
*/
public String getName()
@@ -614,11 +614,11 @@ public class HTMLDocument extends DefaultStyledDocument
name = super.getName();
return name;
}
-
+
/**
* Gets the resolving parent. HTML attributes do not inherit at the
* model level, so this method returns null.
- *
+ *
* @return null
*/
public AttributeSet getResolveParent()
@@ -626,10 +626,10 @@ public class HTMLDocument extends DefaultStyledDocument
return null;
}
}
-
+
/**
* A reader to load an HTMLDocument with HTML structure.
- *
+ *
* @author Anthony Balkissoon abalkiss at redhat dot com
*/
public class HTMLReader extends HTMLEditorKit.ParserCallback
@@ -648,51 +648,51 @@ public class HTMLDocument extends DefaultStyledDocument
* Holds the current character attribute set *
*/
protected MutableAttributeSet charAttr = new SimpleAttributeSet();
-
- protected Vector parseBuffer = new Vector();
+
+ protected Vector parseBuffer = new Vector();
/**
* The parse stack. It holds the current element tree path.
*/
private Stack parseStack = new Stack();
- /**
+ /**
* A stack for character attribute sets *
*/
Stack charAttrStack = new Stack();
-
+
/** A mapping between HTML.Tag objects and the actions that handle them **/
HashMap tagToAction;
-
+
/** Tells us whether we've received the '