[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: Some reindentations from libgcj gui branch
From: |
Mark Wielaard |
Subject: |
[cp-patches] FYI: Some reindentations from libgcj gui branch |
Date: |
Sat, 31 Jul 2004 19:16:49 +0200 |
Hi,
This reindents some classes so they are in sync with the libgcj gui
branch again. No code changes.
2004-07-31 Mark Wielaard <address@hidden>
* gnu/java/awt/EmbeddedWindow.java: Reindent.
* gnu/java/awt/image/ImageDecoder.java: Reindent.
* gnu/java/awt/peer/gtk/GtkComponentPeer.java: Reindent.
* gnu/java/awt/peer/gtk/GtkFileDialogPeer.java: Reindent.
* java/awt/DefaultKeyboardFocusManager.java: Reindent.
* java/awt/Frame.java: Reindent.
* javax/swing/JCheckBox.java: Reindent.
* javax/swing/JCheckBoxMenuItem.java: Reindent.
* javax/swing/UIDefaults.java: Reindent.
* javax/swing/UIManager.java: Reindent.
Committed.
Cheers,
Mark
Index: gnu/java/awt/EmbeddedWindow.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/gnu/java/awt/EmbeddedWindow.java,v
retrieving revision 1.4
diff -u -r1.4 EmbeddedWindow.java
--- gnu/java/awt/EmbeddedWindow.java 29 Jul 2004 08:06:35 -0000 1.4
+++ gnu/java/awt/EmbeddedWindow.java 31 Jul 2004 17:10:00 -0000
@@ -38,7 +38,6 @@
package gnu.java.awt;
-import gnu.classpath.Configuration;
import gnu.java.awt.peer.EmbeddedWindowPeer;
import gnu.java.security.action.SetAccessibleAction;
Index: gnu/java/awt/image/ImageDecoder.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/gnu/java/awt/image/ImageDecoder.java,v
retrieving revision 1.11
diff -u -r1.11 ImageDecoder.java
--- gnu/java/awt/image/ImageDecoder.java 22 Jul 2004 19:45:38 -0000
1.11
+++ gnu/java/awt/image/ImageDecoder.java 31 Jul 2004 17:10:00 -0000
@@ -99,7 +99,7 @@
public void startProduction (ImageConsumer ic)
{
if (!isConsumer(ic))
- addConsumer (ic);
+ addConsumer(ic);
Vector list = (Vector) consumers.clone ();
try
Index: gnu/java/awt/peer/gtk/GtkComponentPeer.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java,v
retrieving revision 1.69
diff -u -r1.69 GtkComponentPeer.java
--- gnu/java/awt/peer/gtk/GtkComponentPeer.java 31 Jul 2004 16:39:15
-0000 1.69
+++ gnu/java/awt/peer/gtk/GtkComponentPeer.java 31 Jul 2004 17:10:00
-0000
@@ -139,21 +139,21 @@
setVisibleAndEnabled ();
}
- void setParent ()
+ void setParent ()
{
ComponentPeer p;
Component component = awtComponent;
do
{
- component = component.getParent ();
- p = component.getPeer ();
+ component = component.getParent ();
+ p = component.getPeer ();
}
while (p instanceof java.awt.peer.LightweightPeer);
-
+
if (p != null)
gtkWidgetSetParent (p);
}
-
+
/*
* Set the bounds of this peer's AWT Component based on dimensions
* returned by the native windowing system. Most Components impose
@@ -178,7 +178,7 @@
return i.checkImage ();
}
- public Image createImage (ImageProducer producer)
+ public Image createImage (ImageProducer producer)
{
return new GtkImage (producer, null);
}
@@ -377,8 +377,8 @@
public void requestFocus ()
{
- gtkWidgetRequestFocus();
- postFocusEvent(FocusEvent.FOCUS_GAINED, false);
+ gtkWidgetRequestFocus ();
+ postFocusEvent (FocusEvent.FOCUS_GAINED, false);
}
public void reshape (int x, int y, int width, int height)
Index: gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java,v
retrieving revision 1.16
diff -u -r1.16 GtkFileDialogPeer.java
--- gnu/java/awt/peer/gtk/GtkFileDialogPeer.java 30 Jul 2004 23:16:58
-0000 1.16
+++ gnu/java/awt/peer/gtk/GtkFileDialogPeer.java 31 Jul 2004 17:10:00
-0000
@@ -114,7 +114,7 @@
// GtkFileChooser requires absolute filenames. If the given
filename
// is not absolute, let's construct it based on current directory.
- currentFile = fileName;
+ currentFile = fileName;
if (fileName.indexOf(FS) == 0)
{
nativeSetFile (fileName);
Index: java/awt/DefaultKeyboardFocusManager.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/awt/DefaultKeyboardFocusManager.java,v
retrieving revision 1.5
diff -u -r1.5 DefaultKeyboardFocusManager.java
--- java/awt/DefaultKeyboardFocusManager.java 31 Jul 2004 16:39:15
-0000 1.5
+++ java/awt/DefaultKeyboardFocusManager.java 31 Jul 2004 17:10:01 -0000
@@ -197,7 +197,7 @@
setGlobalPermanentFocusOwner (null);
}
- target.dispatchEvent (e);
+ target.dispatchEvent (e);
return true;
}
@@ -219,7 +219,7 @@
Component focusOwner = getGlobalPermanentFocusOwner ();
if (focusOwner != null)
- processKeyEvent (focusOwner, (KeyEvent) e);
+ processKeyEvent (focusOwner, (KeyEvent) e);
if (e.isConsumed ())
return true;
@@ -258,7 +258,7 @@
Component focusOwner = getGlobalPermanentFocusOwner ();
if (focusOwner != null)
- focusOwner.dispatchEvent (e);
+ focusOwner.dispatchEvent (e);
// Loop through all registered KeyEventPostProcessors, giving
// each a chance to process this event.
Index: java/awt/Frame.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Frame.java,v
retrieving revision 1.21
diff -u -r1.21 Frame.java
--- java/awt/Frame.java 22 Jul 2004 19:45:38 -0000 1.21
+++ java/awt/Frame.java 31 Jul 2004 17:10:01 -0000
@@ -197,9 +197,9 @@
*/
private boolean undecorated = false;
-/*
+ /*
* The number used to generate the name returned by getName.
- */
+ */
private static transient long next_frame_number = 0;
/**
@@ -408,13 +408,13 @@
super.removeNotify();
}
-/**
- * Returns a debugging string describing this window.
- *
- * @return A debugging string describing this window.
- */
+ /**
+ * Returns a debugging string describing this window.
+ *
+ * @return A debugging string describing this window.
+ */
protected String paramString ()
-{
+ {
String title = getTitle ();
String resizable = "";
@@ -442,7 +442,7 @@
}
return super.paramString () + ",title=" + title + resizable +
state;
-}
+ }
public static Frame[]
getFrames()
Index: javax/swing/JCheckBox.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JCheckBox.java,v
retrieving revision 1.9
diff -u -r1.9 JCheckBox.java
--- javax/swing/JCheckBox.java 22 Jul 2004 19:45:39 -0000 1.9
+++ javax/swing/JCheckBox.java 31 Jul 2004 17:10:01 -0000
@@ -48,7 +48,7 @@
public class JCheckBox extends JToggleButton
{
private static final long serialVersionUID = -5246739313864538930L;
-
+
private boolean borderPaintedFlat;
private void init()
@@ -57,20 +57,20 @@
contentAreaFilled = false;
}
- public JCheckBox()
- {
+ public JCheckBox()
+ {
super();
init();
- }
+ }
public JCheckBox(Action action)
- {
+ {
super(action);
init();
- }
+ }
- public JCheckBox(Icon icon)
- {
+ public JCheckBox(Icon icon)
+ {
super(icon);
init();
}
@@ -79,10 +79,10 @@
{
super(icon, selected);
init();
- }
+ }
- public JCheckBox(String text)
- {
+ public JCheckBox(String text)
+ {
super(text);
init();
}
@@ -91,41 +91,41 @@
{
super(text, selected);
init();
- }
+ }
- public JCheckBox(String text, Icon icon)
- {
- super(text, icon);
+ public JCheckBox(String text, Icon icon)
+ {
+ super(text, icon);
init();
- }
+ }
public JCheckBox(String text, Icon icon, boolean selected)
{
super(text, icon, selected);
init();
}
-
+
/**
* Gets the AccessibleContext associated with this JCheckBox.
*/
- public AccessibleContext getAccessibleContext()
- {
- return null;
- }
+ public AccessibleContext getAccessibleContext()
+ {
+ return null;
+ }
/**
- * Returns a string that specifies the name of the L&F class
+ * Returns a string that specifies the name of the Look and Feel
class
* that renders this component.
*/
- public String getUIClassID()
- {
- return "CheckBoxUI";
- }
+ public String getUIClassID()
+ {
+ return "CheckBoxUI";
+ }
- protected String paramString()
- {
- return "JCheckBox";
- }
+ protected String paramString()
+ {
+ return "JCheckBox";
+ }
public boolean isBorderPaintedFlat()
{
Index: javax/swing/JCheckBoxMenuItem.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/swing/JCheckBoxMenuItem.java,v
retrieving revision 1.8
diff -u -r1.8 JCheckBoxMenuItem.java
--- javax/swing/JCheckBoxMenuItem.java 22 Jul 2004 19:45:39 -0000 1.8
+++ javax/swing/JCheckBoxMenuItem.java 31 Jul 2004 17:10:01 -0000
@@ -205,7 +205,7 @@
* This method overrides JComponent.requestFocus with an empty
* implementation, since JCheckBoxMenuItems should not
* receve focus in general.
- */
+ */
public void requestFocus()
{
// Should do nothing here
Index: javax/swing/UIDefaults.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/UIDefaults.java,v
retrieving revision 1.11
diff -u -r1.11 UIDefaults.java
--- javax/swing/UIDefaults.java 22 Jul 2004 19:45:39 -0000 1.11
+++ javax/swing/UIDefaults.java 31 Jul 2004 17:10:01 -0000
@@ -51,8 +51,6 @@
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-import java.util.Set;
-
import javax.swing.border.Border;
import javax.swing.plaf.ComponentUI;
@@ -111,9 +109,9 @@
try
{
return Class
- .forName (className)
- .getConstructor (new Class[] {})
- .newInstance (new Object[] {});
+ .forName(className)
+ .getConstructor(new Class[] {})
+ .newInstance(new Object[] {});
}
catch (Exception e)
{
@@ -146,54 +144,54 @@
};
}
- public ProxyLazyValue (String c, Object[] os)
+ public ProxyLazyValue(String c, Object[] os)
{
final String className = c;
final Object[] objs = os;
final Class[] clss = new Class[objs.length];
for (int i = 0; i < objs.length; ++i)
{
- clss[i] = objs[i].getClass ();
+ clss[i] = objs[i].getClass();
}
- inner = new LazyValue ()
+ inner = new LazyValue()
{
- public Object createValue (UIDefaults table)
+ public Object createValue(UIDefaults table)
{
try
{
return Class
- .forName (className)
- .getConstructor (clss)
- .newInstance (objs);
- }
+ .forName(className)
+ .getConstructor(clss)
+ .newInstance(objs);
+ }
catch (Exception e)
- {
+ {
return null;
}
}
};
}
- public ProxyLazyValue (String c, String m, Object[] os)
+ public ProxyLazyValue(String c, String m, Object[] os)
{
final String className = c;
final String methodName = m;
final Object[] objs = os;
final Class[] clss = new Class[objs.length];
for (int i = 0; i < objs.length; ++i)
- {
- clss[i] = objs[i].getClass ();
- }
- inner = new LazyValue ()
+ {
+ clss[i] = objs[i].getClass();
+ }
+ inner = new LazyValue()
{
- public Object createValue(UIDefaults table)
- {
+ public Object createValue(UIDefaults table)
+ {
try
{
return Class
- .forName (className)
- .getMethod (methodName, clss)
- .invoke (null, objs);
+ .forName(className)
+ .getMethod(methodName, clss)
+ .invoke(null, objs);
}
catch (Exception e)
{
@@ -203,9 +201,9 @@
};
}
- public Object createValue (UIDefaults table)
+ public Object createValue(UIDefaults table)
{
- return inner.createValue (table);
+ return inner.createValue(table);
}
}
@@ -213,46 +211,46 @@
public UIDefaults()
{
- bundles = new LinkedList ();
- defaultLocale = Locale.getDefault ();
+ bundles = new LinkedList();
+ defaultLocale = Locale.getDefault();
propertyChangeSupport = new PropertyChangeSupport(this);
}
public UIDefaults(Object[] entries)
{
this();
-
- for (int i = 0; (2*i+1) < entries.length; ++i)
- put (entries[2*i], entries[2*i+1]);
- }
+
+ for (int i = 0; (2 * i + 1) < entries.length; ++i)
+ put(entries[2 * i], entries[2 * i + 1]);
+ }
public Object get(Object key)
{
- return this.get (key, getDefaultLocale ());
+ return this.get(key, getDefaultLocale());
}
- public Object get (Object key, Locale loc)
+ public Object get(Object key, Locale loc)
{
Object obj = null;
- if (super.containsKey (key))
+ if (super.containsKey(key))
{
- obj = super.get (key);
+ obj = super.get(key);
}
else if (key instanceof String)
{
String keyString = (String) key;
- ListIterator i = bundles.listIterator (0);
- while (i.hasNext ())
- {
- String bundle_name = (String) i.next ();
+ ListIterator i = bundles.listIterator(0);
+ while (i.hasNext())
+ {
+ String bundle_name = (String) i.next();
ResourceBundle res =
- ResourceBundle.getBundle (bundle_name, loc);
+ ResourceBundle.getBundle(bundle_name, loc);
if (res != null)
{
try
{
- obj = res.getObject (keyString);
+ obj = res.getObject(keyString);
break;
}
catch (MissingResourceException me)
@@ -272,14 +270,14 @@
if (obj instanceof LazyValue)
{
- Object resolved = ((LazyValue)obj).createValue (this);
- super.remove (key);
- super.put (key, resolved);
+ Object resolved = ((LazyValue) obj).createValue(this);
+ super.remove(key);
+ super.put(key, resolved);
return resolved;
}
else if (obj instanceof ActiveValue)
{
- return ((ActiveValue)obj).createValue (this);
+ return ((ActiveValue) obj).createValue(this);
}
return obj;
@@ -287,19 +285,19 @@
public Object put(Object key, Object value)
{
- Object old = super.put (key, value);
+ Object old = super.put(key, value);
if (key instanceof String && old != value)
- firePropertyChange ((String) key, old, value);
+ firePropertyChange((String) key, old, value);
return old;
}
public void putDefaults(Object[] entries)
{
- for (int i = 0; (2*i+1) < entries.length; ++i)
+ for (int i = 0; (2 * i + 1) < entries.length; ++i)
{
- super.put (entries[2*i], entries[2*i+1]);
+ super.put(entries[2 * i], entries[2 * i + 1]);
}
- firePropertyChange ("UIDefaults", null, null);
+ firePropertyChange("UIDefaults", null, null);
}
public Font getFont(Object key)
@@ -455,20 +453,20 @@
{
getUIError ("failed to locate createUI method on " +
cls.toString ());
return null;
- }
+ }
try
- {
+ {
return (ComponentUI) factory.invoke (null, new Object[] {
target });
- }
+ }
catch (java.lang.reflect.InvocationTargetException ite)
- {
+ {
getUIError ("InvocationTargetException ("+
ite.getTargetException()
+") calling createUI(...) on " + cls.toString ());
return null;
- }
+ }
catch (Exception e)
- {
+ {
getUIError ("exception calling createUI(...) on " +
cls.toString ());
return null;
}
@@ -497,12 +495,12 @@
public void addResourceBundle(String name)
{
- bundles.addFirst (name);
+ bundles.addFirst(name);
}
public void removeResourceBundle(String name)
{
- bundles.remove (name);
+ bundles.remove(name);
}
public void setDefaultLocale(Locale loc)
Index: javax/swing/UIManager.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/UIManager.java,v
retrieving revision 1.14
diff -u -r1.14 UIManager.java
--- javax/swing/UIManager.java 30 Jul 2004 20:21:19 -0000 1.14
+++ javax/swing/UIManager.java 31 Jul 2004 17:10:01 -0000
@@ -278,7 +278,7 @@
}
/**
- * Returns the L&F object that renders the target component.
+ * Returns the Look and Feel object that renders the target
component.
*/
public static ComponentUI getUI(JComponent target)
{
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: Some reindentations from libgcj gui branch,
Mark Wielaard <=