@@ -186,7 +186,7 @@ public abstract class CommandMap
{
return getCommand(mimeType, cmdName);
}
-
+
/**
* Locate a DataContentHandler that corresponds to the MIME type.
* The mechanism and semantics for determining this are determined
@@ -206,7 +206,6 @@ public abstract class CommandMap
DataSource ds)
{
return createDataContentHandler(mimeType);
- }
+ }
}
-
diff --git a/libjava/classpath/javax/activation/CommandObject.java b/libjava/classpath/javax/activation/CommandObject.java
index 594622d..f89a976 100644
--- a/libjava/classpath/javax/activation/CommandObject.java
+++ b/libjava/classpath/javax/activation/CommandObject.java
@@ -57,6 +57,5 @@ public interface CommandObject
*/
void setCommandContext(String verb, DataHandler dh)
throws IOException;
-
-}
+}
diff --git a/libjava/classpath/javax/activation/DataContentHandler.java b/libjava/classpath/javax/activation/DataContentHandler.java
index f950739..be919c2 100644
--- a/libjava/classpath/javax/activation/DataContentHandler.java
+++ b/libjava/classpath/javax/activation/DataContentHandler.java
@@ -56,7 +56,7 @@ public interface DataContentHandler
* by preference.
*/
DataFlavor[] getTransferDataFlavors();
-
+
/**
* Returns an object representing the data to be transferred.
* @param df the flavor representing the requested type
@@ -64,14 +64,14 @@ public interface DataContentHandler
*/
Object getTransferData(DataFlavor df, DataSource ds)
throws UnsupportedFlavorException, IOException;
-
+
/**
* Returns an object representing the data in its most preferred form.
* @param ds the data source of the data to be converted
*/
Object getContent(DataSource ds)
throws IOException;
-
+
/**
* Writes the object as a stream of bytes.
* @param obj the object to convert
@@ -80,6 +80,5 @@ public interface DataContentHandler
*/
void writeTo(Object obj, String mimeType, OutputStream os)
throws IOException;
-
-}
+}
diff --git a/libjava/classpath/javax/activation/DataContentHandlerFactory.java b/libjava/classpath/javax/activation/DataContentHandlerFactory.java
index c1f2b78..815c1a9 100644
--- a/libjava/classpath/javax/activation/DataContentHandlerFactory.java
+++ b/libjava/classpath/javax/activation/DataContentHandlerFactory.java
@@ -51,6 +51,5 @@ public interface DataContentHandlerFactory
* @param mimeType the MIME type
*/
DataContentHandler createDataContentHandler(String mimeType);
-
-}
+}
diff --git a/libjava/classpath/javax/activation/DataHandler.java b/libjava/classpath/javax/activation/DataHandler.java
index de786f9..63ad0c4 100644
--- a/libjava/classpath/javax/activation/DataHandler.java
+++ b/libjava/classpath/javax/activation/DataHandler.java
@@ -59,7 +59,7 @@ public class DataHandler
private static final DataFlavor[] NO_FLAVORS = new DataFlavor[0];
private static DataContentHandlerFactory factory = null;
-
+
private final DataSource dataSource;
private DataSource objDataSource;
private Object object;
@@ -70,7 +70,7 @@ public class DataHandler
private DataContentHandler factoryDCH;
private DataContentHandlerFactory oldFactory;
private String shortType;
-
+
/**
* Constructor in which the data is read from a data source.
* @param ds the data source
@@ -80,7 +80,7 @@ public class DataHandler
dataSource = ds;
oldFactory = factory;
}
-
+
/**
* Constructor using a reified object representation.
* @param obj the object representation of the data
@@ -93,7 +93,7 @@ public class DataHandler
objectMimeType = mimeType;
oldFactory = factory;
}
-
+
/**
* Constructor in which the data is read from a URL.
* @param url the URL
@@ -103,7 +103,7 @@ public class DataHandler
dataSource = new URLDataSource(url);
oldFactory = factory;
}
-
+
/**
* Returns the data source from which data is read.
*/
@@ -119,7 +119,7 @@ public class DataHandler
}
return objDataSource;
}
-
+
/**
* Returns the name of the data object if created with a DataSource.
*/
@@ -131,7 +131,7 @@ public class DataHandler
}
return null;
}
-
+
/**
* Returns the MIME type of the data (with parameters).
*/
@@ -143,7 +143,7 @@ public class DataHandler
}
return objectMimeType;
}
-
+
/**
* Returns an input stream from which the data can be read.
*/
@@ -174,16 +174,16 @@ public class DataHandler
thread.start();
return new PipedInputStream(pos);
}
-
+
static class DataContentHandlerWriter
implements Runnable
{
-
+
DataContentHandler dch;
Object object;
String mimeType;
OutputStream out;
-
+
DataContentHandlerWriter(DataContentHandler dch, Object object,
String mimeType, OutputStream out)
{
@@ -192,7 +192,7 @@ public class DataHandler
this.mimeType = mimeType;
this.out = out;
}
-
+
public void run()
{
try
@@ -214,7 +214,7 @@ public class DataHandler
}
}
}
-
+
/**
* Writes the data as a byte stream.
* @param os the stream to write to
@@ -238,7 +238,7 @@ public class DataHandler
dch.writeTo(object, objectMimeType, os);
}
}
-
+
/**
* Returns an output stream that can be used to overwrite the underlying
* data, if the DataSource constructor was used.
@@ -252,7 +252,7 @@ public class DataHandler
}
return null;
}
-
+
/**
* Returns the data flavors in which this data is available.
*/
@@ -265,7 +265,7 @@ public class DataHandler
}
return transferFlavors;
}
-
+
/**
* Indicates whether the specified data flavor is supported for this
* data.
@@ -282,7 +282,7 @@ public class DataHandler
}
return false;
}
-
+
/**
* Returns an object representing the data to be transferred.
* @param flavor the requested data flavor
@@ -293,7 +293,7 @@ public class DataHandler
DataContentHandler dch = getDataContentHandler();
return dch.getTransferData(flavor, dataSource);
}
-
+
/**
* Sets the command map to be used by this data handler.
* Setting to null uses the default command map.
@@ -308,7 +308,7 @@ public class DataHandler
currentCommandMap = commandMap;
}
}
-
+
/**
* Returns the preferred commands for this type of data.
*/
@@ -336,7 +336,7 @@ public class DataHandler
CommandMap commandMap = getCommandMap();
return commandMap.getCommand(getShortType(), cmdName);
}
-
+
/**
* Returns the data as a reified object.
*/
@@ -346,7 +346,7 @@ public class DataHandler
DataContentHandler dch = getDataContentHandler();
return dch.getContent(getDataSource());
}
-
+
/**
* Returns the instantiated bean using the specified command.
* @param cmdInfo the command to instantiate the bean with
@@ -399,7 +399,7 @@ public class DataHandler
}
factory = newFactory;
}
-
+
/*
* Returns just the base part of the data's content-type, with no
* parameters.
@@ -421,7 +421,7 @@ public class DataHandler
}
return shortType;
}
-
+
/*
* Returns the command map for this handler.
*/
@@ -433,7 +433,7 @@ public class DataHandler
}
return CommandMap.getDefaultCommandMap();
}
-
+
/*
* Returns the DCH for this handler.
*/
@@ -477,6 +477,5 @@ public class DataHandler
}
return dataContentHandler;
}
-
-}
+}
diff --git a/libjava/classpath/javax/activation/DataHandlerDataSource.java b/libjava/classpath/javax/activation/DataHandlerDataSource.java
index 8dcd1a7..9781b39 100644
--- a/libjava/classpath/javax/activation/DataHandlerDataSource.java
+++ b/libjava/classpath/javax/activation/DataHandlerDataSource.java
@@ -52,28 +52,28 @@ final class DataHandlerDataSource
{
final DataHandler dh;
-
+
DataHandlerDataSource(DataHandler dh)
{
this.dh = dh;
}
-
+
public String getContentType()
{
return dh.getContentType();
}
-
+
public InputStream getInputStream()
throws IOException
{
return dh.getInputStream();
}
-
+
public String getName()
{
return dh.getName();
}
-
+
public OutputStream getOutputStream()
throws IOException
{
@@ -81,4 +81,3 @@ final class DataHandlerDataSource
}
}
-
diff --git a/libjava/classpath/javax/activation/DataSource.java b/libjava/classpath/javax/activation/DataSource.java
index 0d70843..c4da9d3 100644
--- a/libjava/classpath/javax/activation/DataSource.java
+++ b/libjava/classpath/javax/activation/DataSource.java
@@ -49,28 +49,27 @@ import java.io.OutputStream;
*/
public interface DataSource
{
-
+
/**
* Returns an input stream from which the data can be read.
*/
InputStream getInputStream()
throws IOException;
-
+
/**
* Returns an output stream to which the data can be written.
*/
OutputStream getOutputStream()
throws IOException;
-
+
/**
* Returns the MIME content type of the data.
*/
String getContentType();
-
+
/**
* Returns the underlying name of this object.
*/
String getName();
-
-}
+}
diff --git a/libjava/classpath/javax/activation/DataSourceDataContentHandler.java b/libjava/classpath/javax/activation/DataSourceDataContentHandler.java
index 9706ac1..8b16fd1 100644
--- a/libjava/classpath/javax/activation/DataSourceDataContentHandler.java
+++ b/libjava/classpath/javax/activation/DataSourceDataContentHandler.java
@@ -55,13 +55,13 @@ class DataSourceDataContentHandler
private DataSource ds;
private DataFlavor[] flavors;
private DataContentHandler dch;
-
+
public DataSourceDataContentHandler(DataContentHandler dch, DataSource ds)
{
this.ds = ds;
this.dch = dch;
}
-
+
public Object getContent(DataSource ds)
throws IOException
{
@@ -74,7 +74,7 @@ class DataSourceDataContentHandler
return ds.getInputStream();
}
}
-
+
public Object getTransferData(DataFlavor flavor, DataSource ds)
throws UnsupportedFlavorException, IOException
{
@@ -92,7 +92,7 @@ class DataSourceDataContentHandler
throw new UnsupportedFlavorException(flavor);
}
}
-
+
public DataFlavor[] getTransferDataFlavors()
{
if (flavors == null)
@@ -121,6 +121,5 @@ class DataSourceDataContentHandler
}
dch.writeTo(obj, mimeType, out);
}
-
-}
+}
diff --git a/libjava/classpath/javax/activation/FileDataSource.java b/libjava/classpath/javax/activation/FileDataSource.java
index 6e9035f..72ef066 100644
--- a/libjava/classpath/javax/activation/FileDataSource.java
+++ b/libjava/classpath/javax/activation/FileDataSource.java
@@ -56,7 +56,7 @@ public class FileDataSource
private final File file;
private FileTypeMap typeMap;
-
+
/**
* Constructor.
* @param file the underlying file to use
@@ -65,7 +65,7 @@ public class FileDataSource
{
this.file = file;
}
-
+
/**
* Constructor.
* @param name the path to the underlying file to use
@@ -74,7 +74,7 @@ public class FileDataSource
{
this(new File(name));
}
-
+
public InputStream getInputStream()
throws IOException
{
@@ -86,7 +86,7 @@ public class FileDataSource
{
return new FileOutputStream(file);
}
-
+
public String getContentType()
{
if (typeMap == null)
@@ -96,12 +96,12 @@ public class FileDataSource
}
return typeMap.getContentType(file);
}
-
+
public String getName()
{
return file.getName();
}
-
+
/**
* Returns the underlying file.
*/
@@ -118,6 +118,5 @@ public class FileDataSource
{
typeMap = map;
}
-
-}
+}
diff --git a/libjava/classpath/javax/activation/FileTypeMap.java b/libjava/classpath/javax/activation/FileTypeMap.java
index 2ef7805..bbd088c 100644
--- a/libjava/classpath/javax/activation/FileTypeMap.java
+++ b/libjava/classpath/javax/activation/FileTypeMap.java
@@ -49,9 +49,9 @@ public abstract class FileTypeMap
{
/* Class scope */
-
+
private static FileTypeMap defaultMap;
-
+
/**
* Returns the system default file type map.
* If one has not been set, this returns a MimetypesFileTypeMap.
@@ -64,7 +64,7 @@ public abstract class FileTypeMap
}
return defaultMap;
}
-
+
/**
* Sets the default file type map.
* @param map the new file type map
@@ -91,13 +91,13 @@ public abstract class FileTypeMap
}
/* Instance scope */
-
+
/**
* Returns the content type of the specified file.
* @param file the file to classify
*/
public abstract String getContentType(File file);
-
+
/**
* Returns the content type of the specified file path.
* @param filename the path of the file to classify
@@ -105,4 +105,3 @@ public abstract class FileTypeMap
public abstract String getContentType(String filename);
}
-
diff --git a/libjava/classpath/javax/activation/MailcapCommandMap.java b/libjava/classpath/javax/activation/MailcapCommandMap.java
index cca5f04..48b1bbb 100644
--- a/libjava/classpath/javax/activation/MailcapCommandMap.java
+++ b/libjava/classpath/javax/activation/MailcapCommandMap.java
@@ -82,8 +82,8 @@ public class MailcapCommandMap
private static boolean debug = false;
private static final int NORMAL = 0;
private static final int FALLBACK = 1;
-
- static
+
+ static
{
try
{
@@ -94,9 +94,9 @@ public class MailcapCommandMap
{
}
}
-
+
private Map>>[][] mailcaps;
-
+
/**
* Default constructor.
*/
@@ -104,7 +104,7 @@ public class MailcapCommandMap
{
init(null);
}
-
+
/**
* Constructor specifying a filename.
* @param fileName the name of the file to read mailcap entries from
@@ -132,7 +132,7 @@ public class MailcapCommandMap
}
}
}
-
+
/**
* Constructor specifying an input stream.
* @param is the input stream to read mailcap entries from
@@ -150,7 +150,7 @@ public class MailcapCommandMap
for (int j = 0; j < 2; j++)
{
mailcaps[i][j] =
- new LinkedHashMap>>();
+ new LinkedHashMap>>();
}
}
if (in != null)
@@ -167,7 +167,7 @@ public class MailcapCommandMap
{
}
}
-
+
if (debug)
{
System.out.println("MailcapCommandMap: load HOME");
@@ -186,17 +186,17 @@ public class MailcapCommandMap
catch (SecurityException e)
{
}
-
+
if (debug)
{
System.out.println("MailcapCommandMap: load SYS");
}
try
{
- parseFile(SYS,
+ parseFile(SYS,
new CPStringBuilder(System.getProperty("java.home"))
- .append(File.separatorChar)
- .append("lib")
+ .append(File.separatorChar)
+ .append("lib")
.append(File.separatorChar)
.append("mailcap")
.toString());
@@ -204,7 +204,7 @@ public class MailcapCommandMap
catch (SecurityException e)
{
}
-
+
if (debug)
{
System.out.println("MailcapCommandMap: load JAR");
@@ -253,14 +253,14 @@ public class MailcapCommandMap
{
parseResource(JAR, "/META-INF/mailcap");
}
-
+
if (debug)
{
System.out.println("MailcapCommandMap: load DEF");
}
parseResource(DEF, "/META-INF/mailcap.default");
}
-
+
/**
* Returns the list of preferred commands for a given MIME type.
* @param mimeType the MIME type
@@ -295,7 +295,7 @@ public class MailcapCommandMap
cmdList.toArray(cmds);
return cmds;
}
-
+
/**
* Returns all commands for the given MIME type.
* @param mimeType the MIME type
@@ -343,7 +343,7 @@ public class MailcapCommandMap
for (int j = 0; j < 5; j++)
{
Map> map =
- getCommands(mailcaps[j][i], mimeType);
+ getCommands(mailcaps[j][i], mimeType);
if (map != null)
{
List classNames = map.get(cmdName);
@@ -449,7 +449,7 @@ public class MailcapCommandMap
}
return null;
}
-
+
/**
* Get the native commands for the given MIME type.
* Returns an array of strings where each string is
@@ -479,8 +479,8 @@ public class MailcapCommandMap
}
private void addNativeCommands(List acc,
- Map>> mailcap,
- String mimeType)
+ Map>> mailcap,
+ String mimeType)
{
for (Map.Entry>> mEntry : mailcap.entrySet())
{
@@ -522,7 +522,7 @@ public class MailcapCommandMap
}
}
}
-
+
private static String nameOf(int mailcap)
{
switch (mailcap)
@@ -539,7 +539,7 @@ public class MailcapCommandMap
return "DEF";
default:
return "ERR";
- }
+ }
}
private void parseFile(int index, String filename)
@@ -576,7 +576,7 @@ public class MailcapCommandMap
}
}
}
-
+
private void parseResource(int index, String name)
{
Reader in = null;
@@ -615,7 +615,7 @@ public class MailcapCommandMap
}
}
}
-
+
private void parse(int index, Reader in)
throws IOException
{
@@ -649,7 +649,7 @@ public class MailcapCommandMap
}
}
}
-
+
private void parseEntry(int index, String line)
{
// Tokenize entry into fields
@@ -691,7 +691,7 @@ public class MailcapCommandMap
fallback = true;
}
fields.add(field);
-
+
len = fields.size();
if (len < 2)
{
@@ -701,7 +701,7 @@ public class MailcapCommandMap
}
return;
}
-
+
Map>> mailcap =
fallback ? mailcaps[index][FALLBACK] : mailcaps[index][NORMAL];
String mimeType = fields.get(0);
@@ -711,9 +711,9 @@ public class MailcapCommandMap
addField(mailcap, mimeType, null, (String) fields.get(i));
}
}
-
+
private void addField(Map>> mailcap,
- String mimeType, String verb, String command)
+ String mimeType, String verb, String command)
{
if (verb == null)
{
@@ -728,7 +728,7 @@ public class MailcapCommandMap
{
return; // Invalid field or flag
}
-
+
Map> commands = mailcap.get(mimeType);
if (commands == null)
{
@@ -743,10 +743,10 @@ public class MailcapCommandMap
}
classNames.add(command);
}
-
+
private Map>
getCommands(Map>> mailcap,
- String mimeType)
+ String mimeType)
{
int si = mimeType.indexOf('/');
String genericMimeType = new CPStringBuilder(mimeType.substring(0, si))
@@ -782,7 +782,7 @@ public class MailcapCommandMap
}
// -- Utility methods --
-
+
private List getSystemResources(String name)
{
List acc = new ArrayList();
@@ -799,6 +799,5 @@ public class MailcapCommandMap
}
return acc;
}
-
-}
+}
diff --git a/libjava/classpath/javax/activation/MimeType.java b/libjava/classpath/javax/activation/MimeType.java
index 70045d6..bc3afc1 100644
--- a/libjava/classpath/javax/activation/MimeType.java
+++ b/libjava/classpath/javax/activation/MimeType.java
@@ -53,13 +53,13 @@ import java.io.ObjectOutput;
public class MimeType
implements Externalizable
{
-
+
static final String TSPECIALS = "()<>@,;:/[]?=\\\"";
-
+
private String primaryType;
private String subType;
private MimeTypeParameterList parameters;
-
+
/**
* Constructor for an application/* content type.
*/
@@ -69,7 +69,7 @@ public class MimeType
subType = "*";
parameters = new MimeTypeParameterList();
}
-
+
/**
* Constructor that parses a raw String.
* @param rawdata the MIME type string
@@ -79,7 +79,7 @@ public class MimeType
{
parse(rawdata);
}
-
+
/**
* Constructor for a new MIME type with the given primary and sub types
* and an empty parameter list.
@@ -103,7 +103,7 @@ public class MimeType
{
return primaryType;
}
-
+
/**
* Sets the primary type.
* @param primary the new primary type
@@ -114,7 +114,7 @@ public class MimeType
checkValidity(primary, "Primary type is invalid");
primaryType = primary.toLowerCase();
}
-
+
/**
* Returns the subtype.
*/
@@ -122,7 +122,7 @@ public class MimeType
{
return subType;
}
-
+
/**
* Sets the subtype.
* @param sub the new subtype
@@ -133,7 +133,7 @@ public class MimeType
checkValidity(sub, "Sub type is invalid");
subType = sub.toLowerCase();
}
-
+
/**
* Returns the MIME parameters.
*/
@@ -141,7 +141,7 @@ public class MimeType
{
return parameters;
}
-
+
/**
* Returns the parameter value for the specified name.
* @param name the parameter name
@@ -150,7 +150,7 @@ public class MimeType
{
return parameters.get(name);
}
-
+
/**
* Sets the parameter value for the specified name.
* @param name the parameter name
@@ -160,7 +160,7 @@ public class MimeType
{
parameters.set(name, value);
}
-
+
/**
* Removes the parameter value for the specified name.
* @param name the parameter name
@@ -169,7 +169,7 @@ public class MimeType
{
parameters.remove(name);
}
-
+
/**
* Returns the complete string representation of this MIME type.
*/
@@ -181,7 +181,7 @@ public class MimeType
.append(parameters.toString())
.toString();
}
-
+
/**
* Returns the string representation of this MIME type without
* parameters.
@@ -193,7 +193,7 @@ public class MimeType
.append(subType)
.toString();
}
-
+
/**
* Returns true if the primary and subtype of this MIME type are the
* same as in the given MIME type.
@@ -206,7 +206,7 @@ public class MimeType
"*".equals(subType) ||
"*".equals(sub2));
}
-
+
/**
* Returns true if the primary and subtype of this MIME type are the
* same as in the given MIME type string.
@@ -216,14 +216,14 @@ public class MimeType
{
return match(new MimeType(rawdata));
}
-
+
public void writeExternal(ObjectOutput out)
throws IOException
{
out.writeUTF(toString());
out.flush();
}
-
+
public void readExternal(ObjectInput in)
throws IOException, ClassNotFoundException
{
@@ -236,7 +236,7 @@ public class MimeType
throw new IOException(e.getMessage());
}
}
-
+
private void parse(String rawdata)
throws MimeTypeParseException
{
@@ -283,11 +283,10 @@ public class MimeType
}
}
}
-
+
static boolean isValidChar(char c)
{
return c > ' ' && c <= '~' && TSPECIALS.indexOf(c) == -1;
}
}
-
diff --git a/libjava/classpath/javax/activation/MimeTypeParameterList.java b/libjava/classpath/javax/activation/MimeTypeParameterList.java
index e15469d..3d36ede 100644
--- a/libjava/classpath/javax/activation/MimeTypeParameterList.java
+++ b/libjava/classpath/javax/activation/MimeTypeParameterList.java
@@ -57,7 +57,7 @@ public class MimeTypeParameterList
private final List parameterNames;
private final Map parameterValues;
-
+
/**
* Constructor for an empty parameter list.
*/
@@ -122,11 +122,11 @@ public class MimeTypeParameterList
{
params.add(param);
}
-
+
// Tokenize each parameter into name + value
for (Iterator i = params.iterator(); i.hasNext();)
{
- param = i.next();
+ param = i.next();
int ei = param.indexOf('=');
if (ei == -1)
{
@@ -147,12 +147,12 @@ public class MimeTypeParameterList
{
MimeType.checkValidity(name, "Parameter value is invalid");
}
-
+
parameterNames.add(name);
parameterValues.put(name.toLowerCase(), value);
}
}
-
+
/**
* Returns the number of parameters.
*/
@@ -160,7 +160,7 @@ public class MimeTypeParameterList
{
return parameterNames.size();
}
-
+
/**
* Indicates if there are no parameters.
*/
@@ -178,7 +178,7 @@ public class MimeTypeParameterList
name = name.trim();
return parameterValues.get(name.toLowerCase());
}
-
+
/**
* Sets the value for the specified parameter name.
* @param name the parameter name
@@ -201,7 +201,7 @@ public class MimeTypeParameterList
}
parameterValues.put(name.toLowerCase(), value);
}
-
+
/**
* Removes the parameter identified by the specified name.
* @param name the parameter name
@@ -211,7 +211,7 @@ public class MimeTypeParameterList
name = name.trim();
for (Iterator i = parameterNames.iterator();i.hasNext();)
{
- String pname = i.next();
+ String pname = i.next();
if (name.equalsIgnoreCase(pname))
{
i.remove();
@@ -219,7 +219,7 @@ public class MimeTypeParameterList
}
parameterValues.remove(name.toLowerCase());
}
-
+
/**
* Returns an enumeration of all the parameter names.
*/
@@ -229,7 +229,7 @@ public class MimeTypeParameterList
{
return new IteratorEnumeration(parameterNames.iterator());
}
-
+
/**
* Returns an RFC 2045-compliant string representation of this parameter
* list.
@@ -240,7 +240,7 @@ public class MimeTypeParameterList
for (String name : parameterNames)
{
String value = parameterValues.get(name.toLowerCase());
-
+
buffer.append(';');
buffer.append(' ');
buffer.append(name);
@@ -249,7 +249,7 @@ public class MimeTypeParameterList
}
return buffer.toString();
}
-
+
private static String quote(String value)
{
boolean needsQuoting = false;
@@ -262,7 +262,7 @@ public class MimeTypeParameterList
break;
}
}
-
+
if (needsQuoting)
{
CPStringBuilder buffer = new CPStringBuilder();
@@ -281,7 +281,7 @@ public class MimeTypeParameterList
}
return value;
}
-
+
private static String unquote(String value)
{
int len = value.length();
@@ -305,32 +305,31 @@ public class MimeTypeParameterList
}
return buffer.toString();
}
-
+
/**
* Enumeration proxy for an Iterator.
*/
static class IteratorEnumeration
implements Enumeration
{
-
+
final Iterator iterator;
-
+
IteratorEnumeration(Iterator iterator)
{
this.iterator = iterator;
}
-
+
public boolean hasMoreElements()
{
return iterator.hasNext();
}
-
+
public String nextElement()
{
return iterator.next();
}
-
+
}
-
-}
+}
diff --git a/libjava/classpath/javax/activation/MimeTypeParseException.java b/libjava/classpath/javax/activation/MimeTypeParseException.java
index b46e244..18e8a62 100644
--- a/libjava/classpath/javax/activation/MimeTypeParseException.java
+++ b/libjava/classpath/javax/activation/MimeTypeParseException.java
@@ -55,7 +55,7 @@ public class MimeTypeParseException
public MimeTypeParseException()
{
}
-
+
/**
* MimeTypeParseException with the specified detail message.
* @param message the exception message
@@ -79,6 +79,5 @@ public class MimeTypeParseException
.append(token)
.toString());
}
-
-}
+}
diff --git a/libjava/classpath/javax/activation/MimetypesFileTypeMap.java b/libjava/classpath/javax/activation/MimetypesFileTypeMap.java
index d1566fd..0c381d8 100644
--- a/libjava/classpath/javax/activation/MimetypesFileTypeMap.java
+++ b/libjava/classpath/javax/activation/MimetypesFileTypeMap.java
@@ -92,9 +92,9 @@ public class MimetypesFileTypeMap
{
}
}
-
+
private Map[] mimetypes;
-
+
/**
* Default constructor.
*/
@@ -102,7 +102,7 @@ public class MimetypesFileTypeMap
{
init(null);
}
-
+
/**
* Constructor specifying a filename.
* @param mimeTypeFileName the name of the file to read mime.types
@@ -125,7 +125,7 @@ public class MimetypesFileTypeMap
}
}
}
-
+
/**
* Constructor specifying an input stream.
* @param is the input stream to read mime.types entries from
@@ -156,7 +156,7 @@ public class MimetypesFileTypeMap
{
}
}
-
+
if (debug)
{
System.out.println("MimetypesFileTypeMap: load HOME");
@@ -175,7 +175,7 @@ public class MimetypesFileTypeMap
catch (SecurityException e)
{
}
-
+
if (debug)
{
System.out.println("MimetypesFileTypeMap: load SYS");
@@ -184,8 +184,8 @@ public class MimetypesFileTypeMap
{
parseFile(mimetypes[SYS],
new CPStringBuilder(System.getProperty("java.home"))
- .append(File.separatorChar)
- .append("lib")
+ .append(File.separatorChar)
+ .append("lib")
.append(File.separatorChar)
.append("mime.types")
.toString());
@@ -232,14 +232,14 @@ public class MimetypesFileTypeMap
{
parseResource(mimetypes[JAR], "/META-INF/mime.types");
}
-
+
if (debug)
{
System.out.println("MimetypesFileTypeMap: load DEF");
}
parseResource(mimetypes[DEF], "/META-INF/mimetypes.default");
}
-
+
/**
* Adds entries prorammatically to the registry.
* @param mime_types a mime.types formatted entries string
@@ -268,7 +268,7 @@ public class MimetypesFileTypeMap
{
return getContentType(f.getName());
}
-
+
/**
* Returns the MIME type based on the given filename.
* If no entry is found, returns "application/octet-stream".
@@ -296,7 +296,7 @@ public class MimetypesFileTypeMap
}
return DEFAULT_MIME_TYPE;
}
-
+
private void parseFile(Map mimetypes, String filename)
{
Reader in = null;
@@ -322,7 +322,7 @@ public class MimetypesFileTypeMap
}
}
}
-
+
private void parseResource(Map mimetypes, String name)
{
Reader in = null;
@@ -352,7 +352,7 @@ public class MimetypesFileTypeMap
}
}
}
-
+
private void parse(Map mimetypes, Reader in)
throws IOException
{
@@ -386,9 +386,9 @@ public class MimetypesFileTypeMap
}
}
}
-
+
private void parseEntry(Map mimetypes,
- String line)
+ String line)
{
// Tokenize
String mimeType = null;
@@ -418,9 +418,9 @@ public class MimetypesFileTypeMap
mimetypes.put(buffer.toString(), mimeType);
}
}
-
+
// -- Utility methods --
-
+
private List getSystemResources(String name)
{
List acc = new ArrayList();
@@ -435,6 +435,5 @@ public class MimetypesFileTypeMap
}
return acc;
}
-
-}
+}
diff --git a/libjava/classpath/javax/activation/ObjectDataContentHandler.java b/libjava/classpath/javax/activation/ObjectDataContentHandler.java
index 5105cb4..3f5e296 100644
--- a/libjava/classpath/javax/activation/ObjectDataContentHandler.java
+++ b/libjava/classpath/javax/activation/ObjectDataContentHandler.java
@@ -56,7 +56,7 @@ class ObjectDataContentHandler
private Object object;
private String mimeType;
private DataFlavor[] flavors;
-
+
public ObjectDataContentHandler(DataContentHandler dch, Object object,
String mimeType)
{
@@ -64,12 +64,12 @@ class ObjectDataContentHandler
this.object = object;
this.mimeType = mimeType;
}
-
+
public Object getContent(DataSource ds)
{
return object;
}
-
+
public DataContentHandler getDCH()
{
return dch;
@@ -92,7 +92,7 @@ class ObjectDataContentHandler
}
throw new UnsupportedFlavorException(flavor);
}
-
+
public DataFlavor[] getTransferDataFlavors()
{
if (flavors == null)
@@ -123,6 +123,5 @@ class ObjectDataContentHandler
throw new UnsupportedDataTypeException("no object DCH for MIME type " + mimeType);
}
}
-
-}
+}
diff --git a/libjava/classpath/javax/activation/URLDataSource.java b/libjava/classpath/javax/activation/URLDataSource.java
index 8b77567..66472ad 100644
--- a/libjava/classpath/javax/activation/URLDataSource.java
+++ b/libjava/classpath/javax/activation/URLDataSource.java
@@ -55,7 +55,7 @@ public class URLDataSource
private final URL url;
private URLConnection connection;
-
+
/**
* Constructor.
* This will not open the connection to the URL.
@@ -64,7 +64,7 @@ public class URLDataSource
{
this.url = url;
}
-
+
/**
* Returns the Content-Type header for the URL.
* In the case of failure or lack of such a header,
@@ -93,7 +93,7 @@ public class URLDataSource
}
return contentType;
}
-
+
/**
* Returns the result of getFile of the underlying URL.
*/
@@ -101,7 +101,7 @@ public class URLDataSource
{
return url.getFile();
}
-
+
public InputStream getInputStream()
throws IOException
{
@@ -125,7 +125,7 @@ public class URLDataSource
}
return null;
}
-
+
/**
* Returns the underlying URL.
*/
@@ -133,6 +133,5 @@ public class URLDataSource
{
return url;
}
-
-}
+}
diff --git a/libjava/classpath/javax/activation/UnsupportedDataTypeException.java b/libjava/classpath/javax/activation/UnsupportedDataTypeException.java
index 09460b0..d0c4b9d 100644
--- a/libjava/classpath/javax/activation/UnsupportedDataTypeException.java
+++ b/libjava/classpath/javax/activation/UnsupportedDataTypeException.java
@@ -55,7 +55,7 @@ public class UnsupportedDataTypeException extends IOException
public UnsupportedDataTypeException()
{
}
-
+
/**
* Constructs an UnsupportedDataTypeException with the specified detail
* message.
@@ -65,6 +65,5 @@ public class UnsupportedDataTypeException extends IOException
{
super(message);
}
-
-}
+}
diff --git a/libjava/classpath/javax/crypto/Cipher.java b/libjava/classpath/javax/crypto/Cipher.java
index 7c18e6f..9b7d8f9 100644
--- a/libjava/classpath/javax/crypto/Cipher.java
+++ b/libjava/classpath/javax/crypto/Cipher.java
@@ -163,7 +163,7 @@ public class Cipher
* The installed providers are tried in order for an implementation, and the
* first appropriate instance is returned. If no installed provider can
* provide the implementation, an appropriate exception is thrown.
- *
+ *
* @param transformation The transformation to create.
* @return An appropriate cipher for this transformation.
* @throws NoSuchAlgorithmException If no installed provider can supply the
@@ -201,7 +201,7 @@ public class Cipher
/**
* Creates a new cipher instance for the given transformation and the named
* provider.
- *
+ *
* @param transformation The transformation to create.
* @param provider The name of the provider to use.
* @return An appropriate cipher for this transformation.
@@ -228,7 +228,7 @@ public class Cipher
/**
* Creates a new cipher instance for a given transformation from a given
* provider.
- *
+ *
* @param transformation The transformation to create.
* @param provider The provider to use.
* @return An appropriate cipher for this transformation.
diff --git a/libjava/classpath/javax/crypto/CipherOutputStream.java b/libjava/classpath/javax/crypto/CipherOutputStream.java
index 960f6fb..170feed 100644
--- a/libjava/classpath/javax/crypto/CipherOutputStream.java
+++ b/libjava/classpath/javax/crypto/CipherOutputStream.java
@@ -45,7 +45,7 @@ import java.io.OutputStream;
/**
* A filtered output stream that transforms data written to it with a
* {@link Cipher} before sending it to the underlying output stream.
- *
+ *
* @author Casey Marshall (csm@gnu.org)
*/
public class CipherOutputStream extends FilterOutputStream
@@ -56,7 +56,7 @@ public class CipherOutputStream extends FilterOutputStream
/**
* Create a new cipher output stream. The cipher argument must have already
* been initialized.
- *
+ *
* @param out The sink for transformed data.
* @param cipher The cipher to transform data with.
*/
@@ -82,7 +82,7 @@ public class CipherOutputStream extends FilterOutputStream
* This method will first invoke the {@link Cipher#doFinal()} method of the
* underlying {@link Cipher}, and writes the output of that method to the
* sink output stream.
- *
+ *
* @throws IOException If an I/O error occurs, or if an error is caused by
* finalizing the transformation.
*/
@@ -114,7 +114,7 @@ public class CipherOutputStream extends FilterOutputStream
/**
* Write a single byte to the output stream.
- *
+ *
* @param b The next byte.
* @throws IOException If an I/O error occurs, or if the underlying cipher is
* not in the correct state to transform data.
@@ -126,7 +126,7 @@ public class CipherOutputStream extends FilterOutputStream
/**
* Write a byte array to the output stream.
- *
+ *
* @param buf The next bytes.
* @throws IOException If an I/O error occurs, or if the underlying cipher is
* not in the correct state to transform data.
@@ -138,7 +138,7 @@ public class CipherOutputStream extends FilterOutputStream
/**
* Write a portion of a byte array to the output stream.
- *
+ *
* @param buf The next bytes.
* @param off The offset in the byte array to start.
* @param len The number of bytes to write.
diff --git a/libjava/classpath/javax/crypto/ExemptionMechanism.java b/libjava/classpath/javax/crypto/ExemptionMechanism.java
index baf6bad..b8b17c4 100644
--- a/libjava/classpath/javax/crypto/ExemptionMechanism.java
+++ b/libjava/classpath/javax/crypto/ExemptionMechanism.java
@@ -90,7 +90,7 @@ public class ExemptionMechanism
/**
* Create an instance of ExemptionMechanism for a designated
* mechanism from the first Security Provider offering it.
- *
+ *
* @param mechanism the name of the exemption mechanism to create.
* @return a newly created instance of ExemptionMechanism.
* @throws IllegalArgumentException if the provider is null.
@@ -121,7 +121,7 @@ public class ExemptionMechanism
/**
* Create an instance of ExemptionMechanism for a designated
* mechanism from a named provider.
- *
+ *
* @param mechanism the name of the exemption mechanism to create.
* @param provider the security provider to provide the exemption
* mechanism.
@@ -149,7 +149,7 @@ public class ExemptionMechanism
/**
* Create an instance of ExemptionMechanism for a designated
* mechanism from a designated provider.
- *
+ *
* @param mechanism the name of the exemption mechanism to create.
* @param provider the security provider to provide the exemption
* mechanism.
diff --git a/libjava/classpath/javax/crypto/KeyAgreement.java b/libjava/classpath/javax/crypto/KeyAgreement.java
index 4900310..fe3e226 100644
--- a/libjava/classpath/javax/crypto/KeyAgreement.java
+++ b/libjava/classpath/javax/crypto/KeyAgreement.java
@@ -104,7 +104,7 @@ public class KeyAgreement
/**
* Get an implementation of an algorithm from the first provider that
* implements it.
- *
+ *
* @param algorithm The name of the algorithm to get.
* @return The proper KeyAgreement instacne, if found.
* @throws NoSuchAlgorithmException If the specified algorithm is not
@@ -133,7 +133,7 @@ public class KeyAgreement
/**
* Return an implementation of an algorithm from a named provider.
- *
+ *
* @param algorithm The name of the algorithm to create.
* @param provider The name of the provider from which to get the
* implementation.
@@ -158,7 +158,7 @@ public class KeyAgreement
/**
* Return an implementation of an algorithm from a specific provider.
- *
+ *
* @param algorithm The name of the algorithm to get.
* @param provider The provider from which to get the implementation.
* @return The proper KeyAgreement instance, if found.
diff --git a/libjava/classpath/javax/crypto/KeyGenerator.java b/libjava/classpath/javax/crypto/KeyGenerator.java
index 79334e9..f0c80e1 100644
--- a/libjava/classpath/javax/crypto/KeyGenerator.java
+++ b/libjava/classpath/javax/crypto/KeyGenerator.java
@@ -96,7 +96,7 @@ public class KeyGenerator
/**
* Create a new key generator, returning the first available implementation.
- *
+ *
* @param algorithm The generator algorithm name.
* @throws NoSuchAlgorithmException If the specified algorithm does not exist.
* @throws IllegalArgumentException if algorithm is
@@ -123,7 +123,7 @@ public class KeyGenerator
/**
* Create a new key generator from the named provider.
- *
+ *
* @param algorithm The generator algorithm name.
* @param provider The name of the provider to use.
* @return An appropriate key generator, if found.
@@ -147,7 +147,7 @@ public class KeyGenerator
/**
* Create a new key generator from the supplied provider.
- *
+ *
* @param algorithm The generator algorithm name.
* @param provider The provider to use.
* @return An appropriate key generator, if found.
diff --git a/libjava/classpath/javax/crypto/Mac.java b/libjava/classpath/javax/crypto/Mac.java
index 2a269ab..9175e58 100644
--- a/libjava/classpath/javax/crypto/Mac.java
+++ b/libjava/classpath/javax/crypto/Mac.java
@@ -111,7 +111,7 @@ public class Mac implements Cloneable
/**
* Create an instance of the named algorithm from the first provider with an
* appropriate implementation.
- *
+ *
* @param algorithm The name of the algorithm.
* @return An appropriate Mac instance, if the specified algorithm is
* implemented by a provider.
@@ -141,7 +141,7 @@ public class Mac implements Cloneable
/**
* Create an instance of the named algorithm from the named provider.
- *
+ *
* @param algorithm The name of the algorithm.
* @param provider The name of the provider.
* @return An appropriate Mac instance, if the specified algorithm is
@@ -166,7 +166,7 @@ public class Mac implements Cloneable
/**
* Create an instance of the named algorithm from a provider.
- *
+ *
* @param algorithm The name of the algorithm.
* @param provider The provider.
* @return An appropriate Mac instance, if the specified algorithm is
@@ -417,7 +417,7 @@ public class Mac implements Cloneable
throw new IllegalStateException ("not initialized");
macSpi.engineUpdate(buffer);
}
-
+
/**
* Clone this instance, if the underlying implementation supports it.
*
diff --git a/libjava/classpath/javax/crypto/MacSpi.java b/libjava/classpath/javax/crypto/MacSpi.java
index 853bd66..a03aa69 100644
--- a/libjava/classpath/javax/crypto/MacSpi.java
+++ b/libjava/classpath/javax/crypto/MacSpi.java
@@ -143,10 +143,10 @@ public abstract class MacSpi
* @param length The number of bytes to update.
*/
protected abstract void engineUpdate(byte[] input, int offset, int length);
-
+
/**
* Update this MAC with the remaining bytes of a buffer.
- *
+ *
* @param buffer The input buffer.
* @since 1.5
*/
diff --git a/libjava/classpath/javax/crypto/SecretKeyFactory.java b/libjava/classpath/javax/crypto/SecretKeyFactory.java
index 1c857d2..9749a82 100644
--- a/libjava/classpath/javax/crypto/SecretKeyFactory.java
+++ b/libjava/classpath/javax/crypto/SecretKeyFactory.java
@@ -96,7 +96,7 @@ public class SecretKeyFactory
/**
* Create a new secret key factory from the first appropriate instance.
- *
+ *
* @param algorithm The algorithm name.
* @return The appropriate key factory, if found.
* @throws NoSuchAlgorithmException If no provider implements the specified
@@ -125,7 +125,7 @@ public class SecretKeyFactory
/**
* Create a new secret key factory from the named provider.
- *
+ *
* @param algorithm The algorithm name.
* @param provider The provider name.
* @return The appropriate key factory, if found.
@@ -150,7 +150,7 @@ public class SecretKeyFactory
/**
* Create a new secret key factory from the specified provider.
- *
+ *
* @param algorithm The algorithm name.
* @param provider The provider.
* @return The appropriate key factory, if found.
diff --git a/libjava/classpath/javax/crypto/spec/PBEKeySpec.java b/libjava/classpath/javax/crypto/spec/PBEKeySpec.java
index 54b821a..f0ffa37 100644
--- a/libjava/classpath/javax/crypto/spec/PBEKeySpec.java
+++ b/libjava/classpath/javax/crypto/spec/PBEKeySpec.java
@@ -78,7 +78,7 @@ public class PBEKeySpec implements KeySpec
/** The password state */
private boolean passwordValid = true;
-
+
// Constructors.
// ------------------------------------------------------------------------
@@ -86,13 +86,13 @@ public class PBEKeySpec implements KeySpec
* Create a new PBE key spec with just a password.
*
* A copy of the password argument is stored instead of the argument itself.
- *
+ *
* @param password The password char array.
*/
public PBEKeySpec(char[] password)
{
setPassword(password);
-
+
// load the default values for unspecified variables.
salt = null;
iterationCount = 0;
@@ -104,7 +104,7 @@ public class PBEKeySpec implements KeySpec
*
* A copy of the password and salt arguments are stored instead of the
* arguments themselves.
- *
+ *
* @param password The password char array.
* @param salt The salt bytes.
* @param iterationCount The iteration count.
@@ -128,7 +128,7 @@ public class PBEKeySpec implements KeySpec
*
* A copy of the password and salt arguments are stored instead of the
* arguments themselves.
- *
+ *
* @param password The password char array.
* @param salt The salt bytes.
* @param iterationCount The iteration count.
@@ -161,7 +161,7 @@ public class PBEKeySpec implements KeySpec
return;
for (int i = 0; i < password.length; i++)
password[i] = '\u0000';
-
+
// since the password is cleared, it is no longer valid
passwordValid = false;
}
@@ -190,7 +190,7 @@ public class PBEKeySpec implements KeySpec
* Get the password character array copy.
*
* This returns a copy of the password, not the password itself.
- *
+ *
* @return a clone of the password.
* @throws IllegalStateException If {@link #clearPassword()} has already been
* called.
@@ -207,7 +207,7 @@ public class PBEKeySpec implements KeySpec
* Get the salt bytes array copy.
*
* This returns a copy of the salt, not the salt itself.
- *
+ *
* @return The salt.
*/
public final byte[] getSalt()
@@ -221,7 +221,7 @@ public class PBEKeySpec implements KeySpec
* Set the password char array.
*
* A copy of the password argument is stored instead of the argument itself.
- *
+ *
* @param password The password to be set
*/
private void setPassword(char[] password)
@@ -238,7 +238,7 @@ public class PBEKeySpec implements KeySpec
* Set the salt byte array.
*
* A copy of the salt arguments is stored instead of the argument itself.
- *
+ *
* @param salt The salt to be set.
* @throws NullPointerException If the salt is null.
* @throws IllegalArgumentException If the salt is an empty array.
@@ -253,7 +253,7 @@ public class PBEKeySpec implements KeySpec
/**
* Set the iterationCount.
- *
+ *
* @param iterationCount The iteration count to be set.
* @throws IllegalArgumentException If the iterationCount is negative.
*/
@@ -267,7 +267,7 @@ public class PBEKeySpec implements KeySpec
/**
* Set the keyLength.
- *
+ *
* @param keyLength The keyLength to be set.
* @throws IllegalArgumentException if the keyLength is negative.
*/
diff --git a/libjava/classpath/javax/imageio/IIOImage.java b/libjava/classpath/javax/imageio/IIOImage.java
index bd69bae..a368e5a8 100644
--- a/libjava/classpath/javax/imageio/IIOImage.java
+++ b/libjava/classpath/javax/imageio/IIOImage.java
@@ -96,12 +96,12 @@ public class IIOImage
{
if (raster == null)
throw new IllegalArgumentException ("raster may not be null");
-
+
this.raster = raster;
this.thumbnails = thumbnails;
this.metadata = metadata;
}
-
+
/**
* Construct an IIOImage containing rendered image data, thumbnails
* and metadata.
@@ -117,7 +117,7 @@ public class IIOImage
{
if (image == null)
throw new IllegalArgumentException ("image may not be null");
-
+
this.image = image;
this.thumbnails = thumbnails;
this.metadata = metadata;
@@ -232,7 +232,7 @@ public class IIOImage
{
if (raster == null)
throw new IllegalArgumentException ("raster may not be null");
-
+
this.image = null;
this.raster = raster;
}
diff --git a/libjava/classpath/javax/imageio/IIOParam.java b/libjava/classpath/javax/imageio/IIOParam.java
index f6460b4..3e78547 100644
--- a/libjava/classpath/javax/imageio/IIOParam.java
+++ b/libjava/classpath/javax/imageio/IIOParam.java
@@ -158,10 +158,10 @@ public abstract class IIOParam
{
if (controller == null)
{
- if (defaultController == null || no_controller)
- return false;
- else
- return defaultController.activate (this);
+ if (defaultController == null || no_controller)
+ return false;
+ else
+ return defaultController.activate (this);
}
else
return controller.activate(this);
@@ -173,7 +173,7 @@ public abstract class IIOParam
* set to null.
*
* @return the currently used controller or null
- */
+ */
public IIOParamController getController()
{
return controller == null ?
@@ -254,7 +254,7 @@ public abstract class IIOParam
{
return sourceXSubsampling;
}
-
+
/**
* Retrieve the number of pixel rows to advance before taking a
* pixel sample.
@@ -313,13 +313,13 @@ public abstract class IIOParam
{
if (controller == defaultController)
{
- this.controller = null;
- no_controller = false;
+ this.controller = null;
+ no_controller = false;
}
else
{
- no_controller = (controller == null);
- this.controller = controller;
+ no_controller = (controller == null);
+ this.controller = controller;
}
}
@@ -401,24 +401,24 @@ public abstract class IIOParam
public void setSourceRegion(Rectangle sourceRegion)
{
if (sourceRegion != null
- && (sourceRegion.x < 0
- || sourceRegion.y < 0
- || sourceRegion.width <= 0
- || sourceRegion.height <= 0))
+ && (sourceRegion.x < 0
+ || sourceRegion.y < 0
+ || sourceRegion.width <= 0
+ || sourceRegion.height <= 0))
throw new IllegalArgumentException("illegal source region");
if (sourceRegion != null)
{
- int num_rows =
- (sourceRegion.height - subsamplingYOffset + sourceYSubsampling - 1)
- / sourceYSubsampling;
+ int num_rows =
+ (sourceRegion.height - subsamplingYOffset + sourceYSubsampling - 1)
+ / sourceYSubsampling;
- int num_columns =
- (sourceRegion.width - subsamplingXOffset + sourceXSubsampling - 1)
- / sourceXSubsampling;
+ int num_columns =
+ (sourceRegion.width - subsamplingXOffset + sourceXSubsampling - 1)
+ / sourceXSubsampling;
- if (num_rows <= 0 || num_columns <= 0)
- throw new IllegalStateException("zero pixels in source region");
+ if (num_rows <= 0 || num_columns <= 0)
+ throw new IllegalStateException("zero pixels in source region");
}
this.sourceRegion = sourceRegion;
@@ -462,25 +462,25 @@ public abstract class IIOParam
* zero pixel samples
*/
public void setSourceSubsampling(int sourceXSubsampling, int sourceYSubsampling,
- int subsamplingXOffset, int subsamplingYOffset)
+ int subsamplingXOffset, int subsamplingYOffset)
{
if (subsamplingXOffset < 0 || subsamplingYOffset < 0)
throw new IllegalArgumentException("subsampling offset < 0");
if (sourceRegion != null)
{
- int num_rows =
- (sourceRegion.height - subsamplingYOffset + sourceYSubsampling - 1)
- / sourceYSubsampling;
-
- int num_columns =
- (sourceRegion.width - subsamplingXOffset + sourceXSubsampling - 1)
- / sourceXSubsampling;
-
- if (num_rows <= 0 || num_columns <= 0)
- throw new IllegalStateException("subsampling parameters would"
- + " produce zero pixel samples"
- + " in source region");
+ int num_rows =
+ (sourceRegion.height - subsamplingYOffset + sourceYSubsampling - 1)
+ / sourceYSubsampling;
+
+ int num_columns =
+ (sourceRegion.width - subsamplingXOffset + sourceXSubsampling - 1)
+ / sourceXSubsampling;
+
+ if (num_rows <= 0 || num_columns <= 0)
+ throw new IllegalStateException("subsampling parameters would"
+ + " produce zero pixel samples"
+ + " in source region");
}
this.sourceXSubsampling = sourceXSubsampling;
diff --git a/libjava/classpath/javax/imageio/IIOParamController.java b/libjava/classpath/javax/imageio/IIOParamController.java
index 0ee54df..e77f854 100644
--- a/libjava/classpath/javax/imageio/IIOParamController.java
+++ b/libjava/classpath/javax/imageio/IIOParamController.java
@@ -61,7 +61,7 @@ public interface IIOParamController
*
* @return true if the IIOParam has been modified,
* false otherwise
- *
+ *
* @exception IllegalArgumentException if param is null or is not an instance
* of the correct class
*/
diff --git a/libjava/classpath/javax/imageio/ImageIO.java b/libjava/classpath/javax/imageio/ImageIO.java
index 5f0d71d..9abb1c8 100644
--- a/libjava/classpath/javax/imageio/ImageIO.java
+++ b/libjava/classpath/javax/imageio/ImageIO.java
@@ -125,7 +125,7 @@ public final class ImageIO
return false;
}
}
-
+
private static final class ReaderObjectFilter implements ServiceRegistry.Filter
{
private Object object;
@@ -179,7 +179,7 @@ public final class ImageIO
return false;
}
}
-
+
private static final class WriterFormatFilter implements ServiceRegistry.Filter
{
private String formatName;
@@ -192,14 +192,14 @@ public final class ImageIO
public boolean filter(Object provider)
{
if (provider instanceof ImageWriterSpi)
- {
- ImageWriterSpi spi = (ImageWriterSpi) provider;
- String[] formatNames = spi.getFormatNames();
-
- for (int i = formatNames.length - 1; i >= 0; --i)
+ {
+ ImageWriterSpi spi = (ImageWriterSpi) provider;
+ String[] formatNames = spi.getFormatNames();
+
+ for (int i = formatNames.length - 1; i >= 0; --i)
if (formatName.equals(formatNames[i]))
return true;
- }
+ }
return false;
}
@@ -229,7 +229,7 @@ public final class ImageIO
return false;
}
}
-
+
private static final class WriterSuffixFilter implements ServiceRegistry.Filter
{
private String fileSuffix;
@@ -261,7 +261,7 @@ public final class ImageIO
private String formatName;
public WriterObjectFilter(ImageTypeSpecifier type,
- String formatName)
+ String formatName)
{
this.type = type;
this.formatName = formatName;
@@ -273,13 +273,13 @@ public final class ImageIO
{
ImageWriterSpi spi = (ImageWriterSpi) provider;
- if (spi.canEncodeImage(type))
- {
- String[] formatNames = spi.getFormatNames();
- for (int i = formatNames.length - 1; i >= 0; --i)
- if (formatName.equals(formatNames[i]))
- return true;
- }
+ if (spi.canEncodeImage(type))
+ {
+ String[] formatNames = spi.getFormatNames();
+ for (int i = formatNames.length - 1; i >= 0; --i)
+ if (formatName.equals(formatNames[i]))
+ return true;
+ }
}
return false;
@@ -304,11 +304,11 @@ public final class ImageIO
{
ImageTranscoderSpi spi = (ImageTranscoderSpi) provider;
- if (spi.getReaderServiceProviderName().equals
- (reader.getOriginatingProvider().getClass().getName())
- && spi.getWriterServiceProviderName().equals
- (writer.getOriginatingProvider().getClass().getName()))
- return true;
+ if (spi.getReaderServiceProviderName().equals
+ (reader.getOriginatingProvider().getClass().getName())
+ && spi.getWriterServiceProviderName().equals
+ (writer.getOriginatingProvider().getClass().getName()))
+ return true;
}
return false;
@@ -320,14 +320,14 @@ public final class ImageIO
{
Iterator it;
Object readerExtension;
-
+
public ImageReaderIterator(Iterator it,
Object readerExtension)
{
this.it = it;
this.readerExtension = readerExtension;
}
-
+
public ImageReaderIterator(Iterator it)
{
this.it = it;
@@ -364,14 +364,14 @@ public final class ImageIO
{
Iterator it;
Object writerExtension;
-
+
public ImageWriterIterator(Iterator it,
Object writerExtension)
{
this.it = it;
this.writerExtension = writerExtension;
}
-
+
public ImageWriterIterator(Iterator it)
{
this.it = it;
@@ -402,7 +402,7 @@ public final class ImageIO
throw new UnsupportedOperationException();
}
}
-
+
private static File cacheDirectory;
private static boolean useCache = true;
@@ -421,7 +421,7 @@ public final class ImageIO
return Collections.EMPTY_SET.iterator();
}
}
-
+
private static Iterator getWritersByFilter(Class type,
ServiceRegistry.Filter filter,
Object writerExtension)
@@ -503,7 +503,7 @@ public final class ImageIO
{
if (fileSuffix == null)
throw new IllegalArgumentException("formatName may not be null");
-
+
return getReadersByFilter(ImageReaderSpi.class,
new ReaderSuffixFilter(fileSuffix),
fileSuffix);
@@ -523,7 +523,7 @@ public final class ImageIO
{
if (formatName == null)
throw new IllegalArgumentException("formatName may not be null");
-
+
return getWritersByFilter(ImageWriterSpi.class,
new WriterFormatFilter(formatName),
formatName);
@@ -544,7 +544,7 @@ public final class ImageIO
{
if (MIMEType == null)
throw new IllegalArgumentException("MIMEType may not be null");
-
+
return getWritersByFilter(ImageWriterSpi.class,
new WriterMIMETypeFilter(MIMEType),
MIMEType);
@@ -564,7 +564,7 @@ public final class ImageIO
{
if (fileSuffix == null)
throw new IllegalArgumentException("fileSuffix may not be null");
-
+
return getWritersByFilter(ImageWriterSpi.class,
new WriterSuffixFilter(fileSuffix),
fileSuffix);
@@ -581,19 +581,19 @@ public final class ImageIO
try
{
Iterator it =
- getRegistry().getServiceProviders(ImageReaderSpi.class, true);
- ArrayList result = new ArrayList();
+ getRegistry().getServiceProviders(ImageReaderSpi.class, true);
+ ArrayList result = new ArrayList();
- while (it.hasNext())
- {
- ImageReaderSpi spi = (ImageReaderSpi) it.next();
- String[] names = spi.getFormatNames();
+ while (it.hasNext())
+ {
+ ImageReaderSpi spi = (ImageReaderSpi) it.next();
+ String[] names = spi.getFormatNames();
- for (int i = names.length - 1; i >= 0; --i)
- result.add(names[i]);
- }
+ for (int i = names.length - 1; i >= 0; --i)
+ result.add(names[i]);
+ }
- return (String[]) result.toArray(new String[result.size()]);
+ return (String[]) result.toArray(new String[result.size()]);
}
catch (IllegalArgumentException e)
{
@@ -612,19 +612,19 @@ public final class ImageIO
try
{
Iterator it =
- getRegistry().getServiceProviders(ImageReaderSpi.class, true);
- ArrayList result = new ArrayList();
+ getRegistry().getServiceProviders(ImageReaderSpi.class, true);
+ ArrayList result = new ArrayList();
- while (it.hasNext())
- {
- ImageReaderSpi spi = (ImageReaderSpi) it.next();
- String[] names = spi.getMIMETypes();
+ while (it.hasNext())
+ {
+ ImageReaderSpi spi = (ImageReaderSpi) it.next();
+ String[] names = spi.getMIMETypes();
- for (int i = names.length - 1; i >= 0; --i)
- result.add(names[i]);
- }
+ for (int i = names.length - 1; i >= 0; --i)
+ result.add(names[i]);
+ }
- return (String[]) result.toArray(new String[result.size()]);
+ return (String[]) result.toArray(new String[result.size()]);
}
catch (IllegalArgumentException e)
{
@@ -659,19 +659,19 @@ public final class ImageIO
try
{
Iterator it =
- getRegistry().getServiceProviders(ImageWriterSpi.class, true);
- ArrayList result = new ArrayList();
+ getRegistry().getServiceProviders(ImageWriterSpi.class, true);
+ ArrayList result = new ArrayList();
- while (it.hasNext())
- {
- ImageWriterSpi spi = (ImageWriterSpi) it.next();
- String[] names = spi.getFormatNames();
+ while (it.hasNext())
+ {
+ ImageWriterSpi spi = (ImageWriterSpi) it.next();
+ String[] names = spi.getFormatNames();
- for (int i = names.length - 1; i >= 0; --i)
- result.add(names[i]);
- }
+ for (int i = names.length - 1; i >= 0; --i)
+ result.add(names[i]);
+ }
- return (String[]) result.toArray(new String[result.size()]);
+ return (String[]) result.toArray(new String[result.size()]);
}
catch (IllegalArgumentException e)
{
@@ -690,26 +690,26 @@ public final class ImageIO
try
{
Iterator it =
- getRegistry().getServiceProviders(ImageWriterSpi.class, true);
- ArrayList result = new ArrayList();
+ getRegistry().getServiceProviders(ImageWriterSpi.class, true);
+ ArrayList result = new ArrayList();
- while (it.hasNext())
- {
- ImageWriterSpi spi = (ImageWriterSpi) it.next();
- String[] names = spi.getMIMETypes();
+ while (it.hasNext())
+ {
+ ImageWriterSpi spi = (ImageWriterSpi) it.next();
+ String[] names = spi.getMIMETypes();
- for (int i = names.length - 1; i >= 0; --i)
- result.add(names[i]);
- }
+ for (int i = names.length - 1; i >= 0; --i)
+ result.add(names[i]);
+ }
- return (String[]) result.toArray(new String[result.size()]);
+ return (String[]) result.toArray(new String[result.size()]);
}
catch (IllegalArgumentException e)
{
return new String[0];
}
}
-
+
/**
* Rescans the application classpath for ImageIO service providers
* and registers them.
@@ -740,7 +740,7 @@ public final class ImageIO
cacheDirectory.canWrite();
}
-
+
ImageIO.cacheDirectory = cacheDirectory;
}
@@ -841,7 +841,7 @@ public final class ImageIO
while (writers.hasNext())
{
ImageWriter w = (ImageWriter) writers.next();
- try
+ try
{
w.setOutput(output);
}
@@ -849,7 +849,7 @@ public final class ImageIO
{
continue;
}
-
+
w.write(null, img, null);
w.dispose();
output.close();
@@ -1014,13 +1014,13 @@ public final class ImageIO
while(spis.hasNext())
{
- ImageInputStreamSpi spi = (ImageInputStreamSpi) spis.next();
+ ImageInputStreamSpi spi = (ImageInputStreamSpi) spis.next();
- if (input.getClass().equals(spi.getInputClass()))
- {
- foundSpi = spi;
- break;
- }
+ if (input.getClass().equals(spi.getInputClass()))
+ {
+ foundSpi = spi;
+ break;
+ }
}
return foundSpi == null ? null :
@@ -1060,13 +1060,13 @@ public final class ImageIO
while(spis.hasNext())
{
- ImageOutputStreamSpi spi = (ImageOutputStreamSpi) spis.next();
+ ImageOutputStreamSpi spi = (ImageOutputStreamSpi) spis.next();
- if (output.getClass().equals(spi.getOutputClass()))
- {
- foundSpi = spi;
- break;
- }
+ if (output.getClass().equals(spi.getOutputClass()))
+ {
+ foundSpi = spi;
+ break;
+ }
}
return foundSpi == null ? null :
@@ -1143,7 +1143,7 @@ public final class ImageIO
* @return an iterator over a collection of image writers
*/
public static Iterator getImageWriters (ImageTypeSpecifier type,
- String formatName)
+ String formatName)
{
if (type == null || formatName == null)
throw new IllegalArgumentException ("null argument");
@@ -1226,12 +1226,12 @@ public final class ImageIO
{
return spiIterator.hasNext();
}
-
+
public ImageTranscoder next()
{
return spiIterator.next().createTranscoderInstance();
}
-
+
public void remove()
{
throw new UnsupportedOperationException();
diff --git a/libjava/classpath/javax/imageio/ImageReadParam.java b/libjava/classpath/javax/imageio/ImageReadParam.java
index b2680f6..8a31253 100644
--- a/libjava/classpath/javax/imageio/ImageReadParam.java
+++ b/libjava/classpath/javax/imageio/ImageReadParam.java
@@ -112,17 +112,17 @@ public class ImageReadParam extends IIOParam
this.minProgressivePass = minPass;
this.numProgressivePasses = numPasses;
}
-
+
public void setSourceRenderSize(Dimension size)
throws UnsupportedOperationException
{
if (! canSetSourceRenderSize())
throw new UnsupportedOperationException
- ("setting source render size not supported");
-
+ ("setting source render size not supported");
+
if (size.width <= 0 || size.height <= 0)
throw new IllegalArgumentException("negative dimension not allowed");
-
+
sourceRenderSize = size;
}
}
diff --git a/libjava/classpath/javax/imageio/ImageReader.java b/libjava/classpath/javax/imageio/ImageReader.java
index 269493f..14e9359 100644
--- a/libjava/classpath/javax/imageio/ImageReader.java
+++ b/libjava/classpath/javax/imageio/ImageReader.java
@@ -290,7 +290,7 @@ public abstract class ImageReader
{
if (availableLocales == null)
return null;
-
+
return (Locale[]) availableLocales.clone();
}
@@ -770,14 +770,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.imageComplete (this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.imageComplete (this);
+ }
}
}
@@ -793,14 +793,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.imageProgress(this, percentageDone);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.imageProgress(this, percentageDone);
+ }
}
}
/**
@@ -815,14 +815,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.imageStarted(this, imageIndex);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.imageStarted(this, imageIndex);
+ }
}
}
@@ -842,19 +842,19 @@ public abstract class ImageReader
* @param bands the affected bands in the destination
*/
protected void processImageUpdate(BufferedImage image, int minX, int minY,
- int width, int height, int periodX,
- int periodY, int[] bands)
+ int width, int height, int periodX,
+ int periodY, int[] bands)
{
if (updateListeners != null)
{
- Iterator it = updateListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
- listener.imageUpdate(this, image, minX, minY, width, height,
- periodX, periodY, bands);
- }
+ Iterator it = updateListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
+ listener.imageUpdate(this, image, minX, minY, width, height,
+ periodX, periodY, bands);
+ }
}
}
@@ -869,13 +869,13 @@ public abstract class ImageReader
{
if (updateListeners != null)
{
- Iterator it = updateListeners.iterator();
+ Iterator it = updateListeners.iterator();
- while (it.hasNext())
- {
- IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
- listener.passComplete(this, image);
- }
+ while (it.hasNext())
+ {
+ IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
+ listener.passComplete(this, image);
+ }
}
}
@@ -898,19 +898,19 @@ public abstract class ImageReader
* @param bands the affected bands in the destination
*/
protected void processPassStarted(BufferedImage image, int pass, int minPass,
- int maxPass, int minX, int minY,
- int periodX, int periodY, int[] bands)
+ int maxPass, int minX, int minY,
+ int periodX, int periodY, int[] bands)
{
if (updateListeners != null)
{
- Iterator it = updateListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
- listener.passStarted(this, image, pass, minPass, maxPass, minX,
- minY, periodX, periodY, bands);
- }
+ Iterator it = updateListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
+ listener.passStarted(this, image, pass, minPass, maxPass, minX,
+ minY, periodX, periodY, bands);
+ }
}
}
@@ -922,14 +922,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.readAborted(this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.readAborted(this);
+ }
}
}
/**
@@ -941,14 +941,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.sequenceComplete(this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.sequenceComplete(this);
+ }
}
}
@@ -964,14 +964,14 @@ public abstract class ImageReader
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.sequenceStarted(this, minIndex);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.sequenceStarted(this, minIndex);
+ }
}
}
@@ -984,14 +984,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.thumbnailComplete(this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.thumbnailComplete(this);
+ }
}
}
@@ -1006,13 +1006,13 @@ public abstract class ImageReader
{
if (updateListeners != null)
{
- Iterator it = updateListeners.iterator();
+ Iterator it = updateListeners.iterator();
- while (it.hasNext())
- {
- IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
- listener.thumbnailPassComplete(this, thumbnail);
- }
+ while (it.hasNext())
+ {
+ IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
+ listener.thumbnailPassComplete(this, thumbnail);
+ }
}
}
@@ -1035,21 +1035,21 @@ public abstract class ImageReader
* @param bands the affected bands in the destination
*/
protected void processThumbnailPassStarted(BufferedImage thumbnail, int pass,
- int minPass, int maxPass, int minX,
- int minY, int periodX, int periodY,
- int[] bands)
+ int minPass, int maxPass, int minX,
+ int minY, int periodX, int periodY,
+ int[] bands)
{
if (updateListeners != null)
{
- Iterator it = updateListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
- listener.thumbnailPassStarted(this, thumbnail, pass, minPass,
- maxPass, minX, minY, periodX,
- periodY, bands);
- }
+ Iterator it = updateListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
+ listener.thumbnailPassStarted(this, thumbnail, pass, minPass,
+ maxPass, minX, minY, periodX,
+ periodY, bands);
+ }
}
}
@@ -1065,14 +1065,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.thumbnailProgress(this, percentageDone);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.thumbnailProgress(this, percentageDone);
+ }
}
}
@@ -1090,14 +1090,14 @@ public abstract class ImageReader
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadProgressListener listener =
- (IIOReadProgressListener) it.next();
- listener.thumbnailStarted(this, imageIndex, thumbnailIndex);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadProgressListener listener =
+ (IIOReadProgressListener) it.next();
+ listener.thumbnailStarted(this, imageIndex, thumbnailIndex);
+ }
}
}
@@ -1117,19 +1117,19 @@ public abstract class ImageReader
* @param bands the affected bands in the destination
*/
protected void processThumbnailUpdate(BufferedImage image, int minX, int minY,
- int width, int height, int periodX,
- int periodY, int[] bands)
+ int width, int height, int periodX,
+ int periodY, int[] bands)
{
if (updateListeners != null)
{
- Iterator it = updateListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
- listener.thumbnailUpdate(this, image, minX, minY, width, height,
- periodX, periodY, bands);
- }
+ Iterator it = updateListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadUpdateListener listener = (IIOReadUpdateListener) it.next();
+ listener.thumbnailUpdate(this, image, minX, minY, width, height,
+ periodX, periodY, bands);
+ }
}
}
@@ -1147,14 +1147,14 @@ public abstract class ImageReader
throw new IllegalArgumentException ("null argument");
if (warningListeners != null)
{
- Iterator it = warningListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadWarningListener listener =
- (IIOReadWarningListener) it.next();
- listener.warningOccurred(this, warning);
- }
+ Iterator it = warningListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadWarningListener listener =
+ (IIOReadWarningListener) it.next();
+ listener.warningOccurred(this, warning);
+ }
}
}
@@ -1179,7 +1179,7 @@ public abstract class ImageReader
* not a String
*/
protected void processWarningOccurred(String baseName,
- String keyword)
+ String keyword)
{
if (baseName == null || keyword == null)
throw new IllegalArgumentException ("null argument");
@@ -1188,22 +1188,22 @@ public abstract class ImageReader
try
{
- b = ResourceBundle.getBundle(baseName, getLocale());
+ b = ResourceBundle.getBundle(baseName, getLocale());
}
catch (MissingResourceException e)
{
- throw new IllegalArgumentException ("no resource bundle found");
+ throw new IllegalArgumentException ("no resource bundle found");
}
Object str = null;
try
{
- str = b.getObject(keyword);
+ str = b.getObject(keyword);
}
catch (MissingResourceException e)
{
- throw new IllegalArgumentException ("no results found for keyword");
+ throw new IllegalArgumentException ("no results found for keyword");
}
if (! (str instanceof String))
@@ -1213,14 +1213,14 @@ public abstract class ImageReader
if (warningListeners != null)
{
- Iterator it = warningListeners.iterator();
-
- while (it.hasNext())
- {
- IIOReadWarningListener listener =
- (IIOReadWarningListener) it.next();
- listener.warningOccurred(this, warning);
- }
+ Iterator it = warningListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOReadWarningListener listener =
+ (IIOReadWarningListener) it.next();
+ listener.warningOccurred(this, warning);
+ }
}
}
@@ -1292,7 +1292,7 @@ public abstract class ImageReader
* @exception IndexOutOfBoundsException if either the frame index or
* the thumbnail index is out-of-bounds
* @exception IOException if a read error occurs
- *
+ *
*/
public BufferedImage readThumbnail(int imageIndex, int thumbnailIndex)
throws IOException
@@ -1329,13 +1329,13 @@ public abstract class ImageReader
*
* @param listener the listener to remove
*/
- public void removeIIOReadProgressListener(IIOReadProgressListener listener)
+ public void removeIIOReadProgressListener(IIOReadProgressListener listener)
{
if (listener == null)
return;
if (progressListeners != null)
{
- progressListeners.remove(listener);
+ progressListeners.remove(listener);
}
}
@@ -1344,14 +1344,14 @@ public abstract class ImageReader
*
* @param listener the listener to remove
*/
- public void removeIIOReadUpdateListener(IIOReadUpdateListener listener)
+ public void removeIIOReadUpdateListener(IIOReadUpdateListener listener)
{
if (listener == null)
return;
if (updateListeners != null)
{
- updateListeners.remove(listener);
+ updateListeners.remove(listener);
}
}
@@ -1366,7 +1366,7 @@ public abstract class ImageReader
return;
if (warningListeners != null)
{
- warningListeners.remove(listener);
+ warningListeners.remove(listener);
}
}
@@ -1379,16 +1379,16 @@ public abstract class ImageReader
{
if (locale != null)
{
- // Check if its a valid locale.
- boolean found = false;
+ // Check if its a valid locale.
+ boolean found = false;
- if (availableLocales != null)
- for (int i = availableLocales.length - 1; i >= 0; --i)
- if (availableLocales[i].equals(locale))
- found = true;
+ if (availableLocales != null)
+ for (int i = availableLocales.length - 1; i >= 0; --i)
+ if (availableLocales[i].equals(locale))
+ found = true;
- if (! found)
- throw new IllegalArgumentException("looale not available");
+ if (! found)
+ throw new IllegalArgumentException("looale not available");
}
this.locale = locale;
@@ -1411,8 +1411,8 @@ public abstract class ImageReader
* destination band indices are invalid
*/
protected static void checkReadParamBandSettings(ImageReadParam param,
- int numSrcBands,
- int numDstBands)
+ int numSrcBands,
+ int numDstBands)
{
int[] srcBands = param.getSourceBands();
int[] dstBands = param.getDestinationBands();
@@ -1513,11 +1513,11 @@ public abstract class ImageReader
* regions is empty
*/
protected static void computeRegions (ImageReadParam param,
- int srcWidth,
- int srcHeight,
- BufferedImage image,
- Rectangle srcRegion,
- Rectangle destRegion)
+ int srcWidth,
+ int srcHeight,
+ BufferedImage image,
+ Rectangle srcRegion,
+ Rectangle destRegion)
{
if (srcRegion == null || destRegion == null)
throw new IllegalArgumentException ("null region");
@@ -1594,9 +1594,9 @@ public abstract class ImageReader
* height is greater than Integer.MAX_VALUE
*/
protected static BufferedImage getDestination (ImageReadParam param,
- Iterator imageTypes,
- int width,
- int height)
+ Iterator imageTypes,
+ int width,
+ int height)
throws IIOException
{
if (imageTypes == null || !imageTypes.hasNext())
@@ -1751,8 +1751,8 @@ public abstract class ImageReader
* @return a clipped rectangle
*/
protected static Rectangle getSourceRegion (ImageReadParam param,
- int srcWidth,
- int srcHeight)
+ int srcWidth,
+ int srcHeight)
{
Rectangle clippedRegion = new Rectangle (0, 0, srcWidth, srcHeight);
@@ -1870,7 +1870,7 @@ public abstract class ImageReader
* @exception IOException if a read error occurs
*/
public IIOImage readAll (int imageIndex,
- ImageReadParam param)
+ ImageReadParam param)
throws IOException
{
checkReadParamBandSettings (param,
@@ -1953,7 +1953,7 @@ public abstract class ImageReader
* @exception IOException if a read error occurs
*/
public RenderedImage readAsRenderedImage (int imageIndex,
- ImageReadParam param)
+ ImageReadParam param)
throws IOException
{
return read (imageIndex, param);
@@ -2033,4 +2033,3 @@ public abstract class ImageReader
clearAbortRequest ();
}
}
-
diff --git a/libjava/classpath/javax/imageio/ImageTranscoder.java b/libjava/classpath/javax/imageio/ImageTranscoder.java
index 1f9195f..352bb18 100644
--- a/libjava/classpath/javax/imageio/ImageTranscoder.java
+++ b/libjava/classpath/javax/imageio/ImageTranscoder.java
@@ -78,8 +78,8 @@ public interface ImageTranscoder
* is null
*/
IIOMetadata convertImageMetadata(IIOMetadata inData,
- ImageTypeSpecifier imageType,
- ImageWriteParam param);
+ ImageTypeSpecifier imageType,
+ ImageWriteParam param);
/**
* Converts IIOMetadata from an input stream format, returning an
@@ -98,5 +98,5 @@ public interface ImageTranscoder
* @exception IllegalArgumentException if inData is null
*/
IIOMetadata convertStreamMetadata(IIOMetadata inData,
- ImageWriteParam param);
+ ImageWriteParam param);
}
diff --git a/libjava/classpath/javax/imageio/ImageTypeSpecifier.java b/libjava/classpath/javax/imageio/ImageTypeSpecifier.java
index 3faa3c9..da22961 100644
--- a/libjava/classpath/javax/imageio/ImageTypeSpecifier.java
+++ b/libjava/classpath/javax/imageio/ImageTypeSpecifier.java
@@ -90,7 +90,7 @@ public class ImageTypeSpecifier
if (!colorModel.isCompatibleSampleModel(sampleModel))
throw new IllegalArgumentException
("sample Model not compatible with colorModel");
-
+
this.colorModel = colorModel;
this.sampleModel = sampleModel;
}
@@ -107,7 +107,7 @@ public class ImageTypeSpecifier
{
if (image == null)
throw new IllegalArgumentException("image may not be null");
-
+
this.colorModel = image.getColorModel();
this.sampleModel = image.getSampleModel();
}
@@ -324,11 +324,11 @@ public class ImageTypeSpecifier
* data type
*/
public static ImageTypeSpecifier createIndexed (byte[] redLUT,
- byte[] greenLUT,
- byte[] blueLUT,
- byte[] alphaLUT,
- int bits,
- int dataType)
+ byte[] greenLUT,
+ byte[] blueLUT,
+ byte[] alphaLUT,
+ int bits,
+ int dataType)
{
if (redLUT == null || greenLUT == null || blueLUT == null)
throw new IllegalArgumentException ("null colour table");
@@ -402,10 +402,10 @@ public class ImageTypeSpecifier
* one value of the given data type.
*
* @param colorSpace the color space to use in the color model
- * @param redMask the bitmask for the red bits
- * @param greenMask the bitmask for the green bits
- * @param blueMask the bitmask for the blue bits
- * @param alphaMask the bitmask for the alpha bits
+ * @param redMask the bitmask for the red bits
+ * @param greenMask the bitmask for the green bits
+ * @param blueMask the bitmask for the blue bits
+ * @param alphaMask the bitmask for the alpha bits
* @param transferType the data type used to store pixel values
* @param isAlphaPremultiplied true if other colour channels should
* be premultiplied by the alpha value, false otherwise
diff --git a/libjava/classpath/javax/imageio/ImageWriteParam.java b/libjava/classpath/javax/imageio/ImageWriteParam.java
index f4794a3..1c400e1 100644
--- a/libjava/classpath/javax/imageio/ImageWriteParam.java
+++ b/libjava/classpath/javax/imageio/ImageWriteParam.java
@@ -46,118 +46,118 @@ import java.util.Locale;
*/
public class ImageWriteParam extends IIOParam
{
-
- /**
+
+ /**
* Can be passed to setTilingMode, setProgressiveMode and
* setCompressionMode to disable feature.
*/
public static final int MODE_DISABLED = 0;
-
- /**
- * Can be passed to setTilingMode, setProgressiveMode and
+
+ /**
+ * Can be passed to setTilingMode, setProgressiveMode and
* setCompressionMode to enable feature.
*/
public static final int MODE_DEFAULT = 1;
-
- /**
+
+ /**
* Can be passed to setTilingMode, setCompressionMode to disable feature.
*/
public static final int MODE_EXPLICIT = 2;
-
- /**
- * Can be passed to setTilingMode, setProgressiveMode and
+
+ /**
+ * Can be passed to setTilingMode, setProgressiveMode and
* setCompressionMode to enable feature.
*/
public static final int MODE_COPY_FROM_METADATA = 3;
-
+
/**
* True if tiling grid offset parameters can be set.
*/
protected boolean canOffsetTiles;
-
+
/**
* True if this writer can write images using compression.
*/
protected boolean canWriteCompressed;
-
+
/**
* True if images can be written as a progressive sequence
* of increasing quality.
*/
protected boolean canWriteProgressive;
-
+
/**
* True if tile width and height parameters can be set.
*/
protected boolean canWriteTiles;
-
+
/**
* Controls compression settings, which must be set to one of the four
* MODE_* values.
*/
protected int compressionMode = MODE_COPY_FROM_METADATA;
-
+
/**
* Contains the current compression quality setting.
*/
protected float compressionQuality;
-
+
/**
* Contains the name of the current compression type.
*/
protected String compressionType;
-
+
/**
* Array of the names of the available compression types.
*/
protected String[] compressionTypes;
-
+
/**
* Localizes compression type names and quality descriptions,
* or null to use default Locale.
*/
protected Locale locale;
-
+
/**
* Preferred tile size range pairs.
*/
protected Dimension[] preferredTileSizes;
-
+
/**
* The mode controlling progressive encoding, which must
* be set to one of the four MODE_* values, except
* MODE_EXPLICIT.
*/
protected int progressiveMode = MODE_COPY_FROM_METADATA;
-
+
/**
* The amount by which the tile grid origin should be offset
* horizontally from the image origin if tiling has been set.
*/
protected int tileGridXOffset;
-
+
/**
* The amount by which the tile grid origin should be offset
* vertically from the image origin if tiling has been set.
*/
protected int tileGridYOffset;
-
+
/**
* The height of each tile if tiling has been set.
*/
protected int tileHeight;
-
+
/**
* The width of each tile if tiling has been set.
*/
protected int tileWidth;
-
+
/**
* The mode controlling tiling settings, which must be
* set to one of the four MODE_* values.
*/
protected int tilingMode;
-
+
/**
* True if the tiling parameters have been specified.
*/
@@ -201,11 +201,11 @@ public class ImageWriteParam extends IIOParam
if (getCompressionMode() != MODE_EXPLICIT)
throw new IllegalStateException("compression mode is not MODE_EXPLICIT");
}
-
+
private void checkCompressionTypesSet()
{
if (getCompressionType() == null
- && getCompressionTypes() != null)
+ && getCompressionTypes() != null)
throw new IllegalStateException("no compression type set");
}
@@ -213,9 +213,9 @@ public class ImageWriteParam extends IIOParam
{
if (! canWriteProgressive())
throw new UnsupportedOperationException
- ("progressive output not supported");
+ ("progressive output not supported");
}
-
+
private void checkSupportsTiling()
{
if (! canWriteTiles())
@@ -279,7 +279,7 @@ public class ImageWriteParam extends IIOParam
{
checkNotExplicitCompression();
checkCompressionTypesSet();
-
+
return null;
}
@@ -287,7 +287,7 @@ public class ImageWriteParam extends IIOParam
{
checkNotExplicitCompression();
checkCompressionTypesSet();
-
+
return null;
}
@@ -383,9 +383,9 @@ public class ImageWriteParam extends IIOParam
{
checkSupportsCompression();
checkMode(mode);
-
+
compressionMode = mode;
-
+
if (mode == MODE_EXPLICIT)
unsetCompression();
}
@@ -409,17 +409,17 @@ public class ImageWriteParam extends IIOParam
if (types == null)
throw new UnsupportedOperationException("no settable compression types");
-
+
if (compressionType == null)
this.compressionType = null;
for (int i = types.length - 1; i >= 0; --i)
if (types[i].equals(compressionType))
- {
- this.compressionType = compressionType;
- return;
- }
-
+ {
+ this.compressionType = compressionType;
+ return;
+ }
+
throw new IllegalArgumentException("unknown compression type");
}
@@ -427,18 +427,18 @@ public class ImageWriteParam extends IIOParam
{
checkSupportsProgressiveEncoding();
checkMode(mode);
-
+
progressiveMode = mode;
}
public void setTiling(int tileWidth, int tileHeight,
- int tileGridXOffset, int tileGridYOffset)
+ int tileGridXOffset, int tileGridYOffset)
{
checkNotExplicitTiling();
if (! canOffsetTiles
- && tileGridXOffset != 0
- && tileGridYOffset != 0)
+ && tileGridXOffset != 0
+ && tileGridYOffset != 0)
throw new UnsupportedOperationException("tile offsets not supported");
if (tileWidth < 0 || tileHeight < 0)
@@ -446,18 +446,18 @@ public class ImageWriteParam extends IIOParam
if (preferredTileSizes != null)
{
- boolean found = false;
-
- for (int i = 0; i < preferredTileSizes.length; i += 2)
- {
- if (tileWidth >= preferredTileSizes[i].width
- && tileWidth <= preferredTileSizes[i + 1].width
- && tileHeight >= preferredTileSizes[i].height
- && tileHeight <= preferredTileSizes[i + 1].height)
- found = true;
- }
-
- if (! found)
+ boolean found = false;
+
+ for (int i = 0; i < preferredTileSizes.length; i += 2)
+ {
+ if (tileWidth >= preferredTileSizes[i].width
+ && tileWidth <= preferredTileSizes[i + 1].width
+ && tileHeight >= preferredTileSizes[i].height
+ && tileHeight <= preferredTileSizes[i + 1].height)
+ found = true;
+ }
+
+ if (! found)
throw new IllegalArgumentException("illegal tile size");
}
@@ -478,7 +478,7 @@ public class ImageWriteParam extends IIOParam
public void unsetCompression()
{
checkNotExplicitCompression();
-
+
compressionType = null;
compressionQuality = 1.0F;
}
@@ -486,7 +486,7 @@ public class ImageWriteParam extends IIOParam
public void unsetTiling()
{
checkNotExplicitTiling();
-
+
tileWidth = 0;
tileHeight = 0;
tileGridXOffset = 0;
diff --git a/libjava/classpath/javax/imageio/ImageWriter.java b/libjava/classpath/javax/imageio/ImageWriter.java
index 78d792c..7a7f45e 100644
--- a/libjava/classpath/javax/imageio/ImageWriter.java
+++ b/libjava/classpath/javax/imageio/ImageWriter.java
@@ -76,7 +76,7 @@ public abstract class ImageWriter
implements ImageTranscoder
{
private boolean aborted;
-
+
/**
* All locales available for localization of warning messages, or
* null if localization is not supported.
@@ -138,7 +138,7 @@ public abstract class ImageWriter
if (output == null)
throw new IllegalStateException("no output set");
}
-
+
/**
* Request that writing be aborted. The unwritten portions of the
* destination image will be undefined.
@@ -392,8 +392,8 @@ public abstract class ImageWriter
* is null
*/
public abstract IIOMetadata convertImageMetadata (IIOMetadata inData,
- ImageTypeSpecifier imageType,
- ImageWriteParam param);
+ ImageTypeSpecifier imageType,
+ ImageWriteParam param);
/**
* Convert IIOMetadata from an input stream format, returning an
@@ -412,7 +412,7 @@ public abstract class ImageWriter
* @exception IllegalArgumentException if inData is null
*/
public abstract IIOMetadata convertStreamMetadata (IIOMetadata inData,
- ImageWriteParam param);
+ ImageWriteParam param);
/**
* Releases any resources allocated to this object. Subsequent
@@ -425,7 +425,7 @@ public abstract class ImageWriter
{
// The default implementation is empty. Subclasses have to overwrite it.
}
-
+
/**
* Retrieve the available locales. Return null if no locales are
* available or a clone of availableLocales.
@@ -504,7 +504,7 @@ public abstract class ImageWriter
*/
public int getNumThumbnailsSupported (ImageTypeSpecifier imageType,
ImageWriteParam param,
- IIOMetadata streamMetadata,
+ IIOMetadata streamMetadata,
IIOMetadata imageMetadata)
{
return 0;
@@ -553,9 +553,9 @@ public abstract class ImageWriter
* if the size is unknown (insufficient information was provided)
*/
public Dimension[] getPreferredThumbnailSizes (ImageTypeSpecifier imageType,
- ImageWriteParam param,
- IIOMetadata streamMetadata,
- IIOMetadata imageMetadata)
+ ImageWriteParam param,
+ IIOMetadata streamMetadata,
+ IIOMetadata imageMetadata)
{
return null;
}
@@ -568,14 +568,14 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.imageComplete(this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.imageComplete(this);
+ }
}
}
@@ -591,14 +591,14 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.imageProgress(this, percentageDone);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.imageProgress(this, percentageDone);
+ }
}
}
@@ -614,14 +614,14 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.imageStarted(this, imageIndex);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.imageStarted(this, imageIndex);
+ }
}
}
@@ -634,14 +634,14 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.thumbnailComplete(this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.thumbnailComplete(this);
+ }
}
}
@@ -657,14 +657,14 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.thumbnailProgress(this, percentageDone);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.thumbnailProgress(this, percentageDone);
+ }
}
}
@@ -682,14 +682,14 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.thumbnailStarted(this, imageIndex, thumbnailIndex);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.thumbnailStarted(this, imageIndex, thumbnailIndex);
+ }
}
}
@@ -707,14 +707,14 @@ public abstract class ImageWriter
{
if (warningListeners != null)
{
- Iterator it = warningListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteWarningListener listener =
- (IIOWriteWarningListener) it.next();
- listener.warningOccurred(this, imageIndex, warning);
- }
+ Iterator it = warningListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteWarningListener listener =
+ (IIOWriteWarningListener) it.next();
+ listener.warningOccurred(this, imageIndex, warning);
+ }
}
}
@@ -741,8 +741,8 @@ public abstract class ImageWriter
* not a String
*/
protected void processWarningOccurred(int imageIndex,
- String baseName,
- String keyword)
+ String baseName,
+ String keyword)
{
if (baseName == null || keyword == null)
throw new IllegalArgumentException ("null argument");
@@ -751,22 +751,22 @@ public abstract class ImageWriter
try
{
- b = ResourceBundle.getBundle(baseName, getLocale());
+ b = ResourceBundle.getBundle(baseName, getLocale());
}
catch (MissingResourceException e)
{
- throw new IllegalArgumentException ("no resource bundle found");
+ throw new IllegalArgumentException ("no resource bundle found");
}
Object str = null;
try
{
- str = b.getObject(keyword);
+ str = b.getObject(keyword);
}
catch (MissingResourceException e)
{
- throw new IllegalArgumentException ("no results found for keyword");
+ throw new IllegalArgumentException ("no results found for keyword");
}
if (! (str instanceof String))
@@ -776,14 +776,14 @@ public abstract class ImageWriter
if (warningListeners != null)
{
- Iterator it = warningListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteWarningListener listener =
- (IIOWriteWarningListener) it.next();
- listener.warningOccurred(this, imageIndex, warning);
- }
+ Iterator it = warningListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteWarningListener listener =
+ (IIOWriteWarningListener) it.next();
+ listener.warningOccurred(this, imageIndex, warning);
+ }
}
}
@@ -791,18 +791,18 @@ public abstract class ImageWriter
* Notifies all installed write progress listeners that image
* loading has been aborted by calling their writeAborted methods.
*/
- protected void processWriteAborted()
+ protected void processWriteAborted()
{
if (progressListeners != null)
{
- Iterator it = progressListeners.iterator();
-
- while (it.hasNext())
- {
- IIOWriteProgressListener listener =
- (IIOWriteProgressListener) it.next();
- listener.writeAborted(this);
- }
+ Iterator it = progressListeners.iterator();
+
+ while (it.hasNext())
+ {
+ IIOWriteProgressListener listener =
+ (IIOWriteProgressListener) it.next();
+ listener.writeAborted(this);
+ }
}
}
@@ -813,7 +813,7 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- progressListeners.clear();
+ progressListeners.clear();
}
}
@@ -824,7 +824,7 @@ public abstract class ImageWriter
{
if (progressListeners != null)
{
- progressListeners.clear();
+ progressListeners.clear();
}
}
@@ -839,7 +839,7 @@ public abstract class ImageWriter
return;
if (progressListeners != null)
{
- progressListeners.remove(listener);
+ progressListeners.remove(listener);
}
}
/**
@@ -853,7 +853,7 @@ public abstract class ImageWriter
return;
if (warningListeners != null)
{
- warningListeners.remove(listener);
+ warningListeners.remove(listener);
}
}
/**
@@ -867,7 +867,7 @@ public abstract class ImageWriter
removeAllIIOWriteProgressListeners();
clearAbortRequest();
}
-
+
/**
* Set the current locale or use the default locale.
*
@@ -877,16 +877,16 @@ public abstract class ImageWriter
{
if (locale != null)
{
- // Check if its a valid locale.
- boolean found = false;
+ // Check if its a valid locale.
+ boolean found = false;
- if (availableLocales != null)
- for (int i = availableLocales.length - 1; i >= 0; --i)
- if (availableLocales[i].equals(locale))
- found = true;
+ if (availableLocales != null)
+ for (int i = availableLocales.length - 1; i >= 0; --i)
+ if (availableLocales[i].equals(locale))
+ found = true;
- if (! found)
- throw new IllegalArgumentException("looale not available");
+ if (! found)
+ throw new IllegalArgumentException("looale not available");
}
this.locale = locale;
@@ -908,20 +908,20 @@ public abstract class ImageWriter
{
if (output != null)
{
- // Check if its a valid output object.
- boolean found = false;
- Class[] types = null;
-
- if (originatingProvider != null)
- types = originatingProvider.getOutputTypes();
-
- if (types != null)
- for (int i = types.length - 1; i >= 0; --i)
+ // Check if its a valid output object.
+ boolean found = false;
+ Class[] types = null;
+
+ if (originatingProvider != null)
+ types = originatingProvider.getOutputTypes();
+
+ if (types != null)
+ for (int i = types.length - 1; i >= 0; --i)
if (types[i].isInstance(output))
found = true;
- if (! found)
- throw new IllegalArgumentException("output type not available");
+ if (! found)
+ throw new IllegalArgumentException("output type not available");
}
this.output = output;
diff --git a/libjava/classpath/javax/imageio/event/IIOReadProgressListener.java b/libjava/classpath/javax/imageio/event/IIOReadProgressListener.java
index 404336c..0eea610 100644
--- a/libjava/classpath/javax/imageio/event/IIOReadProgressListener.java
+++ b/libjava/classpath/javax/imageio/event/IIOReadProgressListener.java
@@ -46,7 +46,7 @@ public interface IIOReadProgressListener extends EventListener
{
/**
* Reports that the current image read operation has completed.
- *
+ *
* @param source the ImageReader object calling this method
*/
void imageComplete(ImageReader source);
@@ -54,7 +54,7 @@ public interface IIOReadProgressListener extends EventListener
/**
* Reports the approximate percentage of completions of this image read
* operation.
- *
+ *
* @param source the ImageReader object calling this method
* @param percentageDone the approximate percentage of encoding completed
*/
@@ -62,7 +62,7 @@ public interface IIOReadProgressListener extends EventListener
/**
* Reports that the current image read operation has started.
- *
+ *
* @param source the ImageReader object calling this method
* @param imageIndex the index of the image to read
*/
@@ -70,21 +70,21 @@ public interface IIOReadProgressListener extends EventListener
/**
* Reports that a read operation has been aborted.
- *
+ *
* @param source the ImageReader object calling this method
*/
void readAborted(ImageReader source);
/**
* Reports that a sequence of read operationshas completed.
- *
+ *
* @param source the ImageReader object calling this method
*/
void sequenceComplete(ImageReader source);
/**
* Reports that a sequence of read operations is beginning.
- *
+ *
* @param source the ImageReader object calling this method
* @param minIndex the index of the first image to be read
*/
@@ -92,7 +92,7 @@ public interface IIOReadProgressListener extends EventListener
/**
* Reports that a thumbnail read operation has completed.
- *
+ *
* @param source the ImageReader object calling this method
*/
void thumbnailComplete(ImageReader source);
@@ -100,7 +100,7 @@ public interface IIOReadProgressListener extends EventListener
/**
* Reports the approximate percentage of completion of a thumbnail read
* operation.
- *
+ *
* @param source the ImageReader object calling this method
* @param percentageDone the approximate percentage of encoding completed
*/
@@ -108,7 +108,7 @@ public interface IIOReadProgressListener extends EventListener
/**
* Reports that a thumbnail read operation is beginning.
- *
+ *
* @param source the ImageReader object calling this method
* @param imageIndex the index of the image being read
* @param thumbnailIndex the index of the thumbnail being read
diff --git a/libjava/classpath/javax/imageio/event/IIOReadUpdateListener.java b/libjava/classpath/javax/imageio/event/IIOReadUpdateListener.java
index 77b1a4e..a20a99e 100644
--- a/libjava/classpath/javax/imageio/event/IIOReadUpdateListener.java
+++ b/libjava/classpath/javax/imageio/event/IIOReadUpdateListener.java
@@ -47,7 +47,7 @@ public interface IIOReadUpdateListener extends EventListener
{
/**
* Reports that a given region of the image has been updated.
- *
+ *
* @param source the ImageReader object calling this method
* @param image the BufferedImage being updated
* @param minX the X coordinate of the leftmost updated column of pixels
@@ -64,7 +64,7 @@ public interface IIOReadUpdateListener extends EventListener
/**
* Reports that the current read operation has completed a progressive pass.
- *
+ *
* @param source the ImageReader object calling this method
* @param image the BufferedImage being updated
*/
@@ -72,7 +72,7 @@ public interface IIOReadUpdateListener extends EventListener
/**
* Reports that the current read operation is about to begin a progressive pass.
- *
+ *
* @param source the ImageReader object calling this method
* @param image the BufferedImage being updated
* @param pass the numer of the pass that is about to begin, starting with 0
@@ -90,7 +90,7 @@ public interface IIOReadUpdateListener extends EventListener
/**
* Reports that the current thumbnail read operation has completed a progressive pass.
- *
+ *
* @param source the ImageReader object calling this method
* @param image the BufferedImage being updated
*/
@@ -98,7 +98,7 @@ public interface IIOReadUpdateListener extends EventListener
/**
* Reports that the current thumbnail read operation is about to begin a progressive pass.
- *
+ *
* @param source the ImageReader object calling this method
* @param image the BufferedImage being updated
* @param pass the numer of the pass that is about to begin, starting with 0
diff --git a/libjava/classpath/javax/imageio/event/IIOWriteProgressListener.java b/libjava/classpath/javax/imageio/event/IIOWriteProgressListener.java
index 16b8891..d759762 100644
--- a/libjava/classpath/javax/imageio/event/IIOWriteProgressListener.java
+++ b/libjava/classpath/javax/imageio/event/IIOWriteProgressListener.java
@@ -46,7 +46,7 @@ public interface IIOWriteProgressListener extends EventListener
{
/**
* Reports that an image write operation has completed.
- *
+ *
* @param source the ImageWriter object calling this method
*/
void imageComplete(ImageWriter source);
@@ -54,7 +54,7 @@ public interface IIOWriteProgressListener extends EventListener
/**
* Reports the approximate percentage of completion of an image write
* operation.
- *
+ *
* @param source the ImageWriter object calling this method
* @param percentageDone the approximate percentage of decoding completed
*/
@@ -62,7 +62,7 @@ public interface IIOWriteProgressListener extends EventListener
/**
* Reports that a thumbnail write operation has started.
- *
+ *
* @param source the ImageWriter object calling this method
* @param imageIndex the index of the image being written
*/
@@ -70,7 +70,7 @@ public interface IIOWriteProgressListener extends EventListener
/**
* Reports that a thumbnail write operation has completed.
- *
+ *
* @param source the ImageWriter object calling this method
*/
void thumbnailComplete(ImageWriter source);
@@ -78,7 +78,7 @@ public interface IIOWriteProgressListener extends EventListener
/**
* Reports the approximate percentage of completion of a thumbnail write
* operation.
- *
+ *
* @param source the ImageWriter object calling this method
* @param percentageDone the approximate percentage of decoding completed
*/
@@ -86,7 +86,7 @@ public interface IIOWriteProgressListener extends EventListener
/**
* Reports that a thumbnail write operation is beginning.
- *
+ *
* @param source the ImageWriter object calling this method
* @param imageIndex the index of the image being written
* @param thumnailIndex the index of the thumbnail being written
@@ -95,7 +95,7 @@ public interface IIOWriteProgressListener extends EventListener
/**
* Reports that an image write operation is aborted.
- *
+ *
* @param source the ImageWriter object calling this method
*/
void writeAborted(ImageWriter source);
diff --git a/libjava/classpath/javax/imageio/metadata/IIOInvalidTreeException.java b/libjava/classpath/javax/imageio/metadata/IIOInvalidTreeException.java
index 18d5bf6..b79b8cf 100644
--- a/libjava/classpath/javax/imageio/metadata/IIOInvalidTreeException.java
+++ b/libjava/classpath/javax/imageio/metadata/IIOInvalidTreeException.java
@@ -55,7 +55,7 @@ public class IIOInvalidTreeException extends IIOException
}
public IIOInvalidTreeException(String message, Throwable cause,
- Node offendingNode)
+ Node offendingNode)
{
super(message, cause);
this.offendingNode = offendingNode;
diff --git a/libjava/classpath/javax/imageio/metadata/IIOMetadata.java b/libjava/classpath/javax/imageio/metadata/IIOMetadata.java
index e5105de..b898b99 100644
--- a/libjava/classpath/javax/imageio/metadata/IIOMetadata.java
+++ b/libjava/classpath/javax/imageio/metadata/IIOMetadata.java
@@ -162,39 +162,39 @@ public abstract class IIOMetadata
{
if (formatName == null)
throw new IllegalArgumentException("formatName may not be null");
-
+
String formatClassName = null;
if (isStandardMetadataFormatSupported()
- && formatName.equals(nativeMetadataFormatName))
+ && formatName.equals(nativeMetadataFormatName))
formatClassName = nativeMetadataFormatClassName;
else
{
- String[] extraFormatNames = getExtraMetadataFormatNames();
-
- for (int i = extraFormatNames.length - 1; i >= 0; --i)
- if (extraFormatNames[i].equals(formatName))
- {
- formatClassName = extraFormatNames[i];
- break;
- }
+ String[] extraFormatNames = getExtraMetadataFormatNames();
+
+ for (int i = extraFormatNames.length - 1; i >= 0; --i)
+ if (extraFormatNames[i].equals(formatName))
+ {
+ formatClassName = extraFormatNames[i];
+ break;
+ }
}
if (formatClassName == null)
throw new IllegalArgumentException("unknown format");
IIOMetadataFormat format;
-
+
try
{
- format = (IIOMetadataFormat) Class.forName(formatClassName)
- .newInstance();
+ format = (IIOMetadataFormat) Class.forName(formatClassName)
+ .newInstance();
}
catch (Exception e)
{
- IllegalStateException ise = new IllegalStateException();
- ise.initCause(e);
- throw ise;
+ IllegalStateException ise = new IllegalStateException();
+ ise.initCause(e);
+ throw ise;
}
return format;
@@ -203,18 +203,18 @@ public abstract class IIOMetadata
public String[] getMetadataFormatNames()
{
String[] formatNames = getExtraMetadataFormatNames();
-
+
if (isStandardMetadataFormatSupported())
{
// Combine native metadata format name and extra metadata format names
- // into one String array.
- String[] tmp = new String[formatNames.length + 1];
- tmp[0] = getNativeMetadataFormatName();
+ // into one String array.
+ String[] tmp = new String[formatNames.length + 1];
+ tmp[0] = getNativeMetadataFormatName();
- for (int i = 1; i < tmp.length; ++i)
- tmp[i] = formatNames[i - 1];
+ for (int i = 1; i < tmp.length; ++i)
+ tmp[i] = formatNames[i - 1];
- formatNames = tmp;
+ formatNames = tmp;
}
return formatNames;
@@ -287,7 +287,7 @@ public abstract class IIOMetadata
}
private void appendChild (IIOMetadataNode node,
- IIOMetadataNode child)
+ IIOMetadataNode child)
{
if (child != null)
node.appendChild(child);
diff --git a/libjava/classpath/javax/imageio/metadata/IIOMetadataFormatImpl.java b/libjava/classpath/javax/imageio/metadata/IIOMetadataFormatImpl.java
index 444497d..efea723 100644
--- a/libjava/classpath/javax/imageio/metadata/IIOMetadataFormatImpl.java
+++ b/libjava/classpath/javax/imageio/metadata/IIOMetadataFormatImpl.java
@@ -88,18 +88,18 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
protected String defaultValue;
public IIOMetadataNodeAttr (Element owner,
- String name,
- String defaultValue)
+ String name,
+ String defaultValue)
{
this (owner, name, IIOMetadataFormat.DATATYPE_STRING,
true, defaultValue);
}
public IIOMetadataNodeAttr (Element owner,
- String name,
- int dataType,
- boolean required,
- String defaultValue)
+ String name,
+ int dataType,
+ boolean required,
+ String defaultValue)
{
this.owner = owner;
this.name = name;
@@ -160,11 +160,11 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
protected List enumeratedValues;
public IIOMetadataNodeAttrEnumerated (Element owner,
- String name,
- int dataType,
- boolean required,
- String defaultValue,
- List enumeratedValues)
+ String name,
+ int dataType,
+ boolean required,
+ String defaultValue,
+ List enumeratedValues)
{
super (owner, name, dataType, required, defaultValue);
this.enumeratedValues = new ArrayList (enumeratedValues);
@@ -184,14 +184,14 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
protected boolean maxInclusive;
public IIOMetadataNodeAttrBounded (Element owner,
- String name,
- int dataType,
- boolean required,
- String defaultValue,
- String minValue,
- String maxValue,
- boolean minInclusive,
- boolean maxInclusive)
+ String name,
+ int dataType,
+ boolean required,
+ String defaultValue,
+ String minValue,
+ String maxValue,
+ boolean minInclusive,
+ boolean maxInclusive)
{
super (owner, name, dataType, required, defaultValue);
this.minValue = minValue;
@@ -217,11 +217,11 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
protected int listMaxLength;
public IIOMetadataNodeAttrList (Element owner,
- String name,
- int dataType,
- boolean required,
- int listMinLength,
- int listMaxLength)
+ String name,
+ int dataType,
+ boolean required,
+ int listMinLength,
+ int listMaxLength)
{
super (owner, name, dataType, required, null);
this.listMinLength = listMinLength;
@@ -398,8 +398,8 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
throw new IllegalArgumentException ("null argument");
if (childPolicy < IIOMetadataFormat.CHILD_POLICY_ALL
- || childPolicy > IIOMetadataFormat.CHILD_POLICY_SOME
- || childPolicy == IIOMetadataFormat.CHILD_POLICY_REPEAT)
+ || childPolicy > IIOMetadataFormat.CHILD_POLICY_SOME
+ || childPolicy == IIOMetadataFormat.CHILD_POLICY_REPEAT)
throw new IllegalArgumentException ("wrong child policy");
nodes.put (rootName, new IIOMetadataNode (rootName));
@@ -423,8 +423,8 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
* zero or greater than maxChildren
*/
public IIOMetadataFormatImpl (String rootName,
- int minChildren,
- int maxChildren)
+ int minChildren,
+ int maxChildren)
{
if (rootName == null)
throw new IllegalArgumentException ("null argument");
@@ -446,10 +446,10 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
node.setAttributeNode (new IIOMetadataNodeAttr (node,
- attrName,
- dataType,
- required,
- defaultValue));
+ attrName,
+ dataType,
+ required,
+ defaultValue));
}
protected void addAttribute (String elementName,
@@ -461,11 +461,11 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
node.setAttributeNode (new IIOMetadataNodeAttrEnumerated (node,
- attrName,
- dataType,
- required,
- defaultValue,
- enumeratedValues));
+ attrName,
+ dataType,
+ required,
+ defaultValue,
+ enumeratedValues));
}
protected void addAttribute (String elementName,
@@ -480,14 +480,14 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
node.setAttributeNode (new IIOMetadataNodeAttrBounded (node,
- attrName,
- dataType,
- required,
- defaultValue,
- minValue,
- maxValue,
- minInclusive,
- maxInclusive));
+ attrName,
+ dataType,
+ required,
+ defaultValue,
+ minValue,
+ maxValue,
+ minInclusive,
+ maxInclusive));
}
protected void addAttribute (String elementName,
@@ -499,11 +499,11 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
{
IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName);
node.setAttributeNode (new IIOMetadataNodeAttrList (node,
- attrName,
- dataType,
- required,
- listMinLength,
- listMaxLength));
+ attrName,
+ dataType,
+ required,
+ listMinLength,
+ listMaxLength));
}
protected void addBooleanAttribute (String elementName,
@@ -518,11 +518,11 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat
enumeratedValues.add ("FALSE");
node.setAttributeNode (new IIOMetadataNodeAttrEnumerated (node,
- attrName,
- IIOMetadataFormat.DATATYPE_BOOLEAN,
- hasDefaultValue,
- defaultValue ? "TRUE" : "FALSE",
- enumeratedValues));
+ attrName,
+ IIOMetadataFormat.DATATYPE_BOOLEAN,
+ hasDefaultValue,
+ defaultValue ? "TRUE" : "FALSE",
+ enumeratedValues));
}
protected void addChildElement (String elementName, String parentName)
diff --git a/libjava/classpath/javax/imageio/metadata/IIOMetadataNode.java b/libjava/classpath/javax/imageio/metadata/IIOMetadataNode.java
index 37269f5..db3de23 100644
--- a/libjava/classpath/javax/imageio/metadata/IIOMetadataNode.java
+++ b/libjava/classpath/javax/imageio/metadata/IIOMetadataNode.java
@@ -165,7 +165,7 @@ public class IIOMetadataNode
private class IIONodeList implements NodeList
{
List children = new ArrayList();
-
+
/* (non-Javadoc)
* @see org.w3c.dom.NodeList#item(int)
*/
@@ -187,7 +187,7 @@ public class IIOMetadataNode
{
// Do nothing here.
}
-
+
public IIOMetadataNode(String nodename)
{
name = nodename;
@@ -202,7 +202,7 @@ public class IIOMetadataNode
{
obj = o;
}
-
+
public short compareDocumentPosition(Node other)
throws DOMException
{
@@ -260,7 +260,7 @@ public class IIOMetadataNode
getElementsRecurse(list, name);
}
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#getElementsByTagName(java.lang.String)
*/
@@ -280,7 +280,7 @@ public class IIOMetadataNode
getElementsRecurse(list, name);
return list;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#getTagName()
*/
@@ -288,7 +288,7 @@ public class IIOMetadataNode
{
return name;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#hasAttribute(java.lang.String)
*/
@@ -296,7 +296,7 @@ public class IIOMetadataNode
{
return attrs.containsKey(name);
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#hasAttributeNS(java.lang.String, java.lang.String)
*/
@@ -304,7 +304,7 @@ public class IIOMetadataNode
{
return attrs.containsKey(localName);
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#removeAttribute(java.lang.String)
*/
@@ -320,7 +320,7 @@ public class IIOMetadataNode
{
return (Attr)attrs.remove(oldAttr.getName());
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#removeAttributeNS(java.lang.String, java.lang.String)
*/
@@ -328,7 +328,7 @@ public class IIOMetadataNode
{
removeAttribute(localName);
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#setAttribute(java.lang.String, java.lang.String)
*/
@@ -340,7 +340,7 @@ public class IIOMetadataNode
else
attrs.put(name, new IIOMetadataNodeAttr(this, name, value));
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#setAttributeNode(org.w3c.dom.Attr)
*/
@@ -348,7 +348,7 @@ public class IIOMetadataNode
{
return (Attr)attrs.put(newAttr.getName(), newAttr);
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#setAttributeNodeNS(org.w3c.dom.Attr)
*/
@@ -356,15 +356,15 @@ public class IIOMetadataNode
{
return (Attr)attrs.put(newAttr.getName(), newAttr);
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Element#setAttributeNS(java.lang.String, java.lang.String, java.lang.String)
*/
public void setAttributeNS(String namespaceURI, String qualifiedName, String value)
{
- setAttribute(qualifiedName, value);
+ setAttribute(qualifiedName, value);
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.NodeList#getLength()
*/
@@ -372,7 +372,7 @@ public class IIOMetadataNode
{
return children.size();
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.NodeList#item(int)
*/
@@ -383,7 +383,7 @@ public class IIOMetadataNode
else
return null;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#appendChild(org.w3c.dom.Node)
*/
@@ -391,9 +391,9 @@ public class IIOMetadataNode
{
if (newChild == null)
throw new IllegalArgumentException("Child node is null");
-
+
IIOMetadataNode child = (IIOMetadataNode) newChild;
-
+
children.add(child);
child.parent = this;
return this;
@@ -412,7 +412,7 @@ public class IIOMetadataNode
for (int i=0; i < children.size(); i++)
newnode.children.add(((Node)children.get(i)).cloneNode(deep));
}
-
+
// clone attrs
for (Iterator it = attrs.values().iterator(); it.hasNext();)
{
@@ -452,7 +452,7 @@ public class IIOMetadataNode
{
return (children.size() > 0) ? (Node)children.get(0) : null;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#getLastChild()
*/
@@ -469,7 +469,7 @@ public class IIOMetadataNode
{
return name;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#getNamespaceURI()
*/
@@ -477,7 +477,7 @@ public class IIOMetadataNode
{
return null;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#getNextSibling()
*/
@@ -497,7 +497,7 @@ public class IIOMetadataNode
{
return name;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#getNodeType()
*/
@@ -530,7 +530,7 @@ public class IIOMetadataNode
{
return parent;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#getPrefix()
*/
@@ -538,7 +538,7 @@ public class IIOMetadataNode
{
return null;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#getPreviousSibling()
*/
@@ -566,7 +566,7 @@ public class IIOMetadataNode
{
return null;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#hasAttributes()
*/
@@ -574,7 +574,7 @@ public class IIOMetadataNode
{
return !attrs.isEmpty();
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#hasChildNodes()
*/
@@ -590,14 +590,14 @@ public class IIOMetadataNode
{
if (newChild == null)
throw new IllegalArgumentException();
-
+
int idx = children.indexOf(refChild);
if (idx == -1)
children.add(newChild);
else
children.add(idx, newChild);
((IIOMetadataNode)newChild).parent = this;
-
+
return newChild;
}
@@ -610,12 +610,12 @@ public class IIOMetadataNode
{
return true;
}
-
+
public boolean isSameNode(Node other)
{
return this == other;
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#isSupported(java.lang.String, java.lang.String)
*/
@@ -624,12 +624,12 @@ public class IIOMetadataNode
// No DOM features are supported
return false;
}
-
+
public String lookupNamespaceURI(String prefix)
{
return null;
}
-
+
public String lookupPrefix(String namespaceURI)
{
return null;
@@ -667,7 +667,7 @@ public class IIOMetadataNode
((IIOMetadataNode)oldChild).parent = null;
return oldChild;
}
-
+
public void setIdAttribute(String name, boolean isId)
throws DOMException
{
@@ -682,14 +682,14 @@ public class IIOMetadataNode
throws DOMException
{
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#setNodeValue(java.lang.String)
*/
public void setNodeValue(String nodeValue) throws DOMException
{
}
-
+
/* (non-Javadoc)
* @see org.w3c.dom.Node#setPrefix(java.lang.String)
*/
@@ -701,7 +701,7 @@ public class IIOMetadataNode
throws DOMException
{
}
-
+
public Object setUserData(String key, Object data, UserDataHandler handler)
{
return null;
diff --git a/libjava/classpath/javax/imageio/plugins/bmp/BMPImageWriteParam.java b/libjava/classpath/javax/imageio/plugins/bmp/BMPImageWriteParam.java
index de59efb..cc0e0d3 100644
--- a/libjava/classpath/javax/imageio/plugins/bmp/BMPImageWriteParam.java
+++ b/libjava/classpath/javax/imageio/plugins/bmp/BMPImageWriteParam.java
@@ -1,4 +1,4 @@
-/* BMPImageWriteParam.java --
+/* BMPImageWriteParam.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,25 +43,25 @@ import java.util.Locale;
import javax.imageio.ImageWriteParam;
/**
- * A class to encode images in the BMP format.
+ * A class to encode images in the BMP format.
* By default, the data layout is bottom-up, such that the pixels are stored in
- * bottom-up order.
- *
- * The compression scheme can be specified by using setCompressionType()
+ * bottom-up order.
+ *
+ * The compression scheme can be specified by using setCompressionType()
* appropriate type string. The compression scheme specified will be honored
- * if it is compatible with the type of image being written. If the
+ * if it is compatible with the type of image being written. If the
* compression scheme is not compatible with the type of image being written,
- * then an IOException will be thrown by the BMP image writer. If the
+ * then an IOException will be thrown by the BMP image writer. If the
* compression type is not set, then getCompressionType() will return null.
- * In this case the BMP image writer will select a compression type that
- * supports encoding of the given image without loss of the color resolution.
- *
- * The compression type strings and the image type each supports are:
- * Uncompressed RLE: BI_RGB, image type: <= 8-bits/sample.
- * 8-bit Run Length Encoding: BI_RLE8, image type: <= 8-bits/sample
- * 4-bit Run Length Encoding: BI_RLE4, image type: <= 4-bits/sample
+ * In this case the BMP image writer will select a compression type that
+ * supports encoding of the given image without loss of the color resolution.
+ *
+ * The compression type strings and the image type each supports are:
+ * Uncompressed RLE: BI_RGB, image type: <= 8-bits/sample.
+ * 8-bit Run Length Encoding: BI_RLE8, image type: <= 8-bits/sample
+ * 4-bit Run Length Encoding: BI_RLE4, image type: <= 4-bits/sample
* Packed data: BI_BITFIELDS, image type: 16 or 32 bits/sample
- *
+ *
* @author Lillian Angel (langel at redhat dot com)
*/
public class BMPImageWriteParam
@@ -72,7 +72,7 @@ public class BMPImageWriteParam
* This boolean is true if the data will be written in a topdown manner.
*/
private boolean topDown;
-
+
/**
* Compression type strings.
*/
@@ -80,7 +80,7 @@ public class BMPImageWriteParam
String rle8 = "BI_RLE8";
String rle4 = "BI_RLE4";
String bitfields = "BI_BITFIELDS";
-
+
/**
* Constants to represent image types.
*/
@@ -88,7 +88,7 @@ public class BMPImageWriteParam
static final int BI_RLE8 = 1;
static final int BI_RLE4 = 2;
static final int BI_BITFIELDS = 3;
-
+
/**
* Constructs an BMPImageWriteParam object with default values
* and a null Locale.
@@ -101,7 +101,7 @@ public class BMPImageWriteParam
/**
* Constructs a BMPImageWriteParam set to use a given
* Locale and with default values for all parameters.
- *
+ *
* @param locale - a Locale to be used to localize compression
* type names and quality descriptions, or null.
*/
@@ -110,20 +110,20 @@ public class BMPImageWriteParam
super(locale);
topDown = false;
canWriteCompressed = true;
-
+
compressionTypes = new String[4];
compressionTypes[BI_RGB] = rgb;
compressionTypes[BI_RLE8] = rle8;
compressionTypes[BI_RLE4] = rle4;
compressionTypes[BI_BITFIELDS] = bitfields;
-
+
compressionType = compressionTypes[BI_RGB];
}
/**
* If set, the data will be written out in a top-down manner, the first
* scanline being written first.
- *
+ *
* @param topDown - whether the data are written in top-down order.
*/
public void setTopDown(boolean topDown)
@@ -134,7 +134,7 @@ public class BMPImageWriteParam
/**
* Returns the value of the topDown parameter. The default is
* false.
- *
+ *
* @return whether the data are written in top-down order.
*/
public boolean isTopDown()
diff --git a/libjava/classpath/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java b/libjava/classpath/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java
index 378e11f..be718d4 100644
--- a/libjava/classpath/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java
+++ b/libjava/classpath/javax/imageio/plugins/jpeg/JPEGHuffmanTable.java
@@ -162,7 +162,7 @@ public class JPEGHuffmanTable
* the array arguments. lengths[index] stores the number of Huffman
* values with Huffman codes of length index + 1. The values array
* stores the Huffman values in order of increasing code length.
- *
+ *
* @param lengths an array of Huffman code lengths
* @param values a sorted array of Huffman values
* @throws IllegalArgumentException if either parameter is null, if
@@ -266,17 +266,17 @@ public class JPEGHuffmanTable
public String toString()
{
CPStringBuilder buffer = new CPStringBuilder();
-
+
buffer.append("JPEGHuffmanTable:\nlengths:");
-
+
for (int i = 0; i < lengths.length; i++)
buffer.append(" " + lengths[i]);
-
+
buffer.append("\nvalues:");
-
+
for (int i = 0; i < values.length; i++)
buffer.append(" " + values[i]);
-
+
return buffer.toString();
}
}
diff --git a/libjava/classpath/javax/imageio/spi/IIORegistry.java b/libjava/classpath/javax/imageio/spi/IIORegistry.java
index 101cead..faa571d 100644
--- a/libjava/classpath/javax/imageio/spi/IIORegistry.java
+++ b/libjava/classpath/javax/imageio/spi/IIORegistry.java
@@ -54,7 +54,7 @@ import gnu.javax.imageio.png.PNGImageReaderSpi;
public final class IIORegistry extends ServiceRegistry
{
private static final HashSet defaultCategories = new HashSet();
-
+
private static HashMap instances = new HashMap();
static
@@ -65,19 +65,19 @@ public final class IIORegistry extends ServiceRegistry
defaultCategories.add(ImageInputStreamSpi.class);
defaultCategories.add(ImageOutputStreamSpi.class);
}
-
+
public static synchronized IIORegistry getDefaultInstance()
{
// XXX: This leaks memory if a ThreadGroup isn't available anymore.
ThreadGroup group = Thread.currentThread().getThreadGroup();
IIORegistry registry = (IIORegistry) instances.get(group);
-
+
if (registry == null)
{
registry = new IIORegistry();
instances.put(group, registry);
}
-
+
return registry;
}
@@ -94,7 +94,7 @@ public final class IIORegistry extends ServiceRegistry
Toolkit toolkit = Toolkit.getDefaultToolkit();
if (toolkit instanceof ClasspathToolkit)
((ClasspathToolkit)toolkit).registerImageIOSpis(this);
-
+
registerApplicationClasspathSpis();
}
@@ -109,11 +109,11 @@ public final class IIORegistry extends ServiceRegistry
while (categories.hasNext())
{
- Class category = (Class) categories.next();
- Iterator providers = ServiceFactory.lookupProviders(category, loader);
+ Class category = (Class) categories.next();
+ Iterator providers = ServiceFactory.lookupProviders(category, loader);
- while (providers.hasNext())
- registerServiceProvider((IIOServiceProvider) providers.next());
+ while (providers.hasNext())
+ registerServiceProvider((IIOServiceProvider) providers.next());
}
}
}
diff --git a/libjava/classpath/javax/imageio/spi/ImageReaderSpi.java b/libjava/classpath/javax/imageio/spi/ImageReaderSpi.java
index e97d239..3ffa93a 100644
--- a/libjava/classpath/javax/imageio/spi/ImageReaderSpi.java
+++ b/libjava/classpath/javax/imageio/spi/ImageReaderSpi.java
@@ -84,7 +84,7 @@ public abstract class ImageReaderSpi extends ImageReaderWriterSpi
if (inputTypes == null
|| inputTypes.length == 0)
throw new IllegalArgumentException("inputTypes may not be null or empty");
-
+
this.inputTypes = inputTypes;
this.writerSpiNames = writerSpiNames;
}
@@ -115,7 +115,7 @@ public abstract class ImageReaderSpi extends ImageReaderWriterSpi
{
if (reader == null)
throw new IllegalArgumentException("reader may not be null");
-
+
return pluginClassName.equals(reader.getClass().getName());
}
}
diff --git a/libjava/classpath/javax/imageio/spi/ImageWriterSpi.java b/libjava/classpath/javax/imageio/spi/ImageWriterSpi.java
index 3ec52c5..6a07348 100644
--- a/libjava/classpath/javax/imageio/spi/ImageWriterSpi.java
+++ b/libjava/classpath/javax/imageio/spi/ImageWriterSpi.java
@@ -89,9 +89,9 @@ public abstract class ImageWriterSpi extends ImageReaderWriterSpi
if (outputTypes == null
|| outputTypes.length == 0)
throw new IllegalArgumentException("outputTypes may not be null or empty");
-
+
this.outputTypes = outputTypes;
- this.readerSpiNames = readerSpiNames;
+ this.readerSpiNames = readerSpiNames;
}
public abstract boolean canEncodeImage(ImageTypeSpecifier type);
diff --git a/libjava/classpath/javax/imageio/spi/RegisterableService.java b/libjava/classpath/javax/imageio/spi/RegisterableService.java
index 7be5a1b..b424e04 100644
--- a/libjava/classpath/javax/imageio/spi/RegisterableService.java
+++ b/libjava/classpath/javax/imageio/spi/RegisterableService.java
@@ -80,4 +80,3 @@ public interface RegisterableService
*/
void onDeregistration(ServiceRegistry registry, Class> category);
}
-
diff --git a/libjava/classpath/javax/imageio/spi/ServiceRegistry.java b/libjava/classpath/javax/imageio/spi/ServiceRegistry.java
index 170ea00..d923596 100644
--- a/libjava/classpath/javax/imageio/spi/ServiceRegistry.java
+++ b/libjava/classpath/javax/imageio/spi/ServiceRegistry.java
@@ -107,11 +107,11 @@ public class ServiceRegistry
*/
private IdentityHashMap[] constraints;
-
+
/**
* Constructs a ServiceRegistry for the specified
* service categories.
- *
+ *
* @param categories the categories to support
*
* @throws IllegalArgumentException if categories is
@@ -475,8 +475,8 @@ public class ServiceRegistry
return deregisterServiceProvider(provider, i);
throw new IllegalArgumentException();
}
-
-
+
+
/**
* De-registers a provider from all service categories it
* implements.
@@ -704,7 +704,7 @@ public class ServiceRegistry
provs = providers[catid];
if (provs == null)
return Collections.EMPTY_LIST.iterator();
-
+
result = new ArrayList(provs.size());
for (Iterator iter = provs.iterator(); iter.hasNext();)
{
@@ -728,7 +728,7 @@ public class ServiceRegistry
if (o1 == o2)
return 0;
-
+
s = (Set) cons.get(o1);
if (s != null && s.contains(o2))
return -1; // o1 < o2
@@ -749,7 +749,7 @@ public class ServiceRegistry
/**
* Returns one of the service providers that is a subclass of the
* specified class.
- *
+ *
* @param providerClass a class to search for.
*/
public synchronized T getServiceProviderByClass(Class providerClass)
@@ -764,7 +764,7 @@ public class ServiceRegistry
{
if (!categories[cat].isAssignableFrom(providerClass))
continue;
-
+
LinkedList provs = providers[cat];
if (provs == null)
continue;
@@ -959,4 +959,3 @@ public class ServiceRegistry
boolean filter(Object provider);
}
}
-
diff --git a/libjava/classpath/javax/imageio/stream/FileCacheImageInputStream.java b/libjava/classpath/javax/imageio/stream/FileCacheImageInputStream.java
index 40fed63..2717e07 100644
--- a/libjava/classpath/javax/imageio/stream/FileCacheImageInputStream.java
+++ b/libjava/classpath/javax/imageio/stream/FileCacheImageInputStream.java
@@ -49,7 +49,7 @@ public class FileCacheImageInputStream extends ImageInputStreamImpl
{
private InputStream stream;
private File cacheDir;
-
+
public FileCacheImageInputStream(InputStream stream, File cacheDir)
throws IOException
{
@@ -64,8 +64,8 @@ public class FileCacheImageInputStream extends ImageInputStreamImpl
{
if (stream != null)
{
- stream.close();
- stream = null;
+ stream.close();
+ stream = null;
}
}
@@ -85,7 +85,7 @@ public class FileCacheImageInputStream extends ImageInputStreamImpl
{
return true;
}
-
+
public boolean isCachedMemory()
{
return false;
diff --git a/libjava/classpath/javax/imageio/stream/FileCacheImageOutputStream.java b/libjava/classpath/javax/imageio/stream/FileCacheImageOutputStream.java
index 47b7bb8..1d73a05 100644
--- a/libjava/classpath/javax/imageio/stream/FileCacheImageOutputStream.java
+++ b/libjava/classpath/javax/imageio/stream/FileCacheImageOutputStream.java
@@ -84,12 +84,12 @@ public class FileCacheImageOutputStream extends ImageOutputStreamImpl
{
return true;
}
-
+
public boolean isCachedMemory()
{
return false;
}
-
+
public int read()
throws IOException
{
diff --git a/libjava/classpath/javax/imageio/stream/FileImageInputStream.java b/libjava/classpath/javax/imageio/stream/FileImageInputStream.java
index 4fa1ac8..abdd997 100644
--- a/libjava/classpath/javax/imageio/stream/FileImageInputStream.java
+++ b/libjava/classpath/javax/imageio/stream/FileImageInputStream.java
@@ -49,7 +49,7 @@ import java.io.RandomAccessFile;
public class FileImageInputStream extends ImageInputStreamImpl
{
private RandomAccessFile file;
-
+
public FileImageInputStream(File file)
throws FileNotFoundException, IOException
{
diff --git a/libjava/classpath/javax/imageio/stream/FileImageOutputStream.java b/libjava/classpath/javax/imageio/stream/FileImageOutputStream.java
index e1ce5c2..7d5d8fb 100644
--- a/libjava/classpath/javax/imageio/stream/FileImageOutputStream.java
+++ b/libjava/classpath/javax/imageio/stream/FileImageOutputStream.java
@@ -49,7 +49,7 @@ import java.io.RandomAccessFile;
public class FileImageOutputStream extends ImageOutputStreamImpl
{
private RandomAccessFile file;
-
+
public FileImageOutputStream(File file)
throws FileNotFoundException, IOException
{
@@ -92,7 +92,7 @@ public class FileImageOutputStream extends ImageOutputStreamImpl
throws IOException
{
checkClosed();
-
+
setBitOffset(0);
return file.read();
}
@@ -101,7 +101,7 @@ public class FileImageOutputStream extends ImageOutputStreamImpl
throws IOException
{
checkClosed();
-
+
setBitOffset(0);
return file.read(data, offset, len);
}
@@ -117,7 +117,7 @@ public class FileImageOutputStream extends ImageOutputStreamImpl
throws IOException
{
checkClosed();
-
+
flushBits();
file.write(data, offset, len);
}
@@ -126,7 +126,7 @@ public class FileImageOutputStream extends ImageOutputStreamImpl
throws IOException
{
checkClosed();
-
+
// FIXME: Flush pending bits.
file.write(value);
}
diff --git a/libjava/classpath/javax/imageio/stream/ImageInputStream.java b/libjava/classpath/javax/imageio/stream/ImageInputStream.java
index 4d1b5d5..dd57ca6 100644
--- a/libjava/classpath/javax/imageio/stream/ImageInputStream.java
+++ b/libjava/classpath/javax/imageio/stream/ImageInputStream.java
@@ -58,7 +58,7 @@ public interface ImageInputStream
void setByteOrder(ByteOrder order);
ByteOrder getByteOrder();
-
+
int read()
throws IOException;
@@ -156,7 +156,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @throws EOFException if the input stream ends before all two
* bytes were read.
*
@@ -178,7 +178,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
*
This method does the same as {@link #readChar()}.
*
* @throws EOFException if the input stream ends before all two
@@ -202,7 +202,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
*
This method does the same as {@link #readUnsignedShort()}.
*
* @throws EOFException if the input stream ends before all two
@@ -224,7 +224,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @throws EOFException if the input stream ends before all four
* bytes were read.
*
@@ -245,7 +245,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @throws EOFException if the input stream ends before all four
* bytes were read.
*
@@ -266,7 +266,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @throws EOFException if the input stream ends before all eight
* bytes were read.
*
@@ -286,7 +286,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @throws EOFException if the input stream ends before all four
* bytes were read.
*
@@ -306,7 +306,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @throws EOFException if the input stream ends before all eight
* bytes were read.
*
@@ -331,7 +331,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param b an array for storing the read values.
*
* @param offset the index of the first element in b
@@ -364,7 +364,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param b an array for storing the read values.
*
* @throws NullPointerException if b is
@@ -391,7 +391,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param s an array for storing the read values.
*
* @param offset the index of the first element in s
@@ -427,7 +427,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param c an array for storing the read values.
*
* @param offset the index of the first element in c
@@ -463,7 +463,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param i an array for storing the read values.
*
* @param offset the index of the first element in i
@@ -499,7 +499,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param l an array for storing the read values.
*
* @param offset the index of the first element in l
@@ -535,7 +535,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param d an array for storing the read values.
*
* @param offset the index of the first element in d
@@ -572,7 +572,7 @@ public interface ImageInputStream
*
*
The {@linkplain #getBitOffset() bit offset} is set to zero
* before any data is read.
- *
+ *
* @param d an array for storing the read values.
*
* @param offset the index of the first element in d
diff --git a/libjava/classpath/javax/imageio/stream/ImageInputStreamImpl.java b/libjava/classpath/javax/imageio/stream/ImageInputStreamImpl.java
index e338f1d..72fd6de 100644
--- a/libjava/classpath/javax/imageio/stream/ImageInputStreamImpl.java
+++ b/libjava/classpath/javax/imageio/stream/ImageInputStreamImpl.java
@@ -53,9 +53,9 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
{
private boolean closed;
private Stack markStack = new Stack();
-
+
byte[] buffer = new byte[8];
-
+
protected int bitOffset;
protected ByteOrder byteOrder = ByteOrder.BIG_ENDIAN;
protected long flushedPos;
@@ -79,7 +79,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
checkClosed();
closed = true;
}
-
+
protected void finalize()
throws Throwable
{
@@ -153,7 +153,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
{
try
{
- markStack.push(new Long(getStreamPosition()));
+ markStack.push(new Long(getStreamPosition()));
}
catch (IOException e)
{
@@ -193,7 +193,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
seek(getStreamPosition() - 1);
data = (byte) (data >> (8 - newOffset));
}
-
+
bitOffset = newOffset;
return data & 0x1;
}
@@ -210,8 +210,8 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
for (int i = 0; i < numBits; i++)
{
- bits <<= 1;
- bits |= readBit();
+ bits <<= 1;
+ bits |= readBit();
}
return bits;
}
@@ -351,9 +351,9 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
while (!eol)
{
- switch(c)
- {
- case '\r':
+ switch(c)
+ {
+ case '\r':
// Check for following '\n'.
long oldPosition = getStreamPosition();
c = read();
@@ -366,14 +366,14 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
}
continue;
- case '\n':
- eol = true;
+ case '\n':
+ eol = true;
continue;
- default:
- buffer.append((char) c);
- break;
- }
+ default:
+ buffer.append((char) c);
+ break;
+ }
c = read();
if (c == -1)
eol = true;
@@ -454,13 +454,13 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
try
{
- data = DataInputStream.readUTF(this);
+ data = DataInputStream.readUTF(this);
}
finally
{
- setByteOrder(old);
+ setByteOrder(old);
}
-
+
return data;
}
@@ -468,7 +468,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
throws IOException
{
checkClosed();
-
+
long mark = ((Long) markStack.pop()).longValue();
seek(mark);
}
@@ -489,7 +489,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
throws IOException
{
checkClosed();
-
+
if (bitOffset < 0 || bitOffset > 7)
throw new IllegalArgumentException("bitOffset not between 0 and 7 inclusive");
@@ -505,7 +505,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
throws IOException
{
checkClosed();
-
+
seek(getStreamPosition() + num);
bitOffset = 0;
return num;
@@ -515,7 +515,7 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
throws IOException
{
checkClosed();
-
+
seek(getStreamPosition() + num);
bitOffset = 0;
return num;
@@ -530,12 +530,12 @@ public abstract class ImageInputStreamImpl implements ImageInputStream
while (len > 0)
{
- // read will block until some data is available.
- int numread = read (buf, offset, len);
- if (numread < 0)
- throw new EOFException ();
- len -= numread;
- offset += numread;
+ // read will block until some data is available.
+ int numread = read (buf, offset, len);
+ if (numread < 0)
+ throw new EOFException ();
+ len -= numread;
+ offset += numread;
}
bitOffset = 0;
}
diff --git a/libjava/classpath/javax/imageio/stream/ImageOutputStreamImpl.java b/libjava/classpath/javax/imageio/stream/ImageOutputStreamImpl.java
index f23e695..5bf7e44 100644
--- a/libjava/classpath/javax/imageio/stream/ImageOutputStreamImpl.java
+++ b/libjava/classpath/javax/imageio/stream/ImageOutputStreamImpl.java
@@ -221,20 +221,20 @@ public abstract class ImageOutputStreamImpl extends ImageInputStreamImpl
for(int i = 0; i < len; ++len)
writeDouble(data[offset + i]);
}
-
+
public void writeFloat(float value)
throws IOException
{
writeInt(Float.floatToIntBits(value));
}
-
+
public void writeFloats(float[] data, int offset, int len)
throws IOException
{
for(int i = 0; i < len; ++len)
writeFloat(data[offset + i]);
}
-
+
public void writeInt(int value)
throws IOException
{
@@ -252,17 +252,17 @@ public abstract class ImageOutputStreamImpl extends ImageInputStreamImpl
buffer[2] = ((byte) (value >> 8));
buffer[3] = ((byte) value);
}
-
+
write(buffer, 0, 4);
}
-
+
public void writeInts(int[] data, int offset, int len)
throws IOException
{
for(int i = 0; i < len; ++len)
writeInt(data[offset + i]);
}
-
+
public void writeLong(long value)
throws IOException
{
@@ -288,17 +288,17 @@ public abstract class ImageOutputStreamImpl extends ImageInputStreamImpl
buffer[6] = ((byte) (value >> 8));
buffer[7] = ((byte) value);
}
-
+
write(buffer, 0, 8);
}
-
+
public void writeLongs(long[] data, int offset, int len)
throws IOException
{
for(int i = 0; i < len; ++len)
writeLong(data[offset + i]);
}
-
+
public void writeShort(int value)
throws IOException
{
@@ -312,17 +312,17 @@ public abstract class ImageOutputStreamImpl extends ImageInputStreamImpl
buffer[0] = ((byte) (value >> 8));
buffer[1] = ((byte) value);
}
-
+
write(buffer, 0, 2);
}
-
+
public void writeShorts(short[] data, int offset, int len)
throws IOException
{
for(int i = 0; i < len; ++len)
writeShort(data[offset + i]);
}
-
+
public void writeUTF(String value)
throws IOException
{
@@ -367,7 +367,7 @@ public abstract class ImageOutputStreamImpl extends ImageInputStreamImpl
buf[pos++] = (byte) (0x80 | (0x3f & c));
}
}
-
+
writeShort (sum);
write(buf, 0, sum);
}
diff --git a/libjava/classpath/javax/imageio/stream/MemoryCacheImageInputStream.java b/libjava/classpath/javax/imageio/stream/MemoryCacheImageInputStream.java
index 72aa5e8..e1ad71f 100644
--- a/libjava/classpath/javax/imageio/stream/MemoryCacheImageInputStream.java
+++ b/libjava/classpath/javax/imageio/stream/MemoryCacheImageInputStream.java
@@ -51,7 +51,7 @@ public class MemoryCacheImageInputStream extends ImageInputStreamImpl
private BufferedInputStream buffer;
private int READLIMIT = 2048;
-
+
public MemoryCacheImageInputStream(InputStream stream)
{
this.stream = stream;
@@ -85,7 +85,7 @@ public class MemoryCacheImageInputStream extends ImageInputStreamImpl
{
return false;
}
-
+
public boolean isCachedMemory()
{
return true;
@@ -96,7 +96,7 @@ public class MemoryCacheImageInputStream extends ImageInputStreamImpl
{
setBitOffset(0);
int retval = buffer.read();
-
+
if (retval != -1)
streamPos++;
@@ -114,9 +114,9 @@ public class MemoryCacheImageInputStream extends ImageInputStreamImpl
streamPos += retval;
}
- return retval;
+ return retval;
}
-
+
public void seek(long position)
throws IOException
{
diff --git a/libjava/classpath/javax/imageio/stream/MemoryCacheImageOutputStream.java b/libjava/classpath/javax/imageio/stream/MemoryCacheImageOutputStream.java
index 17039f5..84e8360 100644
--- a/libjava/classpath/javax/imageio/stream/MemoryCacheImageOutputStream.java
+++ b/libjava/classpath/javax/imageio/stream/MemoryCacheImageOutputStream.java
@@ -78,7 +78,7 @@ public class MemoryCacheImageOutputStream extends ImageOutputStreamImpl
{
return false;
}
-
+
public boolean isCachedMemory()
{
return true;
diff --git a/libjava/classpath/javax/management/Attribute.java b/libjava/classpath/javax/management/Attribute.java
index ece9495..48f5db9 100644
--- a/libjava/classpath/javax/management/Attribute.java
+++ b/libjava/classpath/javax/management/Attribute.java
@@ -42,9 +42,9 @@ import java.io.Serializable;
/**
* Represents an MBean attribute, having the name and the assigned value. The
* MBean objects use this class to get and set attributes values.
- *
+ *
* @since 1.5
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public class Attribute
@@ -67,7 +67,7 @@ public class Attribute
/**
* Create the attribute with the given name and value.
- *
+ *
* @param name the attribute name
* @param value the attribute value
*/
@@ -79,9 +79,9 @@ public class Attribute
/**
* Compares the attribute with another attribute.
- *
+ *
* @param other the other object to compare with
- *
+ *
* @return true if both value and object are equal, false otherwise.
*/
public boolean equals(Object other)
@@ -99,7 +99,7 @@ public class Attribute
v = oa.m_value == m_value;
else
v = oa.m_value.equals(m_value);
-
+
return n && v;
}
@@ -109,7 +109,7 @@ public class Attribute
/**
* Returns the attribute name.
- *
+ *
* @return the attribute name
*/
public String getName()
@@ -119,7 +119,7 @@ public class Attribute
/**
* Returns the attribute value.
- *
+ *
* @return the attribute value.
*/
public Object getValue()
@@ -129,14 +129,14 @@ public class Attribute
/**
* Need to override as {@link #equals} is overridden.
- *
+ *
* @return the expression, dependent of the object and name hashcodes.
*/
public int hashCode()
{
int n = m_name == null ? 0 : m_name.hashCode();
int v = m_value == null ? 0 : m_value.hashCode();
-
+
return n ^ v;
}
diff --git a/libjava/classpath/javax/management/AttributeChangeNotification.java b/libjava/classpath/javax/management/AttributeChangeNotification.java
index e63671d..16dbf86 100644
--- a/libjava/classpath/javax/management/AttributeChangeNotification.java
+++ b/libjava/classpath/javax/management/AttributeChangeNotification.java
@@ -67,7 +67,7 @@ public class AttributeChangeNotification
* notifications.
*/
public static final String ATTRIBUTE_CHANGE = "jmx.attribute.change";
-
+
/**
* The name of the attribute that changed.
*/
@@ -107,14 +107,14 @@ public class AttributeChangeNotification
* @param newVal the new value of the attribute.
*/
public AttributeChangeNotification(Object source,
- long sequenceNumber,
- long timeStamp,
- String msg, String name,
- String type, Object oldVal,
- Object newVal)
+ long sequenceNumber,
+ long timeStamp,
+ String msg, String name,
+ String type, Object oldVal,
+ Object newVal)
{
super(ATTRIBUTE_CHANGE, source, sequenceNumber,
- timeStamp, msg);
+ timeStamp, msg);
attributeName = name;
attributeType = type;
oldValue = oldVal;
@@ -162,5 +162,3 @@ public class AttributeChangeNotification
}
}
-
-
diff --git a/libjava/classpath/javax/management/AttributeChangeNotificationFilter.java b/libjava/classpath/javax/management/AttributeChangeNotificationFilter.java
index 90d19a3..ef3af0d 100644
--- a/libjava/classpath/javax/management/AttributeChangeNotificationFilter.java
+++ b/libjava/classpath/javax/management/AttributeChangeNotificationFilter.java
@@ -100,7 +100,7 @@ public class AttributeChangeNotificationFilter
if (!enabledAttributes.contains(name))
enabledAttributes.add(name);
}
-
+
/**
* Returns the list of enabled attributes for this
* filter.
@@ -127,9 +127,9 @@ public class AttributeChangeNotificationFilter
{
if (notif instanceof AttributeChangeNotification)
{
- AttributeChangeNotification n =
- (AttributeChangeNotification) notif;
- return enabledAttributes.contains(n.getAttributeName());
+ AttributeChangeNotification n =
+ (AttributeChangeNotification) notif;
+ return enabledAttributes.contains(n.getAttributeName());
}
return false;
}
diff --git a/libjava/classpath/javax/management/AttributeList.java b/libjava/classpath/javax/management/AttributeList.java
index 09db9b6..3d240b7 100644
--- a/libjava/classpath/javax/management/AttributeList.java
+++ b/libjava/classpath/javax/management/AttributeList.java
@@ -119,7 +119,7 @@ public class AttributeList
* the @link{IndexOutOfBoundsException} from the underlying
* array list.
*
- *
+ *
* @param index the index at which to place the new attribute.
* @param attribute the new attribute to add.
* @throws RuntimeOperationsException if index < 0
@@ -130,11 +130,11 @@ public class AttributeList
{
try
{
- super.add(index, attribute);
+ super.add(index, attribute);
}
catch (IndexOutOfBoundsException e)
{
- throw new RuntimeOperationsException(e, "Invalid index.");
+ throw new RuntimeOperationsException(e, "Invalid index.");
}
}
@@ -171,7 +171,7 @@ public class AttributeList
* the @link{IndexOutOfBoundsException} from the underlying
* array list.
*
- *
+ *
* @param index the index at which to place the new attribute.
* @param list the list of attributes to add.
* @return true if the list changed.
@@ -183,11 +183,11 @@ public class AttributeList
{
try
{
- return super.addAll(index, list);
+ return super.addAll(index, list);
}
catch (IndexOutOfBoundsException e)
{
- throw new RuntimeOperationsException(e, "Invalid index.");
+ throw new RuntimeOperationsException(e, "Invalid index.");
}
}
@@ -209,12 +209,12 @@ public class AttributeList
{
try
{
- super.set(index, attribute);
+ super.set(index, attribute);
}
catch (IndexOutOfBoundsException e)
{
- throw new RuntimeOperationsException(e, "Invalid index.");
+ throw new RuntimeOperationsException(e, "Invalid index.");
}
}
-
+
}
diff --git a/libjava/classpath/javax/management/AttributeNotFoundException.java b/libjava/classpath/javax/management/AttributeNotFoundException.java
index 2c6c698..4b1f4e6 100644
--- a/libjava/classpath/javax/management/AttributeNotFoundException.java
+++ b/libjava/classpath/javax/management/AttributeNotFoundException.java
@@ -68,4 +68,3 @@ public class AttributeNotFoundException
}
}
-
diff --git a/libjava/classpath/javax/management/AttributeValueExp.java b/libjava/classpath/javax/management/AttributeValueExp.java
index 42e7161..6e8f5fb 100644
--- a/libjava/classpath/javax/management/AttributeValueExp.java
+++ b/libjava/classpath/javax/management/AttributeValueExp.java
@@ -101,7 +101,7 @@ public class AttributeValueExp
*/
public ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
Object val = getAttribute(name);
if (val == null || !(val instanceof String))
@@ -123,27 +123,27 @@ public class AttributeValueExp
{
try
{
- return QueryEval.getMBeanServer().getAttribute(name, attr);
+ return QueryEval.getMBeanServer().getAttribute(name, attr);
}
catch (NullPointerException e)
{
- return null;
+ return null;
}
catch (MBeanException e)
{
- return null;
+ return null;
}
catch (AttributeNotFoundException e)
{
- return null;
+ return null;
}
catch (InstanceNotFoundException e)
{
- return null;
+ return null;
}
catch (ReflectionException e)
{
- return null;
+ return null;
}
}
diff --git a/libjava/classpath/javax/management/BadAttributeValueExpException.java b/libjava/classpath/javax/management/BadAttributeValueExpException.java
index fbdf1de..207a786 100644
--- a/libjava/classpath/javax/management/BadAttributeValueExpException.java
+++ b/libjava/classpath/javax/management/BadAttributeValueExpException.java
@@ -83,9 +83,8 @@ public class BadAttributeValueExpException
public String toString()
{
return getClass().getName()
- + "[val=" + val
+ + "[val=" + val
+ "]";
}
}
-
diff --git a/libjava/classpath/javax/management/BadBinaryOpValueExpException.java b/libjava/classpath/javax/management/BadBinaryOpValueExpException.java
index 5e1f5db..082b4a7 100644
--- a/libjava/classpath/javax/management/BadBinaryOpValueExpException.java
+++ b/libjava/classpath/javax/management/BadBinaryOpValueExpException.java
@@ -94,9 +94,8 @@ public class BadBinaryOpValueExpException
public String toString()
{
return getClass().getName()
- + "[exp=" + exp
+ + "[exp=" + exp
+ "]";
}
}
-
diff --git a/libjava/classpath/javax/management/BadStringOperationException.java b/libjava/classpath/javax/management/BadStringOperationException.java
index 8e5949e..261b352 100644
--- a/libjava/classpath/javax/management/BadStringOperationException.java
+++ b/libjava/classpath/javax/management/BadStringOperationException.java
@@ -84,9 +84,8 @@ public class BadStringOperationException
public String toString()
{
return getClass().getName()
- + "[op=" + op
+ + "[op=" + op
+ "]";
}
}
-
diff --git a/libjava/classpath/javax/management/DefaultLoaderRepository.java b/libjava/classpath/javax/management/DefaultLoaderRepository.java
index 38f7d02..d331552 100644
--- a/libjava/classpath/javax/management/DefaultLoaderRepository.java
+++ b/libjava/classpath/javax/management/DefaultLoaderRepository.java
@@ -85,18 +85,18 @@ import java.util.List;
List servers = MBeanServerFactory.findMBeanServer(null);
for (MBeanServer server : servers)
{
- try
- {
- return server.getClassLoaderRepository().loadClass(name);
- }
- catch (ClassNotFoundException e)
- {
- /* Ignored; try the next server. */
- }
+ try
+ {
+ return server.getClassLoaderRepository().loadClass(name);
+ }
+ catch (ClassNotFoundException e)
+ {
+ /* Ignored; try the next server. */
+ }
}
throw new ClassNotFoundException("The class loaders of all registered " +
- "servers failed to load the class, " +
- name);
+ "servers failed to load the class, " +
+ name);
}
/**
@@ -134,19 +134,19 @@ import java.util.List;
List servers = MBeanServerFactory.findMBeanServer(null);
for (MBeanServer server : servers)
{
- try
- {
- return server.getClassLoaderRepository().loadClassWithout(exclude,
- name);
- }
- catch (ClassNotFoundException e)
- {
- /* Ignored; try the next server. */
- }
+ try
+ {
+ return server.getClassLoaderRepository().loadClassWithout(exclude,
+ name);
+ }
+ catch (ClassNotFoundException e)
+ {
+ /* Ignored; try the next server. */
+ }
}
throw new ClassNotFoundException("The class loaders of all registered " +
- "servers failed to load the class, " +
- name);
+ "servers failed to load the class, " +
+ name);
}
}
diff --git a/libjava/classpath/javax/management/Descriptor.java b/libjava/classpath/javax/management/Descriptor.java
index 07b8f1d..9a50b9e 100644
--- a/libjava/classpath/javax/management/Descriptor.java
+++ b/libjava/classpath/javax/management/Descriptor.java
@@ -197,7 +197,7 @@ public interface Descriptor
* Returns a clone of this descriptor, which can then be modified
* independently of this descriptor. If the descriptor is
* immutable, it is sufficient to return this instance.
- *
+ *
* @return a clone of this descriptor.
* @throws RuntimeOperationsException if creation of the new
* descriptor fails for any
@@ -224,7 +224,7 @@ public interface Descriptor
* must return true.
*
Otherwise, {@link Object#equals(Object)} must return true.
*
- *
+ *
* @param obj the object to compare according to the above.
* @return true if the above holds.
* @see Object#equals(Object)
@@ -265,7 +265,7 @@ public interface Descriptor
/**
* Returns the value of the specified field, or null
* if no value is present for the given field name.
- *
+ *
* @param name the field name.
* @return the value of the field, or null if there
* is no value present.
@@ -283,7 +283,7 @@ public interface Descriptor
* being returned if the field is not present. This applies
* even if the given field name is null or
* the empty string.
- *
+ *
* @param names an array of field names whose values should
* be returned.
* @return the values of the specified fields.
diff --git a/libjava/classpath/javax/management/DynamicMBean.java b/libjava/classpath/javax/management/DynamicMBean.java
index 80ea72c..ceb47dc 100644
--- a/libjava/classpath/javax/management/DynamicMBean.java
+++ b/libjava/classpath/javax/management/DynamicMBean.java
@@ -49,7 +49,7 @@ package javax.management;
*/
public interface DynamicMBean
{
-
+
/**
* Obtains the value of the specified attribute of the
* management bean. The management bean should perform
@@ -73,7 +73,7 @@ public interface DynamicMBean
*/
Object getAttribute(String name)
throws AttributeNotFoundException, MBeanException,
- ReflectionException;
+ ReflectionException;
/**
* Obtains the values of each of the specified attributes
@@ -103,7 +103,7 @@ public interface DynamicMBean
* corresponding to each parameter. The class loader used to
* load these classes is the same as that used for loading the
* management bean itself.
- *
+ *
* @param name the name of the action to invoke.
* @param params the parameters used to call the action.
* @param signature the signature of the action.
@@ -145,7 +145,7 @@ public interface DynamicMBean
*/
void setAttribute(Attribute attribute)
throws AttributeNotFoundException, InvalidAttributeValueException,
- MBeanException, ReflectionException;
+ MBeanException, ReflectionException;
/**
* Sets the value of each of the specified attributes
diff --git a/libjava/classpath/javax/management/InstanceAlreadyExistsException.java b/libjava/classpath/javax/management/InstanceAlreadyExistsException.java
index c783208..954df52 100644
--- a/libjava/classpath/javax/management/InstanceAlreadyExistsException.java
+++ b/libjava/classpath/javax/management/InstanceAlreadyExistsException.java
@@ -73,4 +73,3 @@ public class InstanceAlreadyExistsException
}
}
-
diff --git a/libjava/classpath/javax/management/InstanceNotFoundException.java b/libjava/classpath/javax/management/InstanceNotFoundException.java
index 4d209fc..22eee35 100644
--- a/libjava/classpath/javax/management/InstanceNotFoundException.java
+++ b/libjava/classpath/javax/management/InstanceNotFoundException.java
@@ -73,4 +73,3 @@ public class InstanceNotFoundException
}
}
-
diff --git a/libjava/classpath/javax/management/IntrospectionException.java b/libjava/classpath/javax/management/IntrospectionException.java
index 3b9d4b1..dfca93b 100644
--- a/libjava/classpath/javax/management/IntrospectionException.java
+++ b/libjava/classpath/javax/management/IntrospectionException.java
@@ -75,4 +75,3 @@ public class IntrospectionException
}
}
-
diff --git a/libjava/classpath/javax/management/InvalidApplicationException.java b/libjava/classpath/javax/management/InvalidApplicationException.java
index 0bcf2d6..b7a7e3c 100644
--- a/libjava/classpath/javax/management/InvalidApplicationException.java
+++ b/libjava/classpath/javax/management/InvalidApplicationException.java
@@ -84,9 +84,8 @@ public class InvalidApplicationException
public String toString()
{
return getClass().getName()
- + "[val=" + val
+ + "[val=" + val
+ "]";
}
}
-
diff --git a/libjava/classpath/javax/management/InvalidAttributeValueException.java b/libjava/classpath/javax/management/InvalidAttributeValueException.java
index f766eda..1ec9fad 100644
--- a/libjava/classpath/javax/management/InvalidAttributeValueException.java
+++ b/libjava/classpath/javax/management/InvalidAttributeValueException.java
@@ -68,4 +68,3 @@ public class InvalidAttributeValueException
}
}
-
diff --git a/libjava/classpath/javax/management/JMException.java b/libjava/classpath/javax/management/JMException.java
index d057025..a46ac54 100644
--- a/libjava/classpath/javax/management/JMException.java
+++ b/libjava/classpath/javax/management/JMException.java
@@ -68,4 +68,3 @@ public class JMException
}
}
-
diff --git a/libjava/classpath/javax/management/JMRuntimeException.java b/libjava/classpath/javax/management/JMRuntimeException.java
index ba14a19..d8eda33 100644
--- a/libjava/classpath/javax/management/JMRuntimeException.java
+++ b/libjava/classpath/javax/management/JMRuntimeException.java
@@ -68,4 +68,3 @@ public class JMRuntimeException
}
}
-
diff --git a/libjava/classpath/javax/management/JMX.java b/libjava/classpath/javax/management/JMX.java
index e5fb258..4a4958a 100644
--- a/libjava/classpath/javax/management/JMX.java
+++ b/libjava/classpath/javax/management/JMX.java
@@ -112,7 +112,7 @@ public class JMX
*
Its name ends in {@code "MXBean"} and it does not
* have an {@link MXBean} annotation.
*
- *
+ *
* @param iface the interface class that is to be checked
* for {@link MXBean} status.
* @return true if the interface represents an {@link MXBean}.
@@ -181,7 +181,7 @@ public class JMX
* boolean)
*/
public static T newMBeanProxy(MBeanServerConnection conn,
- ObjectName name, Class iface)
+ ObjectName name, Class iface)
{
return newMBeanProxy(conn, name, iface, false);
}
@@ -210,11 +210,11 @@ public class JMX
* @see #newMBeanProxy(MBeanServerConnection, ObjectName, Class)
*/
public static T newMBeanProxy(MBeanServerConnection conn,
- ObjectName name, Class iface,
- boolean bcast)
+ ObjectName name, Class iface,
+ boolean bcast)
{
return MBeanServerInvocationHandler.newProxyInstance(conn, name,
- iface, bcast);
+ iface, bcast);
}
/**
@@ -296,7 +296,7 @@ public class JMX
* boolean)
*/
public static T newMXBeanProxy(MBeanServerConnection conn,
- ObjectName name, Class iface)
+ ObjectName name, Class iface)
{
return newMXBeanProxy(conn, name, iface, false);
}
@@ -327,18 +327,18 @@ public class JMX
// Suppress warnings as we know an instance of T will be returned.
@SuppressWarnings("unchecked")
public static T newMXBeanProxy(MBeanServerConnection conn,
- ObjectName name, Class iface,
- boolean bcast)
+ ObjectName name, Class iface,
+ boolean bcast)
{
if (bcast)
return (T) Proxy.newProxyInstance(iface.getClassLoader(),
- new Class[] { iface,
- NotificationEmitter.class },
- new MBeanServerInvocationHandler(conn,name,true));
+ new Class[] { iface,
+ NotificationEmitter.class },
+ new MBeanServerInvocationHandler(conn,name,true));
else
return (T) Proxy.newProxyInstance(iface.getClassLoader(),
- new Class[] { iface },
- new MBeanServerInvocationHandler(conn,name,true));
+ new Class[] { iface },
+ new MBeanServerInvocationHandler(conn,name,true));
}
}
diff --git a/libjava/classpath/javax/management/ListenerNotFoundException.java b/libjava/classpath/javax/management/ListenerNotFoundException.java
index ea3cb74..6fd6a16 100644
--- a/libjava/classpath/javax/management/ListenerNotFoundException.java
+++ b/libjava/classpath/javax/management/ListenerNotFoundException.java
@@ -72,4 +72,3 @@ public class ListenerNotFoundException
}
}
-
diff --git a/libjava/classpath/javax/management/MBeanAttributeInfo.java b/libjava/classpath/javax/management/MBeanAttributeInfo.java
index 85e4e45..950e063 100644
--- a/libjava/classpath/javax/management/MBeanAttributeInfo.java
+++ b/libjava/classpath/javax/management/MBeanAttributeInfo.java
@@ -105,33 +105,33 @@ public class MBeanAttributeInfo
* @throws IntrospectionException if both the accessor and mutator method
* are null.
*/
- public MBeanAttributeInfo(String name, String desc,
- Method getter, Method setter)
+ public MBeanAttributeInfo(String name, String desc,
+ Method getter, Method setter)
throws IntrospectionException
{
super(name, desc);
if (getter == null && setter == null)
throw new IntrospectionException("Both the getter and setter methods can " +
- "not be null.");
+ "not be null.");
if (getter == null)
{
- Type t = setter.getGenericParameterTypes()[0];
- if (t instanceof Class)
- attributeType = ((Class>) t).getName();
- else
- attributeType = t.toString();
- isRead = false;
- is = false;
+ Type t = setter.getGenericParameterTypes()[0];
+ if (t instanceof Class)
+ attributeType = ((Class>) t).getName();
+ else
+ attributeType = t.toString();
+ isRead = false;
+ is = false;
}
else
{
- Type t = getter.getGenericReturnType();
- if (t instanceof Class)
- attributeType = ((Class>) t).getName();
- else
- attributeType = t.toString();
- isRead = true;
- is = getter.getName().startsWith("is");
+ Type t = getter.getGenericReturnType();
+ if (t instanceof Class)
+ attributeType = ((Class>) t).getName();
+ else
+ attributeType = t.toString();
+ isRead = true;
+ is = getter.getName().startsWith("is");
}
if (setter != null)
isWrite = true;
@@ -140,7 +140,7 @@ public class MBeanAttributeInfo
/**
* Constructs a new {@link MBeanAttributeInfo} using the specified
* name, description and type with the given settings for the accessor
- * and mutator methods.
+ * and mutator methods.
*
* @param name the name of the attribute.
* @param type the type of the attribute, in the form of its class name.
@@ -152,13 +152,13 @@ public class MBeanAttributeInfo
* and unwritable.
*/
public MBeanAttributeInfo(String name, String type, String desc,
- boolean isReadable, boolean isWritable,
- boolean isIs)
+ boolean isReadable, boolean isWritable,
+ boolean isIs)
{
super(name, desc);
if (!isReadable && !isWritable)
throw new IllegalArgumentException("The attribute can not be both " +
- "unreadable and unwritable.");
+ "unreadable and unwritable.");
attributeType = type;
isRead = isReadable;
isWrite = isWritable;
@@ -179,13 +179,13 @@ public class MBeanAttributeInfo
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException e)
{
- /* This shouldn't happen; we implement Cloneable */
- throw new IllegalStateException("clone() called on " +
- "non-cloneable object.");
+ /* This shouldn't happen; we implement Cloneable */
+ throw new IllegalStateException("clone() called on " +
+ "non-cloneable object.");
}
}
@@ -200,7 +200,7 @@ public class MBeanAttributeInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanAttributeInfo}
- * instance,
+ * instance,
* name.equals(object.getName()),
* description.equals(object.getDescription()),
* attributeType.equals(object.getType()),
@@ -216,9 +216,9 @@ public class MBeanAttributeInfo
return false;
MBeanAttributeInfo o = (MBeanAttributeInfo) obj;
return (attributeType.equals(o.getType()) &&
- isRead == o.isReadable() &&
- isWrite == o.isWritable() &&
- is == o.isIs());
+ isRead == o.isReadable() &&
+ isWrite == o.isWritable() &&
+ is == o.isIs());
}
/**
@@ -284,8 +284,8 @@ public class MBeanAttributeInfo
* Returns a textual representation of this instance. This
* is constructed using the class name
* (javax.management.MBeanAttributeInfo),
- * the name, description and type of the attribute and the
- * current settings of the {@link #isReadable()},
+ * the name, description and type of the attribute and the
+ * current settings of the {@link #isReadable()},
* {@link #isWritable()} and {@link #isIs()} properties.
*
*
@@ -301,13 +301,13 @@ public class MBeanAttributeInfo
{
if (string == null)
{
- super.toString();
- string = string.substring(0, string.length() - 1)
- + ",type=" + attributeType
- + ",isReadable=" + (isRead ? "yes" : "no")
- + ",isWritable=" + (isWrite ? "yes" : "no")
- + ",isIs=" + (is ? "yes" : "no")
- + "]";
+ super.toString();
+ string = string.substring(0, string.length() - 1)
+ + ",type=" + attributeType
+ + ",isReadable=" + (isRead ? "yes" : "no")
+ + ",isWritable=" + (isWrite ? "yes" : "no")
+ + ",isIs=" + (is ? "yes" : "no")
+ + "]";
}
return string;
}
diff --git a/libjava/classpath/javax/management/MBeanConstructorInfo.java b/libjava/classpath/javax/management/MBeanConstructorInfo.java
index 041f3e9..509483f 100644
--- a/libjava/classpath/javax/management/MBeanConstructorInfo.java
+++ b/libjava/classpath/javax/management/MBeanConstructorInfo.java
@@ -84,13 +84,13 @@ public class MBeanConstructorInfo
signature = new MBeanParameterInfo[paramTypes.length];
for (int a = 0; a < paramTypes.length; ++a)
{
- Type t = paramTypes[a];
- if (t instanceof Class)
- signature[a] = new MBeanParameterInfo(null,
- ((Class>) t).getName(),
- null);
- else
- signature[a] = new MBeanParameterInfo(null, t.toString(), null);
+ Type t = paramTypes[a];
+ if (t instanceof Class)
+ signature[a] = new MBeanParameterInfo(null,
+ ((Class>) t).getName(),
+ null);
+ else
+ signature[a] = new MBeanParameterInfo(null, t.toString(), null);
}
}
@@ -108,15 +108,15 @@ public class MBeanConstructorInfo
* each parameter.
*/
public MBeanConstructorInfo(String name, String desc,
- MBeanParameterInfo[] sig)
+ MBeanParameterInfo[] sig)
{
super(name, desc);
if (sig == null)
signature = new MBeanParameterInfo[0];
else
{
- signature = new MBeanParameterInfo[sig.length];
- System.arraycopy(sig, 0, signature, 0, sig.length);
+ signature = new MBeanParameterInfo[sig.length];
+ System.arraycopy(sig, 0, signature, 0, sig.length);
}
}
@@ -134,13 +134,13 @@ public class MBeanConstructorInfo
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException e)
{
- /* This shouldn't happen; we implement Cloneable */
- throw new IllegalStateException("clone() called on " +
- "non-cloneable object.");
+ /* This shouldn't happen; we implement Cloneable */
+ throw new IllegalStateException("clone() called on " +
+ "non-cloneable object.");
}
}
@@ -155,7 +155,7 @@ public class MBeanConstructorInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanConstructorInfo}
- * instance,
+ * instance,
* name.equals(object.getName()),
* description.equals(object.getDescription())
* and the corresponding elements of the signature arrays are
@@ -171,14 +171,14 @@ public class MBeanConstructorInfo
MBeanParameterInfo[] sig = o.getSignature();
for (int a = 0; a < signature.length; ++a)
{
- if (a == sig.length)
- return true;
- if (!(signature[a].equals(sig[a])))
- return false;
+ if (a == sig.length)
+ return true;
+ if (!(signature[a].equals(sig[a])))
+ return false;
}
return true;
}
-
+
/**
* Returns the constructor's signature, in the form of
* information on each parameter. Each parameter is
@@ -214,7 +214,7 @@ public class MBeanConstructorInfo
* Returns a textual representation of this instance. This
* is constructed using the class name
* (javax.management.MBeanConstructorInfo),
- * the name and description of the constructor and the
+ * the name and description of the constructor and the
* contents of the array of parameters.
*
*
@@ -230,10 +230,10 @@ public class MBeanConstructorInfo
{
if (string == null)
{
- super.toString();
- string = string.substring(0, string.length() - 1)
- + ",signature=" + Arrays.toString(signature)
- + "]";
+ super.toString();
+ string = string.substring(0, string.length() - 1)
+ + ",signature=" + Arrays.toString(signature)
+ + "]";
}
return string;
}
diff --git a/libjava/classpath/javax/management/MBeanException.java b/libjava/classpath/javax/management/MBeanException.java
index f082275..7ce81de 100644
--- a/libjava/classpath/javax/management/MBeanException.java
+++ b/libjava/classpath/javax/management/MBeanException.java
@@ -115,4 +115,3 @@ public class MBeanException
}
}
-
diff --git a/libjava/classpath/javax/management/MBeanFeatureInfo.java b/libjava/classpath/javax/management/MBeanFeatureInfo.java
index b3d60d2..a459ae9 100644
--- a/libjava/classpath/javax/management/MBeanFeatureInfo.java
+++ b/libjava/classpath/javax/management/MBeanFeatureInfo.java
@@ -106,7 +106,7 @@ public class MBeanFeatureInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanFeatureInfo}
- * instance,
+ * instance,
* name.equals(object.getName()) and
* description.equals(object.getDescription.
*/
@@ -114,13 +114,13 @@ public class MBeanFeatureInfo
{
if (obj instanceof MBeanFeatureInfo)
{
- MBeanFeatureInfo o = (MBeanFeatureInfo) obj;
- return ((name == null ?
- o.getName() == null :
- name.equals(o.getName())) &&
- (description == null ?
- o.getDescription() == null :
- description.equals(o.getDescription())));
+ MBeanFeatureInfo o = (MBeanFeatureInfo) obj;
+ return ((name == null ?
+ o.getName() == null :
+ name.equals(o.getName())) &&
+ (description == null ?
+ o.getDescription() == null :
+ description.equals(o.getDescription())));
}
else
return false;
@@ -179,9 +179,9 @@ public class MBeanFeatureInfo
{
if (string == null)
string = getClass().getName()
- + "[name=" + name
- + ",desc=" + description
- + "]";
+ + "[name=" + name
+ + ",desc=" + description
+ + "]";
return string;
}
diff --git a/libjava/classpath/javax/management/MBeanInfo.java b/libjava/classpath/javax/management/MBeanInfo.java
index 64e627f..bf07f9ad 100644
--- a/libjava/classpath/javax/management/MBeanInfo.java
+++ b/libjava/classpath/javax/management/MBeanInfo.java
@@ -78,7 +78,7 @@ import java.util.Arrays;
* instance of this class, as part of implementing the
* {@link DynamicMBean#getMBeanInfo()} method of {@link DynamicMBean}.
*
- *
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
@@ -93,7 +93,7 @@ public class MBeanInfo
/**
* A description of the bean.
- *
+ *
* @serial The bean's description.
*/
private String description;
@@ -155,8 +155,8 @@ public class MBeanInfo
* or null.
*/
public MBeanInfo(String name, String desc, MBeanAttributeInfo[] attribs,
- MBeanConstructorInfo[] cons, MBeanOperationInfo[] ops,
- MBeanNotificationInfo[] notifs)
+ MBeanConstructorInfo[] cons, MBeanOperationInfo[] ops,
+ MBeanNotificationInfo[] notifs)
{
className = name;
description = desc;
@@ -199,11 +199,11 @@ public class MBeanInfo
MBeanInfo clone = null;
try
{
- clone = (MBeanInfo) super.clone();
+ clone = (MBeanInfo) super.clone();
}
catch (CloneNotSupportedException e)
{
- /* This won't happen as we implement Cloneable */
+ /* This won't happen as we implement Cloneable */
}
return clone;
}
@@ -218,7 +218,7 @@ public class MBeanInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanInfo}
- * instance,
+ * instance,
* className.equals(object.getClassName()),
* description.equals(object.getDescription())
* and the corresponding elements of the arrays are
@@ -234,37 +234,37 @@ public class MBeanInfo
MBeanAttributeInfo[] attr = o.getAttributes();
for (int a = 0; a < attributes.length; ++a)
{
- if (a == attr.length)
- return true;
- if (!(attributes[a].equals(attr[a])))
- return false;
+ if (a == attr.length)
+ return true;
+ if (!(attributes[a].equals(attr[a])))
+ return false;
}
MBeanConstructorInfo[] cons = o.getConstructors();
for (int a = 0; a < constructors.length; ++a)
{
- if (a == cons.length)
- return true;
- if (!(constructors[a].equals(cons[a])))
- return false;
+ if (a == cons.length)
+ return true;
+ if (!(constructors[a].equals(cons[a])))
+ return false;
}
MBeanOperationInfo[] ops = o.getOperations();
for (int a = 0; a < operations.length; ++a)
{
- if (a == ops.length)
- return true;
- if (!(operations[a].equals(ops[a])))
- return false;
+ if (a == ops.length)
+ return true;
+ if (!(operations[a].equals(ops[a])))
+ return false;
}
MBeanNotificationInfo[] notifs = o.getNotifications();
for (int a = 0; a < notifications.length; ++a)
{
- if (a == notifs.length)
- return true;
- if (!(notifications[a].equals(notifs[a])))
- return false;
+ if (a == notifs.length)
+ return true;
+ if (!(notifications[a].equals(notifs[a])))
+ return false;
}
return (className.equals(o.getClassName()) &&
- description.equals(o.getDescription()));
+ description.equals(o.getDescription()));
}
/**
@@ -389,13 +389,13 @@ public class MBeanInfo
{
if (string == null)
string = getClass().getName()
- + "[name=" + className
- + ",desc=" + description
- + ",attributes=" + Arrays.toString(attributes)
- + ",constructors=" + Arrays.toString(constructors)
- + ",operations=" + Arrays.toString(operations)
- + ",notifications=" + Arrays.toString(notifications)
- + "]";
+ + "[name=" + className
+ + ",desc=" + description
+ + ",attributes=" + Arrays.toString(attributes)
+ + ",constructors=" + Arrays.toString(constructors)
+ + ",operations=" + Arrays.toString(operations)
+ + ",notifications=" + Arrays.toString(notifications)
+ + "]";
return string;
}
diff --git a/libjava/classpath/javax/management/MBeanNotificationInfo.java b/libjava/classpath/javax/management/MBeanNotificationInfo.java
index ba4077e..10dd956 100644
--- a/libjava/classpath/javax/management/MBeanNotificationInfo.java
+++ b/libjava/classpath/javax/management/MBeanNotificationInfo.java
@@ -101,7 +101,7 @@ public class MBeanNotificationInfo
* @throws IllegalArgumentException for some reason...
*/
public MBeanNotificationInfo(String[] types, String name,
- String description)
+ String description)
{
super(name, description);
this.types = types;
@@ -121,13 +121,13 @@ public class MBeanNotificationInfo
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException e)
{
- /* This shouldn't happen; we implement Cloneable */
- throw new IllegalStateException("clone() called on " +
- "non-cloneable object.");
+ /* This shouldn't happen; we implement Cloneable */
+ throw new IllegalStateException("clone() called on " +
+ "non-cloneable object.");
}
}
@@ -142,7 +142,7 @@ public class MBeanNotificationInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanNotificationInfo}
- * instance,
+ * instance,
* name.equals(object.getName()),
* description.equals(object.getDescription())
* and the corresponding elements of the type arrays are
@@ -152,18 +152,18 @@ public class MBeanNotificationInfo
{
if (obj instanceof MBeanNotificationInfo)
{
- if (!(super.equals(obj)))
- return false;
- MBeanNotificationInfo o = (MBeanNotificationInfo) obj;
- String[] oTypes = o.getNotifTypes();
- for (int a = 0; a < types.length; ++a)
- {
- if (a == oTypes.length)
- return true;
- if (!(types[a].equals(oTypes[a])))
- return false;
- }
- return true;
+ if (!(super.equals(obj)))
+ return false;
+ MBeanNotificationInfo o = (MBeanNotificationInfo) obj;
+ String[] oTypes = o.getNotifTypes();
+ for (int a = 0; a < types.length; ++a)
+ {
+ if (a == oTypes.length)
+ return true;
+ if (!(types[a].equals(oTypes[a])))
+ return false;
+ }
+ return true;
}
else
return false;
@@ -200,7 +200,7 @@ public class MBeanNotificationInfo
* Returns a textual representation of this instance. This
* is constructed using the class name
* (javax.management.MBeanNotificationInfo),
- * the name and description of the notification and the
+ * the name and description of the notification and the
* contents of the array of types.
*
*
@@ -216,10 +216,10 @@ public class MBeanNotificationInfo
{
if (string == null)
{
- super.toString();
- string = string.substring(0, string.length() - 1)
- + ",types=" + Arrays.toString(types)
- + "]";
+ super.toString();
+ string = string.substring(0, string.length() - 1)
+ + ",types=" + Arrays.toString(types)
+ + "]";
}
return string;
}
diff --git a/libjava/classpath/javax/management/MBeanOperationInfo.java b/libjava/classpath/javax/management/MBeanOperationInfo.java
index 03220c1..0adc0e6 100644
--- a/libjava/classpath/javax/management/MBeanOperationInfo.java
+++ b/libjava/classpath/javax/management/MBeanOperationInfo.java
@@ -118,13 +118,13 @@ public class MBeanOperationInfo
signature = new MBeanParameterInfo[paramTypes.length];
for (int a = 0; a < paramTypes.length; ++a)
{
- Type t = paramTypes[a];
- if (t instanceof Class)
- signature[a] = new MBeanParameterInfo(null,
- ((Class>) t).getName(),
- null);
- else
- signature[a] = new MBeanParameterInfo(null, t.toString(), null);
+ Type t = paramTypes[a];
+ if (t instanceof Class)
+ signature[a] = new MBeanParameterInfo(null,
+ ((Class>) t).getName(),
+ null);
+ else
+ signature[a] = new MBeanParameterInfo(null, t.toString(), null);
}
Type retType = method.getGenericReturnType();
if (retType instanceof Class)
@@ -133,17 +133,17 @@ public class MBeanOperationInfo
type = retType.toString();
if (method.getReturnType() == Void.TYPE)
{
- if (paramTypes.length == 0)
- impact = UNKNOWN;
- else
- impact = ACTION;
+ if (paramTypes.length == 0)
+ impact = UNKNOWN;
+ else
+ impact = ACTION;
}
else
{
- if (paramTypes.length == 0)
- impact = INFO;
- else
- impact = ACTION_INFO;
+ if (paramTypes.length == 0)
+ impact = INFO;
+ else
+ impact = ACTION_INFO;
}
}
@@ -163,16 +163,16 @@ public class MBeanOperationInfo
* @param impact the impact of performing the operation.
*/
public MBeanOperationInfo(String name, String desc,
- MBeanParameterInfo[] sig, String type,
- int impact)
+ MBeanParameterInfo[] sig, String type,
+ int impact)
{
super(name, desc);
if (sig == null)
signature = new MBeanParameterInfo[0];
else
{
- signature = new MBeanParameterInfo[sig.length];
- System.arraycopy(sig, 0, signature, 0, sig.length);
+ signature = new MBeanParameterInfo[sig.length];
+ System.arraycopy(sig, 0, signature, 0, sig.length);
}
this.type = type;
this.impact = impact;
@@ -192,13 +192,13 @@ public class MBeanOperationInfo
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException e)
{
- /* This shouldn't happen; we implement Cloneable */
- throw new IllegalStateException("clone() called on " +
- "non-cloneable object.");
+ /* This shouldn't happen; we implement Cloneable */
+ throw new IllegalStateException("clone() called on " +
+ "non-cloneable object.");
}
}
@@ -214,7 +214,7 @@ public class MBeanOperationInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanOperationInfo}
- * instance,
+ * instance,
* name.equals(object.getName()),
* description.equals(object.getDescription()),
* type.equals(object.getReturnType()),
@@ -232,15 +232,15 @@ public class MBeanOperationInfo
MBeanParameterInfo[] sig = o.getSignature();
for (int a = 0; a < signature.length; ++a)
{
- if (a == sig.length)
- return true;
- if (!(signature[a].equals(sig[a])))
- return false;
+ if (a == sig.length)
+ return true;
+ if (!(signature[a].equals(sig[a])))
+ return false;
}
return (type.equals(o.getReturnType()) &&
- impact == o.getImpact());
+ impact == o.getImpact());
}
-
+
/**
*
* Returns the impact of performing this operation.
@@ -328,30 +328,30 @@ public class MBeanOperationInfo
{
if (string == null)
{
- String impactString;
- switch (impact)
- {
- case INFO:
- impactString = "INFO";
- break;
- case ACTION:
- impactString = "ACTION";
- break;
- case ACTION_INFO:
- impactString = "ACTION_INFO";
- break;
- case UNKNOWN:
- impactString = "UNKNOWN";
- break;
- default:
- impactString = "ERRONEOUS VALUE";
- }
- super.toString();
- string = string.substring(0, string.length() - 1)
- + ",returnType=" + type
- + ",impact=" + impactString
- + ",signature=" + Arrays.toString(signature)
- + "]";
+ String impactString;
+ switch (impact)
+ {
+ case INFO:
+ impactString = "INFO";
+ break;
+ case ACTION:
+ impactString = "ACTION";
+ break;
+ case ACTION_INFO:
+ impactString = "ACTION_INFO";
+ break;
+ case UNKNOWN:
+ impactString = "UNKNOWN";
+ break;
+ default:
+ impactString = "ERRONEOUS VALUE";
+ }
+ super.toString();
+ string = string.substring(0, string.length() - 1)
+ + ",returnType=" + type
+ + ",impact=" + impactString
+ + ",signature=" + Arrays.toString(signature)
+ + "]";
}
return string;
}
diff --git a/libjava/classpath/javax/management/MBeanParameterInfo.java b/libjava/classpath/javax/management/MBeanParameterInfo.java
index ee6ef99..9307de4 100644
--- a/libjava/classpath/javax/management/MBeanParameterInfo.java
+++ b/libjava/classpath/javax/management/MBeanParameterInfo.java
@@ -63,7 +63,7 @@ public class MBeanParameterInfo
/**
* Constructs a new {@link MBeanParameterInfo} using the specified
- * name, description and type.
+ * name, description and type.
*
* @param name the name of the attribute.
* @param type the type of the attribute, in the form of its class name.
@@ -89,13 +89,13 @@ public class MBeanParameterInfo
{
try
{
- return super.clone();
+ return super.clone();
}
catch (CloneNotSupportedException e)
{
- /* This shouldn't happen; we implement Cloneable */
- throw new IllegalStateException("clone() called on " +
- "non-cloneable object.");
+ /* This shouldn't happen; we implement Cloneable */
+ throw new IllegalStateException("clone() called on " +
+ "non-cloneable object.");
}
}
@@ -109,7 +109,7 @@ public class MBeanParameterInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link MBeanParameterInfo}
- * instance,
+ * instance,
* name.equals(object.getName()),
* description.equals(object.getDescription()),
* and type.equals(object.getType()).
@@ -165,10 +165,10 @@ public class MBeanParameterInfo
{
if (string == null)
{
- super.toString();
- string = string.substring(0, string.length() - 1)
- + ",type=" + type
- + "]";
+ super.toString();
+ string = string.substring(0, string.length() - 1)
+ + ",type=" + type
+ + "]";
}
return string;
}
diff --git a/libjava/classpath/javax/management/MBeanPermission.java b/libjava/classpath/javax/management/MBeanPermission.java
index 076ac86..10813e4 100644
--- a/libjava/classpath/javax/management/MBeanPermission.java
+++ b/libjava/classpath/javax/management/MBeanPermission.java
@@ -113,7 +113,7 @@ import java.util.TreeSet;
* represent null. When this occurs in a
* required permission, anything may match it. When this
* forms part of a permission held by the user, it only
- * matches another null value.
+ * matches another null value.
*
*
The list of valid actions is as follows:
*
@@ -152,7 +152,7 @@ public class MBeanPermission
* The list of actions associated with this permission.
*/
private String actions;
-
+
/**
* The list of actions as an ordered set.
*/
@@ -166,7 +166,7 @@ public class MBeanPermission
/**
* Initialise the set of valid actions.
*/
- static
+ static
{
validSet = new HashSet();
validSet.add("addNotificationListener");
@@ -232,11 +232,11 @@ public class MBeanPermission
* @param actions the actions associated with this permission.
*/
public MBeanPermission(String className, String member,
- ObjectName name, String actions)
+ ObjectName name, String actions)
{
- this((className == null ? "-" : className) + "#"
- + (member == null ? "-" : member) + "["
- + (name == null ? "-" : name.toString()) + "]", actions);
+ this((className == null ? "-" : className) + "#"
+ + (member == null ? "-" : member) + "["
+ + (name == null ? "-" : name.toString()) + "]", actions);
}
/**
@@ -251,9 +251,9 @@ public class MBeanPermission
{
if (obj instanceof MBeanPermission)
{
- MBeanPermission p = (MBeanPermission) obj;
- return (p.getName().equals(getName()) &&
- p.getActions().equals(actions));
+ MBeanPermission p = (MBeanPermission) obj;
+ return (p.getName().equals(getName()) &&
+ p.getActions().equals(actions));
}
return false;
}
@@ -269,9 +269,9 @@ public class MBeanPermission
CPStringBuilder builder = new CPStringBuilder();
while (it.hasNext())
{
- builder.append(it.next());
- if (it.hasNext())
- builder.append(",");
+ builder.append(it.next());
+ if (it.hasNext())
+ builder.append(",");
}
return builder.toString();
}
@@ -312,7 +312,7 @@ public class MBeanPermission
* of this permission. If the queryMBeans action is presented,
* the queryNames action is implied.
*
- *
+ *
* @param p the permission to check that this permission implies.
* @return true if this permission implies p.
*/
@@ -320,21 +320,21 @@ public class MBeanPermission
{
if (p instanceof MBeanPermission)
{
- MBeanPermission mp = (MBeanPermission) p;
- NameHolder pName = new NameHolder(mp.getName());
- NameHolder name = new NameHolder(getName());
- if (!(name.equals(pName)))
- return false;
- for (String nextAction : mp.actionSet)
- {
- boolean found = actions.contains(nextAction);
- if (!found)
- if (nextAction.equals("queryNames"))
- found = actions.contains("queryMBeans");
- if (!found)
- return false;
- }
- return true;
+ MBeanPermission mp = (MBeanPermission) p;
+ NameHolder pName = new NameHolder(mp.getName());
+ NameHolder name = new NameHolder(getName());
+ if (!(name.equals(pName)))
+ return false;
+ for (String nextAction : mp.actionSet)
+ {
+ boolean found = actions.contains(nextAction);
+ if (!found)
+ if (nextAction.equals("queryNames"))
+ found = actions.contains("queryMBeans");
+ if (!found)
+ return false;
+ }
+ return true;
}
return false;
}
@@ -373,47 +373,47 @@ public class MBeanPermission
int memberIndex = name.indexOf("#");
int onIndex = name.indexOf("[");
if (onIndex == -1)
- {
- if (memberIndex == -1)
- className = name;
- else
- {
- className = name.substring(0, memberIndex);
- member = name.substring(memberIndex + 1);
- }
- }
+ {
+ if (memberIndex == -1)
+ className = name;
+ else
+ {
+ className = name.substring(0, memberIndex);
+ member = name.substring(memberIndex + 1);
+ }
+ }
else
- {
- if (memberIndex == -1)
- {
- className = name.substring(0, onIndex);
- objectName = name.substring(onIndex + 1,
- name.length() - 1);
- }
- else
- {
- className = name.substring(0, memberIndex);
- member = name.substring(memberIndex + 1, onIndex);
- objectName = name.substring(onIndex + 1,
- name.length() - 1);
- }
- }
+ {
+ if (memberIndex == -1)
+ {
+ className = name.substring(0, onIndex);
+ objectName = name.substring(onIndex + 1,
+ name.length() - 1);
+ }
+ else
+ {
+ className = name.substring(0, memberIndex);
+ member = name.substring(memberIndex + 1, onIndex);
+ objectName = name.substring(onIndex + 1,
+ name.length() - 1);
+ }
+ }
if (className.equals("-"))
- className = null;
+ className = null;
if (member.equals("-"))
- member = null;
+ member = null;
if (objectName == null || objectName.equals("-"))
- this.objectName = null;
+ this.objectName = null;
else
- try
- {
- this.objectName = new ObjectName(objectName);
- }
- catch (MalformedObjectNameException e)
- {
- throw (Error)
- (new InternalError("Invalid object name.").initCause(e));
- }
+ try
+ {
+ this.objectName = new ObjectName(objectName);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw (Error)
+ (new InternalError("Invalid object name.").initCause(e));
+ }
}
/**
@@ -436,46 +436,46 @@ public class MBeanPermission
* object name of this name holder is a pattern,
* {@link ObjectName#apply(ObjectName)} may be used as well.
*
- *
+ *
* @param obj the object to compare with this.
* @return true if the above holds.
*/
public boolean equals(Object obj)
{
if (obj instanceof NameHolder)
- {
- NameHolder nh = (NameHolder) obj;
- boolean cn = false;
- String ocn = nh.getClassName();
- if (ocn == null || className.equals("*"))
- cn = true;
- else
- {
- int wcIndex = className.indexOf("*");
- if (wcIndex != -1)
- cn = ocn.startsWith(className.substring(0, wcIndex));
- else
- cn = ocn.equals(className);
- }
- boolean m = false;
- String om = nh.getMember();
- if (om == null || member.equals("*"))
- m = true;
- else
- m = om.equals(member);
- boolean on = false;
- ObjectName oon = nh.getObjectName();
- if (oon == null)
- on = true;
- else if (objectName.isPattern())
- on = objectName.apply(oon);
- else
- on = oon.equals(objectName);
- return (cn && m && on);
- }
+ {
+ NameHolder nh = (NameHolder) obj;
+ boolean cn = false;
+ String ocn = nh.getClassName();
+ if (ocn == null || className.equals("*"))
+ cn = true;
+ else
+ {
+ int wcIndex = className.indexOf("*");
+ if (wcIndex != -1)
+ cn = ocn.startsWith(className.substring(0, wcIndex));
+ else
+ cn = ocn.equals(className);
+ }
+ boolean m = false;
+ String om = nh.getMember();
+ if (om == null || member.equals("*"))
+ m = true;
+ else
+ m = om.equals(member);
+ boolean on = false;
+ ObjectName oon = nh.getObjectName();
+ if (oon == null)
+ on = true;
+ else if (objectName.isPattern())
+ on = objectName.apply(oon);
+ else
+ on = oon.equals(objectName);
+ return (cn && m && on);
+ }
return false;
}
-
+
/**
* Returns the class name.
*/
@@ -540,11 +540,10 @@ public class MBeanPermission
{
for (String action : actionSet)
{
- if (!(validSet.contains(action)))
- throw new IllegalArgumentException("Invalid action "
- + action + " found.");
+ if (!(validSet.contains(action)))
+ throw new IllegalArgumentException("Invalid action "
+ + action + " found.");
}
}
}
-
diff --git a/libjava/classpath/javax/management/MBeanRegistrationException.java b/libjava/classpath/javax/management/MBeanRegistrationException.java
index 9f62b9a..18ed44a 100644
--- a/libjava/classpath/javax/management/MBeanRegistrationException.java
+++ b/libjava/classpath/javax/management/MBeanRegistrationException.java
@@ -81,4 +81,3 @@ public class MBeanRegistrationException
}
-
diff --git a/libjava/classpath/javax/management/MBeanServer.java b/libjava/classpath/javax/management/MBeanServer.java
index 0be5d71..4b57215 100644
--- a/libjava/classpath/javax/management/MBeanServer.java
+++ b/libjava/classpath/javax/management/MBeanServer.java
@@ -72,7 +72,7 @@ import javax.management.loading.ClassLoaderRepository;
* is thrown. Note than the class name used in the exception
* is that of the bean, and thus, as a result, an
* {@link InstanceNotFoundException}
- * precludes these security checks, due to the class name
+ * precludes these security checks, due to the class name
* that would be used in the exception being unavailable.
*
*
@@ -113,7 +113,7 @@ public interface MBeanServer
* Object)
*/
void addNotificationListener(ObjectName name, NotificationListener listener,
- NotificationFilter filter, Object passback)
+ NotificationFilter filter, Object passback)
throws InstanceNotFoundException;
/**
@@ -122,7 +122,7 @@ public interface MBeanServer
* bean. Notifications emitted by the management bean are forwarded
* to the listener via the server, which will convert any MBean
* references in the source to portable {@link ObjectName}
- * instances. The notification is otherwise unchanged.
+ * instances. The notification is otherwise unchanged.
*
*
* The listener that receives notifications will be the one that is
@@ -159,7 +159,7 @@ public interface MBeanServer
* Object)
*/
void addNotificationListener(ObjectName name, ObjectName listener,
- NotificationFilter filter, Object passback)
+ NotificationFilter filter, Object passback)
throws InstanceNotFoundException;
/**
@@ -168,7 +168,7 @@ public interface MBeanServer
* using the default constructor and registers it with the server
* under the supplied name. The class is loaded using the
* {@link javax.management.loading.ClassLoaderRepository default
- * loader repository} of the server.
+ * loader repository} of the server.
*
*
* If the name supplied is null, then the bean is
@@ -177,7 +177,7 @@ public interface MBeanServer
* of this interface will be used to obtain the name in this case.
*
*
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #createMBean(String, ObjectName, Object[], String[])
* createMBean(className, name, (Object[]) null,
* (String[]) null)} with null parameters
@@ -211,8 +211,8 @@ public interface MBeanServer
*/
ObjectInstance createMBean(String className, ObjectName name)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException;
/**
*
@@ -220,7 +220,7 @@ public interface MBeanServer
* using the given constructor and registers it with the server
* under the supplied name. The class is loaded using the
* {@link javax.management.loading.ClassLoaderRepository default
- * loader repository} of the server.
+ * loader repository} of the server.
*
*
* If the name supplied is null, then the bean is
@@ -228,7 +228,7 @@ public interface MBeanServer
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
*
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with.
@@ -256,10 +256,10 @@ public interface MBeanServer
* and registerMBean methods.
*/
ObjectInstance createMBean(String className, ObjectName name,
- Object[] params, String[] sig)
+ Object[] params, String[] sig)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException;
/**
*
@@ -277,7 +277,7 @@ public interface MBeanServer
* of this interface will be used to obtain the name in this case.
*
*
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #createMBean(String, ObjectName, ObjectName, Object[], String)
* createMBean(className, name, loaderName, (Object[]) null,
* (String) null)} with null parameters
@@ -312,11 +312,11 @@ public interface MBeanServer
* and registerMBean methods.
* @see #createMBean(String, ObjectName, ObjectName, Object[], String[])
*/
- ObjectInstance createMBean(String className, ObjectName name,
- ObjectName loaderName)
+ ObjectInstance createMBean(String className, ObjectName name,
+ ObjectName loaderName)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, InstanceNotFoundException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, InstanceNotFoundException;
/**
*
@@ -325,7 +325,7 @@ public interface MBeanServer
* under the supplied name. The class is loaded using the
* given class loader. If this argument is null,
* then the same class loader as was used to load the server
- * is used.
+ * is used.
*
*
* If the name supplied is null, then the bean is
@@ -333,7 +333,7 @@ public interface MBeanServer
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
*
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with.
@@ -364,11 +364,11 @@ public interface MBeanServer
* and registerMBean methods.
*/
ObjectInstance createMBean(String className, ObjectName name,
- ObjectName loaderName, Object[] params,
- String[] sig)
+ ObjectName loaderName, Object[] params,
+ String[] sig)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, InstanceNotFoundException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, InstanceNotFoundException;
/**
* Deserializes a byte array using the class loader of the specified
@@ -449,7 +449,7 @@ public interface MBeanServer
*/
ObjectInputStream deserialize(String name, ObjectName loader, byte[] data)
throws InstanceNotFoundException, ReflectionException,
- OperationsException;
+ OperationsException;
/**
* Returns the value of the supplied attribute from the specified
@@ -478,7 +478,7 @@ public interface MBeanServer
*/
Object getAttribute(ObjectName bean, String name)
throws MBeanException, AttributeNotFoundException,
- InstanceNotFoundException, ReflectionException;
+ InstanceNotFoundException, ReflectionException;
/**
* Returns the values of the named attributes from the specified
@@ -505,7 +505,7 @@ public interface MBeanServer
* MBeanPermission(className, n, bean,
* "getAttribute")} or that attribute will
* not be included.
- *
+ *
* @see DynamicMBean#getAttributes(String[])
*/
AttributeList getAttributes(ObjectName bean, String[] names)
@@ -534,7 +534,7 @@ public interface MBeanServer
*/
ClassLoader getClassLoader(ObjectName name)
throws InstanceNotFoundException;
-
+
/**
* Returns the class loader of the specified management bean. If
* l is the requested class loader, and r
@@ -630,7 +630,7 @@ public interface MBeanServer
*/
MBeanInfo getMBeanInfo(ObjectName name)
throws InstanceNotFoundException, IntrospectionException,
- ReflectionException;
+ ReflectionException;
/**
* Returns the {@link ObjectInstance} created for the specified
@@ -659,7 +659,7 @@ public interface MBeanServer
* but the instance is not yet registered with the server.
*
*
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #instantiate(String, Object[], String[])
* instantiate(name, (Object[]) null, (String[]) null)}
* with null parameters and signature.
@@ -723,7 +723,7 @@ public interface MBeanServer
* registered with the server.
*
*
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #instantiate(String, ObjectName, Object[], String[])
* instantiate(name, loaderName, (Object[]) null,
* (String[]) null)} with null parameters
@@ -751,7 +751,7 @@ public interface MBeanServer
*/
Object instantiate(String name, ObjectName loaderName)
throws InstanceNotFoundException, ReflectionException,
- MBeanException;
+ MBeanException;
/**
* Creates an instance of the specified class using the supplied
@@ -782,9 +782,9 @@ public interface MBeanServer
* "instantiate")}.
*/
Object instantiate(String name, ObjectName loaderName,
- Object[] params, String[] sig)
+ Object[] params, String[] sig)
throws InstanceNotFoundException, ReflectionException,
- MBeanException;
+ MBeanException;
/**
* Invokes the supplied operation on the specified management
@@ -809,7 +809,7 @@ public interface MBeanServer
*/
Object invoke(ObjectName bean, String name, Object[] params, String[] sig)
throws InstanceNotFoundException, MBeanException,
- ReflectionException;
+ ReflectionException;
/**
*
@@ -826,7 +826,7 @@ public interface MBeanServer
*
Both the class of B and C were loaded by the same class loader,
* and B is assignable to C.
*
- *
+ *
* @param name the name of the management bean.
* @param className the name of the class to test if name is
* an instance of.
@@ -869,7 +869,7 @@ public interface MBeanServer
*
* If both the object name and the query expression are null,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
*
*
* @param name an {@link ObjectName} to use as a filter.
@@ -891,7 +891,7 @@ public interface MBeanServer
* case that particular bean will again be excluded.
*/
Set queryMBeans(ObjectName name, QueryExp query);
-
+
/**
*
* Returns a set of {@link ObjectName}s matching the specified
@@ -906,7 +906,7 @@ public interface MBeanServer
*
* If both the object name and the query expression are null,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
*
*
* @param name an {@link ObjectName} to use as a filter.
@@ -935,7 +935,7 @@ public interface MBeanServer
* Registers the supplied instance with the server, using the specified
* {@link ObjectName}. If the name given is null, then
* the bean supplied is expected to implement the {@link MBeanRegistration}
- * interface and provide the name via the
+ * interface and provide the name via the
* {@link MBeanRegistration#preRegister preRegister} method
* of this interface.
*
@@ -971,7 +971,7 @@ public interface MBeanServer
*/
ObjectInstance registerMBean(Object obj, ObjectName name)
throws InstanceAlreadyExistsException, MBeanRegistrationException,
- NotCompliantMBeanException;
+ NotCompliantMBeanException;
/**
* Removes the specified listener from the list of recipients
@@ -997,7 +997,7 @@ public interface MBeanServer
* @see NotificationBroadcaster#removeNotificationListener(NotificationListener)
*/
void removeNotificationListener(ObjectName name,
- NotificationListener listener)
+ NotificationListener listener)
throws InstanceNotFoundException, ListenerNotFoundException;
/**
@@ -1029,9 +1029,9 @@ public interface MBeanServer
* Object)
*/
void removeNotificationListener(ObjectName name,
- NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationListener listener,
+ NotificationFilter filter,
+ Object passback)
throws InstanceNotFoundException, ListenerNotFoundException;
/**
@@ -1091,14 +1091,14 @@ public interface MBeanServer
* Object)
*/
void removeNotificationListener(ObjectName name,
- ObjectName listener,
- NotificationFilter filter,
- Object passback)
+ ObjectName listener,
+ NotificationFilter filter,
+ Object passback)
throws InstanceNotFoundException, ListenerNotFoundException;
/**
* Sets the value of the specified attribute of the supplied
- * management bean.
+ * management bean.
*
* @param name the name of the management bean.
* @param attribute the attribute to set.
@@ -1131,8 +1131,8 @@ public interface MBeanServer
*/
void setAttribute(ObjectName name, Attribute attribute)
throws InstanceNotFoundException, AttributeNotFoundException,
- InvalidAttributeValueException, MBeanException,
- ReflectionException;
+ InvalidAttributeValueException, MBeanException,
+ ReflectionException;
/**
* Sets the value of each of the specified attributes
@@ -1192,7 +1192,7 @@ public interface MBeanServer
* MBeanPermission(String,String,ObjectName,String)
* MBeanPermission(className, null, name,
* "unregisterMBean")}.
- */
+ */
void unregisterMBean(ObjectName name)
throws InstanceNotFoundException, MBeanRegistrationException;
diff --git a/libjava/classpath/javax/management/MBeanServerBuilder.java b/libjava/classpath/javax/management/MBeanServerBuilder.java
index 4e28068..ce45915 100644
--- a/libjava/classpath/javax/management/MBeanServerBuilder.java
+++ b/libjava/classpath/javax/management/MBeanServerBuilder.java
@@ -73,7 +73,7 @@ public class MBeanServerBuilder
* same as that returned by {@link #newMBeanServerDelegate()} as the factory
* can optionally wrap the delegate before calling this method.
*
- *
+ *
* @param defaultDomain the default domain used by the new server.
* @param outer the {@link MBeanServer} passed to the {@link MBeanRegistration}
* interface of management beans.
@@ -82,7 +82,7 @@ public class MBeanServerBuilder
* @return a new instance of a server implementation.
*/
public MBeanServer newMBeanServer(String defaultDomain, MBeanServer outer,
- MBeanServerDelegate delegate)
+ MBeanServerDelegate delegate)
{
return new Server(defaultDomain, outer, delegate);
}
diff --git a/libjava/classpath/javax/management/MBeanServerConnection.java b/libjava/classpath/javax/management/MBeanServerConnection.java
index cba6dac..9e44b8f 100644
--- a/libjava/classpath/javax/management/MBeanServerConnection.java
+++ b/libjava/classpath/javax/management/MBeanServerConnection.java
@@ -80,7 +80,7 @@ public interface MBeanServerConnection
* Object)
*/
void addNotificationListener(ObjectName name, NotificationListener listener,
- NotificationFilter filter, Object passback)
+ NotificationFilter filter, Object passback)
throws InstanceNotFoundException, IOException;
/**
@@ -89,7 +89,7 @@ public interface MBeanServerConnection
* bean. Notifications emitted by the management bean are forwarded
* to the listener via the server, which will convert any MBean
* references in the source to portable {@link ObjectName}
- * instances. The notification is otherwise unchanged.
+ * instances. The notification is otherwise unchanged.
*
*
* The listener that receives notifications will be the one that is
@@ -123,7 +123,7 @@ public interface MBeanServerConnection
* Object)
*/
void addNotificationListener(ObjectName name, ObjectName listener,
- NotificationFilter filter, Object passback)
+ NotificationFilter filter, Object passback)
throws InstanceNotFoundException, RuntimeOperationsException, IOException;
/**
@@ -132,7 +132,7 @@ public interface MBeanServerConnection
* using the default constructor and registers it with the server
* under the supplied name. The class is loaded using the
* {@link javax.management.loading.ClassLoaderRepository default
- * loader repository} of the server.
+ * loader repository} of the server.
*
*
* If the name supplied is null, then the bean is
@@ -141,7 +141,7 @@ public interface MBeanServerConnection
* of this interface will be used to obtain the name in this case.
*
*
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #createMBean(String, ObjectName, Object[], String[])
* createMBean(className, name, (Object[]) null,
* (String[]) null)} with null parameters
@@ -173,8 +173,8 @@ public interface MBeanServerConnection
*/
ObjectInstance createMBean(String className, ObjectName name)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, IOException;
/**
*
@@ -182,7 +182,7 @@ public interface MBeanServerConnection
* using the given constructor and registers it with the server
* under the supplied name. The class is loaded using the
* {@link javax.management.loading.ClassLoaderRepository default
- * loader repository} of the server.
+ * loader repository} of the server.
*
*
* If the name supplied is null, then the bean is
@@ -190,7 +190,7 @@ public interface MBeanServerConnection
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
*
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with.
@@ -216,10 +216,10 @@ public interface MBeanServerConnection
* the bean server.
*/
ObjectInstance createMBean(String className, ObjectName name,
- Object[] params, String[] sig)
+ Object[] params, String[] sig)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, IOException;
/**
*
@@ -237,7 +237,7 @@ public interface MBeanServerConnection
* of this interface will be used to obtain the name in this case.
*
@@ -284,7 +284,7 @@ public interface MBeanServerConnection
* under the supplied name. The class is loaded using the
* given class loader. If this argument is null,
* then the same class loader as was used to load the server
- * is used.
+ * is used.
*
*
* If the name supplied is null, then the bean is
@@ -292,7 +292,7 @@ public interface MBeanServerConnection
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
*
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with.
@@ -321,12 +321,12 @@ public interface MBeanServerConnection
* the bean server.
*/
ObjectInstance createMBean(String className, ObjectName name,
- ObjectName loaderName, Object[] params,
- String[] sig)
+ ObjectName loaderName, Object[] params,
+ String[] sig)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, InstanceNotFoundException,
- IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, InstanceNotFoundException,
+ IOException;
/**
* Returns the value of the supplied attribute from the specified
@@ -352,8 +352,8 @@ public interface MBeanServerConnection
*/
Object getAttribute(ObjectName bean, String name)
throws MBeanException, AttributeNotFoundException,
- InstanceNotFoundException, ReflectionException,
- IOException;
+ InstanceNotFoundException, ReflectionException,
+ IOException;
/**
* Returns the values of the named attributes from the specified
@@ -375,7 +375,7 @@ public interface MBeanServerConnection
*/
AttributeList getAttributes(ObjectName bean, String[] names)
throws InstanceNotFoundException, ReflectionException,
- IOException;
+ IOException;
/**
* Returns the default domain this server applies to beans that have
@@ -427,7 +427,7 @@ public interface MBeanServerConnection
*/
MBeanInfo getMBeanInfo(ObjectName name)
throws InstanceNotFoundException, IntrospectionException,
- ReflectionException, IOException;
+ ReflectionException, IOException;
/**
* Returns the {@link ObjectInstance} created for the specified
@@ -463,7 +463,7 @@ public interface MBeanServerConnection
*/
Object invoke(ObjectName bean, String name, Object[] params, String[] sig)
throws InstanceNotFoundException, MBeanException,
- ReflectionException, IOException;
+ ReflectionException, IOException;
/**
*
@@ -480,7 +480,7 @@ public interface MBeanServerConnection
*
Both the class of B and C were loaded by the same class loader,
* and B is assignable to C.
*
- *
+ *
* @param name the name of the management bean.
* @param className the name of the class to test if name is
* an instance of.
@@ -523,7 +523,7 @@ public interface MBeanServerConnection
*
* If both the object name and the query expression are null,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
*
*
* @param name an {@link ObjectName} to use as a filter.
@@ -535,7 +535,7 @@ public interface MBeanServerConnection
*/
Set queryMBeans(ObjectName name, QueryExp query)
throws IOException;
-
+
/**
*
* Returns a set of {@link ObjectName}s matching the specified
@@ -550,7 +550,7 @@ public interface MBeanServerConnection
*
* If both the object name and the query expression are null,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
*
*
* @param name an {@link ObjectName} to use as a filter.
@@ -584,9 +584,9 @@ public interface MBeanServerConnection
* @see NotificationBroadcaster#removeNotificationListener(NotificationListener)
*/
void removeNotificationListener(ObjectName name,
- NotificationListener listener)
+ NotificationListener listener)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Removes the specified listener from the list of recipients
@@ -614,11 +614,11 @@ public interface MBeanServerConnection
* Object)
*/
void removeNotificationListener(ObjectName name,
- NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationListener listener,
+ NotificationFilter filter,
+ Object passback)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Removes the specified listener from the list of recipients
@@ -643,7 +643,7 @@ public interface MBeanServerConnection
*/
void removeNotificationListener(ObjectName name, ObjectName listener)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Removes the specified listener from the list of recipients
@@ -672,15 +672,15 @@ public interface MBeanServerConnection
* Object)
*/
void removeNotificationListener(ObjectName name,
- ObjectName listener,
- NotificationFilter filter,
- Object passback)
+ ObjectName listener,
+ NotificationFilter filter,
+ Object passback)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Sets the value of the specified attribute of the supplied
- * management bean.
+ * management bean.
*
* @param name the name of the management bean.
* @param attribute the attribute to set.
@@ -710,8 +710,8 @@ public interface MBeanServerConnection
*/
void setAttribute(ObjectName name, Attribute attribute)
throws InstanceNotFoundException, AttributeNotFoundException,
- InvalidAttributeValueException, MBeanException,
- ReflectionException, IOException;
+ InvalidAttributeValueException, MBeanException,
+ ReflectionException, IOException;
/**
* Sets the value of each of the specified attributes
@@ -739,7 +739,7 @@ public interface MBeanServerConnection
*/
AttributeList setAttributes(ObjectName name, AttributeList attributes)
throws InstanceNotFoundException, ReflectionException,
- IOException;
+ IOException;
/**
* Unregisters the specified management bean. Following this operation,
@@ -760,9 +760,9 @@ public interface MBeanServerConnection
* {@link MBeanServerDelegate} bean.
* @throws IOException if an I/O error occurred in communicating with
* the bean server.
- */
+ */
void unregisterMBean(ObjectName name)
throws InstanceNotFoundException, MBeanRegistrationException,
- IOException;
+ IOException;
}
diff --git a/libjava/classpath/javax/management/MBeanServerDelegate.java b/libjava/classpath/javax/management/MBeanServerDelegate.java
index c55faa3..5addb99 100644
--- a/libjava/classpath/javax/management/MBeanServerDelegate.java
+++ b/libjava/classpath/javax/management/MBeanServerDelegate.java
@@ -115,8 +115,8 @@ public class MBeanServerDelegate
* @see #removeNotificationListener(NotificationListener)
*/
public void addNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws IllegalArgumentException
{
if (listener == null)
@@ -175,15 +175,15 @@ public class MBeanServerDelegate
*/
public MBeanNotificationInfo[] getNotificationInfo()
{
- return new MBeanNotificationInfo[]
+ return new MBeanNotificationInfo[]
{
- new MBeanNotificationInfo(new String[]
- {
- MBeanServerNotification.REGISTRATION_NOTIFICATION,
- MBeanServerNotification.UNREGISTRATION_NOTIFICATION,
- },
- MBeanServerNotification.class.getName(),
- "Server registration notifications")
+ new MBeanNotificationInfo(new String[]
+ {
+ MBeanServerNotification.REGISTRATION_NOTIFICATION,
+ MBeanServerNotification.UNREGISTRATION_NOTIFICATION,
+ },
+ MBeanServerNotification.class.getName(),
+ "Server registration notifications")
};
}
@@ -239,15 +239,15 @@ public class MBeanServerDelegate
boolean foundOne = false;
while (it.hasNext())
{
- if (it.next().getListener() == listener)
- {
- it.remove();
- foundOne = true;
- }
+ if (it.next().getListener() == listener)
+ {
+ it.remove();
+ foundOne = true;
+ }
}
if (!foundOne)
throw new ListenerNotFoundException("The specified listener, " + listener +
- "is not registered with this bean.");
+ "is not registered with this bean.");
}
/**
@@ -269,16 +269,16 @@ public class MBeanServerDelegate
* @see #removeNotificationListener(NotificationListener)
*/
public void removeNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws ListenerNotFoundException
{
if (!(listeners.remove(new ListenerData(listener, filter, passback))))
{
- throw new ListenerNotFoundException("The specified listener, " + listener +
- " with filter " + filter +
- "and passback " + passback +
- ", is not registered with this bean.");
+ throw new ListenerNotFoundException("The specified listener, " + listener +
+ " with filter " + filter +
+ "and passback " + passback +
+ ", is not registered with this bean.");
}
}
@@ -295,9 +295,9 @@ public class MBeanServerDelegate
notification.setSequenceNumber(++seqNo);
for (ListenerData ldata : listeners)
{
- NotificationFilter filter = ldata.getFilter();
- if (filter == null || filter.isNotificationEnabled(notification))
- ldata.getListener().handleNotification(notification, ldata.getPassback());
+ NotificationFilter filter = ldata.getFilter();
+ if (filter == null || filter.isNotificationEnabled(notification))
+ ldata.getListener().handleNotification(notification, ldata.getPassback());
}
}
diff --git a/libjava/classpath/javax/management/MBeanServerFactory.java b/libjava/classpath/javax/management/MBeanServerFactory.java
index d798b0c..f9bd456 100644
--- a/libjava/classpath/javax/management/MBeanServerFactory.java
+++ b/libjava/classpath/javax/management/MBeanServerFactory.java
@@ -134,7 +134,7 @@ public class MBeanServerFactory
* The default domain name is used when the domain name specified by
* the user is nullserver is null.
@@ -246,7 +246,7 @@ public class MBeanServerFactory
* used when the domain name specified by the user is nullnull value.
*
@@ -331,42 +331,42 @@ public class MBeanServerFactory
SystemProperties.getProperty("javax.management.builder.initial");
if (builderClass == null)
{
- if (builder == null ||
- builder.getClass() != MBeanServerBuilder.class)
- builder = new MBeanServerBuilder();
+ if (builder == null ||
+ builder.getClass() != MBeanServerBuilder.class)
+ builder = new MBeanServerBuilder();
}
else if (!(builder != null &&
- builderClass.equals(builder.getClass().getName())))
+ builderClass.equals(builder.getClass().getName())))
{
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- if (cl == null)
- cl = MBeanServerFactory.class.getClassLoader();
- try
- {
- Class> bClass = Class.forName(builderClass, true, cl);
- builder = (MBeanServerBuilder) bClass.newInstance();
- }
- catch (ClassNotFoundException e)
- {
- throw (JMRuntimeException) (new JMRuntimeException("The builder class, "
- + builderClass +
- ", could not be found."))
- .initCause(e);
- }
- catch (InstantiationException e)
- {
- throw (JMRuntimeException) (new JMRuntimeException("The builder class, "
- + builderClass +
- ", could not be instantiated."))
- .initCause(e);
- }
- catch (IllegalAccessException e)
- {
- throw (JMRuntimeException) (new JMRuntimeException("The builder class, "
- + builderClass +
- ", could not be accessed."))
- .initCause(e);
- }
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ if (cl == null)
+ cl = MBeanServerFactory.class.getClassLoader();
+ try
+ {
+ Class> bClass = Class.forName(builderClass, true, cl);
+ builder = (MBeanServerBuilder) bClass.newInstance();
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw (JMRuntimeException) (new JMRuntimeException("The builder class, "
+ + builderClass +
+ ", could not be found."))
+ .initCause(e);
+ }
+ catch (InstantiationException e)
+ {
+ throw (JMRuntimeException) (new JMRuntimeException("The builder class, "
+ + builderClass +
+ ", could not be instantiated."))
+ .initCause(e);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw (JMRuntimeException) (new JMRuntimeException("The builder class, "
+ + builderClass +
+ ", could not be accessed."))
+ .initCause(e);
+ }
}
MBeanServerDelegate delegate = builder.newMBeanServerDelegate();
if (delegate == null)
@@ -399,12 +399,12 @@ public class MBeanServerFactory
Iterator i = servers.values().iterator();
while (i.hasNext())
{
- MBeanServer s = i.next();
- if (server == s)
- {
- i.remove();
- return;
- }
+ MBeanServer s = i.next();
+ if (server == s)
+ {
+ i.remove();
+ return;
+ }
}
throw new IllegalArgumentException("The server given is not referenced.");
}
diff --git a/libjava/classpath/javax/management/MBeanServerInvocationHandler.java b/libjava/classpath/javax/management/MBeanServerInvocationHandler.java
index acc8543..093e882 100644
--- a/libjava/classpath/javax/management/MBeanServerInvocationHandler.java
+++ b/libjava/classpath/javax/management/MBeanServerInvocationHandler.java
@@ -81,7 +81,7 @@ import java.lang.reflect.Proxy;
*
toString() returns a textual representation
* of the proxy.
*
- *
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
@@ -129,7 +129,7 @@ public class MBeanServerInvocationHandler
* actual calls.
*/
public MBeanServerInvocationHandler(MBeanServerConnection conn,
- ObjectName name)
+ ObjectName name)
{
this(conn, name, false);
}
@@ -143,7 +143,7 @@ public class MBeanServerInvocationHandler
* Class)} if you wish to make your own call to
* {@link java.lang.reflect.Proxy#newInstance(ClassLoader,
* Class[], java.lang.reflect.InvocationHandler)} with
- * a different {@link ClassLoader}.
+ * a different {@link ClassLoader}.
*
* @param conn the connection through which methods will
* be forwarded to the bean.
@@ -154,7 +154,7 @@ public class MBeanServerInvocationHandler
* @since 1.6
*/
public MBeanServerInvocationHandler(MBeanServerConnection conn,
- ObjectName name, boolean mxBean)
+ ObjectName name, boolean mxBean)
{
this.conn = conn;
this.name = name;
@@ -164,7 +164,7 @@ public class MBeanServerInvocationHandler
/**
* Returns the connection through which the calls to the bean
* will be made.
- *
+ *
* @return the connection being used to forward the calls to
* the bean.
* @since 1.6
@@ -207,77 +207,77 @@ public class MBeanServerInvocationHandler
Class> proxyClass = proxy.getClass();
if (mName.equals("toString"))
{
- if (inInterface(mName, proxyClass))
- return conn.invoke(name,mName,null,null);
- else
- return proxyClass.getName() + "[name=" + name
- + ", conn=" + conn + "]";
+ if (inInterface(mName, proxyClass))
+ return conn.invoke(name,mName,null,null);
+ else
+ return proxyClass.getName() + "[name=" + name
+ + ", conn=" + conn + "]";
}
if (mName.equals("hashCode"))
{
- if (inInterface(mName, proxyClass))
- return conn.invoke(name,mName,null,null);
- else
- return conn.hashCode() + name.hashCode()
- + (iface == null ? 0 : iface.hashCode());
+ if (inInterface(mName, proxyClass))
+ return conn.invoke(name,mName,null,null);
+ else
+ return conn.hashCode() + name.hashCode()
+ + (iface == null ? 0 : iface.hashCode());
}
if (mName.equals("equals"))
{
- if (inInterface(mName, proxyClass, Object.class))
- return conn.invoke(name,mName,new Object[]{args[0]},
- new String[]{"java.lang.Object"});
- else
- {
- if (args[0].getClass() != proxy.getClass())
- return false;
- InvocationHandler ih = Proxy.getInvocationHandler(args[0]);
- if (ih instanceof MBeanServerInvocationHandler)
- {
- MBeanServerInvocationHandler h =
- (MBeanServerInvocationHandler) ih;
- return conn.equals(h.getMBeanServerConnection())
- && name.equals(h.getObjectName())
- && (iface == null ? h.iface == null
- : iface.equals(h.iface));
- }
- return false;
- }
+ if (inInterface(mName, proxyClass, Object.class))
+ return conn.invoke(name,mName,new Object[]{args[0]},
+ new String[]{"java.lang.Object"});
+ else
+ {
+ if (args[0].getClass() != proxy.getClass())
+ return false;
+ InvocationHandler ih = Proxy.getInvocationHandler(args[0]);
+ if (ih instanceof MBeanServerInvocationHandler)
+ {
+ MBeanServerInvocationHandler h =
+ (MBeanServerInvocationHandler) ih;
+ return conn.equals(h.getMBeanServerConnection())
+ && name.equals(h.getObjectName())
+ && (iface == null ? h.iface == null
+ : iface.equals(h.iface));
+ }
+ return false;
+ }
}
if (NotificationEmitter.class.isAssignableFrom(proxyClass))
{
- if (mName.equals("addNotificationListener"))
- {
- conn.addNotificationListener(name,
- (NotificationListener) args[0],
- (NotificationFilter) args[1],
- args[2]);
- return null;
- }
- if (mName.equals("getNotificationInfo"))
- return conn.getMBeanInfo(name).getNotifications();
- if (mName.equals("removeNotificationListener"))
- {
- if (args.length == 1)
- conn.removeNotificationListener(name,
- (NotificationListener)
- args[0]);
- else
- conn.removeNotificationListener(name,
- (NotificationListener)
- args[0],
- (NotificationFilter)
- args[1], args[2]);
- return null;
- }
+ if (mName.equals("addNotificationListener"))
+ {
+ conn.addNotificationListener(name,
+ (NotificationListener) args[0],
+ (NotificationFilter) args[1],
+ args[2]);
+ return null;
+ }
+ if (mName.equals("getNotificationInfo"))
+ return conn.getMBeanInfo(name).getNotifications();
+ if (mName.equals("removeNotificationListener"))
+ {
+ if (args.length == 1)
+ conn.removeNotificationListener(name,
+ (NotificationListener)
+ args[0]);
+ else
+ conn.removeNotificationListener(name,
+ (NotificationListener)
+ args[0],
+ (NotificationFilter)
+ args[1], args[2]);
+ return null;
+ }
}
String[] sigs;
if (args == null)
sigs = null;
else
{
- sigs = new String[args.length];
- for (int a = 0; a < args.length; ++a)
- sigs[a] = args[a].getClass().getName();
+ sigs = new String[args.length];
+ for (int a = 0; a < args.length; ++a)
+ sigs[a] = args[a].getClass().getName();
}
String attrib = null;
if (mName.startsWith("get"))
@@ -286,26 +286,26 @@ public class MBeanServerInvocationHandler
attrib = mName.substring(2);
if (attrib != null)
{
- Object val = conn.getAttribute(name, attrib);
- if (mxBean)
- return Translator.toJava(val, method);
- else
- return val;
+ Object val = conn.getAttribute(name, attrib);
+ if (mxBean)
+ return Translator.toJava(val, method);
+ else
+ return val;
}
else if (mName.startsWith("set"))
{
- Object arg;
- if (mxBean)
- arg = Translator.fromJava(args, method)[0];
- else
- arg = args[0];
- conn.setAttribute(name, new Attribute(mName.substring(3), arg));
- return null;
+ Object arg;
+ if (mxBean)
+ arg = Translator.fromJava(args, method)[0];
+ else
+ arg = args[0];
+ conn.setAttribute(name, new Attribute(mName.substring(3), arg));
+ return null;
}
if (mxBean)
- return Translator.toJava(conn.invoke(name, mName,
- Translator.fromJava(args,method),
- sigs), method);
+ return Translator.toJava(conn.invoke(name, mName,
+ Translator.fromJava(args,method),
+ sigs), method);
else
return conn.invoke(name, mName, args, sigs);
}
@@ -332,7 +332,7 @@ public class MBeanServerInvocationHandler
* second element of the array if broadcaster is true.
* handler refers to the invocation handler which forwards
* calls to the connection, which is created by a call to
- * new MBeanServerInvocationHandler(conn, name).
+ * new MBeanServerInvocationHandler(conn, name).
*
*
* Note: use of the proxy may result in
@@ -355,18 +355,18 @@ public class MBeanServerInvocationHandler
// Suppress warnings as we know an instance of T will be returned.
@SuppressWarnings("unchecked")
public static T newProxyInstance(MBeanServerConnection conn,
- ObjectName name, Class iface,
- boolean broadcaster)
+ ObjectName name, Class iface,
+ boolean broadcaster)
{
if (broadcaster)
return (T) Proxy.newProxyInstance(iface.getClassLoader(),
- new Class[] { iface,
- NotificationEmitter.class },
- new MBeanServerInvocationHandler(conn,name));
+ new Class[] { iface,
+ NotificationEmitter.class },
+ new MBeanServerInvocationHandler(conn,name));
else
return (T) Proxy.newProxyInstance(iface.getClassLoader(),
- new Class[] { iface },
- new MBeanServerInvocationHandler(conn,name));
+ new Class[] { iface },
+ new MBeanServerInvocationHandler(conn,name));
}
/**
@@ -380,23 +380,22 @@ public class MBeanServerInvocationHandler
* given method.
*/
private boolean inInterface(String name, Class> proxyClass,
- Class>... args)
+ Class>... args)
{
for (Class> iface : proxyClass.getInterfaces())
{
- try
- {
- iface.getMethod(name, args);
- return true;
- }
- catch (NoSuchMethodException e)
- {
- /* Ignored; this interface doesn't specify
- the method. */
- }
+ try
+ {
+ iface.getMethod(name, args);
+ return true;
+ }
+ catch (NoSuchMethodException e)
+ {
+ /* Ignored; this interface doesn't specify
+ the method. */
+ }
}
return false;
}
-
-}
+}
diff --git a/libjava/classpath/javax/management/MBeanServerNotification.java b/libjava/classpath/javax/management/MBeanServerNotification.java
index 820fd61..e225a29 100644
--- a/libjava/classpath/javax/management/MBeanServerNotification.java
+++ b/libjava/classpath/javax/management/MBeanServerNotification.java
@@ -84,7 +84,7 @@ public class MBeanServerNotification
* @param name the name of the bean concerned by this event.
*/
public MBeanServerNotification(String type, Object source, long seqNo,
- ObjectName name)
+ ObjectName name)
{
super(type, source, seqNo);
objectName = name;
diff --git a/libjava/classpath/javax/management/MBeanServerPermission.java b/libjava/classpath/javax/management/MBeanServerPermission.java
index 045573a..fea4ea2 100644
--- a/libjava/classpath/javax/management/MBeanServerPermission.java
+++ b/libjava/classpath/javax/management/MBeanServerPermission.java
@@ -161,10 +161,10 @@ public class MBeanServerPermission
super(checkName(name), actions);
if (actions != null && actions.length() > 0)
throw new IllegalArgumentException("The supplied action list " +
- "was not equal to null or the " +
- "empty string.");
+ "was not equal to null or the " +
+ "empty string.");
}
-
+
/**
* Returns true if the given object is also an {@link MBeanServerPermission}
* with the same name.
@@ -177,8 +177,8 @@ public class MBeanServerPermission
{
if (obj instanceof MBeanServerPermission)
{
- MBeanServerPermission o = (MBeanServerPermission) obj;
- return o.getName().equals(getName());
+ MBeanServerPermission o = (MBeanServerPermission) obj;
+ return o.getName().equals(getName());
}
return false;
}
@@ -209,28 +209,28 @@ public class MBeanServerPermission
{
if (p instanceof MBeanServerPermission)
{
- if (getName().equals("*"))
- return true;
- MBeanServerPermission msp = (MBeanServerPermission) p;
- String[] thisCaps = getName().split(",");
- String[] mspCaps = msp.getName().split(",");
- for (int a = 0; a < mspCaps.length; ++a)
- {
- boolean found = false;
- String mc = mspCaps[a].trim();
- for (int b = 0; b < thisCaps.length; ++b)
- {
- String tc = thisCaps[b].trim();
- if (tc.equals(mc))
- found = true;
- if (tc.equals("createMBeanServer") &&
- mc.equals("newMBeanServer"))
- found = true;
- }
- if (!found)
- return false;
- }
- return true;
+ if (getName().equals("*"))
+ return true;
+ MBeanServerPermission msp = (MBeanServerPermission) p;
+ String[] thisCaps = getName().split(",");
+ String[] mspCaps = msp.getName().split(",");
+ for (int a = 0; a < mspCaps.length; ++a)
+ {
+ boolean found = false;
+ String mc = mspCaps[a].trim();
+ for (int b = 0; b < thisCaps.length; ++b)
+ {
+ String tc = thisCaps[b].trim();
+ if (tc.equals(mc))
+ found = true;
+ if (tc.equals("createMBeanServer") &&
+ mc.equals("newMBeanServer"))
+ found = true;
+ }
+ if (!found)
+ return false;
+ }
+ return true;
}
return false;
}
@@ -246,7 +246,7 @@ public class MBeanServerPermission
{
return new MBeanServerPermissionCollection();
}
-
+
/**
* A collection of {@link MBeanServerPermission}s, stored
* as a single permission with the union of the capabilities
@@ -284,46 +284,46 @@ public class MBeanServerPermission
public void add(Permission p)
{
if (isReadOnly())
- throw new SecurityException("This collection is read only.");
+ throw new SecurityException("This collection is read only.");
if (p instanceof MBeanServerPermission)
- {
- MBeanServerPermission msp = (MBeanServerPermission) p;
- if (collectionPermission == null)
- collectionPermission = msp;
- else
- {
- String finalString = collectionPermission.getName();
- String[] cp = finalString.split(",");
- String[] np = msp.getName().split(",");
- int createms = finalString.indexOf("createMBeanServer");
- int newms = finalString.indexOf("newMBeanServer");
- for (int a = 0; a < np.length; ++a)
- {
- boolean found = false;
- String nps = np[a].trim();
- for (int b = 0; b < cp.length; ++b)
- {
- String cps = cp[b].trim();
- if (cps.equals(nps))
- found = true;
- if (nps.equals("newMBeanServer")
- && createms != -1)
- found = true;
- if (nps.equals("createMBeanServer")
- && newms != -1)
- finalString =
- finalString.replace("newMBeanServer",
- "createMBeanServer");
- }
- if (!found)
- finalString += "," + nps;
- }
- collectionPermission =
- new MBeanServerPermission(finalString);
- }
- }
+ {
+ MBeanServerPermission msp = (MBeanServerPermission) p;
+ if (collectionPermission == null)
+ collectionPermission = msp;
+ else
+ {
+ String finalString = collectionPermission.getName();
+ String[] cp = finalString.split(",");
+ String[] np = msp.getName().split(",");
+ int createms = finalString.indexOf("createMBeanServer");
+ int newms = finalString.indexOf("newMBeanServer");
+ for (int a = 0; a < np.length; ++a)
+ {
+ boolean found = false;
+ String nps = np[a].trim();
+ for (int b = 0; b < cp.length; ++b)
+ {
+ String cps = cp[b].trim();
+ if (cps.equals(nps))
+ found = true;
+ if (nps.equals("newMBeanServer")
+ && createms != -1)
+ found = true;
+ if (nps.equals("createMBeanServer")
+ && newms != -1)
+ finalString =
+ finalString.replace("newMBeanServer",
+ "createMBeanServer");
+ }
+ if (!found)
+ finalString += "," + nps;
+ }
+ collectionPermission =
+ new MBeanServerPermission(finalString);
+ }
+ }
}
-
+
/**
* Returns an enumeration over the single permission.
*
@@ -333,7 +333,7 @@ public class MBeanServerPermission
public Enumeration elements()
{
return new
- MBeanServerPermissionEnumeration(collectionPermission);
+ MBeanServerPermissionEnumeration(collectionPermission);
}
/**
@@ -365,8 +365,8 @@ public class MBeanServerPermission
*/
public MBeanServerPermissionEnumeration(MBeanServerPermission p)
{
- this.p = p;
- done = false;
+ this.p = p;
+ done = false;
}
/**
@@ -376,7 +376,7 @@ public class MBeanServerPermission
*/
public boolean hasMoreElements()
{
- return !done;
+ return !done;
}
/**
@@ -386,13 +386,13 @@ public class MBeanServerPermission
*/
public Permission nextElement()
{
- if (hasMoreElements())
- {
- done = true;
- return p;
- }
- else
- throw new NoSuchElementException("No more elements are available.");
+ if (hasMoreElements())
+ {
+ done = true;
+ return p;
+ }
+ else
+ throw new NoSuchElementException("No more elements are available.");
}
}
@@ -433,42 +433,38 @@ public class MBeanServerPermission
{
if (!(name.equals("*")))
{
- String[] constraints = name.split(",");
- name = "";
- boolean seenCreate = false;
- boolean seenNew = false;
- boolean start = true;
- for (int a = 0; a < constraints.length; ++a)
- {
- String next = constraints[a].trim();
- if (!(next.equals("createMBeanServer") ||
- next.equals("findMBeanServer") ||
- next.equals("newMBeanServer") ||
- next.equals("releaseMBeanServer")))
- throw new IllegalArgumentException("An invalid constraint, " +
- next + ", was specified.");
- if (next.equals("newMBeanServer"))
- seenNew = true;
- else if (next.equals("createMBeanServer"))
- seenCreate = true;
- else
- {
- if (!start)
- name += ",";
- name += next;
- start = false;
- }
- }
- if (seenNew && !seenCreate)
- name += (start ? "" : ",") + "newMBeanServer";
- else if (seenCreate)
- name += (start ? "" : ",") + "createMBeanServer";
+ String[] constraints = name.split(",");
+ name = "";
+ boolean seenCreate = false;
+ boolean seenNew = false;
+ boolean start = true;
+ for (int a = 0; a < constraints.length; ++a)
+ {
+ String next = constraints[a].trim();
+ if (!(next.equals("createMBeanServer") ||
+ next.equals("findMBeanServer") ||
+ next.equals("newMBeanServer") ||
+ next.equals("releaseMBeanServer")))
+ throw new IllegalArgumentException("An invalid constraint, " +
+ next + ", was specified.");
+ if (next.equals("newMBeanServer"))
+ seenNew = true;
+ else if (next.equals("createMBeanServer"))
+ seenCreate = true;
+ else
+ {
+ if (!start)
+ name += ",";
+ name += next;
+ start = false;
+ }
+ }
+ if (seenNew && !seenCreate)
+ name += (start ? "" : ",") + "newMBeanServer";
+ else if (seenCreate)
+ name += (start ? "" : ",") + "createMBeanServer";
}
return name;
}
}
-
-
-
-
diff --git a/libjava/classpath/javax/management/MBeanTrustPermission.java b/libjava/classpath/javax/management/MBeanTrustPermission.java
index 57d0e68..371e129 100644
--- a/libjava/classpath/javax/management/MBeanTrustPermission.java
+++ b/libjava/classpath/javax/management/MBeanTrustPermission.java
@@ -46,8 +46,8 @@ import java.security.BasicPermission;
* It has a target, but no actions. Valid values for the target
* are "register" and "*", the latter
* representing both the existing "register" target
- * and any future targets.
- *
+ * and any future targets.
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
@@ -96,10 +96,10 @@ public class MBeanTrustPermission
{
super(target, actions);
if ((!(target.equals("register"))) &&
- (!(target.equals("*"))))
+ (!(target.equals("*"))))
throw new IllegalArgumentException("The target must be 'register' or '*'");
if (actions != null && !(actions.length() == 0))
- throw new IllegalArgumentException("The actions must be null or ''");
+ throw new IllegalArgumentException("The actions must be null or ''");
}
-
+
}
diff --git a/libjava/classpath/javax/management/MalformedObjectNameException.java b/libjava/classpath/javax/management/MalformedObjectNameException.java
index e2f5774..9a98991 100644
--- a/libjava/classpath/javax/management/MalformedObjectNameException.java
+++ b/libjava/classpath/javax/management/MalformedObjectNameException.java
@@ -73,4 +73,3 @@ public class MalformedObjectNameException
}
}
-
diff --git a/libjava/classpath/javax/management/NotCompliantMBeanException.java b/libjava/classpath/javax/management/NotCompliantMBeanException.java
index f2252f2..a8fa7a8 100644
--- a/libjava/classpath/javax/management/NotCompliantMBeanException.java
+++ b/libjava/classpath/javax/management/NotCompliantMBeanException.java
@@ -75,4 +75,3 @@ public class NotCompliantMBeanException
}
}
-
diff --git a/libjava/classpath/javax/management/Notification.java b/libjava/classpath/javax/management/Notification.java
index 2bbc206..0831c29 100644
--- a/libjava/classpath/javax/management/Notification.java
+++ b/libjava/classpath/javax/management/Notification.java
@@ -139,7 +139,7 @@ public class Notification
/**
* Creates a new {@link Notification} object with the specified type,
- * source, sequence number and timestamp.
+ * source, sequence number and timestamp.
*
* @param type the type of the notification.
* @param source the source of the notification.
@@ -147,14 +147,14 @@ public class Notification
* @param timeStamp the time the notification was emitted.
*/
public Notification(String type, Object source, long sequenceNumber,
- long timeStamp)
+ long timeStamp)
{
this(type, source, sequenceNumber, timeStamp, "");
}
/**
* Creates a new {@link Notification} object with the specified type,
- * source, sequence number, timestamp and message.
+ * source, sequence number, timestamp and message.
*
* @param type the type of the notification.
* @param source the source of the notification.
@@ -163,7 +163,7 @@ public class Notification
* @param message the message contained in the notification.
*/
public Notification(String type, Object source, long sequenceNumber,
- long timeStamp, String message)
+ long timeStamp, String message)
{
super(source);
this.type = type;
@@ -184,7 +184,7 @@ public class Notification
* @param message the message contained in the notification.
*/
public Notification(String type, Object source, long sequenceNumber,
- String message)
+ String message)
{
this(type, source, sequenceNumber, new Date().getTime(), message);
}
@@ -304,15 +304,15 @@ public class Notification
/**
* A textual representation of the notification.
- *
+ *
* @return the notification in {@link java.lang.String} form.
*/
public String toString()
{
return getClass().getName()
- + "[message=" + message
- + ", sequenceNumber=" + sequenceNumber
- + ", source=" + source
+ + "[message=" + message
+ + ", sequenceNumber=" + sequenceNumber
+ + ", source=" + source
+ ", timeStamp=" + timeStamp
+ ", type=" + type
+ ", userData=" + userData
@@ -332,4 +332,3 @@ public class Notification
}
}
-
diff --git a/libjava/classpath/javax/management/NotificationBroadcaster.java b/libjava/classpath/javax/management/NotificationBroadcaster.java
index 139d842..2196e98 100644
--- a/libjava/classpath/javax/management/NotificationBroadcaster.java
+++ b/libjava/classpath/javax/management/NotificationBroadcaster.java
@@ -55,7 +55,7 @@ package javax.management;
*/
public interface NotificationBroadcaster
{
-
+
/**
* Registers the specified listener as a new recipient of
* notifications from this bean. If non-null, the filter
@@ -77,8 +77,8 @@ public interface NotificationBroadcaster
* @see #removeNotificationListener(NotificationListener)
*/
void addNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws IllegalArgumentException;
/**
@@ -109,4 +109,3 @@ public interface NotificationBroadcaster
throws ListenerNotFoundException;
}
-
diff --git a/libjava/classpath/javax/management/NotificationBroadcasterSupport.java b/libjava/classpath/javax/management/NotificationBroadcasterSupport.java
index 7eba6ec..28b8148 100644
--- a/libjava/classpath/javax/management/NotificationBroadcasterSupport.java
+++ b/libjava/classpath/javax/management/NotificationBroadcasterSupport.java
@@ -117,7 +117,7 @@ public class NotificationBroadcasterSupport
* thread; only calls which have successfully passed through the
* filter are sent to the executor. This is equivalent to calling
* NotificationBroadcasterSupport(executor, null).
- *
+ *
* @param executor the executor to use for each call to
* handleNotification().
* @since 1.6
@@ -138,7 +138,7 @@ public class NotificationBroadcasterSupport
* calling NotificationBroadcasterSupport(null, info).
*
* @param info an array of {@link MBeanNotificationInfo} objects
- * describing the notifications delivered by this
+ * describing the notifications delivered by this
* broadcaster. This may be null, which
* is taken as being equivalent to an empty array.
*/
@@ -159,17 +159,17 @@ public class NotificationBroadcasterSupport
* information about the notifications on calls to
* {@link #getNotificationInfo()}, where a clone will be
* returned if the array is non-empty.
- *
+ *
* @param executor the executor to use for each call to
* handleNotification().
* @param info an array of {@link MBeanNotificationInfo} objects
- * describing the notifications delivered by this
+ * describing the notifications delivered by this
* broadcaster. This may be null, which
* is taken as being equivalent to an empty array.
* @since 1.6
*/
public NotificationBroadcasterSupport(Executor executor,
- MBeanNotificationInfo... info)
+ MBeanNotificationInfo... info)
{
this.executor = executor;
this.info = info;
@@ -196,8 +196,8 @@ public class NotificationBroadcasterSupport
* @see #removeNotificationListener(NotificationListener)
*/
public void addNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws IllegalArgumentException
{
if (listener == null)
@@ -234,8 +234,8 @@ public class NotificationBroadcasterSupport
* @param passback the passback object of the listener.
*/
protected void handleNotification(NotificationListener listener,
- Notification notif,
- Object passback)
+ Notification notif,
+ Object passback)
{
listener.handleNotification(notif, passback);
}
@@ -260,15 +260,15 @@ public class NotificationBroadcasterSupport
boolean foundOne = false;
while (it.hasNext())
{
- if (it.next().getListener() == listener)
- {
- it.remove();
- foundOne = true;
- }
+ if (it.next().getListener() == listener)
+ {
+ it.remove();
+ foundOne = true;
+ }
}
if (!foundOne)
throw new ListenerNotFoundException("The specified listener, " + listener +
- "is not registered with this bean.");
+ "is not registered with this bean.");
}
/**
@@ -289,16 +289,16 @@ public class NotificationBroadcasterSupport
* java.lang.Object)
*/
public void removeNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws ListenerNotFoundException
{
if (!(listeners.remove(new ListenerData(listener, filter, passback))))
{
- throw new ListenerNotFoundException("The specified listener, " + listener +
- " with filter " + filter +
- "and passback " + passback +
- ", is not registered with this bean.");
+ throw new ListenerNotFoundException("The specified listener, " + listener +
+ " with filter " + filter +
+ "and passback " + passback +
+ ", is not registered with this bean.");
}
}
@@ -326,19 +326,19 @@ public class NotificationBroadcasterSupport
{
for (ListenerData ldata : listeners)
{
- NotificationFilter filter = ldata.getFilter();
- if (filter == null || filter.isNotificationEnabled(notif))
- {
- if (executor == null)
- try
- {
- handleNotification(ldata.getListener(), notif,
- ldata.getPassback());
- }
- catch (Exception e) { /* Ignore */ }
- else
- executor.execute(new DispatchTask(ldata, notif));
- }
+ NotificationFilter filter = ldata.getFilter();
+ if (filter == null || filter.isNotificationEnabled(notif))
+ {
+ if (executor == null)
+ try
+ {
+ handleNotification(ldata.getListener(), notif,
+ ldata.getPassback());
+ }
+ catch (Exception e) { /* Ignore */ }
+ else
+ executor.execute(new DispatchTask(ldata, notif));
+ }
}
}
@@ -366,7 +366,7 @@ public class NotificationBroadcasterSupport
* @param notif the notification to send.
*/
public DispatchTask(ListenerData ldata,
- Notification notif)
+ Notification notif)
{
this.ldata = ldata;
this.notif = notif;
@@ -378,13 +378,12 @@ public class NotificationBroadcasterSupport
public void run()
{
try
- {
- handleNotification(ldata.getListener(), notif,
- ldata.getPassback());
- }
+ {
+ handleNotification(ldata.getListener(), notif,
+ ldata.getPassback());
+ }
catch (Exception e) { /* Ignore */ }
}
}
}
-
diff --git a/libjava/classpath/javax/management/NotificationEmitter.java b/libjava/classpath/javax/management/NotificationEmitter.java
index 002e2fe..7187d8c 100644
--- a/libjava/classpath/javax/management/NotificationEmitter.java
+++ b/libjava/classpath/javax/management/NotificationEmitter.java
@@ -49,7 +49,7 @@ package javax.management;
public interface NotificationEmitter
extends NotificationBroadcaster
{
-
+
/**
* Removes the specified listener from the list of recipients
* of notifications from this bean. Only the first instance with
@@ -68,9 +68,8 @@ public interface NotificationEmitter
* java.lang.Object)
*/
void removeNotificationListener(NotificationListener listener,
- NotificationFilter filter,
- Object passback)
+ NotificationFilter filter,
+ Object passback)
throws ListenerNotFoundException;
}
-
diff --git a/libjava/classpath/javax/management/NotificationFilter.java b/libjava/classpath/javax/management/NotificationFilter.java
index a8e41c9..db39aad7f 100644
--- a/libjava/classpath/javax/management/NotificationFilter.java
+++ b/libjava/classpath/javax/management/NotificationFilter.java
@@ -51,7 +51,7 @@ import java.io.Serializable;
public interface NotificationFilter
extends Serializable
{
-
+
/**
* Returns true if the specified notification should be passed
* on to the listener.
@@ -63,4 +63,3 @@ public interface NotificationFilter
boolean isNotificationEnabled(Notification notification);
}
-
diff --git a/libjava/classpath/javax/management/NotificationFilterSupport.java b/libjava/classpath/javax/management/NotificationFilterSupport.java
index 28be871..a71f5c7 100644
--- a/libjava/classpath/javax/management/NotificationFilterSupport.java
+++ b/libjava/classpath/javax/management/NotificationFilterSupport.java
@@ -108,7 +108,7 @@ public class NotificationFilterSupport
if (!enabledTypes.contains(prefix))
enabledTypes.add(prefix);
}
-
+
/**
* Returns the list of enabled types for this
* filter.
@@ -132,7 +132,7 @@ public class NotificationFilterSupport
String nType = notif.getType();
for (String type : enabledTypes)
if (nType.startsWith(type))
- return true;
+ return true;
return false;
}
diff --git a/libjava/classpath/javax/management/NotificationListener.java b/libjava/classpath/javax/management/NotificationListener.java
index 69b08ee..4810e91 100644
--- a/libjava/classpath/javax/management/NotificationListener.java
+++ b/libjava/classpath/javax/management/NotificationListener.java
@@ -49,7 +49,7 @@ import java.util.EventListener;
public interface NotificationListener
extends EventListener
{
-
+
/**
* Invoked by the notifying bean when a notification is to
* be delivered to the recipient. As the transmission of
@@ -67,4 +67,3 @@ public interface NotificationListener
void handleNotification(Notification notification, Object passback);
}
-
diff --git a/libjava/classpath/javax/management/ObjectInstance.java b/libjava/classpath/javax/management/ObjectInstance.java
index df364cf..1328db0 100644
--- a/libjava/classpath/javax/management/ObjectInstance.java
+++ b/libjava/classpath/javax/management/ObjectInstance.java
@@ -110,7 +110,7 @@ public class ObjectInstance
return false;
ObjectInstance i = (ObjectInstance) obj;
return (i.getClassName().equals(className) &&
- i.getObjectName().equals(name));
+ i.getObjectName().equals(name));
}
/**
diff --git a/libjava/classpath/javax/management/ObjectName.java b/libjava/classpath/javax/management/ObjectName.java
index d3ccd20..856d03f 100644
--- a/libjava/classpath/javax/management/ObjectName.java
+++ b/libjava/classpath/javax/management/ObjectName.java
@@ -101,7 +101,7 @@ import java.io.ObjectOutputStream;
* 'domain: key1 = value1 ' has a key ' key1 ' with value
* ' value1 '. Newlines are disallowed, except where escaped in quoted
* values.
- *
+ *
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -156,13 +156,13 @@ public class ObjectName
{
try
{
- WILDCARD = new ObjectName("");
+ WILDCARD = new ObjectName("");
}
catch (MalformedObjectNameException e)
{
- throw (InternalError) (new InternalError("A problem occurred " +
- "initializing the ObjectName " +
- "wildcard.").initCause(e));
+ throw (InternalError) (new InternalError("A problem occurred " +
+ "initializing the ObjectName " +
+ "wildcard.").initCause(e));
}
}
@@ -208,34 +208,34 @@ public class ObjectName
String[] pairs = rest.split(",");
if (pairs.length == 0 && !isPattern())
throw new MalformedObjectNameException("A name that is not a " +
- "pattern must contain at " +
- "least one key-value pair.");
+ "pattern must contain at " +
+ "least one key-value pair.");
propertyListString = "";
for (int a = 0; a < pairs.length; ++a)
{
- if (pairs[a].equals("*"))
- {
- if (propertyListPattern)
- throw new MalformedObjectNameException("Multiple wildcards " +
- "in properties.");
- propertyListPattern = true;
- continue;
- }
- int sep = pairs[a].indexOf('=');
- if (sep == -1)
- throw new MalformedObjectNameException("A key must be " +
- "followed by a value.");
- String key = pairs[a].substring(0, sep);
- if (properties.containsKey(key))
- throw new MalformedObjectNameException("The same key occurs " +
- "more than once.");
- String value = pairs[a].substring(sep+1);
- properties.put(key, value);
- propertyListString += key + "=" + value + ",";
+ if (pairs[a].equals("*"))
+ {
+ if (propertyListPattern)
+ throw new MalformedObjectNameException("Multiple wildcards " +
+ "in properties.");
+ propertyListPattern = true;
+ continue;
+ }
+ int sep = pairs[a].indexOf('=');
+ if (sep == -1)
+ throw new MalformedObjectNameException("A key must be " +
+ "followed by a value.");
+ String key = pairs[a].substring(0, sep);
+ if (properties.containsKey(key))
+ throw new MalformedObjectNameException("The same key occurs " +
+ "more than once.");
+ String value = pairs[a].substring(sep+1);
+ properties.put(key, value);
+ propertyListString += key + "=" + value + ",";
}
if (propertyListString.length() > 0)
propertyListString =
- propertyListString.substring(0, propertyListString.length() - 1);
+ propertyListString.substring(0, propertyListString.length() - 1);
checkComponents();
}
@@ -300,48 +300,48 @@ public class ObjectName
{
if (domain.indexOf(':') != -1)
throw new MalformedObjectNameException("The domain includes a ':' " +
- "character.");
+ "character.");
if (domain.indexOf('\n') != -1)
throw new MalformedObjectNameException("The domain includes a newline " +
- "character.");
+ "character.");
char[] keychars = new char[] { '\n', ':', ',', '*', '?', '=' };
char[] valchars = new char[] { '\n', ':', ',', '=' };
for (Map.Entry entry : properties.entrySet())
{
- for (int a = 0; a < keychars.length; ++a)
- if (entry.getKey().indexOf(keychars[a]) != -1)
- throw new MalformedObjectNameException("A key contains a '" +
- keychars[a] + "' " +
- "character.");
- String value = entry.getValue();
- int quote = value.indexOf('"');
- if (quote == 0)
- {
- try
- {
- unquote(value);
- }
- catch (IllegalArgumentException e)
- {
- throw (MalformedObjectNameException)
- new MalformedObjectNameException("The quoted value is " +
- "invalid.").initCause(e);
- }
- }
- else if (quote != -1)
- throw new MalformedObjectNameException("A value contains " +
- "a '\"' character.");
- else
- {
- for (int a = 0; a < valchars.length; ++a)
- if (value.indexOf(valchars[a]) != -1)
- throw new MalformedObjectNameException("A value contains " +
- "a '" + valchars[a] + "' " +
- "character.");
-
- }
- if (value.indexOf('*') != -1 || value.indexOf('?') != -1)
- propertyValuePattern = true;
+ for (int a = 0; a < keychars.length; ++a)
+ if (entry.getKey().indexOf(keychars[a]) != -1)
+ throw new MalformedObjectNameException("A key contains a '" +
+ keychars[a] + "' " +
+ "character.");
+ String value = entry.getValue();
+ int quote = value.indexOf('"');
+ if (quote == 0)
+ {
+ try
+ {
+ unquote(value);
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw (MalformedObjectNameException)
+ new MalformedObjectNameException("The quoted value is " +
+ "invalid.").initCause(e);
+ }
+ }
+ else if (quote != -1)
+ throw new MalformedObjectNameException("A value contains " +
+ "a '\"' character.");
+ else
+ {
+ for (int a = 0; a < valchars.length; ++a)
+ if (value.indexOf(valchars[a]) != -1)
+ throw new MalformedObjectNameException("A value contains " +
+ "a '" + valchars[a] + "' " +
+ "character.");
+
+ }
+ if (value.indexOf('*') != -1 || value.indexOf('?') != -1)
+ propertyValuePattern = true;
}
}
@@ -375,33 +375,33 @@ public class ObjectName
if (isDomainPattern())
{
- if (!domainMatches(domain, 0, name.getDomain(), 0))
- return false;
+ if (!domainMatches(domain, 0, name.getDomain(), 0))
+ return false;
}
else
{
- if (!domain.equals(name.getDomain()))
- return false;
+ if (!domain.equals(name.getDomain()))
+ return false;
}
if (isPropertyPattern())
{
- Hashtable oProps = name.getKeyPropertyList();
- for (Map.Entry entry : properties.entrySet())
- {
- String key = entry.getKey();
- if (!(oProps.containsKey(key)))
- return false;
- String val = entry.getValue();
- if (!(val.equals(oProps.get(key))))
- return false;
- }
+ Hashtable oProps = name.getKeyPropertyList();
+ for (Map.Entry entry : properties.entrySet())
+ {
+ String key = entry.getKey();
+ if (!(oProps.containsKey(key)))
+ return false;
+ String val = entry.getValue();
+ if (!(val.equals(oProps.get(key))))
+ return false;
+ }
}
else
{
- if (!getCanonicalKeyPropertyListString().equals
- (name.getCanonicalKeyPropertyListString()))
- return false;
+ if (!getCanonicalKeyPropertyListString().equals
+ (name.getCanonicalKeyPropertyListString()))
+ return false;
}
return true;
}
@@ -416,29 +416,29 @@ public class ObjectName
* @return true if the domain matches the pattern.
*/
private static boolean domainMatches(String pattern, int patternindex,
- String domain, int domainindex)
+ String domain, int domainindex)
{
while (patternindex < pattern.length())
{
- char c = pattern.charAt(patternindex++);
-
- if (c == '*')
- {
- for (int i = domain.length(); i >= domainindex; i--)
- {
- if (domainMatches(pattern, patternindex, domain, i))
- return true;
- }
- return false;
- }
-
- if (domainindex >= domain.length())
- return false;
-
- if (c != '?' && c != domain.charAt(domainindex))
- return false;
-
- domainindex++;
+ char c = pattern.charAt(patternindex++);
+
+ if (c == '*')
+ {
+ for (int i = domain.length(); i >= domainindex; i--)
+ {
+ if (domainMatches(pattern, patternindex, domain, i))
+ return true;
+ }
+ return false;
+ }
+
+ if (domainindex >= domain.length())
+ return false;
+
+ if (c != '?' && c != domain.charAt(domainindex))
+ return false;
+
+ domainindex++;
}
return true;
}
@@ -457,8 +457,8 @@ public class ObjectName
{
if (obj instanceof ObjectName)
{
- ObjectName o = (ObjectName) obj;
- return getCanonicalName().equals(o.getCanonicalName());
+ ObjectName o = (ObjectName) obj;
+ return getCanonicalName().equals(o.getCanonicalName());
}
return false;
}
@@ -467,7 +467,7 @@ public class ObjectName
* Returns the property list in canonical form. The keys
* are ordered using the lexicographic ordering used by
* {@link java.lang.String#compareTo(java.lang.Object)}.
- *
+ *
* @return the property list, with the keys in lexicographic
* order.
*/
@@ -477,10 +477,10 @@ public class ObjectName
Iterator> i = properties.entrySet().iterator();
while (i.hasNext())
{
- Map.Entry entry = i.next();
- builder.append(entry.getKey() + "=" + entry.getValue());
- if (i.hasNext())
- builder.append(",");
+ Map.Entry entry = i.next();
+ builder.append(entry.getKey() + "=" + entry.getValue());
+ if (i.hasNext())
+ builder.append(",");
}
return builder.toString();
}
@@ -488,7 +488,7 @@ public class ObjectName
/**
*
* Returns the name as a string in canonical form. More precisely,
- * this returns a string of the format
+ * this returns a string of the format
* <domain>:<properties><wild>. <properties>
* is the same value as returned by
* {@link #getCanonicalKeyPropertyListString()}. <wild>
@@ -499,7 +499,7 @@ public class ObjectName
*
'*' if <properties> is empty.
*
',*' if there is at least one key-value pair.
*
- *
+ *
* @return the canonical string form of the object name, as specified
* above.
*/
@@ -539,13 +539,13 @@ public class ObjectName
{
try
{
- return new ObjectName(name.getCanonicalName());
+ return new ObjectName(name.getCanonicalName());
}
catch (MalformedObjectNameException e)
{
- throw (InternalError)
- (new InternalError("The canonical name of " +
- "the given name is invalid.").initCause(e));
+ throw (InternalError)
+ (new InternalError("The canonical name of " +
+ "the given name is invalid.").initCause(e));
}
}
@@ -557,7 +557,7 @@ public class ObjectName
*
* @param name the {@link ObjectName} to provide an instance of.
* @return a instance for the given name, which may or may not be a subclass
- * of {@link ObjectName}.
+ * of {@link ObjectName}.
* @throws MalformedObjectNameException the domain, a key or a value
* contains an illegal
* character or a value
@@ -582,7 +582,7 @@ public class ObjectName
* @param key the key of the property.
* @param value the value of the property.
* @return a instance for the given name, which may or may not be a subclass
- * of {@link ObjectName}.
+ * of {@link ObjectName}.
* @throws MalformedObjectNameException the domain, a key or a value
* contains an illegal
* character or a value
@@ -606,7 +606,7 @@ public class ObjectName
* @param domain the domain part of the object name.
* @param properties the key-value property pairs.
* @return a instance for the given name, which may or may not be a subclass
- * of {@link ObjectName}.
+ * of {@link ObjectName}.
* @throws MalformedObjectNameException the domain, a key or a value
* contains an illegal
* character or a value
@@ -615,7 +615,7 @@ public class ObjectName
* @throws NullPointerException if name is null.
*/
public static ObjectName getInstance(String domain,
- Hashtable properties)
+ Hashtable properties)
throws MalformedObjectNameException
{
return new ObjectName(domain, properties);
@@ -654,7 +654,7 @@ public class ObjectName
* list. If the object name was created using {@link
* ObjectName(String)}, then this string will contain the properties
* in the same order they were given in at creation.
- *
+ *
* @return the property list.
*/
public String getKeyPropertyListString()
@@ -784,8 +784,8 @@ public class ObjectName
*
Otherwise, s is used verbatim.
*
*
The string is terminated with a closing quote character, '"'.
- *
- *
+ *
+ *
* @param string the string to quote.
* @return a quoted version of the supplied string.
* @throws NullPointerException if string is null.
@@ -796,27 +796,27 @@ public class ObjectName
builder.append('"');
for (int a = 0; a < string.length(); ++a)
{
- char s = string.charAt(a);
- switch (s)
- {
- case '"':
- builder.append("\\\"");
- break;
- case '*':
- builder.append("\\*");
- break;
- case '?':
- builder.append("\\?");
- break;
- case '\\':
- builder.append("\\\\");
- break;
- case '\n':
- builder.append("\\\n");
- break;
- default:
- builder.append(s);
- }
+ char s = string.charAt(a);
+ switch (s)
+ {
+ case '"':
+ builder.append("\\\"");
+ break;
+ case '*':
+ builder.append("\\*");
+ break;
+ case '?':
+ builder.append("\\?");
+ break;
+ case '\\':
+ builder.append("\\\\");
+ break;
+ case '\n':
+ builder.append("\\\n");
+ break;
+ default:
+ builder.append(s);
+ }
}
builder.append('"');
return builder.toString();
@@ -881,7 +881,7 @@ public class ObjectName
* @param in the input stream to read from.
* @throws IOException if an I/O error occurs.
*/
- private void readObject(ObjectInputStream in)
+ private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException
{
in.defaultReadObject();
@@ -908,7 +908,7 @@ public class ObjectName
* @return the unquoted string.
* @throws NullPointerException if q is null.
* @throws IllegalArgumentException if the string is not a valid
- * quoted string i.e. it is not
+ * quoted string i.e. it is not
* surrounded by quotation marks
* and/or characters are not properly
* escaped.
@@ -917,25 +917,25 @@ public class ObjectName
{
if (q.charAt(0) != '"')
throw new IllegalArgumentException("The string does " +
- "not start with a quote.");
+ "not start with a quote.");
if (q.charAt(q.length() - 1) != '"')
throw new IllegalArgumentException("The string does " +
- "not end with a quote.");
+ "not end with a quote.");
CPStringBuilder builder = new CPStringBuilder();
for (int a = 1; a < (q.length() - 1); ++a)
{
- char n = q.charAt(a);
- if (n == '\\')
- {
- n = q.charAt(++a);
- if (n != '"' && n != '?' && n != '*' &&
- n != 'n' && n != '\\')
- throw new IllegalArgumentException("Illegal escaped character: "
- + n);
- }
- else if (n == '"' || n == '\n')
- throw new IllegalArgumentException("Illegal character: " + n);
- builder.append(n);
+ char n = q.charAt(a);
+ if (n == '\\')
+ {
+ n = q.charAt(++a);
+ if (n != '"' && n != '?' && n != '*' &&
+ n != 'n' && n != '\\')
+ throw new IllegalArgumentException("Illegal escaped character: "
+ + n);
+ }
+ else if (n == '"' || n == '\n')
+ throw new IllegalArgumentException("Illegal character: " + n);
+ builder.append(n);
}
return builder.toString();
diff --git a/libjava/classpath/javax/management/OperationsException.java b/libjava/classpath/javax/management/OperationsException.java
index cbd90d6..b0e434d 100644
--- a/libjava/classpath/javax/management/OperationsException.java
+++ b/libjava/classpath/javax/management/OperationsException.java
@@ -73,4 +73,3 @@ public class OperationsException
}
}
-
diff --git a/libjava/classpath/javax/management/PersistentMBean.java b/libjava/classpath/javax/management/PersistentMBean.java
index e47e2c5..51ee460 100644
--- a/libjava/classpath/javax/management/PersistentMBean.java
+++ b/libjava/classpath/javax/management/PersistentMBean.java
@@ -74,7 +74,7 @@ public interface PersistentMBean
*/
void load()
throws MBeanException, RuntimeOperationsException,
- InstanceNotFoundException;
+ InstanceNotFoundException;
/**
*
@@ -121,6 +121,6 @@ public interface PersistentMBean
*/
void store()
throws MBeanException, RuntimeOperationsException,
- InstanceNotFoundException;
+ InstanceNotFoundException;
}
diff --git a/libjava/classpath/javax/management/Query.java b/libjava/classpath/javax/management/Query.java
index 80b76b1..7cd0270 100644
--- a/libjava/classpath/javax/management/Query.java
+++ b/libjava/classpath/javax/management/Query.java
@@ -42,7 +42,7 @@ package javax.management;
* may be used to list and enumerate management beans, via
* the {@link MBeanServer}. By using the methods in this class,
* complex queries can be created from their more basic
- * components.
+ * components.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -61,7 +61,7 @@ public class Query
* query to be used in serialization.
*/
public static final int MINUS = 1;
-
+
/**
* A code representing the {@link #times(ValueExp, ValueExp)
* query to be used in serialization.
@@ -133,7 +133,7 @@ public class Query
* {@link MatchQueryExp}.
*/
public static QueryExp anySubString(AttributeValueExp attrib,
- StringValueExp string)
+ StringValueExp string)
{
return new MatchQueryExp(attrib, "*" + string.getValue() + "*");
}
@@ -168,7 +168,7 @@ public class Query
* {@link QualifiedAttributeValueExp}.
*/
public static AttributeValueExp attr(String className,
- String name)
+ String name)
{
return new QualifiedAttributeValueExp(className, name);
}
@@ -189,7 +189,7 @@ public class Query
* {@link BetweenQueryExp}.
*/
public static QueryExp between(ValueExp v1, ValueExp v2,
- ValueExp v3)
+ ValueExp v3)
{
return new BetweenQueryExp(v1, v2, v3);
}
@@ -213,7 +213,7 @@ public class Query
/**
* Returns a value expression which evaluates to the result of
- * dividing v1 by v2.
+ * dividing v1 by v2.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -229,7 +229,7 @@ public class Query
/**
* Returns a query expression which evaluates to the result of
- * comparing v1 to v2 for equality.
+ * comparing v1 to v2 for equality.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -257,7 +257,7 @@ public class Query
* {@link MatchQueryExp}.
*/
public static QueryExp finalSubString(AttributeValueExp attrib,
- StringValueExp string)
+ StringValueExp string)
{
return new MatchQueryExp(attrib, "*" + string.getValue());
}
@@ -265,7 +265,7 @@ public class Query
/**
* Returns a query expression which evaluates to the result of
* comparing v1 to v2 to see if
- * v1 is greater than or equal to v2.
+ * v1 is greater than or equal to v2.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -282,7 +282,7 @@ public class Query
/**
* Returns a query expression which evaluates to the result of
* comparing v1 to v2 to see if
- * v1 is greater than v2.
+ * v1 is greater than v2.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -327,7 +327,7 @@ public class Query
* {@link MatchQueryExp}.
*/
public static QueryExp initialSubString(AttributeValueExp attrib,
- StringValueExp string)
+ StringValueExp string)
{
return new MatchQueryExp(attrib, string.getValue() + "*");
}
@@ -357,7 +357,7 @@ public class Query
/**
* Returns a query expression which evaluates to the result of
* comparing v1 to v2 to see if
- * v1 is less than or equal to v2.
+ * v1 is less than or equal to v2.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -374,7 +374,7 @@ public class Query
/**
* Returns a query expression which evaluates to the result of
* comparing v1 to v2 to see if
- * v1 is less than v2.
+ * v1 is less than v2.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -422,14 +422,14 @@ public class Query
* as the non-public class {@link MatchQueryExp}.
*/
public static QueryExp match(AttributeValueExp attrib,
- StringValueExp string)
+ StringValueExp string)
{
return new MatchQueryExp(attrib, string.getValue());
}
/**
* Returns a value expression which evaluates to the result of
- * subtracting v2 from v1.
+ * subtracting v2 from v1.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -474,7 +474,7 @@ public class Query
/**
* Returns a value expression which evaluates to the result of
- * adding v1 to v2.
+ * adding v1 to v2.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -490,7 +490,7 @@ public class Query
/**
* Returns a value expression which evaluates to the result of
- * multiplying v1 by v2.
+ * multiplying v1 by v2.
*
* @param v1 the left-hand operand.
* @param v2 the right-hand operand.
@@ -505,7 +505,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified value.
+ * Returns a value expression wrapping the specified value.
*
* @param val the boolean value to wrap.
* @return a value expression wrapping val. This
@@ -518,7 +518,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified value.
+ * Returns a value expression wrapping the specified value.
*
* @param val the double value to wrap.
* @return a value expression wrapping val. This
@@ -531,7 +531,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified value.
+ * Returns a value expression wrapping the specified value.
*
* @param val the float value to wrap.
* @return a value expression wrapping val. This
@@ -544,7 +544,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified value.
+ * Returns a value expression wrapping the specified value.
*
* @param val the integer value to wrap.
* @return a value expression wrapping val. This
@@ -557,7 +557,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified value.
+ * Returns a value expression wrapping the specified value.
*
* @param val the long value to wrap.
* @return a value expression wrapping val. This
@@ -570,7 +570,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified value.
+ * Returns a value expression wrapping the specified value.
*
* @param val the {@link Number} value to wrap.
* @return a value expression wrapping val. This
@@ -583,7 +583,7 @@ public class Query
}
/**
- * Returns a value expression wrapping the specified string.
+ * Returns a value expression wrapping the specified string.
*
* @param val the {@link String} to wrap.
* @return a {@link StringValueExp} wrapping val.
@@ -609,7 +609,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = -1081892073854801359L;
-
+
/**
* The first operand.
*/
@@ -653,7 +653,7 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
return exp1.apply(name) && exp2.apply(name);
}
@@ -676,7 +676,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = -7156603696948215014L;
-
+
/**
* The attribute to match against.
*/
@@ -695,7 +695,7 @@ public class Query
* @param pattern the pattern.
*/
public MatchQueryExp(AttributeValueExp exp,
- String pattern)
+ String pattern)
{
this.exp = exp;
this.pattern = pattern;
@@ -720,7 +720,7 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
String val = ((StringValueExp) exp.apply(name)).getValue();
int valPos = 0;
@@ -728,83 +728,83 @@ public class Query
int fallbackP = -1;
boolean backslash = false;
for (int a = 0; a < pattern.length(); ++a)
- {
- boolean matched = false;
- int next = pattern.codePointAt(a);
- if (!backslash)
- {
- if (next == '?' && valPos < val.length())
- {
- ++valPos;
- matched = true;
- }
- else if (next == '*')
- {
- fallback = valPos;
- fallbackP = a;
- matched = true;
- }
- else if (next == '[' && valPos < val.length())
- {
- boolean negated = false;
- int b = a + 1;
- int classChar = pattern.codePointAt(b);
- do
- {
- if (classChar == '!' && b == a + 1)
- negated = true;
- else if (pattern.codePointAt(b + 1) == '-' &&
- pattern.codePointAt(b + 2) != ']')
- {
- if (classChar > pattern.codePointAt(b + 2))
- throw new BadStringOperationException("Invalid range: " +
- classChar + " to " +
- pattern.codePointAt(b+2));
- for (int c = classChar; c <= pattern.codePointAt(b+2); ++c)
- if (val.codePointAt(valPos) == c)
- matched = true;
- b = b + 2;
- }
- else if (val.codePointAt(valPos) == classChar)
- matched = true;
- ++b;
- classChar = pattern.codePointAt(b);
- } while (classChar != ']');
- if (negated)
- matched = !matched;
- ++valPos;
- a = b;
- }
- else if (next == '\\')
- backslash = true;
- else if (valPos < val.length() && next == val.codePointAt(valPos))
- {
- matched = true;
- ++valPos;
- }
- }
- else
- {
- backslash = false;
- if (valPos < val.length() && next == val.codePointAt(valPos))
- {
- matched = true;
- ++valPos;
- }
- }
- if (!matched)
- if (fallback != -1)
- {
- ++fallback;
- valPos = fallback;
- a = fallbackP;
- if (valPos == val.length())
- return false;
- continue;
- }
- else
- return false;
- }
+ {
+ boolean matched = false;
+ int next = pattern.codePointAt(a);
+ if (!backslash)
+ {
+ if (next == '?' && valPos < val.length())
+ {
+ ++valPos;
+ matched = true;
+ }
+ else if (next == '*')
+ {
+ fallback = valPos;
+ fallbackP = a;
+ matched = true;
+ }
+ else if (next == '[' && valPos < val.length())
+ {
+ boolean negated = false;
+ int b = a + 1;
+ int classChar = pattern.codePointAt(b);
+ do
+ {
+ if (classChar == '!' && b == a + 1)
+ negated = true;
+ else if (pattern.codePointAt(b + 1) == '-' &&
+ pattern.codePointAt(b + 2) != ']')
+ {
+ if (classChar > pattern.codePointAt(b + 2))
+ throw new BadStringOperationException("Invalid range: " +
+ classChar + " to " +
+ pattern.codePointAt(b+2));
+ for (int c = classChar; c <= pattern.codePointAt(b+2); ++c)
+ if (val.codePointAt(valPos) == c)
+ matched = true;
+ b = b + 2;
+ }
+ else if (val.codePointAt(valPos) == classChar)
+ matched = true;
+ ++b;
+ classChar = pattern.codePointAt(b);
+ } while (classChar != ']');
+ if (negated)
+ matched = !matched;
+ ++valPos;
+ a = b;
+ }
+ else if (next == '\\')
+ backslash = true;
+ else if (valPos < val.length() && next == val.codePointAt(valPos))
+ {
+ matched = true;
+ ++valPos;
+ }
+ }
+ else
+ {
+ backslash = false;
+ if (valPos < val.length() && next == val.codePointAt(valPos))
+ {
+ matched = true;
+ ++valPos;
+ }
+ }
+ if (!matched)
+ if (fallback != -1)
+ {
+ ++fallback;
+ valPos = fallback;
+ a = fallbackP;
+ if (valPos == val.length())
+ return false;
+ continue;
+ }
+ else
+ return false;
+ }
return true;
}
}
@@ -867,22 +867,22 @@ public class Query
*/
public ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
try
- {
- if (!(QueryEval.getMBeanServer().getObjectInstance(name).getClassName().equals(className)))
- throw new BadAttributeValueExpException("The value is not from " +
- "the correct class.");
- }
+ {
+ if (!(QueryEval.getMBeanServer().getObjectInstance(name).getClassName().equals(className)))
+ throw new BadAttributeValueExpException("The value is not from " +
+ "the correct class.");
+ }
catch (InstanceNotFoundException e)
- {
- throw (BadAttributeValueExpException)
- new BadAttributeValueExpException("The named bean is not registered.").initCause(e);
- }
+ {
+ throw (BadAttributeValueExpException)
+ new BadAttributeValueExpException("The named bean is not registered.").initCause(e);
+ }
return super.apply(name);
}
-
+
}
/**
@@ -902,7 +902,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = -2933597532866307444L;
-
+
/**
* The value to compare.
*/
@@ -928,7 +928,7 @@ public class Query
* @param exp3 the upper bound.
*/
public BetweenQueryExp(ValueExp exp1, ValueExp exp2,
- ValueExp exp3)
+ ValueExp exp3)
{
this.exp1 = exp1;
this.exp2 = exp2;
@@ -954,7 +954,7 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
String v1 = exp1.apply(name).toString();
String v2 = exp2.apply(name).toString();
@@ -999,19 +999,19 @@ public class Query
*/
public ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
try
- {
- return new StringValueExp(QueryEval.getMBeanServer().getObjectInstance(name).getClassName());
- }
+ {
+ return new StringValueExp(QueryEval.getMBeanServer().getObjectInstance(name).getClassName());
+ }
catch (InstanceNotFoundException e)
- {
- throw (BadAttributeValueExpException)
- new BadAttributeValueExpException("The named bean is not registered.").initCause(e);
- }
+ {
+ throw (BadAttributeValueExpException)
+ new BadAttributeValueExpException("The named bean is not registered.").initCause(e);
+ }
}
-
+
}
/**
@@ -1032,7 +1032,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = 1216286847881456786L;
-
+
/**
* The operation to perform.
*/
@@ -1082,23 +1082,23 @@ public class Query
*/
public ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
NumericValueExp v1 = (NumericValueExp) exp1.apply(name);
NumericValueExp v2 = (NumericValueExp) exp2.apply(name);
switch (op)
- {
- case PLUS:
- return v1.plus(v2);
- case MINUS:
- return v1.minus(v2);
- case TIMES:
- return v1.times(v2);
- case DIV:
- return v1.div(v2);
- default:
- throw new BadBinaryOpValueExpException(this);
- }
+ {
+ case PLUS:
+ return v1.plus(v2);
+ case MINUS:
+ return v1.minus(v2);
+ case TIMES:
+ return v1.times(v2);
+ case DIV:
+ return v1.div(v2);
+ default:
+ throw new BadBinaryOpValueExpException(this);
+ }
}
/**
@@ -1110,22 +1110,22 @@ public class Query
{
String opS;
switch (op)
- {
- case PLUS:
- opS = "+";
- break;
- case MINUS:
- opS = "-";
- break;
- case TIMES:
- opS = "x";
- break;
- case DIV:
- opS = "/";
- break;
- default:
- opS = "?";
- }
+ {
+ case PLUS:
+ opS = "+";
+ break;
+ case MINUS:
+ opS = "-";
+ break;
+ case TIMES:
+ opS = "x";
+ break;
+ case DIV:
+ opS = "/";
+ break;
+ default:
+ opS = "?";
+ }
return exp1 + " " + opS + " " + exp2;
}
}
@@ -1148,7 +1148,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = -5690656271650491000L;
-
+
/**
* The operation to perform.
*/
@@ -1198,25 +1198,25 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
String v1 = exp1.apply(name).toString();
String v2 = exp2.apply(name).toString();
switch (relOp)
- {
- case EQ:
- return v1.equals(v2);
- case GT:
- return v1.compareTo(v2) > 0;
- case GE:
- return v1.compareTo(v2) >= 0;
- case LE:
- return v1.compareTo(v2) <= 0;
- case LT:
- return v1.compareTo(v2) < 0;
- default:
- throw new BadStringOperationException("Invalid operator: " + relOp);
- }
+ {
+ case EQ:
+ return v1.equals(v2);
+ case GT:
+ return v1.compareTo(v2) > 0;
+ case GE:
+ return v1.compareTo(v2) >= 0;
+ case LE:
+ return v1.compareTo(v2) <= 0;
+ case LT:
+ return v1.compareTo(v2) < 0;
+ default:
+ throw new BadStringOperationException("Invalid operator: " + relOp);
+ }
}
/**
@@ -1228,25 +1228,25 @@ public class Query
{
String op;
switch (relOp)
- {
- case EQ:
- op = "=";
- break;
- case GT:
- op = ">";
- break;
- case GE:
- op = ">=";
- break;
- case LE:
- op = "<=";
- break;
- case LT:
- op = "<";
- break;
- default:
- op = "?";
- }
+ {
+ case EQ:
+ op = "=";
+ break;
+ case GT:
+ op = ">";
+ break;
+ case GE:
+ op = ">=";
+ break;
+ case LE:
+ op = "<=";
+ break;
+ case LT:
+ op = "<";
+ break;
+ default:
+ op = "?";
+ }
return exp1 + " " + op + " " + exp2;
}
}
@@ -1268,7 +1268,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = -5801329450358952434L;
-
+
/**
* The value to look for.
*/
@@ -1312,12 +1312,12 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
String v = val.apply(name).toString();
for (ValueExp vl : valueList)
- if (v.equals(vl.apply(name).toString()))
- return true;
+ if (v.equals(vl.apply(name).toString()))
+ return true;
return false;
}
@@ -1358,7 +1358,7 @@ public class Query
/**
* Checks that the bean specified by the supplied
- * {@link ObjectName} is of the correct class
+ * {@link ObjectName} is of the correct class
* using {@link MBeanServer#isInstanceOf(ObjectName,String)}.
* where the string is obtained by evaluating
* classNameValue.
@@ -1378,21 +1378,21 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
try
- {
- String className = ((StringValueExp)
- classNameValue.apply(name)).getValue();
- return QueryEval.getMBeanServer().isInstanceOf(name, className);
- }
+ {
+ String className = ((StringValueExp)
+ classNameValue.apply(name)).getValue();
+ return QueryEval.getMBeanServer().isInstanceOf(name, className);
+ }
catch (InstanceNotFoundException e)
- {
- throw (BadAttributeValueExpException)
- new BadAttributeValueExpException("The named bean is not registered.").initCause(e);
- }
+ {
+ throw (BadAttributeValueExpException)
+ new BadAttributeValueExpException("The named bean is not registered.").initCause(e);
+ }
}
-
+
}
/**
@@ -1411,7 +1411,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = 5269643775896723397L;
-
+
/**
* The expression to negate.
*/
@@ -1446,7 +1446,7 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
return !(exp.apply(name));
}
@@ -1469,7 +1469,7 @@ public class Query
* Compatible with JDK 1.6
*/
private static final long serialVersionUID = 2962973084421716523L;
-
+
/**
* The first operand.
*/
@@ -1513,7 +1513,7 @@ public class Query
*/
public boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
return exp1.apply(name) || exp2.apply(name);
}
@@ -1542,7 +1542,7 @@ public class Query
* The boolean value.
*/
private boolean val;
-
+
/**
* Constructs a new {@link BooleanValueExp} using the
* specified value.
@@ -1572,11 +1572,11 @@ public class Query
*/
public ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
return this;
}
-
+
/**
* Returns the value as a string.
*
@@ -1613,7 +1613,7 @@ public class Query
* The numeric value.
*/
private Number val;
-
+
/**
* Constructs a new {@link NumericValueExp} using the
* specified value.
@@ -1643,11 +1643,11 @@ public class Query
*/
public ValueExp apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException
+ BadAttributeValueExpException, InvalidApplicationException
{
return this;
}
-
+
/**
* Returns the value.
*/
@@ -1677,51 +1677,51 @@ public class Query
{
Number v = o.getValue();
if (val instanceof Double)
- {
- double d = val.doubleValue();
- if (v instanceof Double)
- return new NumericValueExp(d + v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(d + v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(d + v.longValue());
- else
- return new NumericValueExp(d + v.intValue());
- }
+ {
+ double d = val.doubleValue();
+ if (v instanceof Double)
+ return new NumericValueExp(d + v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(d + v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(d + v.longValue());
+ else
+ return new NumericValueExp(d + v.intValue());
+ }
else if (val instanceof Float)
- {
- float f = val.floatValue();
- if (v instanceof Double)
- return new NumericValueExp(f + v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(f + v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(f + v.longValue());
- else
- return new NumericValueExp(f + v.intValue());
- }
+ {
+ float f = val.floatValue();
+ if (v instanceof Double)
+ return new NumericValueExp(f + v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(f + v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(f + v.longValue());
+ else
+ return new NumericValueExp(f + v.intValue());
+ }
else if (val instanceof Long)
- {
- long l = val.longValue();
- if (v instanceof Double)
- return new NumericValueExp(l + v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(l + v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(l + v.longValue());
- else
- return new NumericValueExp(l + v.intValue());
- }
+ {
+ long l = val.longValue();
+ if (v instanceof Double)
+ return new NumericValueExp(l + v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(l + v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(l + v.longValue());
+ else
+ return new NumericValueExp(l + v.intValue());
+ }
int i = val.intValue();
if (v instanceof Double)
- return new NumericValueExp(i + v.doubleValue());
+ return new NumericValueExp(i + v.doubleValue());
else if (v instanceof Float)
- return new NumericValueExp(i + v.floatValue());
+ return new NumericValueExp(i + v.floatValue());
else if (v instanceof Long)
- return new NumericValueExp(i + v.longValue());
+ return new NumericValueExp(i + v.longValue());
else
- return new NumericValueExp(i + v.intValue());
- }
+ return new NumericValueExp(i + v.intValue());
+ }
/**
* Return New NumericValueExp(the result of subtracting the specified
@@ -1734,51 +1734,51 @@ public class Query
{
Number v = o.getValue();
if (val instanceof Double)
- {
- double d = val.doubleValue();
- if (v instanceof Double)
- return new NumericValueExp(d - v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(d - v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(d - v.longValue());
- else
- return new NumericValueExp(d - v.intValue());
- }
+ {
+ double d = val.doubleValue();
+ if (v instanceof Double)
+ return new NumericValueExp(d - v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(d - v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(d - v.longValue());
+ else
+ return new NumericValueExp(d - v.intValue());
+ }
else if (val instanceof Float)
- {
- float f = val.floatValue();
- if (v instanceof Double)
- return new NumericValueExp(f - v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(f - v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(f - v.longValue());
- else
- return new NumericValueExp(f - v.intValue());
- }
+ {
+ float f = val.floatValue();
+ if (v instanceof Double)
+ return new NumericValueExp(f - v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(f - v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(f - v.longValue());
+ else
+ return new NumericValueExp(f - v.intValue());
+ }
else if (val instanceof Long)
- {
- long l = val.longValue();
- if (v instanceof Double)
- return new NumericValueExp(l - v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(l - v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(l - v.longValue());
- else
- return new NumericValueExp(l - v.intValue());
- }
+ {
+ long l = val.longValue();
+ if (v instanceof Double)
+ return new NumericValueExp(l - v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(l - v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(l - v.longValue());
+ else
+ return new NumericValueExp(l - v.intValue());
+ }
int i = val.intValue();
if (v instanceof Double)
- return new NumericValueExp(i - v.doubleValue());
+ return new NumericValueExp(i - v.doubleValue());
else if (v instanceof Float)
- return new NumericValueExp(i - v.floatValue());
+ return new NumericValueExp(i - v.floatValue());
else if (v instanceof Long)
- return new NumericValueExp(i - v.longValue());
+ return new NumericValueExp(i - v.longValue());
else
- return new NumericValueExp(i - v.intValue());
- }
+ return new NumericValueExp(i - v.intValue());
+ }
/**
* Return New NumericValueExp(the result of multiplying the specified
@@ -1791,51 +1791,51 @@ public class Query
{
Number v = o.getValue();
if (val instanceof Double)
- {
- double d = val.doubleValue();
- if (v instanceof Double)
- return new NumericValueExp(d * v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(d * v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(d * v.longValue());
- else
- return new NumericValueExp(d * v.intValue());
- }
+ {
+ double d = val.doubleValue();
+ if (v instanceof Double)
+ return new NumericValueExp(d * v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(d * v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(d * v.longValue());
+ else
+ return new NumericValueExp(d * v.intValue());
+ }
else if (val instanceof Float)
- {
- float f = val.floatValue();
- if (v instanceof Double)
- return new NumericValueExp(f * v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(f * v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(f * v.longValue());
- else
- return new NumericValueExp(f * v.intValue());
- }
+ {
+ float f = val.floatValue();
+ if (v instanceof Double)
+ return new NumericValueExp(f * v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(f * v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(f * v.longValue());
+ else
+ return new NumericValueExp(f * v.intValue());
+ }
else if (val instanceof Long)
- {
- long l = val.longValue();
- if (v instanceof Double)
- return new NumericValueExp(l * v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(l * v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(l * v.longValue());
- else
- return new NumericValueExp(l * v.intValue());
- }
+ {
+ long l = val.longValue();
+ if (v instanceof Double)
+ return new NumericValueExp(l * v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(l * v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(l * v.longValue());
+ else
+ return new NumericValueExp(l * v.intValue());
+ }
int i = val.intValue();
if (v instanceof Double)
- return new NumericValueExp(i * v.doubleValue());
+ return new NumericValueExp(i * v.doubleValue());
else if (v instanceof Float)
- return new NumericValueExp(i * v.floatValue());
+ return new NumericValueExp(i * v.floatValue());
else if (v instanceof Long)
- return new NumericValueExp(i * v.longValue());
+ return new NumericValueExp(i * v.longValue());
else
- return new NumericValueExp(i * v.intValue());
- }
+ return new NumericValueExp(i * v.intValue());
+ }
/**
* Return New NumericValueExp(the result of dividing this
@@ -1849,53 +1849,52 @@ public class Query
{
Number v = o.getValue();
if (val instanceof Double)
- {
- double d = val.doubleValue();
- if (v instanceof Double)
- return new NumericValueExp(d / v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(d / v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(d / v.longValue());
- else
- return new NumericValueExp(d / v.intValue());
- }
+ {
+ double d = val.doubleValue();
+ if (v instanceof Double)
+ return new NumericValueExp(d / v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(d / v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(d / v.longValue());
+ else
+ return new NumericValueExp(d / v.intValue());
+ }
else if (val instanceof Float)
- {
- float f = val.floatValue();
- if (v instanceof Double)
- return new NumericValueExp(f / v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(f / v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(f / v.longValue());
- else
- return new NumericValueExp(f / v.intValue());
- }
+ {
+ float f = val.floatValue();
+ if (v instanceof Double)
+ return new NumericValueExp(f / v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(f / v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(f / v.longValue());
+ else
+ return new NumericValueExp(f / v.intValue());
+ }
else if (val instanceof Long)
- {
- long l = val.longValue();
- if (v instanceof Double)
- return new NumericValueExp(l / v.doubleValue());
- else if (v instanceof Float)
- return new NumericValueExp(l / v.floatValue());
- else if (v instanceof Long)
- return new NumericValueExp(l / v.longValue());
- else
- return new NumericValueExp(l / v.intValue());
- }
+ {
+ long l = val.longValue();
+ if (v instanceof Double)
+ return new NumericValueExp(l / v.doubleValue());
+ else if (v instanceof Float)
+ return new NumericValueExp(l / v.floatValue());
+ else if (v instanceof Long)
+ return new NumericValueExp(l / v.longValue());
+ else
+ return new NumericValueExp(l / v.intValue());
+ }
int i = val.intValue();
if (v instanceof Double)
- return new NumericValueExp(i / v.doubleValue());
+ return new NumericValueExp(i / v.doubleValue());
else if (v instanceof Float)
- return new NumericValueExp(i / v.floatValue());
+ return new NumericValueExp(i / v.floatValue());
else if (v instanceof Long)
- return new NumericValueExp(i / v.longValue());
+ return new NumericValueExp(i / v.longValue());
else
- return new NumericValueExp(i / v.intValue());
- }
+ return new NumericValueExp(i / v.intValue());
+ }
}
}
-
diff --git a/libjava/classpath/javax/management/QueryEval.java b/libjava/classpath/javax/management/QueryEval.java
index 375270a..0b9df61 100644
--- a/libjava/classpath/javax/management/QueryEval.java
+++ b/libjava/classpath/javax/management/QueryEval.java
@@ -57,7 +57,7 @@ public class QueryEval
private static final long serialVersionUID = 2675899265640874796L;
/**
- * Stores the server used, on a
+ * Stores the server used, on a
* thread-by-thread basis.
*/
private static InheritableThreadLocal server =
@@ -83,7 +83,7 @@ public class QueryEval
* Sets the {@link MBeanServer} on which the query will be
* performed. This value is inherited automatically by
* child threads. This method is only non-static for historical
- * reasons; it makes no use of instance-related values.
+ * reasons; it makes no use of instance-related values.
*
* @param svr the server to use.
*/
diff --git a/libjava/classpath/javax/management/QueryExp.java b/libjava/classpath/javax/management/QueryExp.java
index 124228c..778e28f 100644
--- a/libjava/classpath/javax/management/QueryExp.java
+++ b/libjava/classpath/javax/management/QueryExp.java
@@ -74,7 +74,7 @@ public interface QueryExp
*/
boolean apply(ObjectName name)
throws BadStringOperationException, BadBinaryOpValueExpException,
- BadAttributeValueExpException, InvalidApplicationException;
+ BadAttributeValueExpException, InvalidApplicationException;
/**
* Changes the {@link MBeanServer} on which this query is performed.
@@ -84,4 +84,3 @@ public interface QueryExp
void setMBeanServer(MBeanServer server);
}
-
diff --git a/libjava/classpath/javax/management/ReflectionException.java b/libjava/classpath/javax/management/ReflectionException.java
index 0f19b5b..96b4ea5 100644
--- a/libjava/classpath/javax/management/ReflectionException.java
+++ b/libjava/classpath/javax/management/ReflectionException.java
@@ -115,4 +115,3 @@ public class ReflectionException
}
}
-
diff --git a/libjava/classpath/javax/management/RuntimeErrorException.java b/libjava/classpath/javax/management/RuntimeErrorException.java
index 811dc40..f361a2c 100644
--- a/libjava/classpath/javax/management/RuntimeErrorException.java
+++ b/libjava/classpath/javax/management/RuntimeErrorException.java
@@ -112,4 +112,3 @@ public class RuntimeErrorException
}
}
-
diff --git a/libjava/classpath/javax/management/RuntimeMBeanException.java b/libjava/classpath/javax/management/RuntimeMBeanException.java
index 95225a8..1c8b242 100644
--- a/libjava/classpath/javax/management/RuntimeMBeanException.java
+++ b/libjava/classpath/javax/management/RuntimeMBeanException.java
@@ -111,4 +111,3 @@ public class RuntimeMBeanException
}
}
-
diff --git a/libjava/classpath/javax/management/RuntimeOperationsException.java b/libjava/classpath/javax/management/RuntimeOperationsException.java
index 8a830a5..8c134f0 100644
--- a/libjava/classpath/javax/management/RuntimeOperationsException.java
+++ b/libjava/classpath/javax/management/RuntimeOperationsException.java
@@ -52,12 +52,12 @@ package javax.management;
public class RuntimeOperationsException
extends JMRuntimeException
{
-
+
/**
* Compatible with JDK 1.5
*/
private static final long serialVersionUID = -8408923047489133588L;
-
+
/* Sun re-implemented causality -- don't know why, but
serialization demands we do too... */
@@ -89,7 +89,7 @@ public class RuntimeOperationsException
* @param message the error message to give to the user.
*/
public RuntimeOperationsException(RuntimeException e,
- String message)
+ String message)
{
super(message);
runtimeException = e;
@@ -118,4 +118,3 @@ public class RuntimeOperationsException
}
}
-
diff --git a/libjava/classpath/javax/management/ServiceNotFoundException.java b/libjava/classpath/javax/management/ServiceNotFoundException.java
index 602e149..1c0d742 100644
--- a/libjava/classpath/javax/management/ServiceNotFoundException.java
+++ b/libjava/classpath/javax/management/ServiceNotFoundException.java
@@ -72,4 +72,3 @@ public class ServiceNotFoundException
}
}
-
diff --git a/libjava/classpath/javax/management/StandardMBean.java b/libjava/classpath/javax/management/StandardMBean.java
index 13e95bd..8e30fc5 100644
--- a/libjava/classpath/javax/management/StandardMBean.java
+++ b/libjava/classpath/javax/management/StandardMBean.java
@@ -85,7 +85,7 @@ public class StandardMBean
* Constructs a new {@link StandardMBean} using the specified
* interface and this as the instance. This should
* be used to create an instance via subclassing.
- *
+ *
* @param iface the interface this bean implements, or null
* if the interface should be determined using the naming
* convention (class X has interface XMBean).
@@ -99,31 +99,31 @@ public class StandardMBean
{
if (iface == null)
{
- String className = getClass().getName();
- try
- {
- iface = Class.forName(className + "MBean");
- }
- catch (ClassNotFoundException e)
- {
- for (Class> nextIface : getClass().getInterfaces())
- {
- if (JMX.isMXBeanInterface(nextIface))
- {
- iface = nextIface;
- break;
- }
- }
- if (iface == null)
- throw (NotCompliantMBeanException)
- (new NotCompliantMBeanException("An interface for the class "
- + className +
- " was not found.").initCause(e));
- }
+ String className = getClass().getName();
+ try
+ {
+ iface = Class.forName(className + "MBean");
+ }
+ catch (ClassNotFoundException e)
+ {
+ for (Class> nextIface : getClass().getInterfaces())
+ {
+ if (JMX.isMXBeanInterface(nextIface))
+ {
+ iface = nextIface;
+ break;
+ }
+ }
+ if (iface == null)
+ throw (NotCompliantMBeanException)
+ (new NotCompliantMBeanException("An interface for the class "
+ + className +
+ " was not found.").initCause(e));
+ }
}
if (!(iface.isInstance(this)))
- throw new NotCompliantMBeanException("The instance, " + impl +
- ", is not an instance of " + iface);
+ throw new NotCompliantMBeanException("The instance, " + impl +
+ ", is not an instance of " + iface);
impl = this;
this.iface = iface;
}
@@ -131,7 +131,7 @@ public class StandardMBean
/**
* Constructs a new {@link StandardMBean} using the specified
* interface and the supplied instance as the implementation.
- *
+ *
* @param impl the implementation.
* @param iface the interface the bean implements, or null
* if the interface should be determined using the naming
@@ -149,35 +149,35 @@ public class StandardMBean
throw new IllegalArgumentException("The specified implementation is null.");
if (iface == null)
{
- Class> implClass = impl.getClass();
- String className = implClass.getName();
- try
- {
- this.iface = Class.forName(className + "MBean", true,
- implClass.getClassLoader());
- }
- catch (ClassNotFoundException e)
- {
- for (Class> nextIface : implClass.getInterfaces())
- {
- if (JMX.isMXBeanInterface(nextIface))
- {
- this.iface = nextIface;
- break;
- }
- }
- if (this.iface == null)
- throw (NotCompliantMBeanException)
- (new NotCompliantMBeanException("An interface for the class " +
- className +
- " was not found.").initCause(e));
- }
+ Class> implClass = impl.getClass();
+ String className = implClass.getName();
+ try
+ {
+ this.iface = Class.forName(className + "MBean", true,
+ implClass.getClassLoader());
+ }
+ catch (ClassNotFoundException e)
+ {
+ for (Class> nextIface : implClass.getInterfaces())
+ {
+ if (JMX.isMXBeanInterface(nextIface))
+ {
+ this.iface = nextIface;
+ break;
+ }
+ }
+ if (this.iface == null)
+ throw (NotCompliantMBeanException)
+ (new NotCompliantMBeanException("An interface for the class " +
+ className +
+ " was not found.").initCause(e));
+ }
}
else
this.iface = iface;
if (!(this.iface.isInstance(impl)))
- throw new NotCompliantMBeanException("The instance, " + impl +
- ", is not an instance of " + iface);
+ throw new NotCompliantMBeanException("The instance, " + impl +
+ ", is not an instance of " + iface);
this.impl = impl;
}
@@ -223,44 +223,44 @@ public class StandardMBean
*/
public Object getAttribute(String name)
throws AttributeNotFoundException, MBeanException,
- ReflectionException
+ ReflectionException
{
Method getter;
- try
+ try
{
- getter = iface.getMethod("get" + name);
+ getter = iface.getMethod("get" + name);
}
catch (NoSuchMethodException e)
{
- try
- {
- getter = iface.getMethod("is" + name);
- }
- catch (NoSuchMethodException ex)
- {
- throw ((AttributeNotFoundException)
- new AttributeNotFoundException("The attribute, " + name +
- ", was not found.").initCause(ex));
- }
+ try
+ {
+ getter = iface.getMethod("is" + name);
+ }
+ catch (NoSuchMethodException ex)
+ {
+ throw ((AttributeNotFoundException)
+ new AttributeNotFoundException("The attribute, " + name +
+ ", was not found.").initCause(ex));
+ }
}
Object result;
try
{
- result = getter.invoke(impl);
+ result = getter.invoke(impl);
}
catch (IllegalAccessException e)
{
- throw new ReflectionException(e, "Failed to retrieve " + name);
+ throw new ReflectionException(e, "Failed to retrieve " + name);
}
catch (IllegalArgumentException e)
{
- throw new ReflectionException(e, "Failed to retrieve " + name);
+ throw new ReflectionException(e, "Failed to retrieve " + name);
}
catch (InvocationTargetException e)
{
- throw new MBeanException((Exception) e.getCause(),
- "The getter of " + name +
- " threw an exception");
+ throw new MBeanException((Exception) e.getCause(),
+ "The getter of " + name +
+ " threw an exception");
}
return result;
}
@@ -280,23 +280,23 @@ public class StandardMBean
AttributeList list = new AttributeList(names.length);
for (int a = 0; a < names.length; ++a)
{
- try
- {
- Object value = getAttribute(names[a]);
- list.add(new Attribute(names[a], value));
- }
- catch (AttributeNotFoundException e)
- {
- /* Ignored */
- }
- catch (ReflectionException e)
- {
- /* Ignored */
- }
- catch (MBeanException e)
- {
- /* Ignored */
- }
+ try
+ {
+ Object value = getAttribute(names[a]);
+ list.add(new Attribute(names[a], value));
+ }
+ catch (AttributeNotFoundException e)
+ {
+ /* Ignored */
+ }
+ catch (ReflectionException e)
+ {
+ /* Ignored */
+ }
+ catch (MBeanException e)
+ {
+ /* Ignored */
+ }
}
return list;
}
@@ -349,7 +349,7 @@ public class StandardMBean
* @return the constructor information to use.
*/
protected MBeanConstructorInfo[] getConstructors(MBeanConstructorInfo[]
- constructors, Object impl)
+ constructors, Object impl)
{
if (impl == null || impl == this)
return constructors;
@@ -406,7 +406,7 @@ public class StandardMBean
* @return the description to use in the instance.
*/
protected String getDescription(MBeanConstructorInfo info,
- MBeanParameterInfo param, int n)
+ MBeanParameterInfo param, int n)
{
return param.getDescription();
}
@@ -477,7 +477,7 @@ public class StandardMBean
* @return the description to use in the instance.
*/
protected String getDescription(MBeanOperationInfo info,
- MBeanParameterInfo param, int n)
+ MBeanParameterInfo param, int n)
{
return param.getDescription();
}
@@ -533,7 +533,7 @@ public class StandardMBean
* detailed in this class are called to allow the values used
* to be overrided:
*
- *
For each attribute,
+ *
For each attribute,
* {@link #getDescription(MBeanAttributeInfo)} is called.
*
For each constructor,
* {@link #getDescription(MBeanConstructorInfo)} is called,
@@ -573,117 +573,117 @@ public class StandardMBean
List operations = new ArrayList();
for (int a = 0; a < methods.length; ++a)
{
- String name = methods[a].getName();
- if (((name.startsWith("get") &&
- methods[a].getReturnType() != Void.TYPE) ||
- (name.startsWith("is") &&
- methods[a].getReturnType() == Boolean.TYPE)) &&
- methods[a].getParameterTypes().length == 0)
- {
- Method[] amethods;
- String attrib;
- if (name.startsWith("is"))
- attrib = name.substring(2);
- else
- attrib = name.substring(3);
- if (attributes.containsKey(attrib))
- amethods = (Method[]) attributes.get(attrib);
- else
- {
- amethods = new Method[2];
- attributes.put(attrib, amethods);
- }
- amethods[0] = methods[a];
- }
- else if (name.startsWith("set") &&
- methods[a].getReturnType() == Void.TYPE &&
- methods[a].getParameterTypes().length == 1)
- {
- Method[] amethods;
- String attrib = name.substring(3);
- if (attributes.containsKey(attrib))
- amethods = (Method[]) attributes.get(attrib);
- else
- {
- amethods = new Method[2];
- attributes.put(attrib, amethods);
- }
- amethods[1] = methods[a];
- }
- else
- operations.add(new MBeanOperationInfo(methods[a].getName(),
- methods[a]));
+ String name = methods[a].getName();
+ if (((name.startsWith("get") &&
+ methods[a].getReturnType() != Void.TYPE) ||
+ (name.startsWith("is") &&
+ methods[a].getReturnType() == Boolean.TYPE)) &&
+ methods[a].getParameterTypes().length == 0)
+ {
+ Method[] amethods;
+ String attrib;
+ if (name.startsWith("is"))
+ attrib = name.substring(2);
+ else
+ attrib = name.substring(3);
+ if (attributes.containsKey(attrib))
+ amethods = (Method[]) attributes.get(attrib);
+ else
+ {
+ amethods = new Method[2];
+ attributes.put(attrib, amethods);
+ }
+ amethods[0] = methods[a];
+ }
+ else if (name.startsWith("set") &&
+ methods[a].getReturnType() == Void.TYPE &&
+ methods[a].getParameterTypes().length == 1)
+ {
+ Method[] amethods;
+ String attrib = name.substring(3);
+ if (attributes.containsKey(attrib))
+ amethods = (Method[]) attributes.get(attrib);
+ else
+ {
+ amethods = new Method[2];
+ attributes.put(attrib, amethods);
+ }
+ amethods[1] = methods[a];
+ }
+ else
+ operations.add(new MBeanOperationInfo(methods[a].getName(),
+ methods[a]));
}
List attribs = new ArrayList(attributes.size());
for (Map.Entry entry : attributes.entrySet())
{
- Method[] amethods = entry.getValue();
- try
- {
- attribs.add(new MBeanAttributeInfo(entry.getKey(),
- entry.getKey(),
- amethods[0], amethods[1]));
- }
- catch (IntrospectionException e)
- {
- /* Shouldn't happen; both shouldn't be null */
- throw new IllegalStateException("The two methods passed to " +
- "the MBeanAttributeInfo " +
- "constructor for " + entry +
- "were null.", e);
- }
+ Method[] amethods = entry.getValue();
+ try
+ {
+ attribs.add(new MBeanAttributeInfo(entry.getKey(),
+ entry.getKey(),
+ amethods[0], amethods[1]));
+ }
+ catch (IntrospectionException e)
+ {
+ /* Shouldn't happen; both shouldn't be null */
+ throw new IllegalStateException("The two methods passed to " +
+ "the MBeanAttributeInfo " +
+ "constructor for " + entry +
+ "were null.", e);
+ }
}
MBeanAttributeInfo[] ainfo = new MBeanAttributeInfo[attribs.size()];
for (int a = 0; a < ainfo.length; ++a)
{
- MBeanAttributeInfo oldInfo = (MBeanAttributeInfo) attribs.get(a);
- String desc = getDescription(oldInfo);
- ainfo[a] = new MBeanAttributeInfo(oldInfo.getName(),
- oldInfo.getType(), desc,
- oldInfo.isReadable(),
- oldInfo.isWritable(),
- oldInfo.isIs());
+ MBeanAttributeInfo oldInfo = (MBeanAttributeInfo) attribs.get(a);
+ String desc = getDescription(oldInfo);
+ ainfo[a] = new MBeanAttributeInfo(oldInfo.getName(),
+ oldInfo.getType(), desc,
+ oldInfo.isReadable(),
+ oldInfo.isWritable(),
+ oldInfo.isIs());
}
Constructor>[] cons = impl.getClass().getConstructors();
MBeanConstructorInfo[] cinfo = new MBeanConstructorInfo[cons.length];
for (int a = 0; a < cinfo.length; ++a)
{
- MBeanConstructorInfo oldInfo = new MBeanConstructorInfo(cons[a].getName(),
- cons[a]);
- String desc = getDescription(oldInfo);
- MBeanParameterInfo[] params = oldInfo.getSignature();
- MBeanParameterInfo[] pinfo = new MBeanParameterInfo[params.length];
- for (int b = 0; b < pinfo.length; ++b)
- {
- String pdesc = getDescription(oldInfo, params[b], b);
- String pname = getParameterName(oldInfo, params[b], b);
- pinfo[b] = new MBeanParameterInfo(pname, params[b].getType(),
- pdesc);
- }
- cinfo[a] = new MBeanConstructorInfo(oldInfo.getName(), desc,
- pinfo);
+ MBeanConstructorInfo oldInfo = new MBeanConstructorInfo(cons[a].getName(),
+ cons[a]);
+ String desc = getDescription(oldInfo);
+ MBeanParameterInfo[] params = oldInfo.getSignature();
+ MBeanParameterInfo[] pinfo = new MBeanParameterInfo[params.length];
+ for (int b = 0; b < pinfo.length; ++b)
+ {
+ String pdesc = getDescription(oldInfo, params[b], b);
+ String pname = getParameterName(oldInfo, params[b], b);
+ pinfo[b] = new MBeanParameterInfo(pname, params[b].getType(),
+ pdesc);
+ }
+ cinfo[a] = new MBeanConstructorInfo(oldInfo.getName(), desc,
+ pinfo);
}
cinfo = getConstructors(cinfo, impl);
MBeanOperationInfo[] oinfo = new MBeanOperationInfo[operations.size()];
for (int a = 0; a < oinfo.length; ++a)
{
- MBeanOperationInfo oldInfo = (MBeanOperationInfo) operations.get(a);
- String desc = getDescription(oldInfo);
- int impact = getImpact(oldInfo);
- MBeanParameterInfo[] params = oldInfo.getSignature();
- MBeanParameterInfo[] pinfo = new MBeanParameterInfo[params.length];
- for (int b = 0; b < pinfo.length; ++b)
- {
- String pdesc = getDescription(oldInfo, params[b], b);
- String pname = getParameterName(oldInfo, params[b], b);
- pinfo[b] = new MBeanParameterInfo(pname, params[b].getType(),
- pdesc);
- }
- oinfo[a] = new MBeanOperationInfo(oldInfo.getName(), desc, pinfo,
- oldInfo.getReturnType(), impact);
+ MBeanOperationInfo oldInfo = (MBeanOperationInfo) operations.get(a);
+ String desc = getDescription(oldInfo);
+ int impact = getImpact(oldInfo);
+ MBeanParameterInfo[] params = oldInfo.getSignature();
+ MBeanParameterInfo[] pinfo = new MBeanParameterInfo[params.length];
+ for (int b = 0; b < pinfo.length; ++b)
+ {
+ String pdesc = getDescription(oldInfo, params[b], b);
+ String pname = getParameterName(oldInfo, params[b], b);
+ pinfo[b] = new MBeanParameterInfo(pname, params[b].getType(),
+ pdesc);
+ }
+ oinfo[a] = new MBeanOperationInfo(oldInfo.getName(), desc, pinfo,
+ oldInfo.getReturnType(), impact);
}
info = new MBeanInfo(impl.getClass().getName(), impl.getClass().getName(),
- ainfo, cinfo, oinfo, null);
+ ainfo, cinfo, oinfo, null);
String cname = getClassName(info);
String desc = getDescription(info);
MBeanNotificationInfo[] ninfo = null;
@@ -720,7 +720,7 @@ public class StandardMBean
* @return the name to use in the instance.
*/
protected String getParameterName(MBeanConstructorInfo info,
- MBeanParameterInfo param, int n)
+ MBeanParameterInfo param, int n)
{
return param.getName();
}
@@ -741,7 +741,7 @@ public class StandardMBean
* @return the name to use in the instance.
*/
protected String getParameterName(MBeanOperationInfo info,
- MBeanParameterInfo param, int n)
+ MBeanParameterInfo param, int n)
{
return param.getName();
}
@@ -753,7 +753,7 @@ public class StandardMBean
* corresponding to each parameter. The class loader used to
* load these classes is the same as that used for loading the
* management bean itself.
- *
+ *
* @param name the name of the action to invoke.
* @param params the parameters used to call the action.
* @param signature the signature of the action.
@@ -771,56 +771,56 @@ public class StandardMBean
throws MBeanException, ReflectionException
{
if (name.startsWith("get") || name.startsWith("is") ||
- name.startsWith("set"))
+ name.startsWith("set"))
throw new ReflectionException(new NoSuchMethodException(),
- "Invocation of an attribute " +
- "method is disallowed.");
+ "Invocation of an attribute " +
+ "method is disallowed.");
ClassLoader loader = getClass().getClassLoader();
Class>[] sigTypes;
if (signature != null)
{
- sigTypes = new Class>[signature.length];
- for (int a = 0; a < signature.length; ++a)
- try
- {
- sigTypes[a] = Class.forName(signature[a], true, loader);
- }
- catch (ClassNotFoundException e)
- {
- throw new ReflectionException(e, "The class, " + signature[a] +
- ", in the method signature " +
- "could not be loaded.");
- }
+ sigTypes = new Class>[signature.length];
+ for (int a = 0; a < signature.length; ++a)
+ try
+ {
+ sigTypes[a] = Class.forName(signature[a], true, loader);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new ReflectionException(e, "The class, " + signature[a] +
+ ", in the method signature " +
+ "could not be loaded.");
+ }
}
else
sigTypes = null;
Method method;
try
{
- method = iface.getMethod(name, sigTypes);
+ method = iface.getMethod(name, sigTypes);
}
catch (NoSuchMethodException e)
{
- throw new ReflectionException(e, "The method, " + name +
- ", could not be found.");
+ throw new ReflectionException(e, "The method, " + name +
+ ", could not be found.");
}
Object result;
try
{
- result = method.invoke(impl, params);
+ result = method.invoke(impl, params);
}
catch (IllegalAccessException e)
{
- throw new ReflectionException(e, "Failed to call " + name);
+ throw new ReflectionException(e, "Failed to call " + name);
}
catch (IllegalArgumentException e)
{
- throw new ReflectionException(e, "Failed to call " + name);
+ throw new ReflectionException(e, "Failed to call " + name);
}
catch (InvocationTargetException e)
{
- throw new MBeanException((Exception) e.getCause(), "The method "
- + name + " threw an exception");
+ throw new MBeanException((Exception) e.getCause(), "The method "
+ + name + " threw an exception");
}
return result;
}
@@ -850,30 +850,30 @@ public class StandardMBean
*/
public void setAttribute(Attribute attribute)
throws AttributeNotFoundException, InvalidAttributeValueException,
- MBeanException, ReflectionException
+ MBeanException, ReflectionException
{
String name = attribute.getName();
String attName = name.substring(0, 1).toUpperCase() + name.substring(1);
- Object val = attribute.getValue();
+ Object val = attribute.getValue();
try
{
- getMutator(attName, val.getClass()).invoke(impl, new Object[] { val });
+ getMutator(attName, val.getClass()).invoke(impl, new Object[] { val });
}
catch (IllegalAccessException e)
{
- throw new ReflectionException(e, "Failed to set " + name);
+ throw new ReflectionException(e, "Failed to set " + name);
}
catch (IllegalArgumentException e)
{
- throw ((InvalidAttributeValueException)
- new InvalidAttributeValueException(attribute.getValue() +
- " is an invalid value for " +
- name).initCause(e));
+ throw ((InvalidAttributeValueException)
+ new InvalidAttributeValueException(attribute.getValue() +
+ " is an invalid value for " +
+ name).initCause(e));
}
catch (InvocationTargetException e)
{
- throw new MBeanException(e, "The getter of " + name +
- " threw an exception");
+ throw new MBeanException(e, "The getter of " + name +
+ " threw an exception");
}
}
@@ -893,28 +893,28 @@ public class StandardMBean
Iterator
- *
+ *
* @param obj the object to compare with.
* @return true if the conditions above hold.
*/
@@ -410,8 +410,8 @@ public class ArrayType
return false;
ArrayType> atype = (ArrayType>) obj;
return (atype.getDimension() == dimension &&
- atype.getElementOpenType().equals(elementType) &&
- atype.isPrimitiveArray() == primitiveArray);
+ atype.getElementOpenType().equals(elementType) &&
+ atype.isPrimitiveArray() == primitiveArray);
}
/**
@@ -438,7 +438,7 @@ public class ArrayType
* @throws OpenDataException if the class name of {@code elementType}
* is not in {@link OpenType#ALLOWED_CLASSNAMES_LIST}.
* @since 1.6
- */
+ */
@SuppressWarnings("unchecked")
public static ArrayType getArrayType(OpenType elementType)
throws OpenDataException
@@ -484,7 +484,7 @@ public class ArrayType
* @throws IllegalArgumentException if the type is not a primitive
* array.
* @since 1.6
- */
+ */
@SuppressWarnings("unchecked")
public static ArrayType getPrimitiveArrayType(Class type)
{
@@ -495,32 +495,32 @@ public class ArrayType
int dim = 0;
do
{
- comType = comType.getComponentType();
- ++dim;
- if (comType == null)
- throw new IllegalArgumentException("The given class is " +
- "not an array.");
+ comType = comType.getComponentType();
+ ++dim;
+ if (comType == null)
+ throw new IllegalArgumentException("The given class is " +
+ "not an array.");
} while (comType.isArray());
try
{
- arr = new ArrayType(getPrimitiveType(comType), true);
+ arr = new ArrayType(getPrimitiveType(comType), true);
}
catch (OpenDataException e)
{
- throw new IllegalArgumentException("The array is not of a primitive " +
- "type", e);
+ throw new IllegalArgumentException("The array is not of a primitive " +
+ "type", e);
}
while (dim > 1)
try
- {
- arr = new ArrayType(1, arr);
- --dim;
- }
+ {
+ arr = new ArrayType(1, arr);
+ --dim;
+ }
catch (OpenDataException e)
- {
- throw (Error)
- new InternalError("Couldn't generate extra dimensions").initCause(e);
- }
+ {
+ throw (Error)
+ new InternalError("Couldn't generate extra dimensions").initCause(e);
+ }
primCache.put(type, arr);
return arr;
}
@@ -570,8 +570,8 @@ public class ArrayType
{
if (hashCode == null)
hashCode = Integer.valueOf(dimension +
- elementType.hashCode() +
- Boolean.valueOf(primitiveArray).hashCode());
+ elementType.hashCode() +
+ Boolean.valueOf(primitiveArray).hashCode());
return hashCode.intValue();
}
@@ -619,21 +619,21 @@ public class ArrayType
Class> elementClass = null;
try
{
- elementClass = Class.forName(getClassName());
+ elementClass = Class.forName(getClassName());
}
catch (ClassNotFoundException e)
{
- throw new IllegalStateException("The array type's element " +
- "class could not be found.", e);
+ throw new IllegalStateException("The array type's element " +
+ "class could not be found.", e);
}
if (!(elementClass.isAssignableFrom(objClass)))
return false;
for (int a = 0; a < Array.getLength(obj); ++a)
{
- Object elem = Array.get(obj, a);
- if (elem != null &&
- (!(elementType.isValue(elem))))
- return false;
+ Object elem = Array.get(obj, a);
+ if (elem != null &&
+ (!(elementType.isValue(elem))))
+ return false;
}
return true;
}
@@ -661,11 +661,11 @@ public class ArrayType
{
if (string == null)
string = getClass().getName()
- + "[name=" + getTypeName()
- + ", dimension=" + dimension
- + ", elementType=" + elementType
- + ", primitiveArray=" + primitiveArray
- + "]";
+ + "[name=" + getTypeName()
+ + ", dimension=" + dimension
+ + ", elementType=" + elementType
+ + ", primitiveArray=" + primitiveArray
+ + "]";
return string;
}
diff --git a/libjava/classpath/javax/management/openmbean/CompositeData.java b/libjava/classpath/javax/management/openmbean/CompositeData.java
index 3134bc4..c3d2b2d 100644
--- a/libjava/classpath/javax/management/openmbean/CompositeData.java
+++ b/libjava/classpath/javax/management/openmbean/CompositeData.java
@@ -151,4 +151,3 @@ public interface CompositeData
Collection> values();
}
-
diff --git a/libjava/classpath/javax/management/openmbean/CompositeDataInvocationHandler.java b/libjava/classpath/javax/management/openmbean/CompositeDataInvocationHandler.java
index 170ec32..4f10f6e 100644
--- a/libjava/classpath/javax/management/openmbean/CompositeDataInvocationHandler.java
+++ b/libjava/classpath/javax/management/openmbean/CompositeDataInvocationHandler.java
@@ -49,7 +49,7 @@ import java.lang.reflect.Proxy;
* {@link CompositeData} object. An instance of {@link CompositeData}
* consists of a series of key-value mappings. This handler assumes
* these keys to be the names of attributes, and thus provides
- * accessor methods by returning the associated value.
+ * accessor methods by returning the associated value.
*
*
* As an example, consider the following interface:
@@ -110,7 +110,7 @@ public class CompositeDataInvocationHandler
{
if (data == null)
throw new IllegalArgumentException("The CompositeData instance " +
- "must be non-null.");
+ "must be non-null.");
this.data = data;
}
@@ -149,18 +149,18 @@ public class CompositeDataInvocationHandler
String mName = method.getName();
if (mName.equals("equals"))
{
- if (args[0] instanceof Proxy)
- {
- InvocationHandler h = Proxy.getInvocationHandler(args[0]);
- if (h instanceof CompositeDataInvocationHandler)
- return data.equals(((CompositeDataInvocationHandler)
- h).getCompositeData());
- }
- return false;
+ if (args[0] instanceof Proxy)
+ {
+ InvocationHandler h = Proxy.getInvocationHandler(args[0]);
+ if (h instanceof CompositeDataInvocationHandler)
+ return data.equals(((CompositeDataInvocationHandler)
+ h).getCompositeData());
+ }
+ return false;
}
if (mName.equals("hashCode"))
{
- return data.hashCode();
+ return data.hashCode();
}
String attrib = null;
if (mName.startsWith("get"))
@@ -171,18 +171,18 @@ public class CompositeDataInvocationHandler
throw new NoSuchMethodException(mName + " is not an accessor.");
if (!data.containsKey(attrib))
{
- if (Character.isLowerCase(attrib.charAt(0)))
- throw new NoSuchMethodException("The attribute " +
- attrib + " is not available " +
- "in the given CompositeData " +
- "object");
- attrib = Character.toLowerCase(attrib.charAt(0))
- + attrib.substring(1);
- if (!data.containsKey(attrib))
- throw new NoSuchMethodException("The attribute " +
- attrib + " is not available " +
- "in the given CompositeData " +
- "object");
+ if (Character.isLowerCase(attrib.charAt(0)))
+ throw new NoSuchMethodException("The attribute " +
+ attrib + " is not available " +
+ "in the given CompositeData " +
+ "object");
+ attrib = Character.toLowerCase(attrib.charAt(0))
+ + attrib.substring(1);
+ if (!data.containsKey(attrib))
+ throw new NoSuchMethodException("The attribute " +
+ attrib + " is not available " +
+ "in the given CompositeData " +
+ "object");
}
return data.get(attrib);
}
diff --git a/libjava/classpath/javax/management/openmbean/CompositeDataSupport.java b/libjava/classpath/javax/management/openmbean/CompositeDataSupport.java
index 6bce267..2cc6f40 100644
--- a/libjava/classpath/javax/management/openmbean/CompositeDataSupport.java
+++ b/libjava/classpath/javax/management/openmbean/CompositeDataSupport.java
@@ -109,9 +109,9 @@ public class CompositeDataSupport
public CompositeDataSupport(CompositeType type, Map items)
throws OpenDataException
{
- this(type,
- items.keySet().toArray(new String[items.size()]),
- items.values().toArray());
+ this(type,
+ items.keySet().toArray(new String[items.size()]),
+ items.values().toArray());
}
/**
@@ -157,26 +157,26 @@ public class CompositeDataSupport
Set typeKeys = type.keySet();
if (typeKeys.size() != names.length)
throw new OpenDataException("The number of field names does not match " +
- "the type description.");
+ "the type description.");
contents = new TreeMap();
for (int a = 0; a < names.length; ++a)
{
- if (names[a] == null)
- throw new IllegalArgumentException("Element " + a + " of the names " +
- "array is null.");
- if (names[a].length() == 0)
- throw new IllegalArgumentException("Element " + a + " of the names " +
- "array is an empty string.");
- if (values[a] == null)
- throw new IllegalArgumentException("Element " + a + " of the values " +
- "array is null.");
- if (!(typeKeys.contains(names[a])))
- throw new OpenDataException("The name, " + names[a] + ", is not a " +
- "field in the given type description.");
- if (!(type.getType(names[a]).isValue(values[a])))
- throw new OpenDataException("The value, " + values[a] + ", is not a " +
- "valid value for the " + names[a] + " field.");
- contents.put(names[a], values[a]);
+ if (names[a] == null)
+ throw new IllegalArgumentException("Element " + a + " of the names " +
+ "array is null.");
+ if (names[a].length() == 0)
+ throw new IllegalArgumentException("Element " + a + " of the names " +
+ "array is an empty string.");
+ if (values[a] == null)
+ throw new IllegalArgumentException("Element " + a + " of the values " +
+ "array is null.");
+ if (!(typeKeys.contains(names[a])))
+ throw new OpenDataException("The name, " + names[a] + ", is not a " +
+ "field in the given type description.");
+ if (!(type.getType(names[a]).isValue(values[a])))
+ throw new OpenDataException("The value, " + values[a] + ", is not a " +
+ "valid value for the " + names[a] + " field.");
+ contents.put(names[a], values[a]);
}
}
@@ -229,10 +229,10 @@ public class CompositeDataSupport
return false;
for (String key : contents.keySet())
{
- if (!(data.containsKey(key)))
- return false;
- if (!(data.get(key).equals(contents.get(key))))
- return false;
+ if (!(data.containsKey(key)))
+ return false;
+ if (!(data.get(key).equals(contents.get(key))))
+ return false;
}
return true;
}
@@ -343,4 +343,3 @@ public class CompositeDataSupport
}
}
-
diff --git a/libjava/classpath/javax/management/openmbean/CompositeType.java b/libjava/classpath/javax/management/openmbean/CompositeType.java
index 3244c64..e36fed1 100644
--- a/libjava/classpath/javax/management/openmbean/CompositeType.java
+++ b/libjava/classpath/javax/management/openmbean/CompositeType.java
@@ -46,7 +46,7 @@ import java.util.TreeMap;
/**
* The open type descriptor for instances of the
* {@link CompositeData} class.
- *
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
@@ -109,34 +109,34 @@ public class CompositeType
* before comparison.
*/
public CompositeType(String name, String desc, String[] names,
- String[] descs, OpenType>[] types)
+ String[] descs, OpenType>[] types)
throws OpenDataException
{
super(CompositeData.class.getName(), name, desc);
- if (names.length == 0
- || names.length != descs.length
- || names.length != types.length)
+ if (names.length == 0
+ || names.length != descs.length
+ || names.length != types.length)
throw new IllegalArgumentException("Arrays must be non-empty " +
- "and of equal size.");
+ "and of equal size.");
nameToDescription = new TreeMap();
for (int a = 0; a < names.length; ++a)
{
- if (names[a] == null)
- throw new IllegalArgumentException("Name " + a + " is null.");
- if (descs[a] == null)
- throw new IllegalArgumentException("Description " + a +
- " is null.");
- String fieldName = names[a].trim();
- if (fieldName.length() == 0)
- throw new IllegalArgumentException("Name " + a + " is " +
- "the empty string.");
- if (descs[a].length() == 0)
- throw new IllegalArgumentException("Description " + a + " is " +
- "the empty string.");
- if (nameToDescription.containsKey(fieldName))
- throw new OpenDataException(fieldName + " appears more " +
- "than once.");
- nameToDescription.put(fieldName, descs[a]);
+ if (names[a] == null)
+ throw new IllegalArgumentException("Name " + a + " is null.");
+ if (descs[a] == null)
+ throw new IllegalArgumentException("Description " + a +
+ " is null.");
+ String fieldName = names[a].trim();
+ if (fieldName.length() == 0)
+ throw new IllegalArgumentException("Name " + a + " is " +
+ "the empty string.");
+ if (descs[a].length() == 0)
+ throw new IllegalArgumentException("Description " + a + " is " +
+ "the empty string.");
+ if (nameToDescription.containsKey(fieldName))
+ throw new OpenDataException(fieldName + " appears more " +
+ "than once.");
+ nameToDescription.put(fieldName, descs[a]);
}
nameToType = new TreeMap>();
for (int a = 0; a < names.length; ++a)
@@ -167,7 +167,7 @@ public class CompositeType
*
The type names are equal.
*
The fields and their types match.
*
- *
+ *
* @param obj the object to compare with.
* @return true if the conditions above hold.
*/
@@ -184,7 +184,7 @@ public class CompositeType
for (String key : keys)
{
if (!(ctype.getType(key).equals(getType(key))))
- return false;
+ return false;
}
return true;
}
@@ -222,7 +222,7 @@ public class CompositeType
/**
*
* Returns the hash code of the composite data type.
- * This is computed as the sum of the hash codes of
+ * This is computed as the sum of the hash codes of
* each field name and its type, together with the hash
* code of the type name. These are the same elements
* of the type that are compared as part of the
@@ -242,18 +242,18 @@ public class CompositeType
{
if (hashCode == null)
{
- int elementTotal = 0;
- for (Map.Entry> entry : nameToType.entrySet())
- {
- elementTotal += (entry.getKey().hashCode() +
- entry.getValue().hashCode());
- }
- hashCode = Integer.valueOf(elementTotal
- + getTypeName().hashCode());
+ int elementTotal = 0;
+ for (Map.Entry> entry : nameToType.entrySet())
+ {
+ elementTotal += (entry.getKey().hashCode() +
+ entry.getValue().hashCode());
+ }
+ hashCode = Integer.valueOf(elementTotal
+ + getTypeName().hashCode());
}
return hashCode.intValue();
}
-
+
/**
* Returns true if the specified object is a member of this
* composite type. The object is judged to be so if it is
@@ -268,15 +268,15 @@ public class CompositeType
{
if (obj instanceof CompositeData)
{
- CompositeData data = (CompositeData) obj;
- return equals(data.getCompositeType());
+ CompositeData data = (CompositeData) obj;
+ return equals(data.getCompositeType());
}
return false;
}
/**
* Returns an unmodifiable {@link java.util.Set}-based
- * view of the field names that form part of this
+ * view of the field names that form part of this
* {@link CompositeType} instance. The names are stored
* in ascending alphanumeric order.
*
@@ -311,9 +311,9 @@ public class CompositeType
{
if (string == null)
string = getClass().getName()
- + "[name=" + getTypeName()
- + ", fields=" + nameToType
- + "]";
+ + "[name=" + getTypeName()
+ + ", fields=" + nameToType
+ + "]";
return string;
}
diff --git a/libjava/classpath/javax/management/openmbean/InvalidKeyException.java b/libjava/classpath/javax/management/openmbean/InvalidKeyException.java
index 5f0cf76..e9458ba 100644
--- a/libjava/classpath/javax/management/openmbean/InvalidKeyException.java
+++ b/libjava/classpath/javax/management/openmbean/InvalidKeyException.java
@@ -74,4 +74,3 @@ public class InvalidKeyException
}
}
-
diff --git a/libjava/classpath/javax/management/openmbean/InvalidOpenTypeException.java b/libjava/classpath/javax/management/openmbean/InvalidOpenTypeException.java
index 9c9ff8c..b4f49ba 100644
--- a/libjava/classpath/javax/management/openmbean/InvalidOpenTypeException.java
+++ b/libjava/classpath/javax/management/openmbean/InvalidOpenTypeException.java
@@ -73,4 +73,3 @@ public class InvalidOpenTypeException
}
}
-
diff --git a/libjava/classpath/javax/management/openmbean/KeyAlreadyExistsException.java b/libjava/classpath/javax/management/openmbean/KeyAlreadyExistsException.java
index cc6bba6..69b22c4 100644
--- a/libjava/classpath/javax/management/openmbean/KeyAlreadyExistsException.java
+++ b/libjava/classpath/javax/management/openmbean/KeyAlreadyExistsException.java
@@ -74,4 +74,3 @@ public class KeyAlreadyExistsException
}
}
-
diff --git a/libjava/classpath/javax/management/openmbean/OpenDataException.java b/libjava/classpath/javax/management/openmbean/OpenDataException.java
index a476cc1..5e2a0b7 100644
--- a/libjava/classpath/javax/management/openmbean/OpenDataException.java
+++ b/libjava/classpath/javax/management/openmbean/OpenDataException.java
@@ -76,4 +76,3 @@ public class OpenDataException
}
}
-
diff --git a/libjava/classpath/javax/management/openmbean/OpenMBeanAttributeInfo.java b/libjava/classpath/javax/management/openmbean/OpenMBeanAttributeInfo.java
index 1b276fd..d521306 100644
--- a/libjava/classpath/javax/management/openmbean/OpenMBeanAttributeInfo.java
+++ b/libjava/classpath/javax/management/openmbean/OpenMBeanAttributeInfo.java
@@ -59,7 +59,7 @@ public interface OpenMBeanAttributeInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* name.equals(object.getName()),
* openType.equals(object.getOpenType()),
* defaultValue.equals(object.getDefaultValue()),
diff --git a/libjava/classpath/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java b/libjava/classpath/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
index 6da2e95..098f72e 100644
--- a/libjava/classpath/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
+++ b/libjava/classpath/javax/management/openmbean/OpenMBeanAttributeInfoSupport.java
@@ -44,7 +44,7 @@ import java.util.Set;
import javax.management.MBeanAttributeInfo;
/**
- * Describes an attribute of an open management bean.
+ * Describes an attribute of an open management bean.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -113,11 +113,11 @@ public class OpenMBeanAttributeInfoSupport
* the empty string.
*/
public OpenMBeanAttributeInfoSupport(String name, String desc, OpenType> type,
- boolean isReadable, boolean isWritable,
- boolean isIs)
+ boolean isReadable, boolean isWritable,
+ boolean isIs)
{
super(name, type == null ? null : type.getClassName(), desc, isReadable,
- isWritable, isIs);
+ isWritable, isIs);
if (name == null)
throw new IllegalArgumentException("The name may not be null.");
if (desc == null)
@@ -128,7 +128,7 @@ public class OpenMBeanAttributeInfoSupport
throw new IllegalArgumentException("The name may not be the empty string.");
if (desc.length() == 0)
throw new IllegalArgumentException("The description may not be the " +
- "empty string.");
+ "empty string.");
}
/**
@@ -158,8 +158,8 @@ public class OpenMBeanAttributeInfoSupport
* of {@link ArrayType} or {@link TabularType}.
*/
public OpenMBeanAttributeInfoSupport(String name, String desc, OpenType type,
- boolean isReadable, boolean isWritable,
- boolean isIs, T defaultValue)
+ boolean isReadable, boolean isWritable,
+ boolean isIs, T defaultValue)
throws OpenDataException
{
this(name, desc, type, isReadable, isWritable, isIs, defaultValue, null);
@@ -168,7 +168,7 @@ public class OpenMBeanAttributeInfoSupport
/**
*
* Constructs a new {@link OpenMBeanAttributeInfo} using the
- * specified name, description, open type, access properties,
+ * specified name, description, open type, access properties,
* default, maximum and minimum values. The name, description
* and open type cannot be null and the name and
* description may not be equal to the empty string. The
@@ -187,7 +187,7 @@ public class OpenMBeanAttributeInfoSupport
*
The default value must be smaller than or equal to the maximum value
* (literally, defaultValue.compareTo(maxValue) <= 0.
*
- *
+ *
* @param name the name of the attribute.
* @param desc a description of the attribute.
* @param type the open type of the attribute.
@@ -205,39 +205,39 @@ public class OpenMBeanAttributeInfoSupport
*/
@SuppressWarnings("unchecked")
public OpenMBeanAttributeInfoSupport(String name, String desc, OpenType type,
- boolean isReadable, boolean isWritable,
- boolean isIs, T defaultValue,
- Comparable minimumValue,
- Comparable maximumValue)
+ boolean isReadable, boolean isWritable,
+ boolean isIs, T defaultValue,
+ Comparable minimumValue,
+ Comparable maximumValue)
throws OpenDataException
{
this(name, desc, type, isReadable, isWritable, isIs);
if (defaultValue != null && !(type.isValue(defaultValue)))
throw new OpenDataException("The default value is not a member of the " +
- "open type given.");
+ "open type given.");
if (minimumValue != null && !(type.isValue(minimumValue)))
throw new OpenDataException("The minimum value is not a member of the " +
- "open type given.");
+ "open type given.");
if (maximumValue != null && !(type.isValue(maximumValue)))
throw new OpenDataException("The maximum value is not a member of the " +
- "open type given.");
- if (defaultValue != null && (type instanceof ArrayType ||
- type instanceof TabularType))
+ "open type given.");
+ if (defaultValue != null && (type instanceof ArrayType ||
+ type instanceof TabularType))
throw new OpenDataException("Default values are not applicable for " +
- "array or tabular types.");
- if (minimumValue != null && maximumValue != null
- && minimumValue.compareTo((T) maximumValue) > 0)
+ "array or tabular types.");
+ if (minimumValue != null && maximumValue != null
+ && minimumValue.compareTo((T) maximumValue) > 0)
throw new OpenDataException("The minimum value is greater than the " +
- "maximum.");
- if (minimumValue != null && defaultValue != null
- && minimumValue.compareTo(defaultValue) > 0)
+ "maximum.");
+ if (minimumValue != null && defaultValue != null
+ && minimumValue.compareTo(defaultValue) > 0)
throw new OpenDataException("The minimum value is greater than the " +
- "default.");
+ "default.");
if (defaultValue != null && maximumValue != null
- && maximumValue.compareTo(defaultValue) < 0)
+ && maximumValue.compareTo(defaultValue) < 0)
throw new OpenDataException("The default value is greater than the " +
- "maximum.");
-
+ "maximum.");
+
openType = type;
this.defaultValue = defaultValue;
minValue = minimumValue;
@@ -282,40 +282,40 @@ public class OpenMBeanAttributeInfoSupport
* @throws OpenDataException if any condition in the list above is broken.
*/
public OpenMBeanAttributeInfoSupport(String name, String desc, OpenType type,
- boolean isReadable, boolean isWritable,
- boolean isIs, T defaultValue,
- T[] legalValues)
+ boolean isReadable, boolean isWritable,
+ boolean isIs, T defaultValue,
+ T[] legalValues)
throws OpenDataException
{
this(name, desc, type, isReadable, isWritable, isIs);
if (defaultValue != null && !(type.isValue(defaultValue)))
throw new OpenDataException("The default value is not a member of the " +
- "open type given.");
- if (defaultValue != null && (type instanceof ArrayType ||
- type instanceof TabularType))
+ "open type given.");
+ if (defaultValue != null && (type instanceof ArrayType ||
+ type instanceof TabularType))
throw new OpenDataException("Default values are not applicable for " +
- "array or tabular types.");
- if (legalValues != null && (type instanceof ArrayType ||
- type instanceof TabularType))
+ "array or tabular types.");
+ if (legalValues != null && (type instanceof ArrayType ||
+ type instanceof TabularType))
throw new OpenDataException("Legal values are not applicable for " +
- "array or tabular types.");
+ "array or tabular types.");
if (legalValues != null && legalValues.length > 0)
{
- Set lv = new HashSet(legalValues.length);
- for (int a = 0; a < legalValues.length; ++a)
- {
- if (legalValues[a] != null &&
- !(type.isValue(legalValues[a])))
- throw new OpenDataException("The legal value, "
- + legalValues[a] +
- "is not a member of the " +
- "open type given.");
- lv.add(legalValues[a]);
- }
- if (defaultValue != null && !(lv.contains(defaultValue)))
- throw new OpenDataException("The default value is not in the set " +
- "of legal values.");
- this.legalValues = Collections.unmodifiableSet(lv);
+ Set lv = new HashSet(legalValues.length);
+ for (int a = 0; a < legalValues.length; ++a)
+ {
+ if (legalValues[a] != null &&
+ !(type.isValue(legalValues[a])))
+ throw new OpenDataException("The legal value, "
+ + legalValues[a] +
+ "is not a member of the " +
+ "open type given.");
+ lv.add(legalValues[a]);
+ }
+ if (defaultValue != null && !(lv.contains(defaultValue)))
+ throw new OpenDataException("The default value is not in the set " +
+ "of legal values.");
+ this.legalValues = Collections.unmodifiableSet(lv);
}
openType = type;
this.defaultValue = defaultValue;
@@ -329,7 +329,7 @@ public class OpenMBeanAttributeInfoSupport
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanAttributeInfo}
- * instance,
+ * instance,
* name.equals(object.getName()),
* openType.equals(object.getOpenType()),
* isRead == object.isReadable(),
@@ -446,20 +446,20 @@ public class OpenMBeanAttributeInfoSupport
public int hashCode()
{
if (hashCode == null)
- hashCode = Integer.valueOf(getName().hashCode() +
- openType.hashCode() +
- Boolean.valueOf(isReadable()).hashCode() +
- (2 *
- Boolean.valueOf(isWritable()).hashCode()) +
- (4 * Boolean.valueOf(isIs()).hashCode()) +
- (defaultValue == null ? 0 :
- defaultValue.hashCode()) +
- (minValue == null ? 0 :
- minValue.hashCode()) +
- (maxValue == null ? 0 :
- maxValue.hashCode()) +
- (legalValues == null ? 0 :
- legalValues.hashCode()));
+ hashCode = Integer.valueOf(getName().hashCode() +
+ openType.hashCode() +
+ Boolean.valueOf(isReadable()).hashCode() +
+ (2 *
+ Boolean.valueOf(isWritable()).hashCode()) +
+ (4 * Boolean.valueOf(isIs()).hashCode()) +
+ (defaultValue == null ? 0 :
+ defaultValue.hashCode()) +
+ (minValue == null ? 0 :
+ minValue.hashCode()) +
+ (maxValue == null ? 0 :
+ maxValue.hashCode()) +
+ (legalValues == null ? 0 :
+ legalValues.hashCode()));
return hashCode.intValue();
}
@@ -531,16 +531,16 @@ public class OpenMBeanAttributeInfoSupport
{
if (string == null)
string = getClass().getName()
- + "[name=" + getName()
- + ",openType=" + openType
- + ",isReadable=" + isReadable()
- + ",isWritable=" + isWritable()
- + ",isIs=" + isIs()
- + ",defaultValue=" + defaultValue
- + ",minValue=" + minValue
- + ",maxValue=" + maxValue
- + ",legalValues=" + legalValues
- + "]";
+ + "[name=" + getName()
+ + ",openType=" + openType
+ + ",isReadable=" + isReadable()
+ + ",isWritable=" + isWritable()
+ + ",isIs=" + isIs()
+ + ",defaultValue=" + defaultValue
+ + ",minValue=" + minValue
+ + ",maxValue=" + maxValue
+ + ",legalValues=" + legalValues
+ + "]";
return string;
}
diff --git a/libjava/classpath/javax/management/openmbean/OpenMBeanConstructorInfo.java b/libjava/classpath/javax/management/openmbean/OpenMBeanConstructorInfo.java
index 34cef13..5bccdb6 100644
--- a/libjava/classpath/javax/management/openmbean/OpenMBeanConstructorInfo.java
+++ b/libjava/classpath/javax/management/openmbean/OpenMBeanConstructorInfo.java
@@ -59,7 +59,7 @@ public interface OpenMBeanConstructorInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* name.equals(object.getName()),
* and signature.equals(object.getSignature()).
*/
diff --git a/libjava/classpath/javax/management/openmbean/OpenMBeanConstructorInfoSupport.java b/libjava/classpath/javax/management/openmbean/OpenMBeanConstructorInfoSupport.java
index 9dac01a..c187d5d 100644
--- a/libjava/classpath/javax/management/openmbean/OpenMBeanConstructorInfoSupport.java
+++ b/libjava/classpath/javax/management/openmbean/OpenMBeanConstructorInfoSupport.java
@@ -43,7 +43,7 @@ import javax.management.MBeanConstructorInfo;
import javax.management.MBeanParameterInfo;
/**
- * Describes a constructor for an open management bean.
+ * Describes a constructor for an open management bean.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -89,7 +89,7 @@ public class OpenMBeanConstructorInfoSupport
* {@link javax.management.MBeanParameterInfo}
*/
public OpenMBeanConstructorInfoSupport(String name, String desc,
- OpenMBeanParameterInfo[] sig)
+ OpenMBeanParameterInfo[] sig)
{
super(name, desc, (MBeanParameterInfo[]) sig);
if (name == null)
@@ -100,7 +100,7 @@ public class OpenMBeanConstructorInfoSupport
throw new IllegalArgumentException("The name may not be the empty string.");
if (desc.length() == 0)
throw new IllegalArgumentException("The description may not be the " +
- "empty string.");
+ "empty string.");
}
/**
@@ -110,7 +110,7 @@ public class OpenMBeanConstructorInfoSupport
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* name.equals(object.getName()),
* and signature.equals(object.getSignature()).
*/
@@ -140,8 +140,8 @@ public class OpenMBeanConstructorInfoSupport
public int hashCode()
{
if (hashCode == null)
- hashCode = Integer.valueOf(getName().hashCode() +
- Arrays.asList(getSignature()).hashCode());
+ hashCode = Integer.valueOf(getName().hashCode() +
+ Arrays.asList(getSignature()).hashCode());
return hashCode.intValue();
}
@@ -165,9 +165,9 @@ public class OpenMBeanConstructorInfoSupport
{
if (string == null)
string = getClass().getName()
- + "[name=" + getName()
- + ",signature=" + Arrays.toString(getSignature())
- + "]";
+ + "[name=" + getName()
+ + ",signature=" + Arrays.toString(getSignature())
+ + "]";
return string;
}
diff --git a/libjava/classpath/javax/management/openmbean/OpenMBeanInfo.java b/libjava/classpath/javax/management/openmbean/OpenMBeanInfo.java
index 5aa4df4..98da260 100644
--- a/libjava/classpath/javax/management/openmbean/OpenMBeanInfo.java
+++ b/libjava/classpath/javax/management/openmbean/OpenMBeanInfo.java
@@ -66,7 +66,7 @@ public interface OpenMBeanInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanInfo}
- * instance,
+ * instance,
* className.equals(object.getClassName())
* and each info class has an equal in the other object.
*/
diff --git a/libjava/classpath/javax/management/openmbean/OpenMBeanInfoSupport.java b/libjava/classpath/javax/management/openmbean/OpenMBeanInfoSupport.java
index d67ff76..c335d75 100644
--- a/libjava/classpath/javax/management/openmbean/OpenMBeanInfoSupport.java
+++ b/libjava/classpath/javax/management/openmbean/OpenMBeanInfoSupport.java
@@ -47,7 +47,7 @@ import javax.management.MBeanNotificationInfo;
import javax.management.MBeanOperationInfo;
/**
- * Describes an open management bean.
+ * Describes an open management bean.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -97,16 +97,16 @@ public class OpenMBeanInfoSupport
* is not assignable to the equivalent
* MBeanXXXInfo class.
*/
- public OpenMBeanInfoSupport(String name, String desc,
- OpenMBeanAttributeInfo[] attribs,
- OpenMBeanConstructorInfo[] cons,
- OpenMBeanOperationInfo[] ops,
- MBeanNotificationInfo[] notifs)
+ public OpenMBeanInfoSupport(String name, String desc,
+ OpenMBeanAttributeInfo[] attribs,
+ OpenMBeanConstructorInfo[] cons,
+ OpenMBeanOperationInfo[] ops,
+ MBeanNotificationInfo[] notifs)
{
super(name, desc, (MBeanAttributeInfo[]) attribs,
- (MBeanConstructorInfo[]) cons,
- (MBeanOperationInfo[]) ops,
- notifs);
+ (MBeanConstructorInfo[]) cons,
+ (MBeanOperationInfo[]) ops,
+ notifs);
}
/**
@@ -116,7 +116,7 @@ public class OpenMBeanInfoSupport
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanInfo}
- * instance,
+ * instance,
* className.equals(object.getClassName())
* and each info class has an equal in the other object.
*/
@@ -149,12 +149,12 @@ public class OpenMBeanInfoSupport
public int hashCode()
{
if (hashCode == null)
- hashCode =
- Integer.valueOf(getClassName().hashCode() +
- new HashSet(Arrays.asList(getAttributes())).hashCode() +
- new HashSet(Arrays.asList(getConstructors())).hashCode() +
- new HashSet(Arrays.asList(getNotifications())).hashCode() +
- new HashSet(Arrays.asList(getOperations())).hashCode());
+ hashCode =
+ Integer.valueOf(getClassName().hashCode() +
+ new HashSet(Arrays.asList(getAttributes())).hashCode() +
+ new HashSet(Arrays.asList(getConstructors())).hashCode() +
+ new HashSet(Arrays.asList(getNotifications())).hashCode() +
+ new HashSet(Arrays.asList(getOperations())).hashCode());
return hashCode.intValue();
}
@@ -179,12 +179,12 @@ public class OpenMBeanInfoSupport
{
if (string == null)
string = getClass().getName()
- + "[className=" + getClassName()
- + ",attributes=" + Arrays.toString(getAttributes())
- + ",constructors=" + Arrays.toString(getConstructors())
- + ",notifications=" + Arrays.toString(getNotifications())
- + ",operations=" + Arrays.toString(getOperations())
- + "]";
+ + "[className=" + getClassName()
+ + ",attributes=" + Arrays.toString(getAttributes())
+ + ",constructors=" + Arrays.toString(getConstructors())
+ + ",notifications=" + Arrays.toString(getNotifications())
+ + ",operations=" + Arrays.toString(getOperations())
+ + "]";
return string;
}
diff --git a/libjava/classpath/javax/management/openmbean/OpenMBeanOperationInfo.java b/libjava/classpath/javax/management/openmbean/OpenMBeanOperationInfo.java
index e835b8d..3b5bf92 100644
--- a/libjava/classpath/javax/management/openmbean/OpenMBeanOperationInfo.java
+++ b/libjava/classpath/javax/management/openmbean/OpenMBeanOperationInfo.java
@@ -59,7 +59,7 @@ public interface OpenMBeanOperationInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* name.equals(object.getName()),
* signature.equals(object.getSignature()),
* returnOpenType.equals(object.getReturnOpenType()),
diff --git a/libjava/classpath/javax/management/openmbean/OpenMBeanOperationInfoSupport.java b/libjava/classpath/javax/management/openmbean/OpenMBeanOperationInfoSupport.java
index c01433d..992df34 100644
--- a/libjava/classpath/javax/management/openmbean/OpenMBeanOperationInfoSupport.java
+++ b/libjava/classpath/javax/management/openmbean/OpenMBeanOperationInfoSupport.java
@@ -43,7 +43,7 @@ import javax.management.MBeanOperationInfo;
import javax.management.MBeanParameterInfo;
/**
- * Describes a operation for an open management bean.
+ * Describes a operation for an open management bean.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -82,7 +82,7 @@ public class OpenMBeanOperationInfoSupport
* description may not be equal to the empty string, and neither
* the name, description nor the open return type may be
* null. The value of impact must be
- * one of the four valid values
+ * one of the four valid values
* ({@link javax.management.MBeanOperationInfo#INFO},
* {@link javax.management.MBeanOperationInfo#ACTION},
* {@link javax.management.MBeanOperationInfo#ACTION_INFO} and
@@ -107,11 +107,11 @@ public class OpenMBeanOperationInfoSupport
* {@link javax.management.MBeanParameterInfo}
*/
public OpenMBeanOperationInfoSupport(String name, String desc,
- OpenMBeanParameterInfo[] sig,
- OpenType> type, int impact)
+ OpenMBeanParameterInfo[] sig,
+ OpenType> type, int impact)
{
super(name, desc, (MBeanParameterInfo[]) sig,
- type == null ? null : type.getClassName(), impact);
+ type == null ? null : type.getClassName(), impact);
if (name == null)
throw new IllegalArgumentException("The name may not be null.");
if (desc == null)
@@ -122,9 +122,9 @@ public class OpenMBeanOperationInfoSupport
throw new IllegalArgumentException("The name may not be the empty string.");
if (desc.length() == 0)
throw new IllegalArgumentException("The description may not be the " +
- "empty string.");
- if (impact != ACTION && impact != INFO &&
- impact != ACTION_INFO && impact != UNKNOWN)
+ "empty string.");
+ if (impact != ACTION && impact != INFO &&
+ impact != ACTION_INFO && impact != UNKNOWN)
throw new IllegalArgumentException("The impact factor is an invalid value.");
returnOpenType = type;
}
@@ -136,7 +136,7 @@ public class OpenMBeanOperationInfoSupport
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* name.equals(object.getName()),
* signature.equals(object.getSignature()),
* returnOpenType.equals(object.getReturnOpenType()),
@@ -182,10 +182,10 @@ public class OpenMBeanOperationInfoSupport
public int hashCode()
{
if (hashCode == null)
- hashCode = Integer.valueOf(getName().hashCode() +
- returnOpenType.hashCode() +
- Integer.valueOf(getImpact()).hashCode() +
- Arrays.asList(getSignature()).hashCode());
+ hashCode = Integer.valueOf(getName().hashCode() +
+ returnOpenType.hashCode() +
+ Integer.valueOf(getImpact()).hashCode() +
+ Arrays.asList(getSignature()).hashCode());
return hashCode.intValue();
}
@@ -209,30 +209,30 @@ public class OpenMBeanOperationInfoSupport
{
if (string == null)
{
- String impactString;
- switch (getImpact())
- {
- case INFO:
- impactString = "INFO";
- break;
- case ACTION:
- impactString = "ACTION";
- break;
- case ACTION_INFO:
- impactString = "ACTION_INFO";
- break;
- case UNKNOWN:
- impactString = "UNKNOWN";
- break;
- default:
- impactString = "ERRONEOUS VALUE";
- }
- string = getClass().getName()
- + "[name=" + getName()
- + ",signature=" + Arrays.toString(getSignature())
- + ",returnOpenType=" + returnOpenType
- + ",impact=" + impactString
- + "]";
+ String impactString;
+ switch (getImpact())
+ {
+ case INFO:
+ impactString = "INFO";
+ break;
+ case ACTION:
+ impactString = "ACTION";
+ break;
+ case ACTION_INFO:
+ impactString = "ACTION_INFO";
+ break;
+ case UNKNOWN:
+ impactString = "UNKNOWN";
+ break;
+ default:
+ impactString = "ERRONEOUS VALUE";
+ }
+ string = getClass().getName()
+ + "[name=" + getName()
+ + ",signature=" + Arrays.toString(getSignature())
+ + ",returnOpenType=" + returnOpenType
+ + ",impact=" + impactString
+ + "]";
}
return string;
}
diff --git a/libjava/classpath/javax/management/openmbean/OpenMBeanParameterInfo.java b/libjava/classpath/javax/management/openmbean/OpenMBeanParameterInfo.java
index 75d1baf..0869a68 100644
--- a/libjava/classpath/javax/management/openmbean/OpenMBeanParameterInfo.java
+++ b/libjava/classpath/javax/management/openmbean/OpenMBeanParameterInfo.java
@@ -59,7 +59,7 @@ public interface OpenMBeanParameterInfo
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* name.equals(object.getName()),
* openType.equals(object.getOpenType()),
* defaultValue.equals(object.getDefaultValue()),
diff --git a/libjava/classpath/javax/management/openmbean/OpenMBeanParameterInfoSupport.java b/libjava/classpath/javax/management/openmbean/OpenMBeanParameterInfoSupport.java
index 5f86bf4..78ad1c5 100644
--- a/libjava/classpath/javax/management/openmbean/OpenMBeanParameterInfoSupport.java
+++ b/libjava/classpath/javax/management/openmbean/OpenMBeanParameterInfoSupport.java
@@ -45,7 +45,7 @@ import javax.management.MBeanParameterInfo;
/**
* Describes the parameters of a constructor or operation associated
- * with an open management bean.
+ * with an open management bean.
*
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
@@ -122,7 +122,7 @@ public class OpenMBeanParameterInfoSupport
throw new IllegalArgumentException("The name may not be the empty string.");
if (desc.length() == 0)
throw new IllegalArgumentException("The description may not be the " +
- "empty string.");
+ "empty string.");
openType = type;
}
@@ -150,7 +150,7 @@ public class OpenMBeanParameterInfoSupport
* of {@link ArrayType} or {@link TabularType}.
*/
public OpenMBeanParameterInfoSupport(String name, String desc, OpenType type,
- T defaultValue)
+ T defaultValue)
throws OpenDataException
{
this(name, desc, type, defaultValue, null);
@@ -177,7 +177,7 @@ public class OpenMBeanParameterInfoSupport
*
The default value must be smaller than or equal to the maximum value
* (literally, defaultValue.compareTo(maxValue) <= 0.
*
- *
+ *
* @param name the name of the parameter.
* @param desc a description of the parameter.
* @param type the open type of the parameter.
@@ -192,37 +192,37 @@ public class OpenMBeanParameterInfoSupport
*/
@SuppressWarnings("unchecked")
public OpenMBeanParameterInfoSupport(String name, String desc, OpenType type,
- T defaultValue, Comparable minimumValue,
- Comparable maximumValue)
+ T defaultValue, Comparable minimumValue,
+ Comparable maximumValue)
throws OpenDataException
{
this(name, desc, type);
if (defaultValue != null && !(type.isValue(defaultValue)))
throw new OpenDataException("The default value is not a member of the " +
- "open type given.");
+ "open type given.");
if (minimumValue != null && !(type.isValue(minimumValue)))
throw new OpenDataException("The minimum value is not a member of the " +
- "open type given.");
+ "open type given.");
if (maximumValue != null && !(type.isValue(maximumValue)))
throw new OpenDataException("The maximum value is not a member of the " +
- "open type given.");
- if (defaultValue != null && (type instanceof ArrayType ||
- type instanceof TabularType))
+ "open type given.");
+ if (defaultValue != null && (type instanceof ArrayType ||
+ type instanceof TabularType))
throw new OpenDataException("Default values are not applicable for " +
- "array or tabular types.");
- if (minimumValue != null && maximumValue != null
- && minimumValue.compareTo((T) maximumValue) > 0)
+ "array or tabular types.");
+ if (minimumValue != null && maximumValue != null
+ && minimumValue.compareTo((T) maximumValue) > 0)
throw new OpenDataException("The minimum value is greater than the " +
- "maximum.");
- if (minimumValue != null && defaultValue != null
- && minimumValue.compareTo(defaultValue) > 0)
+ "maximum.");
+ if (minimumValue != null && defaultValue != null
+ && minimumValue.compareTo(defaultValue) > 0)
throw new OpenDataException("The minimum value is greater than the " +
- "default.");
+ "default.");
if (defaultValue != null && maximumValue != null
- && maximumValue.compareTo(defaultValue) < 0)
+ && maximumValue.compareTo(defaultValue) < 0)
throw new OpenDataException("The default value is greater than the " +
- "maximum.");
-
+ "maximum.");
+
this.defaultValue = defaultValue;
minValue = minimumValue;
maxValue = maximumValue;
@@ -263,38 +263,38 @@ public class OpenMBeanParameterInfoSupport
* @throws OpenDataException if any condition in the list above is broken.
*/
public OpenMBeanParameterInfoSupport(String name, String desc, OpenType type,
- T defaultValue, T[] legalValues)
+ T defaultValue, T[] legalValues)
throws OpenDataException
{
this(name, desc, type);
if (defaultValue != null && !(type.isValue(defaultValue)))
throw new OpenDataException("The default value is not a member of the " +
- "open type given.");
- if (defaultValue != null && (type instanceof ArrayType ||
- type instanceof TabularType))
+ "open type given.");
+ if (defaultValue != null && (type instanceof ArrayType ||
+ type instanceof TabularType))
throw new OpenDataException("Default values are not applicable for " +
- "array or tabular types.");
- if (legalValues != null && (type instanceof ArrayType ||
- type instanceof TabularType))
+ "array or tabular types.");
+ if (legalValues != null && (type instanceof ArrayType ||
+ type instanceof TabularType))
throw new OpenDataException("Legal values are not applicable for " +
- "array or tabular types.");
+ "array or tabular types.");
if (legalValues != null && legalValues.length > 0)
{
- Set lv = new HashSet(legalValues.length);
- for (int a = 0; a < legalValues.length; ++a)
- {
- if (legalValues[a] != null &&
- !(type.isValue(legalValues[a])))
- throw new OpenDataException("The legal value, "
- + legalValues[a] +
- "is not a member of the " +
- "open type given.");
- lv.add(legalValues[a]);
- }
- if (defaultValue != null && !(lv.contains(defaultValue)))
- throw new OpenDataException("The default value is not in the set " +
- "of legal values.");
- this.legalValues = Collections.unmodifiableSet(lv);
+ Set lv = new HashSet(legalValues.length);
+ for (int a = 0; a < legalValues.length; ++a)
+ {
+ if (legalValues[a] != null &&
+ !(type.isValue(legalValues[a])))
+ throw new OpenDataException("The legal value, "
+ + legalValues[a] +
+ "is not a member of the " +
+ "open type given.");
+ lv.add(legalValues[a]);
+ }
+ if (defaultValue != null && !(lv.contains(defaultValue)))
+ throw new OpenDataException("The default value is not in the set " +
+ "of legal values.");
+ this.legalValues = Collections.unmodifiableSet(lv);
}
this.defaultValue = defaultValue;
}
@@ -307,7 +307,7 @@ public class OpenMBeanParameterInfoSupport
*
* @param obj the object to compare.
* @return true if the object is a {@link OpenMBeanParameterInfo}
- * instance,
+ * instance,
* name.equals(object.getName()),
* openType.equals(object.getOpenType()),
* defaultValue.equals(object.getDefaultValue()),
@@ -418,16 +418,16 @@ public class OpenMBeanParameterInfoSupport
public int hashCode()
{
if (hashCode == null)
- hashCode = Integer.valueOf(getName().hashCode() +
- openType.hashCode() +
- (defaultValue == null ? 0 :
- defaultValue.hashCode()) +
- (minValue == null ? 0 :
- minValue.hashCode()) +
- (maxValue == null ? 0 :
- maxValue.hashCode()) +
- (legalValues == null ? 0 :
- legalValues.hashCode()));
+ hashCode = Integer.valueOf(getName().hashCode() +
+ openType.hashCode() +
+ (defaultValue == null ? 0 :
+ defaultValue.hashCode()) +
+ (minValue == null ? 0 :
+ minValue.hashCode()) +
+ (maxValue == null ? 0 :
+ maxValue.hashCode()) +
+ (legalValues == null ? 0 :
+ legalValues.hashCode()));
return hashCode.intValue();
}
@@ -499,13 +499,13 @@ public class OpenMBeanParameterInfoSupport
{
if (string == null)
string = getClass().getName()
- + "[name=" + getName()
- + ",openType=" + openType
- + ",defaultValue=" + defaultValue
- + ",minValue=" + minValue
- + ",maxValue=" + maxValue
- + ",legalValues=" + legalValues
- + "]";
+ + "[name=" + getName()
+ + ",openType=" + openType
+ + ",defaultValue=" + defaultValue
+ + ",minValue=" + minValue
+ + ",maxValue=" + maxValue
+ + ",legalValues=" + legalValues
+ + "]";
return string;
}
diff --git a/libjava/classpath/javax/management/openmbean/OpenType.java b/libjava/classpath/javax/management/openmbean/OpenType.java
index f3a97fe..d8abc7c 100644
--- a/libjava/classpath/javax/management/openmbean/OpenType.java
+++ b/libjava/classpath/javax/management/openmbean/OpenType.java
@@ -47,7 +47,7 @@ import java.util.List;
* applicable data values for open MBeans. An open type
* is defined by its name and description, and the name
* of the Java class it maps to.
- *
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
@@ -99,7 +99,7 @@ public abstract class OpenType
"java.util.Date",
"javax.management.ObjectName",
CompositeData.class.getName(),
- TabularData.class.getName()
+ TabularData.class.getName()
};
/**
@@ -107,8 +107,8 @@ public abstract class OpenType
* used as open types. Note that each type is also available
* in array form, possibly with multiple dimensions.
*/
- public static final List ALLOWED_CLASSNAMES_LIST =
- Arrays.asList(ALLOWED_CLASSNAMES);
+ public static final List ALLOWED_CLASSNAMES_LIST =
+ Arrays.asList(ALLOWED_CLASSNAMES);
/**
* Constructs a new {@link OpenType} for the specified class
@@ -136,25 +136,25 @@ public abstract class OpenType
{
if (name == null || name.equals(""))
throw new IllegalArgumentException("The name can not be null " +
- "or the empty string.");
+ "or the empty string.");
if (desc == null || desc.equals(""))
throw new IllegalArgumentException("The description can not " +
- "be null or the empty string.");
+ "be null or the empty string.");
Class> type;
try
{
- type = Class.forName(className);
+ type = Class.forName(className);
}
catch (ClassNotFoundException e)
{
- throw (OpenDataException) new OpenDataException("The class name, " + className +
- ", is unavailable.").initCause(e);
+ throw (OpenDataException) new OpenDataException("The class name, " + className +
+ ", is unavailable.").initCause(e);
}
while (type.isArray())
type = type.getComponentType();
if (!(type.isPrimitive() || ALLOWED_CLASSNAMES_LIST.contains(type.getName())))
- throw new OpenDataException("The class name, " + className +
- ", does not specify a valid open type.");
+ throw new OpenDataException("The class name, " + className +
+ ", does not specify a valid open type.");
this.className = className;
typeName = name;
description = desc;
@@ -172,7 +172,7 @@ public abstract class OpenType
/**
* Returns the name of the Java class this type represents. This must
* be one of the {@link ALLOWED_CLASSNAMES} or an array of one of them.
- * The specification of arrays follows the standard set by
+ * The specification of arrays follows the standard set by
* {@link java.lang.Class#getName()} i.e. the name is the class name
* preceded by n instances of '[' and an 'L', where n is number of
* dimensions used by the array.
diff --git a/libjava/classpath/javax/management/openmbean/SimpleType.java b/libjava/classpath/javax/management/openmbean/SimpleType.java
index ef05e9d..81b991b 100644
--- a/libjava/classpath/javax/management/openmbean/SimpleType.java
+++ b/libjava/classpath/javax/management/openmbean/SimpleType.java
@@ -56,7 +56,7 @@ import javax.management.ObjectName;
* basic Java types. As a result, the valid instances of this
* class are predefined, and no constructor is given for creating
* new instances.
- *
+ *
* @author Andrew John Hughes (gnu_andrew@member.fsf.org)
* @since 1.5
*/
@@ -80,7 +80,7 @@ public final class SimpleType
* The {@link SimpleType} representation of
* java.lang.Boolean.
*/
- public static final SimpleType BOOLEAN;
+ public static final SimpleType BOOLEAN;
/**
* The {@link SimpleType} representation of
@@ -98,7 +98,7 @@ public final class SimpleType
* The {@link SimpleType} representation of
* java.util.Date.
*/
- public static final SimpleType DATE;
+ public static final SimpleType DATE;
/**
* The {@link SimpleType} representation of
@@ -171,28 +171,28 @@ public final class SimpleType
{
try
{
- BIGDECIMAL = new SimpleType("java.math.BigDecimal");
- BIGINTEGER = new SimpleType("java.math.BigInteger");
- BOOLEAN = new SimpleType("java.lang.Boolean");
- BYTE = new SimpleType("java.lang.Byte");
- CHARACTER = new SimpleType("java.lang.Character");
- DATE = new SimpleType("java.util.Date");
- DOUBLE = new SimpleType("java.lang.Double");
- FLOAT = new SimpleType("java.lang.Float");
- INTEGER = new SimpleType("java.lang.Integer");
- LONG = new SimpleType("java.lang.Long");
- OBJECTNAME =
- new SimpleType("javax.management.ObjectName");
- SHORT = new SimpleType("java.lang.Short");
- STRING = new SimpleType("java.lang.String");
- VOID = new SimpleType("java.lang.Void");
+ BIGDECIMAL = new SimpleType("java.math.BigDecimal");
+ BIGINTEGER = new SimpleType("java.math.BigInteger");
+ BOOLEAN = new SimpleType("java.lang.Boolean");
+ BYTE = new SimpleType("java.lang.Byte");
+ CHARACTER = new SimpleType("java.lang.Character");
+ DATE = new SimpleType("java.util.Date");
+ DOUBLE = new SimpleType("java.lang.Double");
+ FLOAT = new SimpleType("java.lang.Float");
+ INTEGER = new SimpleType("java.lang.Integer");
+ LONG = new SimpleType("java.lang.Long");
+ OBJECTNAME =
+ new SimpleType("javax.management.ObjectName");
+ SHORT = new SimpleType("java.lang.Short");
+ STRING = new SimpleType("java.lang.String");
+ VOID = new SimpleType("java.lang.Void");
}
catch (OpenDataException e)
{
- /* In normal circumstances, this shouldn't be possible. */
- throw new IllegalStateException("A invalid class name " +
- "was passed to the SimpleType " +
- "constructor.", e);
+ /* In normal circumstances, this shouldn't be possible. */
+ throw new IllegalStateException("A invalid class name " +
+ "was passed to the SimpleType " +
+ "constructor.", e);
}
}
@@ -200,12 +200,12 @@ public final class SimpleType
* Constructs a new {@link SimpleType} instance for the given
* class name. The class name is also used as the type name
* and description of the {@link OpenType} instance.
- *
+ *
* @param name the name of the class this instance should
* represent.
* @throws OpenDataException if somehow the constructor of the
* superclass is passed an invalid
- * class name.
+ * class name.
*/
private SimpleType(String name)
throws OpenDataException
@@ -224,7 +224,7 @@ public final class SimpleType
* {@link SimpleType}.
*
The class names are equal.
*
- *
+ *
* @param obj the object to compare with.
* @return true if the conditions above hold.
*/
@@ -319,7 +319,7 @@ public final class SimpleType
if (equals(VOID))
return VOID;
throw new InvalidObjectException("Invalid simple type instance " +
- "deserialized.");
+ "deserialized.");
}
/**
@@ -342,8 +342,8 @@ public final class SimpleType
{
if (string == null)
string = getClass().getName()
- + "[name=" + getClassName()
- + "]";
+ + "[name=" + getClassName()
+ + "]";
return string;
}
diff --git a/libjava/classpath/javax/management/openmbean/TabularData.java b/libjava/classpath/javax/management/openmbean/TabularData.java
index 75ab00b..8bceae8 100644
--- a/libjava/classpath/javax/management/openmbean/TabularData.java
+++ b/libjava/classpath/javax/management/openmbean/TabularData.java
@@ -63,7 +63,7 @@ public interface TabularData
* this instance's tabular type. The returned indices are the
* values of the fields in the supplied {@link CompositeData}
* instance that match the names given in the {@link TabularType}.
- *
+ *
* @param val the {@link CompositeData} value whose index should
* be calculated.
* @return the index the value would take on, if it were to be added.
@@ -154,14 +154,14 @@ public interface TabularData
/**
* Returns true if this {@link TabularData} instance
* contains no {@link CompositeData} values.
- *
+ *
* @return true if the instance is devoid of rows.
*/
boolean isEmpty();
/**
* Returns a {@link java.util.Set} view of the keys or
- * indices of this {@link TabularData} instance.
+ * indices of this {@link TabularData} instance.
*
* @return a set containing the keys of this instance.
*/
@@ -174,7 +174,7 @@ public interface TabularData
* the same index as an existing value. The index is
* calculated using the index names of the
* {@link TabularType} for this instance.
- *
+ *
* @param val the {@link CompositeData} value to add.
* @throws NullPointerException if val is
* null.
@@ -198,7 +198,7 @@ public interface TabularData
* value can not be added, then none of the values should
* be. If the array is null or empty, the
* method simply returns.
- *
+ *
* @param vals the {@link CompositeData} values to add.
* @throws NullPointerException if a value from the array is
* null.
@@ -247,7 +247,7 @@ public interface TabularData
* object.
*/
String toString();
-
+
/**
* Returns the values associated with this instance.
*
@@ -256,4 +256,3 @@ public interface TabularData
Collection> values();
}
-
diff --git a/libjava/classpath/javax/management/openmbean/TabularDataSupport.java b/libjava/classpath/javax/management/openmbean/TabularDataSupport.java
index 8557f5f..e2da1b4 100644
--- a/libjava/classpath/javax/management/openmbean/TabularDataSupport.java
+++ b/libjava/classpath/javax/management/openmbean/TabularDataSupport.java
@@ -115,7 +115,7 @@ public class TabularDataSupport
tabularType = type;
dataMap = new HashMap
*
* If the name supplied is null, then the bean is
@@ -262,7 +262,7 @@ public interface RMIConnection
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
*
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with. This may
@@ -297,14 +297,14 @@ public interface RMIConnection
* not have permission to invoke this operation.
* @throws IOException if an I/O error occurred in communicating with
* the bean server.
- */
+ */
@SuppressWarnings("unchecked")
ObjectInstance createMBean(String className, ObjectName name,
- MarshalledObject params, String[] sig,
- Subject delegationSubject)
+ MarshalledObject params, String[] sig,
+ Subject delegationSubject)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, IOException;
/**
*
@@ -320,7 +320,7 @@ public interface RMIConnection
* under the supplied name. The class is loaded using the
* given class loader. If this argument is null,
* then the same class loader as was used to load the server
- * is used.
+ * is used.
*
*
* If the name supplied is null, then the bean is
@@ -328,7 +328,7 @@ public interface RMIConnection
* The {@link MBeanRegistration#preRegister preRegister} method
* of this interface will be used to obtain the name in this case.
*
- *
+ *
* @param className the class of the management bean, of which
* an instance should be created.
* @param name the name to register the new bean with. This may
@@ -369,12 +369,12 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
ObjectInstance createMBean(String className, ObjectName name,
- ObjectName loaderName, MarshalledObject params,
- String[] sig, Subject delegationSubject)
+ ObjectName loaderName, MarshalledObject params,
+ String[] sig, Subject delegationSubject)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, InstanceNotFoundException,
- IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, InstanceNotFoundException,
+ IOException;
/**
*
@@ -394,7 +394,7 @@ public interface RMIConnection
* of this interface will be used to obtain the name in this case.
*
@@ -449,7 +449,7 @@ public interface RMIConnection
* using the default constructor and registering it with the server
* under the supplied name. The class is loaded using the
* {@link javax.management.loading.ClassLoaderRepository default
- * loader repository} of the server.
+ * loader repository} of the server.
*
*
* If the name supplied is null, then the bean is
@@ -458,7 +458,7 @@ public interface RMIConnection
* of this interface will be used to obtain the name in this case.
*
*
- * This method is equivalent to calling {@link
+ * This method is equivalent to calling {@link
* #createMBean(String, ObjectName, Object[], String[])
* createMBean(className, name, (Object[]) null,
* (String[]) null)} with null parameters
@@ -495,10 +495,10 @@ public interface RMIConnection
* @see #createMBean(String, ObjectName, MarshalledObject, String[], Subject)
*/
ObjectInstance createMBean(String className, ObjectName name,
- Subject delegationSubject)
+ Subject delegationSubject)
throws ReflectionException, InstanceAlreadyExistsException,
- MBeanRegistrationException, MBeanException,
- NotCompliantMBeanException, IOException;
+ MBeanRegistrationException, MBeanException,
+ NotCompliantMBeanException, IOException;
/**
*
@@ -552,8 +552,8 @@ public interface RMIConnection
* @throws IOException if an I/O error occurs.
*/
NotificationResult fetchNotifications(long sequenceNumber,
- int maxNotifications,
- long timeout)
+ int maxNotifications,
+ long timeout)
throws IOException;
/**
@@ -587,8 +587,8 @@ public interface RMIConnection
*/
Object getAttribute(ObjectName bean, String name, Subject delegationSubject)
throws MBeanException, AttributeNotFoundException,
- InstanceNotFoundException, ReflectionException,
- IOException;
+ InstanceNotFoundException, ReflectionException,
+ IOException;
/**
* Handles {@link
@@ -616,13 +616,13 @@ public interface RMIConnection
* @see DynamicMBean#getAttributes(String[])
*/
AttributeList getAttributes(ObjectName bean, String[] names,
- Subject delegationSubject)
+ Subject delegationSubject)
throws InstanceNotFoundException, ReflectionException,
- IOException;
+ IOException;
/**
* Returns the unique identifier for this connection to the RMI
- * server.
+ * server.
*
* @return the connection ID.
* @throws IOException if an I/O error occurred.
@@ -707,7 +707,7 @@ public interface RMIConnection
*/
MBeanInfo getMBeanInfo(ObjectName name, Subject delegationSubject)
throws InstanceNotFoundException, IntrospectionException,
- ReflectionException, IOException;
+ ReflectionException, IOException;
/**
* Handles {@link
@@ -769,9 +769,9 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
Object invoke(ObjectName bean, String name, MarshalledObject params,
- String[] sig, Subject delegationSubject)
+ String[] sig, Subject delegationSubject)
throws InstanceNotFoundException, MBeanException,
- ReflectionException, IOException;
+ ReflectionException, IOException;
/**
*
@@ -790,7 +790,7 @@ public interface RMIConnection
*
Both the class of B and C were loaded by the same class loader,
* and B is assignable to C.
*
- *
+ *
* @param name the name of the management bean.
* @param className the name of the class to test if name is
* an instance of.
@@ -807,7 +807,7 @@ public interface RMIConnection
* the bean server.
*/
boolean isInstanceOf(ObjectName name, String className,
- Subject delegationSubject)
+ Subject delegationSubject)
throws InstanceNotFoundException, IOException;
/**
@@ -852,7 +852,7 @@ public interface RMIConnection
*
* If both the object name and the query expression are null,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
*
*
* @param name an {@link ObjectName} to use as a filter.
@@ -873,9 +873,9 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
Set queryMBeans(ObjectName name, MarshalledObject query,
- Subject delegationSubject)
+ Subject delegationSubject)
throws IOException;
-
+
/**
*
* If both the object name and the query expression are null,
* or the object name has no domain and no key properties,
- * no filtering will be performed and all beans are returned.
+ * no filtering will be performed and all beans are returned.
*
*
* @param name an {@link ObjectName} to use as a filter.
@@ -916,7 +916,7 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
Set queryNames(ObjectName name, MarshalledObject query,
- Subject delegationSubject)
+ Subject delegationSubject)
throws IOException;
/**
@@ -962,12 +962,12 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
void removeNotificationListener(ObjectName name,
- ObjectName listener,
- MarshalledObject filter,
- MarshalledObject passback,
- Subject delegationSubject)
+ ObjectName listener,
+ MarshalledObject filter,
+ MarshalledObject passback,
+ Subject delegationSubject)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Handles {@link
@@ -998,9 +998,9 @@ public interface RMIConnection
* @see NotificationBroadcaster#removeNotificationListener(NotificationListener)
*/
void removeNotificationListener(ObjectName name, ObjectName listener,
- Subject delegationSubject)
+ Subject delegationSubject)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Removes one or more {@link NotificationListener}s from the specified
@@ -1014,7 +1014,7 @@ public interface RMIConnection
* identifiers provided by the
* {@link #addNotificationListeners(ObjectName[], MarshalledObject[],
* Subject)} method to select the listeners to remove.
- *
+ *
* @param name the name of the management bean from which the
* listeners should be removed.
* @param listenerIds the identifiers of the listeners to remove.
@@ -1036,9 +1036,9 @@ public interface RMIConnection
* @see #addNotificationListeners(ObjectName[], MarshalledObject[], Subject)
*/
void removeNotificationListeners(ObjectName name, Integer[] listenerIds,
- Subject delegationSubject)
+ Subject delegationSubject)
throws InstanceNotFoundException, ListenerNotFoundException,
- IOException;
+ IOException;
/**
* Handles {@link
@@ -1082,10 +1082,10 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
void setAttribute(ObjectName name, MarshalledObject attribute,
- Subject delegationSubject)
+ Subject delegationSubject)
throws InstanceNotFoundException, AttributeNotFoundException,
- InvalidAttributeValueException, MBeanException,
- ReflectionException, IOException;
+ InvalidAttributeValueException, MBeanException,
+ ReflectionException, IOException;
/**
* Handles {@link
@@ -1123,9 +1123,9 @@ public interface RMIConnection
*/
@SuppressWarnings("unchecked")
AttributeList setAttributes(ObjectName name, MarshalledObject attributes,
- Subject delegationSubject)
+ Subject delegationSubject)
throws InstanceNotFoundException, ReflectionException,
- IOException;
+ IOException;
/**
* Handles {@link
@@ -1153,9 +1153,9 @@ public interface RMIConnection
* not have permission to invoke this operation.
* @throws IOException if an I/O error occurred in communicating with
* the bean server.
- */
+ */
void unregisterMBean(ObjectName name, Subject delegationSubject)
throws InstanceNotFoundException, MBeanRegistrationException,
- IOException;
+ IOException;
}
diff --git a/libjava/classpath/javax/naming/AuthenticationException.java b/libjava/classpath/javax/naming/AuthenticationException.java
index 1a6ade9..36310d3 100644
--- a/libjava/classpath/javax/naming/AuthenticationException.java
+++ b/libjava/classpath/javax/naming/AuthenticationException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
public class AuthenticationException extends NamingSecurityException
{
private static final long serialVersionUID = 3678497619904568096L;
diff --git a/libjava/classpath/javax/naming/AuthenticationNotSupportedException.java b/libjava/classpath/javax/naming/AuthenticationNotSupportedException.java
index a1e811b..9ebda40 100644
--- a/libjava/classpath/javax/naming/AuthenticationNotSupportedException.java
+++ b/libjava/classpath/javax/naming/AuthenticationNotSupportedException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
public class AuthenticationNotSupportedException
extends NamingSecurityException
{
diff --git a/libjava/classpath/javax/naming/BinaryRefAddr.java b/libjava/classpath/javax/naming/BinaryRefAddr.java
index 923c48e..373802a 100644
--- a/libjava/classpath/javax/naming/BinaryRefAddr.java
+++ b/libjava/classpath/javax/naming/BinaryRefAddr.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
@@ -53,7 +53,7 @@ import java.util.Arrays;
public class BinaryRefAddr extends RefAddr
{
static final long serialVersionUID = -3415254970957330361L;
-
+
/**
* The possibly null content of this RefAddr.
* Set by the constructor and returned by getContent.
@@ -109,7 +109,7 @@ public class BinaryRefAddr extends RefAddr
{
byte[] c1 = (byte[]) this.getContent();
byte[] c2 = (byte[]) refAddr.getContent();
- return Arrays.equals(c1, c2);
+ return Arrays.equals(c1, c2);
}
}
return false;
@@ -133,7 +133,7 @@ public class BinaryRefAddr extends RefAddr
}
private static char[] hex = {'0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
+ '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
/**
* Returns a String representation of the RefAddr. Only the first 32 bytes
* of the content are added as hex encoded characters.
@@ -147,8 +147,8 @@ public class BinaryRefAddr extends RefAddr
byte[] b = (byte[]) getContent();
for (int i=0; i < b.length && i < 32; i++)
{
- sb.append(hex[(b[i]&0xf0)>>4]);
- sb.append(hex[b[i]&0x0f]);
+ sb.append(hex[(b[i]&0xf0)>>4]);
+ sb.append(hex[b[i]&0x0f]);
}
if (b.length > 32)
sb.append("...");
diff --git a/libjava/classpath/javax/naming/Binding.java b/libjava/classpath/javax/naming/Binding.java
index a34f8b3..23bb459 100644
--- a/libjava/classpath/javax/naming/Binding.java
+++ b/libjava/classpath/javax/naming/Binding.java
@@ -39,14 +39,14 @@ exception statement from your version. */
package javax.naming;
/**
- * Binding represents the name-object mapping of a
+ * Binding represents the name-object mapping of a
* binding in a context.
*
* Bindings are mappings of a name to an object and this class is used to
* specify such mappings. The bindings of a context are retrieved by the
* Context#listBindings() methods.
*
- *
+ *
* @author Tom Tromey (tromey@redhat.com)
* @since 1.3
*/
@@ -56,7 +56,7 @@ public class Binding extends NameClassPair
/**
* Constructs an instance with the given name and object.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be null)
* @param obj the bound object
@@ -68,9 +68,9 @@ public class Binding extends NameClassPair
}
/**
- * Constructs an instance with the given name and object and a
+ * Constructs an instance with the given name and object and a
* flag indicating if the name is relative to the target context.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be null)
* @param obj the bound object
@@ -84,7 +84,7 @@ public class Binding extends NameClassPair
/**
* Constructs an instance with the given name, classname and object.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be null)
* @param className the classname to set (maybe null)
@@ -97,9 +97,9 @@ public class Binding extends NameClassPair
}
/**
- * Constructs an instance with the given name, classname, object and a
+ * Constructs an instance with the given name, classname, object and a
* flag indicating if the name is relative to the target context.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be null)
* @param className the classname to set (maybe null)
@@ -107,7 +107,7 @@ public class Binding extends NameClassPair
* @param obj the bound object
*/
public Binding (String name, String className, Object obj,
- boolean isRelative)
+ boolean isRelative)
{
super (name, className, isRelative);
boundObj = obj;
@@ -119,7 +119,7 @@ public class Binding extends NameClassPair
* Returns the classname if set explicitly. If not and the bound object is
* not null the classname of the bound object is used.
*
- *
+ *
* @return The fully qualified classname (may be null).
*/
public String getClassName ()
@@ -150,7 +150,7 @@ public class Binding extends NameClassPair
/**
* Returns the string representation.
- * @return The string as given by the NameClassPair superclass plus
+ * @return The string as given by the NameClassPair superclass plus
* the bound objects string representation seperated by a colon.
*/
public String toString ()
diff --git a/libjava/classpath/javax/naming/CannotProceedException.java b/libjava/classpath/javax/naming/CannotProceedException.java
index bc20858..26b1d0b 100644
--- a/libjava/classpath/javax/naming/CannotProceedException.java
+++ b/libjava/classpath/javax/naming/CannotProceedException.java
@@ -35,11 +35,11 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
import java.util.Hashtable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 14, 2001
diff --git a/libjava/classpath/javax/naming/CommunicationException.java b/libjava/classpath/javax/naming/CommunicationException.java
index 7b11b5f..485e5cd 100644
--- a/libjava/classpath/javax/naming/CommunicationException.java
+++ b/libjava/classpath/javax/naming/CommunicationException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class CommunicationException extends NamingException
{
private static final long serialVersionUID = 3618507780299986611L;
diff --git a/libjava/classpath/javax/naming/CompositeName.java b/libjava/classpath/javax/naming/CompositeName.java
index 4593bae..7d4d362 100644
--- a/libjava/classpath/javax/naming/CompositeName.java
+++ b/libjava/classpath/javax/naming/CompositeName.java
@@ -53,14 +53,14 @@ import java.util.Vector;
* the composite name http://www.gnu.org/software/classpath/index.html spans
* over three namespaces (the protocol http, the web server location
* (www.gnu.org) and the index.html location on the server).
- *
+ *
* @author Tom Tromey (tromey@redhat.com)
*/
public class CompositeName implements Name, Cloneable, Serializable
{
private static final long serialVersionUID = 1667768148915813118L;
-
- private transient Vector elts;
+
+ private transient Vector elts;
public CompositeName ()
{
@@ -72,8 +72,8 @@ public class CompositeName implements Name, Cloneable, Serializable
elts = new Vector ();
try
{
- while (comps.hasMoreElements ())
- elts.add (comps.nextElement ());
+ while (comps.hasMoreElements ())
+ elts.add (comps.nextElement ());
}
catch (NoSuchElementException ignore)
{
@@ -84,49 +84,49 @@ public class CompositeName implements Name, Cloneable, Serializable
{
elts = new Vector ();
// Parse the string into its components.
- final char no_quote = 'x'; // Use 'x' to mean no quoting.
+ final char no_quote = 'x'; // Use 'x' to mean no quoting.
char quote = no_quote;
boolean escaped = false;
StringBuilder new_element = new StringBuilder ();
for (int i = 0; i < n.length (); ++i)
{
- char c = n.charAt (i);
- if (escaped)
- escaped = false;
- else if (c == '\\')
- {
- escaped = true;
- continue;
- }
- else if (quote != no_quote)
- {
- if (quote == c)
- {
- // The quotes must surround a complete component.
- if (i + 1 < n.length () && n.charAt (i + 1) != '/')
- throw new InvalidNameException ("close quote before end of component");
- elts.add (new_element.toString ());
- new_element.setLength (0);
- quote = no_quote;
- continue;
- }
- // Otherwise, fall through.
- }
- // Quotes are only special at the start of a component.
- else if (new_element.length () == 0
- && (c == '\'' || c == '"'))
- {
- quote = c;
- continue;
- }
- else if (c == '/')
- {
- elts.add (new_element.toString ());
- new_element.setLength (0);
- continue;
- }
-
- new_element.append (c);
+ char c = n.charAt (i);
+ if (escaped)
+ escaped = false;
+ else if (c == '\\')
+ {
+ escaped = true;
+ continue;
+ }
+ else if (quote != no_quote)
+ {
+ if (quote == c)
+ {
+ // The quotes must surround a complete component.
+ if (i + 1 < n.length () && n.charAt (i + 1) != '/')
+ throw new InvalidNameException ("close quote before end of component");
+ elts.add (new_element.toString ());
+ new_element.setLength (0);
+ quote = no_quote;
+ continue;
+ }
+ // Otherwise, fall through.
+ }
+ // Quotes are only special at the start of a component.
+ else if (new_element.length () == 0
+ && (c == '\'' || c == '"'))
+ {
+ quote = c;
+ continue;
+ }
+ else if (c == '/')
+ {
+ elts.add (new_element.toString ());
+ new_element.setLength (0);
+ continue;
+ }
+
+ new_element.append (c);
}
if (new_element.length () != 0)
@@ -156,11 +156,11 @@ public class CompositeName implements Name, Cloneable, Serializable
Enumeration e = n.getAll ();
try
{
- while (e.hasMoreElements ())
- {
- elts.add (posn, e.nextElement ());
- ++posn;
- }
+ while (e.hasMoreElements ())
+ {
+ elts.add (posn, e.nextElement ());
+ ++posn;
+ }
}
catch (NoSuchElementException ignore)
{
@@ -173,8 +173,8 @@ public class CompositeName implements Name, Cloneable, Serializable
Enumeration e = suffix.getAll ();
try
{
- while (e.hasMoreElements ())
- elts.add (e.nextElement ());
+ while (e.hasMoreElements ())
+ elts.add (e.nextElement ());
}
catch (NoSuchElementException ignore)
{
@@ -195,10 +195,10 @@ public class CompositeName implements Name, Cloneable, Serializable
int last = Math.min (cn.elts.size (), elts.size ());
for (int i = 0; i < last; ++i)
{
- String f = elts.get (i);
- int comp = f.compareTo (cn.elts.get (i));
- if (comp != 0)
- return comp;
+ String f = elts.get (i);
+ int comp = f.compareTo (cn.elts.get (i));
+ if (comp != 0)
+ return comp;
}
return elts.size () - cn.elts.size ();
}
@@ -213,8 +213,8 @@ public class CompositeName implements Name, Cloneable, Serializable
int delta = elts.size () - cn.elts.size ();
for (int i = 0; i < cn.elts.size (); ++i)
{
- if (! cn.elts.get (i).equals (elts.get (delta + i)))
- return false;
+ if (! cn.elts.get (i).equals (elts.get (delta + i)))
+ return false;
}
return true;
}
@@ -288,8 +288,8 @@ public class CompositeName implements Name, Cloneable, Serializable
return false;
for (int i = 0; i < cn.elts.size (); ++i)
{
- if (! cn.elts.get (i).equals (elts.get (i)))
- return false;
+ if (! cn.elts.get (i).equals (elts.get (i)))
+ return false;
}
return true;
}
@@ -299,33 +299,33 @@ public class CompositeName implements Name, Cloneable, Serializable
CPStringBuilder result = new CPStringBuilder ();
for (int i = 0; i < elts.size (); ++i)
{
- // For simplicity we choose to always quote using escapes and
- // never quotes.
- String elt = elts.get (i);
- if (i > 0
- || (i == elts.size () - 1 && elt.equals ("")))
- result.append ('/');
- for (int k = 0; k < elt.length (); ++k)
- {
- char c = elt.charAt (k);
- // We must quote
- // ... a leading quote,
- if ((k == 0 && (c == '"' || c == '\''))
- // ... an escape preceding a meta character,
- // or at the end of a component,
- || (c == '\\'
- && (k == elt.length () - 1
- || "\\'\"/".indexOf (elt.charAt (k + 1)) != -1))
- // ... or a component separator.
- || c == '/')
- result.append ('\\');
- result.append (c);
- }
+ // For simplicity we choose to always quote using escapes and
+ // never quotes.
+ String elt = elts.get (i);
+ if (i > 0
+ || (i == elts.size () - 1 && elt.equals ("")))
+ result.append ('/');
+ for (int k = 0; k < elt.length (); ++k)
+ {
+ char c = elt.charAt (k);
+ // We must quote
+ // ... a leading quote,
+ if ((k == 0 && (c == '"' || c == '\''))
+ // ... an escape preceding a meta character,
+ // or at the end of a component,
+ || (c == '\\'
+ && (k == elt.length () - 1
+ || "\\'\"/".indexOf (elt.charAt (k + 1)) != -1))
+ // ... or a component separator.
+ || c == '/')
+ result.append ('\\');
+ result.append (c);
+ }
}
return result.toString ();
}
-
- private void readObject(ObjectInputStream s)
+
+ private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
int size = s.readInt();
diff --git a/libjava/classpath/javax/naming/CompoundName.java b/libjava/classpath/javax/naming/CompoundName.java
index 26b44c1..d410f6a 100644
--- a/libjava/classpath/javax/naming/CompoundName.java
+++ b/libjava/classpath/javax/naming/CompoundName.java
@@ -52,8 +52,8 @@ import java.util.Vector;
/**
* Represents hierarchical names from the single namespace. For instance,
* the path /home/audriusa/classpath/file.txt is the compound name, using
- * the filesystem namespace.
- *
+ * the filesystem namespace.
+ *
* @author Tom Tromey (tromey@redhat.com)
* @date May 16, 2001
*
@@ -82,8 +82,8 @@ public class CompoundName implements Name, Cloneable, Serializable
initializeSyntax ();
try
{
- while (comps.hasMoreElements ())
- elts.add (comps.nextElement ());
+ while (comps.hasMoreElements ())
+ elts.add (comps.nextElement ());
}
catch (NoSuchElementException ignore)
{
@@ -104,79 +104,79 @@ public class CompoundName implements Name, Cloneable, Serializable
String quote = null;
while (i < n.length ())
{
- String special = isSpecial (n, i);
-
- if (special == escape && escape != null)
- {
- if (n.length () == i + special.length ())
- {
- // A trailing escape is treated as itself.
- new_element.append (special);
- i += special.length ();
- }
- else
- {
- String eSpecial = isSpecial (n, i + special.length ());
- if (eSpecial != null)
- {
- // Treat the escape as an escape.
- new_element.append (eSpecial);
- i += special.length () + eSpecial.length ();
- }
- else
- {
- // Treat the escape as itself.
- new_element.append (special);
- i += special.length ();
- }
- continue;
- }
- }
- else if (quote != null)
- {
- // It is safe to use == here.
- if (quote == special)
- {
- // Quotes must surround a complete component.
- if (i + quote.length () < n.length ()
- && ! n.startsWith (separator, i + quote.length ()))
- throw new InvalidNameException ("close quote before end of component");
- elts.add (new_element.toString ());
- new_element.setLength (0);
- i += quote.length ();
- quote = null;
- continue;
- }
- // Otherwise, fall through.
- }
- // Quotes are only special at the start of a component.
- else if (new_element.length () == 0
- && special == beginQuote
- && beginQuote != null)
- {
- quote = endQuote;
- i += special.length ();
- continue;
- }
- else if (new_element.length () == 0
- && special == beginQuote2
- && beginQuote2 != null)
- {
- quote = endQuote2;
- i += special.length ();
- continue;
- }
- else if (direction != FLAT && special == separator)
- {
- elts.add (new_element.toString ());
- new_element.setLength (0);
- i += special.length ();
- continue;
- }
-
- // Nothing in particular, so try the next character.
- new_element.append (n.charAt (i));
- ++i;
+ String special = isSpecial (n, i);
+
+ if (special == escape && escape != null)
+ {
+ if (n.length () == i + special.length ())
+ {
+ // A trailing escape is treated as itself.
+ new_element.append (special);
+ i += special.length ();
+ }
+ else
+ {
+ String eSpecial = isSpecial (n, i + special.length ());
+ if (eSpecial != null)
+ {
+ // Treat the escape as an escape.
+ new_element.append (eSpecial);
+ i += special.length () + eSpecial.length ();
+ }
+ else
+ {
+ // Treat the escape as itself.
+ new_element.append (special);
+ i += special.length ();
+ }
+ continue;
+ }
+ }
+ else if (quote != null)
+ {
+ // It is safe to use == here.
+ if (quote == special)
+ {
+ // Quotes must surround a complete component.
+ if (i + quote.length () < n.length ()
+ && ! n.startsWith (separator, i + quote.length ()))
+ throw new InvalidNameException ("close quote before end of component");
+ elts.add (new_element.toString ());
+ new_element.setLength (0);
+ i += quote.length ();
+ quote = null;
+ continue;
+ }
+ // Otherwise, fall through.
+ }
+ // Quotes are only special at the start of a component.
+ else if (new_element.length () == 0
+ && special == beginQuote
+ && beginQuote != null)
+ {
+ quote = endQuote;
+ i += special.length ();
+ continue;
+ }
+ else if (new_element.length () == 0
+ && special == beginQuote2
+ && beginQuote2 != null)
+ {
+ quote = endQuote2;
+ i += special.length ();
+ continue;
+ }
+ else if (direction != FLAT && special == separator)
+ {
+ elts.add (new_element.toString ());
+ new_element.setLength (0);
+ i += special.length ();
+ continue;
+ }
+
+ // Nothing in particular, so try the next character.
+ new_element.append (n.charAt (i));
+ ++i;
}
if (new_element.length () != 0)
@@ -184,13 +184,13 @@ public class CompoundName implements Name, Cloneable, Serializable
if (direction == RIGHT_TO_LEFT)
{
- // Reverse the order of the elements.
- int len = elts.size ();
- for (i = 0; i < len / 2; ++i)
- {
- String t = elts.set (i, elts.get (len - i - 1));
- elts.set (len - i - 1, t);
- }
+ // Reverse the order of the elements.
+ int len = elts.size ();
+ for (i = 0; i < len / 2; ++i)
+ {
+ String t = elts.set (i, elts.get (len - i - 1));
+ elts.set (len - i - 1, t);
+ }
}
// Error checking.
@@ -215,11 +215,11 @@ public class CompoundName implements Name, Cloneable, Serializable
Enumeration e = n.getAll ();
try
{
- while (e.hasMoreElements ())
- {
- elts.add (posn, e.nextElement ());
- ++posn;
- }
+ while (e.hasMoreElements ())
+ {
+ elts.add (posn, e.nextElement ());
+ ++posn;
+ }
}
catch (NoSuchElementException ignore)
{
@@ -232,8 +232,8 @@ public class CompoundName implements Name, Cloneable, Serializable
Enumeration e = suffix.getAll ();
try
{
- while (e.hasMoreElements ())
- elts.add (e.nextElement ());
+ while (e.hasMoreElements ())
+ elts.add (e.nextElement ());
}
catch (NoSuchElementException ignore)
{
@@ -254,10 +254,10 @@ public class CompoundName implements Name, Cloneable, Serializable
int last = Math.min (cn.elts.size (), elts.size ());
for (int i = 0; i < last; ++i)
{
- String f = canonicalize (elts.get (i));
- int comp = f.compareTo (canonicalize (cn.elts.get (i)));
- if (comp != 0)
- return comp;
+ String f = canonicalize (elts.get (i));
+ int comp = f.compareTo (canonicalize (cn.elts.get (i)));
+ if (comp != 0)
+ return comp;
}
return elts.size () - cn.elts.size ();
}
@@ -272,9 +272,9 @@ public class CompoundName implements Name, Cloneable, Serializable
int delta = elts.size () - cn.elts.size ();
for (int i = 0; i < cn.elts.size (); ++i)
{
- String f = canonicalize (elts.get (delta + i));
- if (! f.equals (canonicalize (cn.elts.get (i))))
- return false;
+ String f = canonicalize (elts.get (delta + i));
+ if (! f.equals (canonicalize (cn.elts.get (i))))
+ return false;
}
return true;
}
@@ -346,9 +346,9 @@ public class CompoundName implements Name, Cloneable, Serializable
return false;
for (int i = 0; i < cn.elts.size (); ++i)
{
- String f = canonicalize (elts.get (i));
- if (! f.equals (canonicalize (cn.elts.get (i))))
- return false;
+ String f = canonicalize (elts.get (i));
+ if (! f.equals (canonicalize (cn.elts.get (i))))
+ return false;
}
return true;
}
@@ -368,7 +368,7 @@ public class CompoundName implements Name, Cloneable, Serializable
else if (endQuote != null && element.startsWith (endQuote, offset))
special = endQuote;
else if (beginQuote2 != null
- && element.startsWith (beginQuote2, offset))
+ && element.startsWith (beginQuote2, offset))
special = beginQuote2;
else if (endQuote2 != null && element.startsWith (endQuote2, offset))
special = endQuote2;
@@ -382,30 +382,30 @@ public class CompoundName implements Name, Cloneable, Serializable
int size = elts.size ();
for (int i = 0; i < size; ++i)
{
- // Find the appropriate element. FIXME: not clear what FLAT
- // means.
- int offset = (direction == RIGHT_TO_LEFT) ? (size - i - 1) : i;
- String element = elts.get (offset);
- if (i > 0
- || (i == size - 1 && element.equals ("")))
- result.append (separator);
-
- int k = 0;
- while (k < element.length ())
- {
- String special = isSpecial (element, k);
- if (special != null)
- {
- result.append (escape);
- result.append (special);
- k += special.length ();
- }
- else
- {
- result.append (element.charAt (k));
- ++k;
- }
- }
+ // Find the appropriate element. FIXME: not clear what FLAT
+ // means.
+ int offset = (direction == RIGHT_TO_LEFT) ? (size - i - 1) : i;
+ String element = elts.get (offset);
+ if (i > 0
+ || (i == size - 1 && element.equals ("")))
+ result.append (separator);
+
+ int k = 0;
+ while (k < element.length ())
+ {
+ String special = isSpecial (element, k);
+ if (special != null)
+ {
+ result.append (escape);
+ result.append (special);
+ k += special.length ();
+ }
+ else
+ {
+ result.append (element.charAt (k));
+ ++k;
+ }
+ }
}
return result.toString ();
@@ -422,17 +422,17 @@ public class CompoundName implements Name, Cloneable, Serializable
if (trimBlanks)
{
- int first = 0;
- while (first < ret.length ()
- && Character.isWhitespace (ret.charAt (first)))
- ++first;
+ int first = 0;
+ while (first < ret.length ()
+ && Character.isWhitespace (ret.charAt (first)))
+ ++first;
- int last = ret.length () - 1;
- while (last >= first
- && Character.isWhitespace (ret.charAt (last)))
- --last;
+ int last = ret.length () - 1;
+ while (last >= first
+ && Character.isWhitespace (ret.charAt (last)))
+ --last;
- ret = ret.substring (first, last);
+ ret = ret.substring (first, last);
}
return ret;
@@ -451,8 +451,8 @@ public class CompoundName implements Name, Cloneable, Serializable
this.direction = LEFT_TO_RIGHT;
else
{
- // If we don't recognize it, default to flat.
- this.direction = FLAT;
+ // If we don't recognize it, default to flat.
+ this.direction = FLAT;
}
// This is required unless the direction is FLAT. Unfortunately
@@ -461,18 +461,18 @@ public class CompoundName implements Name, Cloneable, Serializable
this.ignoreCase
= Boolean.valueOf (mySyntax.getProperty ("jndi.syntax.ignorecase",
- "false")).booleanValue ();
+ "false")).booleanValue ();
this.escape = mySyntax.getProperty ("jndi.syntax.escape", null);
this.beginQuote = mySyntax.getProperty ("jndi.syntax.beginquote", null);
this.endQuote = mySyntax.getProperty ("jndi.syntax.endquote",
- this.beginQuote);
+ this.beginQuote);
this.beginQuote2 = mySyntax.getProperty ("jndi.syntax.beginquote2",
- null);
+ null);
this.endQuote2 = mySyntax.getProperty ("jndi.syntax.endquote2",
- this.beginQuote2);
+ this.beginQuote2);
this.trimBlanks
= Boolean.valueOf (mySyntax.getProperty ("jndi.syntax.trimblanks",
- "false")).booleanValue ();
+ "false")).booleanValue ();
}
private void readObject(ObjectInputStream s)
diff --git a/libjava/classpath/javax/naming/ConfigurationException.java b/libjava/classpath/javax/naming/ConfigurationException.java
index 1f4002a..eb2fbfe 100644
--- a/libjava/classpath/javax/naming/ConfigurationException.java
+++ b/libjava/classpath/javax/naming/ConfigurationException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class ConfigurationException extends NamingException
{
private static final long serialVersionUID = - 2535156726228855704L;
diff --git a/libjava/classpath/javax/naming/Context.java b/libjava/classpath/javax/naming/Context.java
index 4b87b9e..35217ff 100644
--- a/libjava/classpath/javax/naming/Context.java
+++ b/libjava/classpath/javax/naming/Context.java
@@ -127,7 +127,7 @@ public interface Context
/**
* Give the specified name for the specified object. The passed name must not
* be already bound to some other object.
- *
+ *
* @param name the name that will be given to the object (in the scope of this
* context).
* @param obj the object being named.
@@ -143,7 +143,7 @@ public interface Context
/**
* Give the specified name for the specified object. The passed name must not
* be already bound to some other object.
- *
+ *
* @param name the name that will be given to the object (in the scope of this
* context).
* @param obj the object being named.
@@ -159,7 +159,7 @@ public interface Context
/**
* Gets the previously named object by name. If the passed name is empty, the
* method should return a cloned instance of this naming context.
- *
+ *
* @param name the name of the object being searched in this context
* @return the named object
* @throws NamingException if the naming fails.
@@ -169,7 +169,7 @@ public interface Context
/**
* Gets the previously named object by name. If the passed name is empty, the
* method should return a cloned instance of this naming context.
- *
+ *
* @param name the name of the object being searched in this context
* @return the named object
* @throws NamingException if the naming fails.
@@ -179,7 +179,7 @@ public interface Context
/**
* Give the specified name for the specified object. Unlike bind, this method
* silently replaces the existing binding for this name, if one exists.
- *
+ *
* @param name the name that will be given to the object (in the scope of this
* context).
* @param obj the object being named.
@@ -193,7 +193,7 @@ public interface Context
/**
* Give the specified name for the specified object. Unlike bind, this method
* silently replaces the existing binding for this name, if one exists.
- *
+ *
* @param name the name that will be given to the object (in the scope of this
* context).
* @param obj the object being named.
@@ -209,7 +209,7 @@ public interface Context
* returns without action if the name is not bound to an object in the
* terminal context, but throws {@link NameNotFoundException} if one of the
* intermadiate contexts does not exist.
- *
+ *
* @param name the name to be removed
* @throws NameNotFoundException if one of the intermediate naming contexts
* does not exist. Will not be thrown if just the terminal binding
@@ -224,7 +224,7 @@ public interface Context
* returns without action if the name is not bound to an object in the
* terminal context, but throws {@link NameNotFoundException} if one of the
* intermadiate contexts does not exist.
- *
+ *
* @param name the name to be removed
* @throws NameNotFoundException if one of the intermediate naming contexts
* does not exist. Will not be thrown if just the terminal binding
@@ -237,7 +237,7 @@ public interface Context
/**
* Renames the existing binding, removing the existing and giving the new name
* for the same object.
- *
+ *
* @param oldName the existing name of the known object
* @param newName the new name of the same object
* @throws NameNotFoundException if the oldName is unknown for this context
@@ -249,7 +249,7 @@ public interface Context
/**
* Renames the existing binding, removing the existing and giving the new name
* for the same object.
- *
+ *
* @param oldName the existing name of the known object
* @param newName the new name of the same object
* @throws NameNotFoundException if the oldName is unknown for this context
@@ -265,7 +265,7 @@ public interface Context
* bound object. The behaviour in the case if the bindings are added or
* removed later is not defined. The contents of the subcontexts are not
* included.
- *
+ *
* @param name the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
@@ -279,7 +279,7 @@ public interface Context
* bound object. The behaviour in the case if the bindings are added or
* removed later is not defined. The contents of the subcontexts are not
* included.
- *
+ *
* @param name the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
@@ -292,7 +292,7 @@ public interface Context
* {@link Binding}, providing also information about the class of the bound
* object. The behaviour in the case if the bindings are added or removed
* later is not defined. The contents of the subcontexts are not included.
- *
+ *
* @param name the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
@@ -305,7 +305,7 @@ public interface Context
* {@link Binding}, providing also information about the class of the bound
* object. The behaviour in the case if the bindings are added or removed
* later is not defined. The contents of the subcontexts are not included.
- *
+ *
* @param name the name of the subcontext
* @return the enumeration over the names, known for the given subcontext.
* @throws NamingException
@@ -315,7 +315,7 @@ public interface Context
/**
* Creates the new naming subcontext and binds it to the current (this)
* context.
- *
+ *
* @param name the name of the new context being created
* @return the newly created context, bound to the instance of the context on
* that the method has been called
@@ -329,7 +329,7 @@ public interface Context
/**
* Creates the new naming subcontext and binds it to the current (this)
* context.
- *
+ *
* @param name the name of the new context being created
* @return the newly created context, bound to the instance of the context on
* that the method has been called
@@ -344,7 +344,7 @@ public interface Context
* Removes the naming subcontext from this naming context. Returns without
* action if such subcontext does not exist. The context being destroyed must
* be empty.
- *
+ *
* @param name the name of the subcontext beig removed.
* @throws ContextNotEmptyException if the named context is not empty.
* @throws NamingException
@@ -355,19 +355,19 @@ public interface Context
* Removes the naming subcontext from this naming context. Returns without
* action if such subcontext does not exist. The context being destroyed must
* be empty.
- *
+ *
* @param name the name of the subcontext beig removed.
* @throws ContextNotEmptyException if the named context is not empty.
* @throws NamingException
*/
void destroySubcontext(String name) throws NamingException;
-
+
/**
* Retrieves the named object, not following the link of the terminal atomic
* component of the name. If the object, named by the passed name, is not a
* link, returns that object itself. The intermediate links, if present, are
* followed.
- *
+ *
* @param name the name of the object that may be a link, leading to another
* object.
* @return the named object, not following the terminal link (if present).
@@ -380,18 +380,18 @@ public interface Context
* component of the name. If the object, named by the passed name, is not a
* link, returns that object itself. The intermediate links, if present, are
* followed.
- *
+ *
* @param name the name of the object that may be a link, leading to another
* object.
* @return the named object, not following the terminal link (if present).
* @throws NamingException
*/
Object lookupLink(String name) throws NamingException;
-
+
/**
* Obtains the name parser for parsing the names of the given naming
* subcontext.
- *
+ *
* @param name the name of the subcontext for that the parser must be obtained
* @return the parser to parse the names of that context
* @throws NamingException
@@ -401,17 +401,17 @@ public interface Context
/**
* Obtains the name parser for parsing the names of the given naming
* subcontext.
- *
+ *
* @param name the name of the subcontext for that the parser must be obtained
* @return the parser to parse the names of that context
* @throws NamingException
*/
NameParser getNameParser(String name) throws NamingException;
-
+
/**
* Composes the name of this context together with another name, related to
* this context.
- *
+ *
* @param name a name, defined in the scope of this context
* @param prefix a name of this context itself, defined in the scope of some
* ancestor
@@ -424,7 +424,7 @@ public interface Context
/**
* Composes the name of this context together with another name, related to
* this context.
- *
+ *
* @param name a name, defined in the scope of this context
* @param prefix a name of this context itself, defined in the scope of some
* ancestor
@@ -433,12 +433,12 @@ public interface Context
* @throws NamingException
*/
String composeName(String name, String prefix) throws NamingException;
-
+
/**
* Add new environment property to the environment of this context. Both name
* and value of the new property must not be null. If the property is already
* defined, is current value is replaced by the propVal.
- *
+ *
* @param propName the name of the new property
* @param propVal the value of the new property
* @return the previous value of this property or null if the property has not
@@ -447,33 +447,33 @@ public interface Context
*/
Object addToEnvironment(String propName, Object propVal)
throws NamingException;
-
+
/**
* Removes the property with the given name from the environment. Returns
* without action if this property is not defined.
- *
+ *
* @param propName the name of the property being removed.
* @return the value of the property that has been removed or null if the
* property was not defined.
* @throws NamingException
*/
Object removeFromEnvironment(String propName) throws NamingException;
-
+
/**
* Returns the environment, associated with this naming context. The returned
* table should never be modified by the caller. Use {@link #addToEnvironment}
* and {@link #removeFromEnvironment} to modify the environement, if needed.
- *
+ *
* @return the table, representing the environment of this context
* @throws NamingException
*/
Hashtable,?> getEnvironment() throws NamingException;
-
+
/**
* Releases all resources, associated with this context. The close() method
* can be called several times, but after it has been once invoked, it is not
* allowed to call any other method of this context,
- *
+ *
* @throws NamingException
*/
void close() throws NamingException;
@@ -482,7 +482,7 @@ public interface Context
* Returs the full name of this naming context. The returned string is not a
* JNDI composite name and should not be passed directly to the methods of the
* naming context.
- *
+ *
* @return the full name of this naming context, in its own namespace.
* @throws OperationNotSupportedException if the naming system, represented by
* this context, does not support the notation of the full name.
diff --git a/libjava/classpath/javax/naming/ContextNotEmptyException.java b/libjava/classpath/javax/naming/ContextNotEmptyException.java
index e856341..816e703 100644
--- a/libjava/classpath/javax/naming/ContextNotEmptyException.java
+++ b/libjava/classpath/javax/naming/ContextNotEmptyException.java
@@ -41,9 +41,9 @@ package javax.naming;
/**
* This exception is thrown in response to the attempt to destroy the non
* empty context. Only empty contexts (without bindings) can be destroyed.
- *
+ *
* @see Context#destroySubcontext
- */
+ */
public class ContextNotEmptyException extends NamingException
{
private static final long serialVersionUID = 1090963683348219877L;
diff --git a/libjava/classpath/javax/naming/InitialContext.java b/libjava/classpath/javax/naming/InitialContext.java
index a5fe5f0..c33122a 100644
--- a/libjava/classpath/javax/naming/InitialContext.java
+++ b/libjava/classpath/javax/naming/InitialContext.java
@@ -63,18 +63,18 @@ public class InitialContext implements Context
* this field.
*/
protected Context defaultInitCtx;
-
+
/**
* Indicates if the initial context was obtained by calling
- * {@link NamingManager#getInitialContext}.
+ * {@link NamingManager#getInitialContext}.
*/
protected boolean gotDefault = false;
-
+
/**
* The environment, associated with this initial context.
*/
protected Hashtable myProps;
-
+
/**
* The list of the properties, to that the second alternative value must
* be appended after the colon to the first possible value. Used in
@@ -87,13 +87,13 @@ public class InitialContext implements Context
colon_list.add(Context.OBJECT_FACTORIES);
colon_list.add(Context.URL_PKG_PREFIXES);
colon_list.add(Context.STATE_FACTORIES);
- }
-
+ }
+
/**
* The properties that are searched in the agreed places in the
* {@link #init(Hashtable)} method.
*/
- static final String[] use_properties =
+ static final String[] use_properties =
{
Context.DNS_URL,
Context.INITIAL_CONTEXT_FACTORY,
@@ -102,11 +102,11 @@ public class InitialContext implements Context
Context.STATE_FACTORIES,
Context.URL_PKG_PREFIXES,
};
-
-
+
+
/**
* Creates the new initial context with the given properties.
- *
+ *
* @param environment the properties, used by the initial context being
* created.
* @throws NamingException
@@ -115,11 +115,11 @@ public class InitialContext implements Context
{
init(environment);
}
-
+
/**
* Creates the initial context with the possibility to delay its
* initialisation.
- *
+ *
* @param lazy specified if the initialization should not be performed by this
* constructor (true). If the valueis false, it works the same way as
* the parameterless constructor.
@@ -130,18 +130,18 @@ public class InitialContext implements Context
if (! lazy)
init(null);
}
-
+
/**
* Creates teh new initial context with no properties. Same as
* InitialContext(null).
- *
+ *
* @throws NamingException
*/
public InitialContext() throws NamingException
{
init(null);
}
-
+
/**
*
* Initialises the context, using the properties, specified in the passed
@@ -160,7 +160,7 @@ public class InitialContext implements Context
* specified by the system property "gnu.classpath.home.url".
*
*
- *
+ *
* @param environment the table of the properties, may be null. The method
* modifies the table and stores the reference to it. The caller must
* not later reuse this structure for other purposes.
@@ -191,12 +191,12 @@ public class InitialContext implements Context
if (value != null)
pApplet.put(key, value);
}
-
+
value = System.getProperty(key);
if (value != null)
pSystem.put(key, value);
}
-
+
merge(myProps, pSystem);
if (pApplet != null)
merge(myProps, pApplet);
@@ -249,7 +249,7 @@ public class InitialContext implements Context
merge(myProps, p);
}
}
-
+
/**
* Merge the content of the two tables. If the second table contains the key
* that is missing in the first table, this key - value pair is copied to the
@@ -257,16 +257,16 @@ public class InitialContext implements Context
* {@link #colon_list} set also contains this key, the value from the second
* table is appended to the value from the first table after semicolon, and
* the resulted value replaces the value in the first table.
- *
+ *
* @param primary the first table to merge. The merged result is also stored
* in this table.
* @param additional the second table, from where additional values are taken
- */
+ */
static void merge (Hashtable primary,
Hashtable additional)
{
Enumeration en = additional.keys();
-
+
while (en.hasMoreElements())
{
String key2 = (String) en.nextElement();
@@ -280,13 +280,13 @@ public class InitialContext implements Context
}
}
}
-
+
/**
* Get the default initial context. If {@link #gotDefault} == false, this
* method obtains the initial context from the naming manager and sets
* gotDefault to true. Otherwise the cached value ({@link #defaultInitCtx} is
* returned.
- *
+ *
* @return the default initial context
* @throws NamingException
*/
@@ -305,7 +305,7 @@ public class InitialContext implements Context
* the name is the URL string, this method tries to find the corressponding
* URL naming context. If it is not an URL string, or the URL context is not
* found, the default initial context is returned.
- *
+ *
* @param name the name, for that it is required to obtain the context.
* @return the context for resolving the name.
* @throws NamingException
@@ -323,7 +323,7 @@ public class InitialContext implements Context
* the name is the URL string, this method tries to find the corressponding
* URL naming context. If it is not an URL string, or the URL context is not
* found, the default initial context is returned.
- *
+ *
* @param name the name, for that it is required to obtain the context.
* @return the context for resolving the name.
* @throws NamingException
@@ -348,19 +348,19 @@ public class InitialContext implements Context
return getDefaultInitCtx();
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void bind (Name name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).bind (name, obj);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void bind (String name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).bind (name, obj);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookup (Name name) throws NamingException
{
try
@@ -374,7 +374,7 @@ public class InitialContext implements Context
}
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookup (String name) throws NamingException
{
try
@@ -388,147 +388,147 @@ public class InitialContext implements Context
}
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void rebind (Name name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).rebind (name, obj);
}
-
+
/** @inheritDoc */
public void rebind (String name, Object obj) throws NamingException
{
getURLOrDefaultInitCtx (name).rebind (name, obj);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void unbind (Name name) throws NamingException
{
getURLOrDefaultInitCtx (name).unbind (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void unbind (String name) throws NamingException
{
getURLOrDefaultInitCtx (name).unbind (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void rename (Name oldName, Name newName) throws NamingException
{
getURLOrDefaultInitCtx (oldName).rename (oldName, newName);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void rename (String oldName, String newName) throws NamingException
{
getURLOrDefaultInitCtx (oldName).rename (oldName, newName);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration list (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).list (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration list (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).list (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration listBindings (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).listBindings (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NamingEnumeration listBindings (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).listBindings (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void destroySubcontext (Name name) throws NamingException
{
getURLOrDefaultInitCtx (name).destroySubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void destroySubcontext (String name) throws NamingException
{
getURLOrDefaultInitCtx (name).destroySubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Context createSubcontext (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).createSubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Context createSubcontext (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).createSubcontext (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookupLink (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).lookupLink (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object lookupLink (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).lookupLink (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NameParser getNameParser (Name name) throws NamingException
{
return getURLOrDefaultInitCtx (name).getNameParser (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public NameParser getNameParser (String name) throws NamingException
{
return getURLOrDefaultInitCtx (name).getNameParser (name);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Name composeName (Name name, Name prefix) throws NamingException
{
return getURLOrDefaultInitCtx (name).composeName (name, prefix);
}
- /** @inheritDoc */
- public String composeName (String name,
+ /** @inheritDoc */
+ public String composeName (String name,
String prefix) throws NamingException
{
return getURLOrDefaultInitCtx (name).composeName (name, prefix);
}
-
+
/** @inheritDoc */
- public Object addToEnvironment (String propName,
+ public Object addToEnvironment (String propName,
Object propVal) throws NamingException
{
return myProps.put (propName, propVal);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Object removeFromEnvironment (String propName) throws NamingException
{
return myProps.remove (propName);
}
- /** @inheritDoc */
+ /** @inheritDoc */
public Hashtable,?> getEnvironment () throws NamingException
{
return myProps;
}
- /** @inheritDoc */
+ /** @inheritDoc */
public void close () throws NamingException
{
myProps = null;
@@ -537,7 +537,7 @@ public class InitialContext implements Context
/**
* This operation is not supported for the initial naming context.
- *
+ *
* @throws OperationNotSupportedException always, unless the method is
* overridden in the derived class.
*/
diff --git a/libjava/classpath/javax/naming/InsufficientResourcesException.java b/libjava/classpath/javax/naming/InsufficientResourcesException.java
index 7a9ebe0..a7bc3a8 100644
--- a/libjava/classpath/javax/naming/InsufficientResourcesException.java
+++ b/libjava/classpath/javax/naming/InsufficientResourcesException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
public class InsufficientResourcesException extends NamingException
{
private static final long serialVersionUID = 6227672693037844532L;
diff --git a/libjava/classpath/javax/naming/InterruptedNamingException.java b/libjava/classpath/javax/naming/InterruptedNamingException.java
index 90d6e5e..e42981a 100644
--- a/libjava/classpath/javax/naming/InterruptedNamingException.java
+++ b/libjava/classpath/javax/naming/InterruptedNamingException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class InterruptedNamingException extends NamingException
{
private static final long serialVersionUID = 6404516648893194728L;
diff --git a/libjava/classpath/javax/naming/InvalidNameException.java b/libjava/classpath/javax/naming/InvalidNameException.java
index 286f045..e76a152 100644
--- a/libjava/classpath/javax/naming/InvalidNameException.java
+++ b/libjava/classpath/javax/naming/InvalidNameException.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
diff --git a/libjava/classpath/javax/naming/LimitExceededException.java b/libjava/classpath/javax/naming/LimitExceededException.java
index 8c005ac..6415119 100644
--- a/libjava/classpath/javax/naming/LimitExceededException.java
+++ b/libjava/classpath/javax/naming/LimitExceededException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
public class LimitExceededException extends NamingException
{
private static final long serialVersionUID = - 776898738660207856L;
diff --git a/libjava/classpath/javax/naming/LinkException.java b/libjava/classpath/javax/naming/LinkException.java
index 8f5df8b..f5c661b 100644
--- a/libjava/classpath/javax/naming/LinkException.java
+++ b/libjava/classpath/javax/naming/LinkException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 14, 2001
diff --git a/libjava/classpath/javax/naming/LinkLoopException.java b/libjava/classpath/javax/naming/LinkLoopException.java
index 0c68e01..539294e 100644
--- a/libjava/classpath/javax/naming/LinkLoopException.java
+++ b/libjava/classpath/javax/naming/LinkLoopException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
public class LinkLoopException extends LinkException
{
private static final long serialVersionUID = - 3119189944325198009L;
diff --git a/libjava/classpath/javax/naming/MalformedLinkException.java b/libjava/classpath/javax/naming/MalformedLinkException.java
index db0753d..e665b34 100644
--- a/libjava/classpath/javax/naming/MalformedLinkException.java
+++ b/libjava/classpath/javax/naming/MalformedLinkException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class MalformedLinkException extends LinkException
{
private static final long serialVersionUID = - 3066740437737830242L;
diff --git a/libjava/classpath/javax/naming/Name.java b/libjava/classpath/javax/naming/Name.java
index 687ebd6..3b22ba5 100644
--- a/libjava/classpath/javax/naming/Name.java
+++ b/libjava/classpath/javax/naming/Name.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
@@ -63,7 +63,7 @@ import java.util.Enumeration;
public interface Name extends Cloneable, Serializable, Comparable
{
// This class is implemented as gnu.javax.naming.ictxImpl.trans.GnuName
-
+
long serialVersionUID = -3617482732056931635L;
/**
@@ -96,7 +96,7 @@ public interface Name extends Cloneable, Serializable, Comparable
* Returns the components till the given index as a Name.
* The returned Name can be modified without changing the
* original.
- *
+ *
* @param posn the ending position, exclusive
*
* @exception ArrayIndexOutOfBoundsException if the given index is smaller
@@ -109,7 +109,7 @@ public interface Name extends Cloneable, Serializable, Comparable
* Name.
* The returned Name can be modified without changing the
* original.
- *
+ *
* @param posn the starting position, inclusive. If it is equal to the size
* of the name, the empty name is returned.
*
diff --git a/libjava/classpath/javax/naming/NameAlreadyBoundException.java b/libjava/classpath/javax/naming/NameAlreadyBoundException.java
index 5ddd7d8..07b92ee 100644
--- a/libjava/classpath/javax/naming/NameAlreadyBoundException.java
+++ b/libjava/classpath/javax/naming/NameAlreadyBoundException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class NameAlreadyBoundException extends NamingException
{
private static final long serialVersionUID = - 8491441000356780586L;
diff --git a/libjava/classpath/javax/naming/NameClassPair.java b/libjava/classpath/javax/naming/NameClassPair.java
index 7925d45..f4f9fda 100644
--- a/libjava/classpath/javax/naming/NameClassPair.java
+++ b/libjava/classpath/javax/naming/NameClassPair.java
@@ -41,14 +41,14 @@ package javax.naming;
import java.io.Serializable;
/**
- * NameClassPair represents the name-classname mapping pair
+ * NameClassPair represents the name-classname mapping pair
* of a binding in a context.
*
* Bindings are mappings of a name to an object and this class is used to
* specify the mapping of the name to the class type of the bound object.
* As classname the fully qualified classname is used.
*
- *
+ *
* @author Tom Tromey (tromey@redhat.com)
* @since 1.3
*/
@@ -58,7 +58,7 @@ public class NameClassPair implements Serializable
/**
* Constructs an instance with the given name and classname.
- *
+ *
* @param name the name of the binding relative to the target context
* (may not be null)
* @param className the name of the class. If null the bound
@@ -70,9 +70,9 @@ public class NameClassPair implements Serializable
}
/**
- * Constructs an instance with the given name and classname and a
+ * Constructs an instance with the given name and classname and a
* flag indicating if the name is relative to the target context.
- *
+ *
* @param name the name of the binding (may not be null)
* @param className the name of the class. If null the bound
* object is also null
@@ -87,7 +87,7 @@ public class NameClassPair implements Serializable
/**
* Returns the classname of the binding.
- * @return The fully qualified classname or null if the
+ * @return The fully qualified classname or null if the
* bound object is null.
*/
public String getClassName ()
@@ -106,7 +106,7 @@ public class NameClassPair implements Serializable
/**
* Checks whether the name is relative to the target context or not.
- * @return true if the name is relative,
+ * @return true if the name is relative,
* false otherwise.
*/
public boolean isRelative ()
@@ -140,43 +140,43 @@ public class NameClassPair implements Serializable
{
this.isRel = r;
}
-
+
/**
- * Sets the full name for this binding. Setting the full name by this
- * method is the only way to initialize full names of bindings if
+ * Sets the full name for this binding. Setting the full name by this
+ * method is the only way to initialize full names of bindings if
* supported by a specific naming system.
- *
- * @param fullName the full name of this binding. If not set or set to
+ *
+ * @param fullName the full name of this binding. If not set or set to
* null the getNameInNamespace() method will
* throw an exception
- *
+ *
* @see #getNameInNamespace()
- *
+ *
* @since 1.5
*/
- public void setNameInNamespace(String fullName)
+ public void setNameInNamespace(String fullName)
{
this.fullName = fullName;
}
-
+
/**
* Returns the full name for this binding. The full name of a binding is
- * defined as the absolute name in its own namespace and is not valid
+ * defined as the absolute name in its own namespace and is not valid
* outside.
- *
+ *
* @return The full name in the bindings namespace.
- * @throws UnsupportedOperationException if no full name is applicable in
+ * @throws UnsupportedOperationException if no full name is applicable in
* the specific naming system.
- *
+ *
* @see Context#getNameInNamespace()
- *
+ *
* @since 1.5
*/
public String getNameInNamespace()
{
if (this.fullName == null)
throw new UnsupportedOperationException();
-
+
return this.fullName;
}
diff --git a/libjava/classpath/javax/naming/NameNotFoundException.java b/libjava/classpath/javax/naming/NameNotFoundException.java
index b7c24a6..64e45f3 100644
--- a/libjava/classpath/javax/naming/NameNotFoundException.java
+++ b/libjava/classpath/javax/naming/NameNotFoundException.java
@@ -35,10 +35,10 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
-
+
public class NameNotFoundException extends NamingException
{
private static final long serialVersionUID = - 8007156725367842053L;
diff --git a/libjava/classpath/javax/naming/NameParser.java b/libjava/classpath/javax/naming/NameParser.java
index 004b406..c832003 100644
--- a/libjava/classpath/javax/naming/NameParser.java
+++ b/libjava/classpath/javax/naming/NameParser.java
@@ -46,10 +46,10 @@ package javax.naming;
* @see Context#getNameParser(Name)
*/
public interface NameParser
-{
+{
/**
* Parser the string name representation into the {@link Name} representation
- *
+ *
* @param name the string representation of the name
* @return the {@link Name} representation of the name.
* @throws InvalidNameException if the name violates the syntax, expected by
@@ -58,5 +58,3 @@ public interface NameParser
*/
Name parse (String name) throws NamingException;
}
-
-
diff --git a/libjava/classpath/javax/naming/NamingEnumeration.java b/libjava/classpath/javax/naming/NamingEnumeration.java
index a7c5770..cd0963d 100644
--- a/libjava/classpath/javax/naming/NamingEnumeration.java
+++ b/libjava/classpath/javax/naming/NamingEnumeration.java
@@ -35,7 +35,7 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming;
import java.util.Enumeration;
@@ -58,16 +58,16 @@ public interface NamingEnumeration extends Enumeration
* Returns the next element in this enumeration. The naming - specific
* exceptions are only throws after returning all still available elements of
* the enumeration.
- *
+ *
* @return the next element of this enumeration
* @throws NamingException
*/
T next() throws NamingException;
-
+
/**
* Checks if there are more unvisited elements in the enumeration, throwing
* exceptions if there are some unvisited, but not available elements.
- *
+ *
* @return true if there are some unvisited elements, false otherwise.
* @throws PartialResultException if the enumeration, returned by the
* {@link Context#list(Name)} or other similar method contains only
@@ -77,13 +77,13 @@ public interface NamingEnumeration extends Enumeration
* @throws NamingException
*/
boolean hasMore() throws NamingException;
-
+
/**
* Immediately frees all resources, owned by this enumeration. If invoked, it
* must be the last method called for that enumeration.
- *
+ *
* @throws NamingException
- */
+ */
void close() throws NamingException;
}
diff --git a/libjava/classpath/javax/naming/NamingException.java b/libjava/classpath/javax/naming/NamingException.java
index 7a5c35e..28b8172 100644
--- a/libjava/classpath/javax/naming/NamingException.java
+++ b/libjava/classpath/javax/naming/NamingException.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
@@ -199,9 +199,9 @@ public class NamingException extends Exception
{
if (name != null)
try
- {
- remainingName.addAll(name);
- }
+ {
+ remainingName.addAll(name);
+ }
catch(InvalidNameException ine) { /* ignored */ }
}
@@ -216,9 +216,9 @@ public class NamingException extends Exception
{
if (name != null)
try
- {
- remainingName.add(name);
- }
+ {
+ remainingName.add(name);
+ }
catch(InvalidNameException ine) { /* ignored */ }
}
@@ -243,24 +243,24 @@ public class NamingException extends Exception
Throwable cause = getRootCause();
if (cause != null)
{
- sb.append(" caused by ");
- sb.append(cause);
+ sb.append(" caused by ");
+ sb.append(cause);
}
Name remaining = getRemainingName();
if (remaining != null)
{
- sb.append(" [remainingName: ");
- sb.append(remaining);
+ sb.append(" [remainingName: ");
+ sb.append(remaining);
}
Object resolved = getResolvedObj();
if (objectInfo && resolved != null)
{
- if (remainingName == null)
- sb.append(" [");
- else
- sb.append(", ");
- sb.append("resolvedObj: ");
- sb.append(resolved);
+ if (remainingName == null)
+ sb.append(" [");
+ else
+ sb.append(", ");
+ sb.append("resolvedObj: ");
+ sb.append(resolved);
}
if ((remaining != null) || (objectInfo && resolved != null))
sb.append(']');
@@ -314,4 +314,3 @@ public class NamingException extends Exception
super.printStackTrace(pw);
}
}
-
diff --git a/libjava/classpath/javax/naming/NamingSecurityException.java b/libjava/classpath/javax/naming/NamingSecurityException.java
index ae7f5ed..34ad6df 100644
--- a/libjava/classpath/javax/naming/NamingSecurityException.java
+++ b/libjava/classpath/javax/naming/NamingSecurityException.java
@@ -38,11 +38,11 @@ exception statement from your version. */
package javax.naming;
-
+
public abstract class NamingSecurityException extends NamingException
{
private static final long serialVersionUID = 5855287647294685775L;
-
+
public NamingSecurityException ()
{
super ();
diff --git a/libjava/classpath/javax/naming/NoInitialContextException.java b/libjava/classpath/javax/naming/NoInitialContextException.java
index 5e4f6df..a51f567 100644
--- a/libjava/classpath/javax/naming/NoInitialContextException.java
+++ b/libjava/classpath/javax/naming/NoInitialContextException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class NoInitialContextException extends NamingException
{
private static final long serialVersionUID = - 3413733186901258623L;
diff --git a/libjava/classpath/javax/naming/NoPermissionException.java b/libjava/classpath/javax/naming/NoPermissionException.java
index 02764a9..7934e09 100644
--- a/libjava/classpath/javax/naming/NoPermissionException.java
+++ b/libjava/classpath/javax/naming/NoPermissionException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class NoPermissionException extends NamingSecurityException
{
private static final long serialVersionUID = 8395332708699751775L;
diff --git a/libjava/classpath/javax/naming/NotContextException.java b/libjava/classpath/javax/naming/NotContextException.java
index a27f10f..a543a38 100644
--- a/libjava/classpath/javax/naming/NotContextException.java
+++ b/libjava/classpath/javax/naming/NotContextException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class NotContextException extends NamingException
{
private static final long serialVersionUID = 849752551644540417L;
diff --git a/libjava/classpath/javax/naming/PartialResultException.java b/libjava/classpath/javax/naming/PartialResultException.java
index 28f0467..dd2813b 100644
--- a/libjava/classpath/javax/naming/PartialResultException.java
+++ b/libjava/classpath/javax/naming/PartialResultException.java
@@ -42,7 +42,7 @@ package javax.naming;
* Thrown from the {@link javax.naming.NamingEnumeration}, this exception
* indicates that the enumeration represents only part of the existing
* elements that would be an answer to the specified request.
- */
+ */
public class PartialResultException extends NamingException
{
private static final long serialVersionUID = 2572144970049426786L;
diff --git a/libjava/classpath/javax/naming/RefAddr.java b/libjava/classpath/javax/naming/RefAddr.java
index f345c88..6e4de1c 100644
--- a/libjava/classpath/javax/naming/RefAddr.java
+++ b/libjava/classpath/javax/naming/RefAddr.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
@@ -71,12 +71,12 @@ public abstract class RefAddr implements Serializable
*/
protected RefAddr(String addrType)
{
- if (addrType == null)
- throw new NullPointerException("addrType cannot be null");
-
+ if (addrType == null)
+ throw new NullPointerException("addrType cannot be null");
+
this.addrType = addrType;
}
-
+
/**
* Returns the non-null address type given to the constructor.
*/
@@ -84,13 +84,13 @@ public abstract class RefAddr implements Serializable
{
return addrType;
}
-
+
/**
* Returns the possibly null content of this RefAddr.
* The actual value is defined by the non-abstract subclass.
*/
public abstract Object getContent();
-
+
/**
* Checks if the object is a RefAddr with the same type and content.
*
@@ -107,10 +107,10 @@ public abstract class RefAddr implements Serializable
{
Object c1 = this.getContent();
Object c2 = refAddr.getContent();
- if (c1 == null)
- return c2 == null;
- else
- return c1.equals(c2);
+ if (c1 == null)
+ return c2 == null;
+ else
+ return c1.equals(c2);
}
}
return false;
diff --git a/libjava/classpath/javax/naming/Reference.java b/libjava/classpath/javax/naming/Reference.java
index fedbf58..6a2626d 100644
--- a/libjava/classpath/javax/naming/Reference.java
+++ b/libjava/classpath/javax/naming/Reference.java
@@ -45,37 +45,37 @@ import java.util.Vector;
/**
* This class represents a reference to an object that is located outside of the
* naming/directory system.
- *
+ *
* @see Referenceable
- *
+ *
* @author Tom Tromey (tromey@redhat.com)
*/
public class Reference implements Cloneable, Serializable
{
private static final long serialVersionUID = - 1673475790065791735L;
-
+
/**
- * The list of addresses, stored in this reference. The object may be
+ * The list of addresses, stored in this reference. The object may be
* have by several different addresses.
*/
protected Vector addrs;
-
+
/**
* The name of the class factory to create an instance of the object,
* referenced by this reference.
*/
protected String classFactory;
-
+
/**
* The location, from where the class factory should be loaded.
*/
protected String classFactoryLocation;
-
+
/**
* The name of the class of the object, to that this reference refers.
*/
protected String className;
-
+
/**
* Create a new reference that is referencting to the object of the
* specified class.
@@ -85,7 +85,7 @@ public class Reference implements Cloneable, Serializable
this.className = className;
addrs = new Vector ();
}
-
+
/**
* Create a new reference that is referencing to the object of the
* specified class with the given address.
@@ -96,17 +96,17 @@ public class Reference implements Cloneable, Serializable
addrs = new Vector ();
addrs.add (addr);
}
-
+
/**
* Create a new reference that is referencing to the object of the
* specified class, specifying the class and location of the factory that
* produces these objects.
- *
+ *
* @param className the object class name
* @param factoryClassName the object factory class name
* @param factoryLocation the object factory location
*/
- public Reference (String className, String factoryClassName,
+ public Reference (String className, String factoryClassName,
String factoryLocation)
{
this.className = className;
@@ -119,14 +119,14 @@ public class Reference implements Cloneable, Serializable
* Create a new reference that is referencing to the object of the
* specified class, specifying the class and location of the factory that
* produces these objects and also the address of this object.
- *
+ *
* @param className the object class name
* @param addr the address of the object
* @param factoryClassName the object factory class name
* @param factoryLocation the object factory location
*/
public Reference (String className, RefAddr addr,
- String factoryClassName, String factoryLocation)
+ String factoryClassName, String factoryLocation)
{
this.className = className;
this.classFactory = factoryClassName;
@@ -136,14 +136,14 @@ public class Reference implements Cloneable, Serializable
}
/**
- * Add the new address for this object at the given position of the
+ * Add the new address for this object at the given position of the
* address list.
*/
public void add (int posn, RefAddr addr)
{
addrs.add (posn, addr);
}
-
+
/**
* Appends the new object address to the end of the address list.
*/
@@ -151,7 +151,7 @@ public class Reference implements Cloneable, Serializable
{
addrs.add (addr);
}
-
+
/**
* Removes all defined addresses of the object.
*/
@@ -163,7 +163,7 @@ public class Reference implements Cloneable, Serializable
public Object clone ()
{
Reference r = new Reference (className, classFactory,
- classFactoryLocation);
+ classFactoryLocation);
r.addrs = (Vector) addrs.clone ();
return r;
}
@@ -173,7 +173,7 @@ public class Reference implements Cloneable, Serializable
{
return (a == null) ? (b == null) : a.equals (b);
}
-
+
/**
* Compares two addresses for equality, by value.
*/
@@ -183,11 +183,11 @@ public class Reference implements Cloneable, Serializable
return false;
Reference r = (Reference) obj;
return (equals (classFactory, r.classFactory)
- && equals (classFactoryLocation, r.classFactoryLocation)
- && equals (className, r.className)
- && addrs.equals (r.addrs));
+ && equals (classFactoryLocation, r.classFactoryLocation)
+ && equals (className, r.className)
+ && addrs.equals (r.addrs));
}
-
+
/**
* Get the address of this object at the given position.
*/
@@ -195,12 +195,12 @@ public class Reference implements Cloneable, Serializable
{
return addrs.get (posn);
}
-
+
/**
* Get the given type of address for this object.
- *
+ *
* @param addrType the needed type of address
- *
+ *
* @return the address of this object, having the specified type. If there
* is no address of such type, null is returned.
*/
@@ -208,13 +208,13 @@ public class Reference implements Cloneable, Serializable
{
for (int i = 0; i < addrs.size (); ++i)
{
- RefAddr r = addrs.get (i);
- if (addrType.equals (r.getType ()))
- return r;
+ RefAddr r = addrs.get (i);
+ if (addrType.equals (r.getType ()))
+ return r;
}
return null;
}
-
+
/**
* Get the enumeration over all defined addresses of the object.
*/
@@ -222,20 +222,20 @@ public class Reference implements Cloneable, Serializable
{
return addrs.elements ();
}
-
+
/**
* Get the name of the class of the referenced object.
- *
+ *
* @see #className
*/
public String getClassName ()
{
return className;
}
-
+
/**
* Get the location of the factory class of the referenced object.
- *
+ *
* @see #classFactoryLocation
*/
public String getFactoryClassLocation ()
@@ -245,18 +245,18 @@ public class Reference implements Cloneable, Serializable
/**
* Get the name of the factory class of the referenced object
- *
+ *
* @see #classFactory
*/
public String getFactoryClassName ()
{
return classFactory;
}
-
+
/**
- * Get the hashcode of this reference.
- *
- * @return the sum of the hash codes of the addresses.
+ * Get the hashcode of this reference.
+ *
+ * @return the sum of the hash codes of the addresses.
*/
public int hashCode ()
{
@@ -267,19 +267,19 @@ public class Reference implements Cloneable, Serializable
h += addrs.get (i).hashCode ();
return h;
}
-
+
/**
* Remove the address at the given position.
- *
+ *
* @param posn the position of the address to remove
- *
+ *
* @return the removed address
*/
public Object remove (int posn)
{
return addrs.remove (posn);
}
-
+
/**
* Return the number of the defined addresses.
*/
@@ -287,7 +287,7 @@ public class Reference implements Cloneable, Serializable
{
return addrs.size ();
}
-
+
/**
* Return the string representation.
*/
@@ -296,9 +296,9 @@ public class Reference implements Cloneable, Serializable
String x = getClass ().toString () + "[";
for (int i = 0; i < addrs.size (); ++i)
{
- if (i > 0)
- x += ",";
- x += addrs.get (i).toString ();
+ if (i > 0)
+ x += ",";
+ x += addrs.get (i).toString ();
}
return x + "]";
}
diff --git a/libjava/classpath/javax/naming/Referenceable.java b/libjava/classpath/javax/naming/Referenceable.java
index 21c5238..ed8e4d4 100644
--- a/libjava/classpath/javax/naming/Referenceable.java
+++ b/libjava/classpath/javax/naming/Referenceable.java
@@ -46,9 +46,9 @@ public interface Referenceable
{
/**
* Get the reference about this object.
- *
+ *
* @return the reference about this object, cannot be null.
- *
+ *
* @throws NamingException if the naming exception has been raised while
* retrieving the reference.
*/
diff --git a/libjava/classpath/javax/naming/ReferralException.java b/libjava/classpath/javax/naming/ReferralException.java
index c264d63..b596af0 100644
--- a/libjava/classpath/javax/naming/ReferralException.java
+++ b/libjava/classpath/javax/naming/ReferralException.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming;
import java.util.Hashtable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 14, 2001
@@ -48,7 +48,7 @@ import java.util.Hashtable;
public abstract class ReferralException extends NamingException
{
private static final long serialVersionUID = -2881363844695698876L;
-
+
protected ReferralException ()
{
super ();
diff --git a/libjava/classpath/javax/naming/ServiceUnavailableException.java b/libjava/classpath/javax/naming/ServiceUnavailableException.java
index ddb154f..6a07bc6 100644
--- a/libjava/classpath/javax/naming/ServiceUnavailableException.java
+++ b/libjava/classpath/javax/naming/ServiceUnavailableException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class ServiceUnavailableException extends NamingException
{
private static final long serialVersionUID = - 4996964726566773444L;
diff --git a/libjava/classpath/javax/naming/SizeLimitExceededException.java b/libjava/classpath/javax/naming/SizeLimitExceededException.java
index caffa70..8f0523f 100644
--- a/libjava/classpath/javax/naming/SizeLimitExceededException.java
+++ b/libjava/classpath/javax/naming/SizeLimitExceededException.java
@@ -43,7 +43,7 @@ package javax.naming;
* indicates that there are more elements than the previously specified
* size limit. Hence the enumeration represents only part of the existing
* elements that would be an answer to the specified request.
- */
+ */
public class SizeLimitExceededException extends LimitExceededException
{
private static final long serialVersionUID = 7129289564879168579L;
diff --git a/libjava/classpath/javax/naming/StringRefAddr.java b/libjava/classpath/javax/naming/StringRefAddr.java
index f40da8f..02f072e 100644
--- a/libjava/classpath/javax/naming/StringRefAddr.java
+++ b/libjava/classpath/javax/naming/StringRefAddr.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
diff --git a/libjava/classpath/javax/naming/TimeLimitExceededException.java b/libjava/classpath/javax/naming/TimeLimitExceededException.java
index e3456f5..95188d2 100644
--- a/libjava/classpath/javax/naming/TimeLimitExceededException.java
+++ b/libjava/classpath/javax/naming/TimeLimitExceededException.java
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.naming;
-
+
public class TimeLimitExceededException extends LimitExceededException
{
private static final long serialVersionUID = - 3597009011385034696L;
diff --git a/libjava/classpath/javax/naming/directory/AttributeInUseException.java b/libjava/classpath/javax/naming/directory/AttributeInUseException.java
index 9be25c9..08f337c 100644
--- a/libjava/classpath/javax/naming/directory/AttributeInUseException.java
+++ b/libjava/classpath/javax/naming/directory/AttributeInUseException.java
@@ -35,7 +35,7 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
+
package javax.naming.directory;
import javax.naming.NamingException;
diff --git a/libjava/classpath/javax/naming/directory/Attributes.java b/libjava/classpath/javax/naming/directory/Attributes.java
index 2dc2c61..50df17c 100644
--- a/libjava/classpath/javax/naming/directory/Attributes.java
+++ b/libjava/classpath/javax/naming/directory/Attributes.java
@@ -59,4 +59,3 @@ public interface Attributes extends Cloneable, Serializable
Attribute remove(String attrID);
Object clone();
}
-
diff --git a/libjava/classpath/javax/naming/directory/BasicAttribute.java b/libjava/classpath/javax/naming/directory/BasicAttribute.java
index 2715c96..65b4416 100644
--- a/libjava/classpath/javax/naming/directory/BasicAttribute.java
+++ b/libjava/classpath/javax/naming/directory/BasicAttribute.java
@@ -56,7 +56,7 @@ import javax.naming.OperationNotSupportedException;
public class BasicAttribute implements Attribute
{
private static final long serialVersionUID = 6743528196119291326L;
-
+
/** The ID of this attribute. */
protected String attrID;
/** True if this attribute's values are ordered. */
@@ -126,8 +126,8 @@ public class BasicAttribute implements Attribute
{
for (int i = 0; i < values.size (); ++i)
{
- if (equals (val, values.get (i)))
- return true;
+ if (equals (val, values.get (i)))
+ return true;
}
return false;
@@ -140,29 +140,29 @@ public class BasicAttribute implements Attribute
BasicAttribute b = (BasicAttribute) obj;
if (ordered != b.ordered
- || ! attrID.equals (b.attrID)
- || values.size () != b.values.size ())
+ || ! attrID.equals (b.attrID)
+ || values.size () != b.values.size ())
return false;
for (int i = 0; i < values.size (); ++i)
{
- boolean ok = false;
- if (ordered)
- ok = equals (values.get (i), b.values.get (i));
- else
- {
- for (int j = 0; j < b.values.size (); ++j)
- {
- if (equals (values.get (i), b.values.get (j)))
- {
- ok = true;
- break;
- }
- }
- }
-
- if (! ok)
- return false;
+ boolean ok = false;
+ if (ordered)
+ ok = equals (values.get (i), b.values.get (i));
+ else
+ {
+ for (int j = 0; j < b.values.size (); ++j)
+ {
+ if (equals (values.get (i), b.values.get (j)))
+ {
+ ok = true;
+ break;
+ }
+ }
+ }
+
+ if (! ok)
+ return false;
}
return true;
@@ -210,19 +210,19 @@ public class BasicAttribute implements Attribute
int val = attrID.hashCode ();
for (int i = 0; i < values.size (); ++i)
{
- Object o = values.get (i);
- if (o == null)
- {
- // Nothing.
- }
- else if (o instanceof Object[])
- {
- Object[] a = (Object[]) o;
- for (int j = 0; j < a.length; ++j)
- val += a[j].hashCode ();
- }
- else
- val += o.hashCode ();
+ Object o = values.get (i);
+ if (o == null)
+ {
+ // Nothing.
+ }
+ else if (o instanceof Object[])
+ {
+ Object[] a = (Object[]) o;
+ for (int j = 0; j < a.length; ++j)
+ val += a[j].hashCode ();
+ }
+ else
+ val += o.hashCode ();
}
return val;
@@ -242,11 +242,11 @@ public class BasicAttribute implements Attribute
{
for (int i = 0; i < values.size (); ++i)
{
- if (equals (val, values.get (i)))
- {
- values.remove (i);
- return true;
- }
+ if (equals (val, values.get (i)))
+ {
+ values.remove (i);
+ return true;
+ }
}
return false;
@@ -281,27 +281,27 @@ public class BasicAttribute implements Attribute
if (one instanceof Object[])
{
- if (! (two instanceof Object[]))
- return false;
+ if (! (two instanceof Object[]))
+ return false;
- Object[] aone = (Object[]) one;
- Object[] atwo = (Object[]) two;
+ Object[] aone = (Object[]) one;
+ Object[] atwo = (Object[]) two;
- if (aone.length != atwo.length)
- return false;
+ if (aone.length != atwo.length)
+ return false;
- for (int i = 0; i < aone.length; ++i)
- {
- if (! aone[i].equals (atwo[i]))
- return false;
- }
+ for (int i = 0; i < aone.length; ++i)
+ {
+ if (! aone[i].equals (atwo[i]))
+ return false;
+ }
- return true;
+ return true;
}
return one.equals (two);
}
-
+
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
@@ -317,9 +317,9 @@ public class BasicAttribute implements Attribute
s.defaultWriteObject();
s.writeInt(values.size());
for (int i=0; i < values.size(); i++)
- s.writeObject(values.get(i));
+ s.writeObject(values.get(i));
}
-
+
// Used when enumerating this attribute.
private class BasicAttributeEnumeration implements NamingEnumeration
{
@@ -351,7 +351,7 @@ public class BasicAttribute implements Attribute
public Object nextElement () throws NoSuchElementException
{
if (where == values.size ())
- throw new NoSuchElementException ("no more elements");
+ throw new NoSuchElementException ("no more elements");
return values.get (where++);
}
}
diff --git a/libjava/classpath/javax/naming/directory/BasicAttributes.java b/libjava/classpath/javax/naming/directory/BasicAttributes.java
index 54b1f19..8b607a8 100644
--- a/libjava/classpath/javax/naming/directory/BasicAttributes.java
+++ b/libjava/classpath/javax/naming/directory/BasicAttributes.java
@@ -54,7 +54,7 @@ import javax.naming.NamingException;
public class BasicAttributes implements Attributes
{
private static final long serialVersionUID = 4980164073184639448L;
-
+
public BasicAttributes ()
{
this (false);
@@ -98,16 +98,16 @@ public class BasicAttributes implements Attributes
Attributes bs = (Attributes) obj;
if (ignoreCase != bs.isCaseIgnored()
- || attributes.size () != bs.size ())
+ || attributes.size () != bs.size ())
return false;
NamingEnumeration bas = bs.getAll();
while (bas.hasMoreElements())
{
- Attribute a = (Attribute) bas.nextElement();
- Attribute b = get(a.getID ());
- if (! a.equals(b))
- return false;
+ Attribute a = (Attribute) bas.nextElement();
+ Attribute b = get(a.getID ());
+ if (! a.equals(b))
+ return false;
}
return true;
@@ -117,10 +117,10 @@ public class BasicAttributes implements Attributes
{
for (int i = 0; i < attributes.size (); ++i)
{
- Attribute at = attributes.get (i);
- if ((ignoreCase && attrID.equalsIgnoreCase (at.getID ()))
- || (! ignoreCase && attrID.equals (at.getID ())))
- return at;
+ Attribute at = attributes.get (i);
+ if ((ignoreCase && attrID.equalsIgnoreCase (at.getID ()))
+ || (! ignoreCase && attrID.equals (at.getID ())))
+ return at;
}
return null;
@@ -139,7 +139,7 @@ public class BasicAttributes implements Attributes
{
return attrs.hasMore();
}
-
+
public boolean hasMoreElements()
{
return attrs.hasMoreElements();
@@ -191,13 +191,13 @@ public class BasicAttributes implements Attributes
{
for (int i = 0; i < attributes.size (); ++i)
{
- Attribute at = (Attribute) attributes.get (i);
- if ((ignoreCase && attrID.equalsIgnoreCase (at.getID ()))
- || (! ignoreCase && attrID.equals (at.getID ())))
- {
- attributes.remove (i);
- return at;
- }
+ Attribute at = (Attribute) attributes.get (i);
+ if ((ignoreCase && attrID.equalsIgnoreCase (at.getID ()))
+ || (! ignoreCase && attrID.equals (at.getID ())))
+ {
+ attributes.remove (i);
+ return at;
+ }
}
return null;
@@ -213,9 +213,9 @@ public class BasicAttributes implements Attributes
String r = "";
for (int i = 0; i < attributes.size (); ++i)
{
- if (i > 0)
- r += "; ";
- r += attributes.get (i).toString ();
+ if (i > 0)
+ r += "; ";
+ r += attributes.get (i).toString ();
}
return r;
}
@@ -230,7 +230,7 @@ public class BasicAttributes implements Attributes
{
s.defaultReadObject();
int size = s.readInt();
- attributes = new Vector(size);
+ attributes = new Vector(size);
for (int i = 0; i < size; i++)
attributes.add((Attribute) s.readObject());
}
@@ -275,7 +275,7 @@ public class BasicAttributes implements Attributes
public Attribute nextElement () throws NoSuchElementException
{
if (where >= attributes.size ())
- throw new NoSuchElementException ("no more elements");
+ throw new NoSuchElementException ("no more elements");
Attribute at = attributes.get (where);
++where;
return at;
diff --git a/libjava/classpath/javax/naming/directory/InitialDirContext.java b/libjava/classpath/javax/naming/directory/InitialDirContext.java
index 8c7852f..68130b2 100644
--- a/libjava/classpath/javax/naming/directory/InitialDirContext.java
+++ b/libjava/classpath/javax/naming/directory/InitialDirContext.java
@@ -211,7 +211,7 @@ public class InitialDirContext extends InitialContext implements DirContext
throws NamingException
{
return getURLOrDefaultInitDirCtx (name).search (name, matchingAttributes,
- attributesToReturn);
+ attributesToReturn);
}
public NamingEnumeration search(String name,
@@ -220,7 +220,7 @@ public class InitialDirContext extends InitialContext implements DirContext
throws NamingException
{
return getURLOrDefaultInitDirCtx (name).search (name, matchingAttributes,
- attributesToReturn);
+ attributesToReturn);
}
public NamingEnumeration search(Name name,
@@ -257,7 +257,7 @@ public class InitialDirContext extends InitialContext implements DirContext
throws NamingException
{
return getURLOrDefaultInitDirCtx (name).search (name, filterExpr,
- filterArgs, cons);
+ filterArgs, cons);
}
public NamingEnumeration search(String name,
@@ -267,6 +267,6 @@ public class InitialDirContext extends InitialContext implements DirContext
throws NamingException
{
return getURLOrDefaultInitDirCtx (name).search (name, filterExpr,
- filterArgs, cons);
+ filterArgs, cons);
}
}
diff --git a/libjava/classpath/javax/naming/directory/ModificationItem.java b/libjava/classpath/javax/naming/directory/ModificationItem.java
index 56a5ae6..b7cb48e 100644
--- a/libjava/classpath/javax/naming/directory/ModificationItem.java
+++ b/libjava/classpath/javax/naming/directory/ModificationItem.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.directory;
import java.io.Serializable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 13, 2001
@@ -57,8 +57,8 @@ public class ModificationItem implements Serializable
if (attr == null)
throw new IllegalArgumentException("attr is null");
if (mod_op != DirContext.ADD_ATTRIBUTE &&
- mod_op != DirContext.REPLACE_ATTRIBUTE &&
- mod_op != DirContext.REMOVE_ATTRIBUTE)
+ mod_op != DirContext.REPLACE_ATTRIBUTE &&
+ mod_op != DirContext.REMOVE_ATTRIBUTE)
throw new IllegalArgumentException("mod_op is invalid");
this.mod_op = mod_op;
this.attr = attr;
diff --git a/libjava/classpath/javax/naming/directory/SearchControls.java b/libjava/classpath/javax/naming/directory/SearchControls.java
index 5ba488b..805e971 100644
--- a/libjava/classpath/javax/naming/directory/SearchControls.java
+++ b/libjava/classpath/javax/naming/directory/SearchControls.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.directory;
import java.io.Serializable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 5, 2001
@@ -66,7 +66,7 @@ public class SearchControls implements Serializable
}
public SearchControls(int scope, long countlim, int timelim, String[] attrs,
- boolean retobj, boolean deref)
+ boolean retobj, boolean deref)
{
searchScope = scope;
timeLimit = timelim;
diff --git a/libjava/classpath/javax/naming/directory/SearchResult.java b/libjava/classpath/javax/naming/directory/SearchResult.java
index ce6bfed..5d6a2b1 100644
--- a/libjava/classpath/javax/naming/directory/SearchResult.java
+++ b/libjava/classpath/javax/naming/directory/SearchResult.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.directory;
import javax.naming.Binding;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 13, 2001
@@ -58,21 +58,21 @@ public class SearchResult extends Binding
}
public SearchResult(String name, Object obj, Attributes attrs,
- boolean isRelative)
+ boolean isRelative)
{
super(name, obj, isRelative);
this.attrs = attrs;
}
public SearchResult(String name, String className, Object obj,
- Attributes attrs)
+ Attributes attrs)
{
super(name, className, obj);
this.attrs = attrs;
}
public SearchResult(String name, String className, Object obj,
- Attributes attrs, boolean isRelative)
+ Attributes attrs, boolean isRelative)
{
super(name, className, obj, isRelative);
this.attrs = attrs;
diff --git a/libjava/classpath/javax/naming/event/EventContext.java b/libjava/classpath/javax/naming/event/EventContext.java
index 32629c0..fbee971 100644
--- a/libjava/classpath/javax/naming/event/EventContext.java
+++ b/libjava/classpath/javax/naming/event/EventContext.java
@@ -41,7 +41,7 @@ package javax.naming.event;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
@@ -55,11 +55,11 @@ public interface EventContext extends Context
void addNamingListener (Name target, int scope, NamingListener l)
throws NamingException;
-
+
void addNamingListener (String target, int scope, NamingListener l)
throws NamingException;
-
+
void removeNamingListener (NamingListener l) throws NamingException;
-
+
boolean targetMustExist() throws NamingException;
}
diff --git a/libjava/classpath/javax/naming/event/NamespaceChangeListener.java b/libjava/classpath/javax/naming/event/NamespaceChangeListener.java
index 464b718..efe797e 100644
--- a/libjava/classpath/javax/naming/event/NamespaceChangeListener.java
+++ b/libjava/classpath/javax/naming/event/NamespaceChangeListener.java
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.naming.event;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/libjava/classpath/javax/naming/event/NamingEvent.java b/libjava/classpath/javax/naming/event/NamingEvent.java
index 1bf381a..dcc8c89 100644
--- a/libjava/classpath/javax/naming/event/NamingEvent.java
+++ b/libjava/classpath/javax/naming/event/NamingEvent.java
@@ -41,7 +41,7 @@ package javax.naming.event;
import java.util.EventObject;
import javax.naming.Binding;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 5, 2001
@@ -62,7 +62,7 @@ public class NamingEvent extends EventObject
protected Binding newBinding;
public NamingEvent(EventContext source, int type, Binding newBd,
- Binding oldBd, Object changeInfo)
+ Binding oldBd, Object changeInfo)
{
super(source);
this.type = type;
@@ -106,17 +106,17 @@ public class NamingEvent extends EventObject
switch (type)
{
case OBJECT_ADDED:
- ((NamespaceChangeListener) listener).objectAdded(this);
- break;
+ ((NamespaceChangeListener) listener).objectAdded(this);
+ break;
case OBJECT_REMOVED:
- ((NamespaceChangeListener) listener).objectRemoved(this);
- break;
+ ((NamespaceChangeListener) listener).objectRemoved(this);
+ break;
case OBJECT_RENAMED:
- ((NamespaceChangeListener) listener).objectRenamed(this);
- break;
+ ((NamespaceChangeListener) listener).objectRenamed(this);
+ break;
case OBJECT_CHANGED:
- ((ObjectChangeListener) listener).objectChanged(this);
- break;
+ ((ObjectChangeListener) listener).objectChanged(this);
+ break;
}
}
}
diff --git a/libjava/classpath/javax/naming/event/NamingExceptionEvent.java b/libjava/classpath/javax/naming/event/NamingExceptionEvent.java
index 3a9de21..27a7552 100644
--- a/libjava/classpath/javax/naming/event/NamingExceptionEvent.java
+++ b/libjava/classpath/javax/naming/event/NamingExceptionEvent.java
@@ -41,7 +41,7 @@ package javax.naming.event;
import java.util.EventObject;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 5, 2001
diff --git a/libjava/classpath/javax/naming/event/NamingListener.java b/libjava/classpath/javax/naming/event/NamingListener.java
index 4f313a3..e820d55 100644
--- a/libjava/classpath/javax/naming/event/NamingListener.java
+++ b/libjava/classpath/javax/naming/event/NamingListener.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.event;
import java.util.EventListener;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/libjava/classpath/javax/naming/event/ObjectChangeListener.java b/libjava/classpath/javax/naming/event/ObjectChangeListener.java
index 00e8c4c..63ccc5b 100644
--- a/libjava/classpath/javax/naming/event/ObjectChangeListener.java
+++ b/libjava/classpath/javax/naming/event/ObjectChangeListener.java
@@ -37,7 +37,7 @@ exception statement from your version. */
package javax.naming.event;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/libjava/classpath/javax/naming/ldap/Control.java b/libjava/classpath/javax/naming/ldap/Control.java
index 9f6409b..b852c00 100644
--- a/libjava/classpath/javax/naming/ldap/Control.java
+++ b/libjava/classpath/javax/naming/ldap/Control.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import java.io.Serializable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/libjava/classpath/javax/naming/ldap/ControlFactory.java b/libjava/classpath/javax/naming/ldap/ControlFactory.java
index b815164..05d53f9 100644
--- a/libjava/classpath/javax/naming/ldap/ControlFactory.java
+++ b/libjava/classpath/javax/naming/ldap/ControlFactory.java
@@ -58,8 +58,8 @@ public abstract class ControlFactory
throws NamingException;
public static Control getControlInstance (Control control,
- Context ctx,
- Hashtable, ?> env)
+ Context ctx,
+ Hashtable, ?> env)
throws NamingException
{
String path = (String) env.get (LdapContext.CONTROL_FACTORIES);
@@ -74,32 +74,32 @@ public abstract class ControlFactory
StringTokenizer tokens = new StringTokenizer (path, ":");
while (tokens.hasMoreTokens ())
{
- String name = tokens.nextToken ();
- try
- {
- Class k = Class.forName (name);
- ControlFactory cf = (ControlFactory) k.newInstance ();
- Control ctrl = cf.getControlInstance (control);
- if (ctrl != null)
- return ctrl;
- }
- catch (ClassNotFoundException _1)
- {
- // Ignore it.
- }
- catch (ClassCastException _2)
- {
- // Ignore it.
- }
- catch (InstantiationException _3)
- {
- // If we couldn't instantiate the factory we might get
- // this.
- }
- catch (IllegalAccessException _4)
- {
- // Another possibility when instantiating.
- }
+ String name = tokens.nextToken ();
+ try
+ {
+ Class k = Class.forName (name);
+ ControlFactory cf = (ControlFactory) k.newInstance ();
+ Control ctrl = cf.getControlInstance (control);
+ if (ctrl != null)
+ return ctrl;
+ }
+ catch (ClassNotFoundException _1)
+ {
+ // Ignore it.
+ }
+ catch (ClassCastException _2)
+ {
+ // Ignore it.
+ }
+ catch (InstantiationException _3)
+ {
+ // If we couldn't instantiate the factory we might get
+ // this.
+ }
+ catch (IllegalAccessException _4)
+ {
+ // Another possibility when instantiating.
+ }
}
return control;
diff --git a/libjava/classpath/javax/naming/ldap/ExtendedRequest.java b/libjava/classpath/javax/naming/ldap/ExtendedRequest.java
index e6379c0..43ddcd7 100644
--- a/libjava/classpath/javax/naming/ldap/ExtendedRequest.java
+++ b/libjava/classpath/javax/naming/ldap/ExtendedRequest.java
@@ -41,7 +41,7 @@ package javax.naming.ldap;
import java.io.Serializable;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
@@ -51,7 +51,7 @@ public interface ExtendedRequest extends Serializable
String getID();
byte[] getEncodedValue();
ExtendedResponse createExtendedResponse(String id,
- byte[] berValue, int offset,
- int length)
- throws NamingException;
+ byte[] berValue, int offset,
+ int length)
+ throws NamingException;
}
diff --git a/libjava/classpath/javax/naming/ldap/ExtendedResponse.java b/libjava/classpath/javax/naming/ldap/ExtendedResponse.java
index a3b6dd1..18b2221 100644
--- a/libjava/classpath/javax/naming/ldap/ExtendedResponse.java
+++ b/libjava/classpath/javax/naming/ldap/ExtendedResponse.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import java.io.Serializable;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/libjava/classpath/javax/naming/ldap/HasControls.java b/libjava/classpath/javax/naming/ldap/HasControls.java
index a169896..f3b97fc 100644
--- a/libjava/classpath/javax/naming/ldap/HasControls.java
+++ b/libjava/classpath/javax/naming/ldap/HasControls.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/libjava/classpath/javax/naming/ldap/InitialLdapContext.java b/libjava/classpath/javax/naming/ldap/InitialLdapContext.java
index 1a29c6a..011ff5a 100644
--- a/libjava/classpath/javax/naming/ldap/InitialLdapContext.java
+++ b/libjava/classpath/javax/naming/ldap/InitialLdapContext.java
@@ -69,12 +69,12 @@ public class InitialLdapContext
Hashtable myenv = null;
if (connControls != null)
{
- if (environment == null)
- myenv = new Hashtable ();
- else
- myenv = (Hashtable) environment.clone ();
- myenv.put ("java.naming.ldap.control.connect",
- connControls);
+ if (environment == null)
+ myenv = new Hashtable ();
+ else
+ myenv = (Hashtable) environment.clone ();
+ myenv.put ("java.naming.ldap.control.connect",
+ connControls);
}
init (myenv);
diff --git a/libjava/classpath/javax/naming/ldap/LdapContext.java b/libjava/classpath/javax/naming/ldap/LdapContext.java
index 10b72f7..ff11259 100644
--- a/libjava/classpath/javax/naming/ldap/LdapContext.java
+++ b/libjava/classpath/javax/naming/ldap/LdapContext.java
@@ -40,7 +40,7 @@ package javax.naming.ldap;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/libjava/classpath/javax/naming/ldap/LdapReferralException.java b/libjava/classpath/javax/naming/ldap/LdapReferralException.java
index 87942b9..faa719c 100644
--- a/libjava/classpath/javax/naming/ldap/LdapReferralException.java
+++ b/libjava/classpath/javax/naming/ldap/LdapReferralException.java
@@ -43,7 +43,7 @@ import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.ReferralException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/libjava/classpath/javax/naming/ldap/StartTlsRequest.java b/libjava/classpath/javax/naming/ldap/StartTlsRequest.java
index b0a30b5..42ee8d7 100644
--- a/libjava/classpath/javax/naming/ldap/StartTlsRequest.java
+++ b/libjava/classpath/javax/naming/ldap/StartTlsRequest.java
@@ -55,7 +55,7 @@ public class StartTlsRequest
/**
* The assigned object identifier for this response.
*/
- public static final String OID = "1.3.6.1.4.1.1466.20037";
+ public static final String OID = "1.3.6.1.4.1.1466.20037";
/**
* Create a new instance.
diff --git a/libjava/classpath/javax/naming/ldap/UnsolicitedNotification.java b/libjava/classpath/javax/naming/ldap/UnsolicitedNotification.java
index 0b6f9d7..ca911f5 100644
--- a/libjava/classpath/javax/naming/ldap/UnsolicitedNotification.java
+++ b/libjava/classpath/javax/naming/ldap/UnsolicitedNotification.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import javax.naming.NamingException;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/libjava/classpath/javax/naming/ldap/UnsolicitedNotificationEvent.java b/libjava/classpath/javax/naming/ldap/UnsolicitedNotificationEvent.java
index f9946064..52e591a 100644
--- a/libjava/classpath/javax/naming/ldap/UnsolicitedNotificationEvent.java
+++ b/libjava/classpath/javax/naming/ldap/UnsolicitedNotificationEvent.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import java.util.EventObject;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 5, 2001
@@ -47,12 +47,12 @@ import java.util.EventObject;
public class UnsolicitedNotificationEvent extends EventObject
{
private static final long serialVersionUID = -2382603380799883705L;
-
+
// Serialized fields.
private UnsolicitedNotification notice;
public UnsolicitedNotificationEvent(Object src,
- UnsolicitedNotification notice)
+ UnsolicitedNotification notice)
{
super(src);
this.notice = notice;
diff --git a/libjava/classpath/javax/naming/ldap/UnsolicitedNotificationListener.java b/libjava/classpath/javax/naming/ldap/UnsolicitedNotificationListener.java
index fd56f05..f2a35da 100644
--- a/libjava/classpath/javax/naming/ldap/UnsolicitedNotificationListener.java
+++ b/libjava/classpath/javax/naming/ldap/UnsolicitedNotificationListener.java
@@ -39,7 +39,7 @@ exception statement from your version. */
package javax.naming.ldap;
import javax.naming.event.NamingListener;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
diff --git a/libjava/classpath/javax/naming/spi/DirObjectFactory.java b/libjava/classpath/javax/naming/spi/DirObjectFactory.java
index 1a71c28..47fb7a1 100644
--- a/libjava/classpath/javax/naming/spi/DirObjectFactory.java
+++ b/libjava/classpath/javax/naming/spi/DirObjectFactory.java
@@ -43,7 +43,7 @@ import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.directory.Attributes;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
@@ -51,6 +51,6 @@ import javax.naming.directory.Attributes;
public interface DirObjectFactory extends ObjectFactory
{
Object getObjectInstance(Object obj, Name name, Context nameCtx,
- Hashtable, ?> environment, Attributes attrs)
- throws Exception;
+ Hashtable, ?> environment, Attributes attrs)
+ throws Exception;
}
diff --git a/libjava/classpath/javax/naming/spi/DirStateFactory.java b/libjava/classpath/javax/naming/spi/DirStateFactory.java
index 6ddd12f..1c0c21b 100644
--- a/libjava/classpath/javax/naming/spi/DirStateFactory.java
+++ b/libjava/classpath/javax/naming/spi/DirStateFactory.java
@@ -44,7 +44,7 @@ import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
-
+
/**
* @author Warren Levy (warrenl@redhat.com)
* @date June 1, 2001
@@ -76,8 +76,8 @@ public interface DirStateFactory extends StateFactory
}
DirStateFactory.Result getStateToBind(Object obj, Name name,
- Context nameCtx,
- Hashtable, ?> environment,
- Attributes inAttrs)
- throws NamingException;
+ Context nameCtx,
+ Hashtable, ?> environment,
+ Attributes inAttrs)
+ throws NamingException;
}
diff --git a/libjava/classpath/javax/naming/spi/DirectoryManager.java b/libjava/classpath/javax/naming/spi/DirectoryManager.java
index a6d91b2..4abb5f1 100644
--- a/libjava/classpath/javax/naming/spi/DirectoryManager.java
+++ b/libjava/classpath/javax/naming/spi/DirectoryManager.java
@@ -73,28 +73,28 @@ public class DirectoryManager extends NamingManager
// Try to create an object using the factory. Return null on
// failure.
private static Object tryCreateObject (ObjectFactory factory,
- Object refInfo,
- Name name,
- Context nameCtx,
- Hashtable environment,
- Attributes attrs)
+ Object refInfo,
+ Name name,
+ Context nameCtx,
+ Hashtable environment,
+ Attributes attrs)
throws Exception
{
if (factory instanceof DirObjectFactory)
{
- DirObjectFactory dof = (DirObjectFactory) factory;
- return dof.getObjectInstance (refInfo, name, nameCtx,
- environment, attrs);
+ DirObjectFactory dof = (DirObjectFactory) factory;
+ return dof.getObjectInstance (refInfo, name, nameCtx,
+ environment, attrs);
}
else
return factory.getObjectInstance (refInfo, name, nameCtx,
- environment);
+ environment);
}
public static Object getObjectInstance (Object refInfo, Name name,
- Context nameCtx,
- Hashtable, ?> environment,
- Attributes attrs)
+ Context nameCtx,
+ Hashtable, ?> environment,
+ Attributes attrs)
throws Exception
{
ObjectFactory factory = null;
@@ -103,139 +103,139 @@ public class DirectoryManager extends NamingManager
factory = ofb.createObjectFactory (refInfo, environment);
else
{
- // First see if we have a Reference or a Referenceable. If so
- // we do some special processing.
- Object ref2 = refInfo;
- if (refInfo instanceof Referenceable)
- ref2 = ((Referenceable) refInfo).getReference ();
- if (ref2 instanceof Reference)
- {
- Reference ref = (Reference) ref2;
-
- // If we have a factory class name then we use that.
- String fClass = ref.getFactoryClassName ();
- if (fClass != null)
- {
- // Exceptions here are passed to the caller.
- Class k = Class.forName (fClass);
- factory = (ObjectFactory) k.newInstance ();
- }
- else
- {
- // There's no factory class name. If the address is a
- // StringRefAddr with address type `URL', then we try
- // the URL's context factory.
- Enumeration e = ref.getAll ();
- while (e.hasMoreElements ())
- {
- RefAddr ra = (RefAddr) e.nextElement ();
- if (ra instanceof StringRefAddr
- && "URL".equals (ra.getType ()))
- {
- factory
- = (ObjectFactory) getURLContext (refInfo,
- name,
- nameCtx,
- (String) ra.getContent (),
- environment);
- Object obj = tryCreateObject (factory,
- refInfo,
- name,
- nameCtx,
- environment,
- attrs);
- if (obj != null)
- return obj;
- }
- }
-
- // Have to try the next step.
- factory = null;
- }
- }
-
- // Now look at OBJECT_FACTORIES to find the factory.
- if (factory == null)
- {
- StringTokenizer tokens = getPlusPath (Context.OBJECT_FACTORIES,
- environment, nameCtx);
-
- while (tokens.hasMoreTokens ())
- {
- String klassName = tokens.nextToken ();
- Class k = Class.forName (klassName);
- factory = (ObjectFactory) k.newInstance ();
- Object obj = tryCreateObject (factory, refInfo, name,
- nameCtx, environment, attrs);
- if (obj != null)
- return obj;
- }
-
- // Failure.
- return refInfo;
- }
+ // First see if we have a Reference or a Referenceable. If so
+ // we do some special processing.
+ Object ref2 = refInfo;
+ if (refInfo instanceof Referenceable)
+ ref2 = ((Referenceable) refInfo).getReference ();
+ if (ref2 instanceof Reference)
+ {
+ Reference ref = (Reference) ref2;
+
+ // If we have a factory class name then we use that.
+ String fClass = ref.getFactoryClassName ();
+ if (fClass != null)
+ {
+ // Exceptions here are passed to the caller.
+ Class k = Class.forName (fClass);
+ factory = (ObjectFactory) k.newInstance ();
+ }
+ else
+ {
+ // There's no factory class name. If the address is a
+ // StringRefAddr with address type `URL', then we try
+ // the URL's context factory.
+ Enumeration e = ref.getAll ();
+ while (e.hasMoreElements ())
+ {
+ RefAddr ra = (RefAddr) e.nextElement ();
+ if (ra instanceof StringRefAddr
+ && "URL".equals (ra.getType ()))
+ {
+ factory
+ = (ObjectFactory) getURLContext (refInfo,
+ name,
+ nameCtx,
+ (String) ra.getContent (),
+ environment);
+ Object obj = tryCreateObject (factory,
+ refInfo,
+ name,
+ nameCtx,
+ environment,
+ attrs);
+ if (obj != null)
+ return obj;
+ }
+ }
+
+ // Have to try the next step.
+ factory = null;
+ }
+ }
+
+ // Now look at OBJECT_FACTORIES to find the factory.
+ if (factory == null)
+ {
+ StringTokenizer tokens = getPlusPath (Context.OBJECT_FACTORIES,
+ environment, nameCtx);
+
+ while (tokens.hasMoreTokens ())
+ {
+ String klassName = tokens.nextToken ();
+ Class k = Class.forName (klassName);
+ factory = (ObjectFactory) k.newInstance ();
+ Object obj = tryCreateObject (factory, refInfo, name,
+ nameCtx, environment, attrs);
+ if (obj != null)
+ return obj;
+ }
+
+ // Failure.
+ return refInfo;
+ }
}
if (factory == null)
return refInfo;
Object obj = tryCreateObject (factory, refInfo, name,
- nameCtx, environment, attrs);
+ nameCtx, environment, attrs);
return obj == null ? refInfo : obj;
}
public static DirStateFactory.Result getStateToBind (Object obj,
- Name name,
- Context nameCtx,
- Hashtable, ?> environment,
- Attributes attrs)
+ Name name,
+ Context nameCtx,
+ Hashtable, ?> environment,
+ Attributes attrs)
throws NamingException
{
StringTokenizer tokens = getPlusPath (Context.STATE_FACTORIES,
- environment, nameCtx);
+ environment, nameCtx);
while (tokens.hasMoreTokens ())
{
- String klassName = tokens.nextToken ();
- try
- {
- Class k = Class.forName (klassName);
- StateFactory factory = (StateFactory) k.newInstance ();
-
- DirStateFactory.Result result = null;
- if (factory instanceof DirStateFactory)
- {
- DirStateFactory dsf = (DirStateFactory) factory;
- result = dsf.getStateToBind (obj, name, nameCtx, environment,
- attrs);
- }
- else
- {
- Object o = factory.getStateToBind (obj, name, nameCtx,
- environment);
- if (o != null)
- result = new DirStateFactory.Result (o, attrs);
- }
- if (result != null)
- return result;
- }
- catch (ClassNotFoundException _1)
- {
- // Ignore it.
- }
- catch (ClassCastException _2)
- {
- // This means that the class we found was not an
- // ObjectFactory or that the factory returned something
- // which was not a Context.
- }
- catch (InstantiationException _3)
- {
- // If we couldn't instantiate the factory we might get
- // this.
- }
- catch (IllegalAccessException _4)
- {
- // Another possibility when instantiating.
- }
+ String klassName = tokens.nextToken ();
+ try
+ {
+ Class k = Class.forName (klassName);
+ StateFactory factory = (StateFactory) k.newInstance ();
+
+ DirStateFactory.Result result = null;
+ if (factory instanceof DirStateFactory)
+ {
+ DirStateFactory dsf = (DirStateFactory) factory;
+ result = dsf.getStateToBind (obj, name, nameCtx, environment,
+ attrs);
+ }
+ else
+ {
+ Object o = factory.getStateToBind (obj, name, nameCtx,
+ environment);
+ if (o != null)
+ result = new DirStateFactory.Result (o, attrs);
+ }
+ if (result != null)
+ return result;
+ }
+ catch (ClassNotFoundException _1)
+ {
+ // Ignore it.
+ }
+ catch (ClassCastException _2)
+ {
+ // This means that the class we found was not an
+ // ObjectFactory or that the factory returned something
+ // which was not a Context.
+ }
+ catch (InstantiationException _3)
+ {
+ // If we couldn't instantiate the factory we might get
+ // this.
+ }
+ catch (IllegalAccessException _4)
+ {
+ // Another possibility when instantiating.
+ }
}
return new DirStateFactory.Result (obj, attrs);
diff --git a/libjava/classpath/javax/naming/spi/InitialContextFactory.java b/libjava/classpath/javax/naming/spi/InitialContextFactory.java
index f715327..bd13c6e 100644
--- a/libjava/classpath/javax/naming/spi/InitialContextFactory.java
+++ b/libjava/classpath/javax/naming/spi/InitialContextFactory.java
@@ -58,7 +58,7 @@ public interface InitialContextFactory
{
/**
* Create a new initial context
- *
+ *
* @param environment the properties, used when creating the context. The
* implementing class will not modify the table nor keep the
* reference to it. After the method returns, the caller can safely
diff --git a/libjava/classpath/javax/naming/spi/InitialContextFactoryBuilder.java b/libjava/classpath/javax/naming/spi/InitialContextFactoryBuilder.java
index 31bafe6..12ee888 100644
--- a/libjava/classpath/javax/naming/spi/InitialContextFactoryBuilder.java
+++ b/libjava/classpath/javax/naming/spi/InitialContextFactoryBuilder.java
@@ -47,14 +47,14 @@ import javax.naming.NamingException;
* initial naming contexts. JNDI allows to specifiy different initial contexts
* at runtime. The user program can install its own initial context factory
* builder.
- *
+ *
* @see NamingManager#setInitialContextFactoryBuilder
*/
public interface InitialContextFactoryBuilder
{
/**
* Create the new initial context factory
- *
+ *
* @param environment the properties, used for creation of the initial
* context factory. The parameter is owned by the caller: it is safe to reuse
* the table for other purposes after the method returns.
diff --git a/libjava/classpath/javax/naming/spi/NamingManager.java b/libjava/classpath/javax/naming/spi/NamingManager.java
index cc8d46f..d974513 100644
--- a/libjava/classpath/javax/naming/spi/NamingManager.java
+++ b/libjava/classpath/javax/naming/spi/NamingManager.java
@@ -84,16 +84,16 @@ public class NamingManager
/**
* Checks if the initial context factory builder has been set.
- *
+ *
* @return true if the builder has been set
- *
+ *
* @see #setInitialContextFactoryBuilder(InitialContextFactoryBuilder)
*/
public static boolean hasInitialContextFactoryBuilder ()
{
return icfb != null;
}
-
+
/**
* Creates the initial context. If the initial object factory builder has
* been set with {@link #setObjectFactoryBuilder(ObjectFactoryBuilder)},
@@ -101,54 +101,54 @@ public class NamingManager
* for the property Context.INITIAL_CONTEXT_FACTORY first in the passed
* table and then in the system properties. The value of this property is
* uses as a class name to install the context factory. The corresponding
- * class must exist, be public and have the public parameterless constructor.
- *
+ * class must exist, be public and have the public parameterless constructor.
+ *
* @param environment the properties, used to create the context.
- *
+ *
* @return the created context
- *
+ *
* @throws NoInitialContextException if the initial builder is not set,
* the property Context.INITIAL_CONTEXT_FACTORY is missing of the
- * class, named by this property, cannot be instantiated.
+ * class, named by this property, cannot be instantiated.
* @throws NamingException if throws by the context factory
*/
public static Context getInitialContext (Hashtable, ?> environment)
throws NamingException
{
InitialContextFactory icf = null;
-
+
if (icfb != null)
icf = icfb.createInitialContextFactory(environment);
else
- {
- String java_naming_factory_initial = null;
- if (environment != null)
- java_naming_factory_initial
- = (String) environment.get (Context.INITIAL_CONTEXT_FACTORY);
- if (java_naming_factory_initial == null)
- java_naming_factory_initial =
- System.getProperty (Context.INITIAL_CONTEXT_FACTORY);
- if (java_naming_factory_initial == null)
- throw new
- NoInitialContextException ("Can't find property: "
- + Context.INITIAL_CONTEXT_FACTORY);
-
- try
- {
- icf = (InitialContextFactory)Class.forName
- (java_naming_factory_initial, true,
- Thread.currentThread().getContextClassLoader())
- .newInstance ();
- }
- catch (Exception exception)
- {
- NoInitialContextException e
- = new NoInitialContextException
- ("Can't load InitialContextFactory class: "
- + java_naming_factory_initial);
- e.setRootCause(exception);
- throw e;
- }
+ {
+ String java_naming_factory_initial = null;
+ if (environment != null)
+ java_naming_factory_initial
+ = (String) environment.get (Context.INITIAL_CONTEXT_FACTORY);
+ if (java_naming_factory_initial == null)
+ java_naming_factory_initial =
+ System.getProperty (Context.INITIAL_CONTEXT_FACTORY);
+ if (java_naming_factory_initial == null)
+ throw new
+ NoInitialContextException ("Can't find property: "
+ + Context.INITIAL_CONTEXT_FACTORY);
+
+ try
+ {
+ icf = (InitialContextFactory)Class.forName
+ (java_naming_factory_initial, true,
+ Thread.currentThread().getContextClassLoader())
+ .newInstance ();
+ }
+ catch (Exception exception)
+ {
+ NoInitialContextException e
+ = new NoInitialContextException
+ ("Can't load InitialContextFactory class: "
+ + java_naming_factory_initial);
+ e.setRootCause(exception);
+ throw e;
+ }
}
return icf.getInitialContext (environment);
@@ -178,7 +178,7 @@ public class NamingManager
* After the factory is instantiated, its method
* {@link ObjectFactory#getObjectInstance(Object, Name, Context, Hashtable)}
* is called to create and return the object instance.
- *
+ *
* @param refInfo passed to the factory
* @param name passed to the factory
* @param nameCtx passed to the factory
@@ -198,7 +198,7 @@ public class NamingManager
// The final default location, as specified in the documentation.
String finalPrefix = "com.sun.jndi.url";
-
+
CPStringBuilder allPrefixes = new CPStringBuilder();
String prefixes;
@@ -208,7 +208,7 @@ public class NamingManager
if (prefixes != null)
allPrefixes.append(prefixes);
}
-
+
prefixes = System.getProperty(Context.URL_PKG_PREFIXES);
if (prefixes != null)
{
@@ -224,7 +224,7 @@ public class NamingManager
allPrefixes.append(finalPrefix);
scheme = scheme + "." + scheme + "URLContextFactory";
-
+
StringTokenizer tokens = new StringTokenizer(allPrefixes.toString(), ":");
while (tokens.hasMoreTokens())
{
@@ -279,8 +279,8 @@ public class NamingManager
{
// Anything from getObjectInstance.
}
- }
-
+ }
+
return null;
}
@@ -322,9 +322,9 @@ public class NamingManager
}
}
return null;
- }
-
-
+ }
+
+
/**
*
* Creates the URL context for the given URL scheme id.
@@ -345,7 +345,7 @@ public class NamingManager
* After the factory is instantiated, its method
* {@link ObjectFactory#getObjectInstance(Object, Name, Context, Hashtable)}
* is called to create and return the object instance.
- *
+ *
* @param scheme the url scheme that must be supported by the given context
* @param environment the properties for creating the factory and context
* (may be null)
@@ -354,7 +354,7 @@ public class NamingManager
* context.
*/
public static Context getURLContext (String scheme,
- Hashtable, ?> environment)
+ Hashtable, ?> environment)
throws NamingException
{
return getURLContext (null, null, null, scheme, environment);
@@ -362,12 +362,12 @@ public class NamingManager
/**
* Sets the initial object factory builder.
- *
+ *
* @param builder the builder to set
- *
+ *
* @throws SecurityException if the builder cannot be installed due
* security restrictions.
- * @throws NamingException if the builder cannot be installed due other
+ * @throws NamingException if the builder cannot be installed due other
* reasons
* @throws IllegalStateException if setting the builder repeatedly
*/
@@ -385,7 +385,7 @@ public class NamingManager
}
static StringTokenizer getPlusPath (String property, Hashtable env,
- Context nameCtx)
+ Context nameCtx)
throws NamingException
{
String path = (String) env.get (property);
@@ -398,12 +398,12 @@ public class NamingManager
path += ":" + path2;
return new StringTokenizer (path != null ? path : "", ":");
}
-
+
/**
*
Creates an object for the specified name context, environment and
* referencing context object.
*
- * If the builder factory is set by
+ * If the builder factory is set by
* {@link #setObjectFactoryBuilder(ObjectFactoryBuilder)}, the call is
* delegated to that factory. Otherwise, the object is created using the
* following rules:
@@ -415,20 +415,20 @@ public class NamingManager
* are StringRefAddrs having the address type "URL", the object is
* created by the URL context factory. The used factory corresponds the
* the naming schema of the each URL. If the attempt to create
- * the object this way is not successful, the subsequent rule is
+ * the object this way is not successful, the subsequent rule is
* tried.
*
If the refInfo is not an instance of Reference or Referencable
* (for example, null), the object is created by the factories,
- * specified in the Context.OBJECT_FACTORIES property of the
+ * specified in the Context.OBJECT_FACTORIES property of the
* environment and the provider resource file, associated with the
* nameCtx. The value of this property is the colon separated list
* of the possible factories. If none of the factories can be
- * loaded, the refInfo is returned.
+ * loaded, the refInfo is returned.
*
*
*
The object factory must be public and have the public parameterless
* constructor.
- *
+ *
* @param refInfo the referencing object, for which the new object must be
* created (can be null). If not null, it is usually an instance of
* the {@link Reference} or {@link Referenceable}.
@@ -441,19 +441,19 @@ public class NamingManager
* @param environment contains additional information for creating the object.
* This paramter can be null if there is no need to provide any
* additional information.
- *
+ *
* @return the created object. If the creation fails, in some cases
* the parameter refInfo may be returned.
- *
+ *
* @throws NamingException if the attempt to name the new object has failed
* @throws Exception if the object factory throws it. The object factory
* only throws an exception if it does not want other factories
* to be used to create the object.
*/
public static Object getObjectInstance (Object refInfo,
- Name name,
- Context nameCtx,
- Hashtable, ?> environment)
+ Name name,
+ Context nameCtx,
+ Hashtable, ?> environment)
throws Exception
{
ObjectFactory factory = null;
@@ -462,102 +462,102 @@ public class NamingManager
factory = ofb.createObjectFactory (refInfo, environment);
else
{
- // First see if we have a Reference or a Referenceable. If so
- // we do some special processing.
- Object ref2 = refInfo;
- if (refInfo instanceof Referenceable)
- ref2 = ((Referenceable) refInfo).getReference ();
- if (ref2 instanceof Reference)
- {
- Reference ref = (Reference) ref2;
-
- // If we have a factory class name then we use that.
- String fClass = ref.getFactoryClassName ();
- if (fClass != null)
- {
- // Exceptions here are passed to the caller.
- Class k = Class.forName (fClass,
- true,
- Thread.currentThread().getContextClassLoader());
- factory = (ObjectFactory) k.newInstance ();
- }
- else
- {
- // There's no factory class name. If the address is a
- // StringRefAddr with address type `URL', then we try
- // the URL's context factory.
- Enumeration e = ref.getAll ();
- while (e.hasMoreElements ())
- {
- RefAddr ra = (RefAddr) e.nextElement ();
- if (ra instanceof StringRefAddr
- && "URL".equals (ra.getType ()))
- {
- factory
- = (ObjectFactory) getURLContext (refInfo,
- name,
- nameCtx,
- (String) ra.getContent (),
- environment);
- Object obj = factory.getObjectInstance (refInfo,
- name,
- nameCtx,
- environment);
- if (obj != null)
- return obj;
- }
- }
-
- // Have to try the next step.
- factory = null;
- }
- }
-
- // Now look at OBJECT_FACTORIES to find the factory.
- if (factory == null)
- {
- StringTokenizer tokens = getPlusPath (Context.OBJECT_FACTORIES,
- environment, nameCtx);
-
- while (tokens.hasMoreTokens ())
- {
- String klassName = tokens.nextToken ();
- Class k = Class.forName (klassName,
- true,
- Thread.currentThread().getContextClassLoader());
- factory = (ObjectFactory) k.newInstance ();
- Object obj = factory.getObjectInstance (refInfo, name,
- nameCtx, environment);
- if (obj != null)
- return obj;
- }
-
- // Failure.
- return refInfo;
- }
+ // First see if we have a Reference or a Referenceable. If so
+ // we do some special processing.
+ Object ref2 = refInfo;
+ if (refInfo instanceof Referenceable)
+ ref2 = ((Referenceable) refInfo).getReference ();
+ if (ref2 instanceof Reference)
+ {
+ Reference ref = (Reference) ref2;
+
+ // If we have a factory class name then we use that.
+ String fClass = ref.getFactoryClassName ();
+ if (fClass != null)
+ {
+ // Exceptions here are passed to the caller.
+ Class k = Class.forName (fClass,
+ true,
+ Thread.currentThread().getContextClassLoader());
+ factory = (ObjectFactory) k.newInstance ();
+ }
+ else
+ {
+ // There's no factory class name. If the address is a
+ // StringRefAddr with address type `URL', then we try
+ // the URL's context factory.
+ Enumeration e = ref.getAll ();
+ while (e.hasMoreElements ())
+ {
+ RefAddr ra = (RefAddr) e.nextElement ();
+ if (ra instanceof StringRefAddr
+ && "URL".equals (ra.getType ()))
+ {
+ factory
+ = (ObjectFactory) getURLContext (refInfo,
+ name,
+ nameCtx,
+ (String) ra.getContent (),
+ environment);
+ Object obj = factory.getObjectInstance (refInfo,
+ name,
+ nameCtx,
+ environment);
+ if (obj != null)
+ return obj;
+ }
+ }
+
+ // Have to try the next step.
+ factory = null;
+ }
+ }
+
+ // Now look at OBJECT_FACTORIES to find the factory.
+ if (factory == null)
+ {
+ StringTokenizer tokens = getPlusPath (Context.OBJECT_FACTORIES,
+ environment, nameCtx);
+
+ while (tokens.hasMoreTokens ())
+ {
+ String klassName = tokens.nextToken ();
+ Class k = Class.forName (klassName,
+ true,
+ Thread.currentThread().getContextClassLoader());
+ factory = (ObjectFactory) k.newInstance ();
+ Object obj = factory.getObjectInstance (refInfo, name,
+ nameCtx, environment);
+ if (obj != null)
+ return obj;
+ }
+
+ // Failure.
+ return refInfo;
+ }
}
if (factory == null)
return refInfo;
Object obj = factory.getObjectInstance (refInfo, name,
- nameCtx, environment);
+ nameCtx, environment);
return obj == null ? refInfo : obj;
}
/**
* Sets the initial context factory builder.
- *
+ *
* @param builder the builder to set
- *
+ *
* @throws SecurityException if the builder cannot be installed due
* security restrictions.
- * @throws NamingException if the builder cannot be installed due other
+ * @throws NamingException if the builder cannot be installed due other
* reasons
* @throws IllegalStateException if setting the builder repeatedly
- *
+ *
* @see #hasInitialContextFactoryBuilder()
*/
- public static void setInitialContextFactoryBuilder
+ public static void setInitialContextFactoryBuilder
(InitialContextFactoryBuilder builder)
throws NamingException
{
@@ -570,17 +570,17 @@ public class NamingManager
if (builder != null)
icfb = builder;
}
-
+
/**
* Creates a context in which the context operation must be continued.
* This method is used by operations on names that span multiple namespaces.
- *
+ *
* @param cpe the exception that triggered this continuation. This method
* obtains the environment ({@link CannotProceedException#getEnvironment()}
* and sets the environment property {@link #CPE} = cpe.
- *
+ *
* @return a non null context for continuing the operation
- *
+ *
* @throws NamingException if the naming problems have occured
*/
public static Context getContinuationContext (CannotProceedException cpe)
@@ -593,12 +593,12 @@ public class NamingManager
// TODO: Check if this implementation matches the API specification
try
{
- Object obj = getObjectInstance (cpe.getResolvedObj(),
- cpe.getAltName (),
- cpe.getAltNameCtx (),
- env);
- if (obj != null)
- return (Context) obj;
+ Object obj = getObjectInstance (cpe.getResolvedObj(),
+ cpe.getAltName (),
+ cpe.getAltNameCtx (),
+ env);
+ if (obj != null)
+ return (Context) obj;
}
catch (Exception _)
{
@@ -609,10 +609,10 @@ public class NamingManager
throw cpe;
}
-
+
/**
* Get the object state for binding.
- *
+ *
* @param obj the object, for that the binding state must be retrieved. Cannot
* be null.
* @param name the name of this object, related to the nameCtx. Can be null if
@@ -624,46 +624,46 @@ public class NamingManager
* @return the object state for binding, may be null if no changes are
* returned by the factory
* @throws NamingException
- */
+ */
public static Object getStateToBind (Object obj, Name name,
- Context nameCtx, Hashtable, ?> environment)
+ Context nameCtx, Hashtable, ?> environment)
throws NamingException
{
StringTokenizer tokens = getPlusPath (Context.STATE_FACTORIES,
- environment, nameCtx);
+ environment, nameCtx);
while (tokens.hasMoreTokens ())
{
- String klassName = tokens.nextToken ();
- try
- {
- Class k = Class.forName (klassName,
- true,
- Thread.currentThread().getContextClassLoader());
- StateFactory factory = (StateFactory) k.newInstance ();
- Object o = factory.getStateToBind (obj, name, nameCtx,
- environment);
- if (o != null)
- return o;
- }
- catch (ClassNotFoundException _1)
- {
- // Ignore it.
- }
- catch (ClassCastException _2)
- {
- // This means that the class we found was not an
- // ObjectFactory or that the factory returned something
- // which was not a Context.
- }
- catch (InstantiationException _3)
- {
- // If we couldn't instantiate the factory we might get
- // this.
- }
- catch (IllegalAccessException _4)
- {
- // Another possibility when instantiating.
- }
+ String klassName = tokens.nextToken ();
+ try
+ {
+ Class k = Class.forName (klassName,
+ true,
+ Thread.currentThread().getContextClassLoader());
+ StateFactory factory = (StateFactory) k.newInstance ();
+ Object o = factory.getStateToBind (obj, name, nameCtx,
+ environment);
+ if (o != null)
+ return o;
+ }
+ catch (ClassNotFoundException _1)
+ {
+ // Ignore it.
+ }
+ catch (ClassCastException _2)
+ {
+ // This means that the class we found was not an
+ // ObjectFactory or that the factory returned something
+ // which was not a Context.
+ }
+ catch (InstantiationException _3)
+ {
+ // If we couldn't instantiate the factory we might get
+ // this.
+ }
+ catch (IllegalAccessException _4)
+ {
+ // Another possibility when instantiating.
+ }
}
return obj;
diff --git a/libjava/classpath/javax/naming/spi/ObjectFactory.java b/libjava/classpath/javax/naming/spi/ObjectFactory.java
index 4534481..d44d2ff 100644
--- a/libjava/classpath/javax/naming/spi/ObjectFactory.java
+++ b/libjava/classpath/javax/naming/spi/ObjectFactory.java
@@ -54,7 +54,7 @@ public interface ObjectFactory
/**
* Creates the object, using the specified name and location information. The
* call of this method must be thread safe.
- *
+ *
* @param refObj may provide the reference and location information. Can be null.
* @param name the name of the new object in the scope of the specified naming
* context. Can be null if the name is not specified.
@@ -67,8 +67,8 @@ public interface ObjectFactory
* @return the newly created object or null if the object cannot be created
* @throws Exception if this factory suggest not to try creating of this
* object by other alternative factories
- *
- * @see NamingManager#getObjectInstance(Object, Name, Context, Hashtable)
+ *
+ * @see NamingManager#getObjectInstance(Object, Name, Context, Hashtable)
*/
Object getObjectInstance (Object refObj, Name name, Context nameCtx,
Hashtable, ?> environment)
diff --git a/libjava/classpath/javax/naming/spi/ObjectFactoryBuilder.java b/libjava/classpath/javax/naming/spi/ObjectFactoryBuilder.java
index 6a528b1..e0886d1 100644
--- a/libjava/classpath/javax/naming/spi/ObjectFactoryBuilder.java
+++ b/libjava/classpath/javax/naming/spi/ObjectFactoryBuilder.java
@@ -43,19 +43,19 @@ import java.util.Hashtable;
import javax.naming.NamingException;
import javax.naming.Reference;
import javax.naming.Referenceable;
-
+
/**
* Represents the builder that creates the object factories.
- *
+ *
* @see NamingManager#setObjectFactoryBuilder(ObjectFactoryBuilder)
- *
+ *
* @author Warren Levy (warrenl@redhat.com)
*/
public interface ObjectFactoryBuilder
{
/**
* Create a new object using the supplied environment.
- *
+ *
* @param refInfo the referencing object, for which the new object must be
* created (can be null). If not null, it is usually an instance of
* the {@link Reference} or {@link Referenceable}.
@@ -65,6 +65,6 @@ public interface ObjectFactoryBuilder
* @throws NamingException
*/
ObjectFactory createObjectFactory(Object refInfo,
- Hashtable, ?> environment)
- throws NamingException;
+ Hashtable, ?> environment)
+ throws NamingException;
}
diff --git a/libjava/classpath/javax/naming/spi/ResolveResult.java b/libjava/classpath/javax/naming/spi/ResolveResult.java
index d5051a5..3945b9b 100644
--- a/libjava/classpath/javax/naming/spi/ResolveResult.java
+++ b/libjava/classpath/javax/naming/spi/ResolveResult.java
@@ -43,12 +43,12 @@ import java.io.Serializable;
import javax.naming.CompositeName;
import javax.naming.InvalidNameException;
import javax.naming.Name;
-
+
/**
* Stores the partial resolution of the name. This class contains the
* object to which part of the name has been resolved and the remaining,
- * unresolved part of this name.
- *
+ * unresolved part of this name.
+ *
* @author Warren Levy (warrenl@redhat.com)
*/
@@ -61,22 +61,22 @@ public class ResolveResult implements Serializable
* The object, to that part of the name has been resolved.
*/
protected Object resolvedObj;
-
+
/**
* The remaining, unresolved part of the name.
*/
protected Name remainingName;
-
+
/**
* Create the unitialised instance with both parts being null.
*/
protected ResolveResult()
{
}
-
+
/**
* Create the initialised instance
- *
+ *
* @param resolved the object, to that the name is partially resolved
* @param remaining the remaining unresolved part of the name.
*/
@@ -88,7 +88,7 @@ public class ResolveResult implements Serializable
remainingName = new CompositeName ();
try
{
- remainingName.add (remaining);
+ remainingName.add (remaining);
}
catch (InvalidNameException _)
{
@@ -97,7 +97,7 @@ public class ResolveResult implements Serializable
/**
* Create the initialised instance
- *
+ *
* @param resolved the object, to that the name is partially resolved
* @param remaining the remaining unresolved part of the name.
*/
@@ -109,7 +109,7 @@ public class ResolveResult implements Serializable
/**
* Get the remaining unresolved part of the name
- *
+ *
* @return the remaining unresolved part of the name.
*/
public Name getRemainingName()
@@ -119,17 +119,17 @@ public class ResolveResult implements Serializable
/**
* Get the object to that the name was partially resolved
- *
+ *
* @return the object, to that the name is partially resolved
*/
public Object getResolvedObj()
{
return resolvedObj;
}
-
+
/**
* Set the remaining unresolved name.
- *
+ *
* @param name the name being set. The passed parameter is cloned, so the
* caller can reuse or modify it after the method returns.
*/
@@ -137,17 +137,17 @@ public class ResolveResult implements Serializable
{
remainingName = (Name) name.clone();
}
-
+
/**
* Append the name to the end of the resolved name.
- *
+ *
* @param name the name to append
*/
public void appendRemainingName(Name name)
{
try
{
- remainingName.addAll(name);
+ remainingName.addAll(name);
}
catch (InvalidNameException _)
{
@@ -156,14 +156,14 @@ public class ResolveResult implements Serializable
/**
* Append the name to the end of the resolved name.
- *
+ *
* @param name the name to append
*/
public void appendRemainingComponent(String name)
{
try
{
- remainingName.add(name);
+ remainingName.add(name);
}
catch (InvalidNameException _)
{
@@ -172,7 +172,7 @@ public class ResolveResult implements Serializable
/**
* Set the object to that the part of the name has been resolved.
- *
+ *
* @param obj the object, to that the name has been partially resolved.
*/
public void setResolvedObj(Object obj)
diff --git a/libjava/classpath/javax/naming/spi/Resolver.java b/libjava/classpath/javax/naming/spi/Resolver.java
index 67174cf..7a009fa 100644
--- a/libjava/classpath/javax/naming/spi/Resolver.java
+++ b/libjava/classpath/javax/naming/spi/Resolver.java
@@ -41,19 +41,19 @@ package javax.naming.spi;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
-
+
/**
*
Represents the object, capable for the at least partial name resolution.
* The object is not necessay capable for the complete name resolution and
* need not implement the {@link Context}.
*
* Both passed parameters and returned results are owned by the caller.
- *
+ *
* @author Warren Levy (warrenl@redhat.com)
*/
public interface Resolver
{
- ResolveResult resolveToClass(Name name,
+ ResolveResult resolveToClass(Name name,
Class extends Context> contextType)
throws NamingException;
ResolveResult resolveToClass(String name,
diff --git a/libjava/classpath/javax/naming/spi/StateFactory.java b/libjava/classpath/javax/naming/spi/StateFactory.java
index 0c48309..d674803 100644
--- a/libjava/classpath/javax/naming/spi/StateFactory.java
+++ b/libjava/classpath/javax/naming/spi/StateFactory.java
@@ -43,13 +43,13 @@ import java.util.Hashtable;
import javax.naming.Context;
import javax.naming.Name;
import javax.naming.NamingException;
-
+
/**
* Represents a factory, producing the object states for binding. The operation,
* performed by this factory, is the reverse operation with related to the
* operation, performed by the {@link ObjectFactory}. Classes, implementing
* this interface, must be public and have public parameterless constructor.
- *
+ *
* @see DirStateFactory
* @see ObjectFactory
* @author Warren Levy (warrenl@redhat.com)
@@ -58,7 +58,7 @@ public interface StateFactory
{
/**
* Get the object state for binding.
- *
+ *
* @param obj the object, for that the binding state must be retrieved. Cannot
* be null.
* @param name the name of this object, related to the nameCtx. Can be null if
@@ -70,10 +70,10 @@ public interface StateFactory
* @return the object state for binding, may be null if no changes are
* returned by the factory
* @throws NamingException
- *
+ *
* @see NamingManager#getStateToBind
* @see DirectoryManager#getStateToBind
*/
Object getStateToBind(Object obj, Name name, Context nameCtx,
- Hashtable, ?> environment) throws NamingException;
+ Hashtable, ?> environment) throws NamingException;
}
diff --git a/libjava/classpath/javax/net/ssl/CertPathTrustManagerParameters.java b/libjava/classpath/javax/net/ssl/CertPathTrustManagerParameters.java
index b6dc135..c23d654 100644
--- a/libjava/classpath/javax/net/ssl/CertPathTrustManagerParameters.java
+++ b/libjava/classpath/javax/net/ssl/CertPathTrustManagerParameters.java
@@ -1,4 +1,4 @@
-/* CertPathTrustManagerParameters.java --
+/* CertPathTrustManagerParameters.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/libjava/classpath/javax/net/ssl/KeyManagerFactory.java b/libjava/classpath/javax/net/ssl/KeyManagerFactory.java
index 33f2fda9..d951951 100644
--- a/libjava/classpath/javax/net/ssl/KeyManagerFactory.java
+++ b/libjava/classpath/javax/net/ssl/KeyManagerFactory.java
@@ -134,7 +134,7 @@ public class KeyManagerFactory
/**
* Create an instance of the named key manager factory, from the first
* provider that implements it.
- *
+ *
* @param algorithm The type of key manager factory to get.
* @return An appropriate implementation of that algoritm.
* @throws NoSuchAlgorithmException If no provider implements the requested
@@ -164,7 +164,7 @@ public class KeyManagerFactory
/**
* Create an instance of the named key manager factory, from the named
* provider.
- *
+ *
* @param algorithm The type of key manager factory to get.
* @param provider The name of the provider to get the implementation from.
* @return An appropriate implementation of that algorithm.
@@ -190,7 +190,7 @@ public class KeyManagerFactory
/**
* Create an instance of the named key manager factory, from the given
* provider.
- *
+ *
* @param algorithm The type of key manager factory to get.
* @param provider The provider to get the implementation from.
* @return An appropriate implementation of that algorithm.
diff --git a/libjava/classpath/javax/net/ssl/KeyStoreBuilderParameters.java b/libjava/classpath/javax/net/ssl/KeyStoreBuilderParameters.java
index 2aa665e..26b6142 100644
--- a/libjava/classpath/javax/net/ssl/KeyStoreBuilderParameters.java
+++ b/libjava/classpath/javax/net/ssl/KeyStoreBuilderParameters.java
@@ -1,4 +1,4 @@
-/* KeyStoreBuilderParameters.java --
+/* KeyStoreBuilderParameters.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/libjava/classpath/javax/net/ssl/SSLContext.java b/libjava/classpath/javax/net/ssl/SSLContext.java
index dcc8508..9a6e9a5 100644
--- a/libjava/classpath/javax/net/ssl/SSLContext.java
+++ b/libjava/classpath/javax/net/ssl/SSLContext.java
@@ -94,7 +94,7 @@ public class SSLContext
/**
* Get an instance of a context for the specified protocol from the first
* provider that implements it.
- *
+ *
* @param protocol The name of the protocol to get a context for.
* @return The new context.
* @throws NoSuchAlgorithmException If no provider implements the given
@@ -124,7 +124,7 @@ public class SSLContext
/**
* Get an instance of a context for the specified protocol from the named
* provider.
- *
+ *
* @param protocol The name of the protocol to get a context for.
* @param provider The name of the provider to get the implementation from.
* @return The new context.
@@ -149,7 +149,7 @@ public class SSLContext
/**
* Get an instance of a context for the specified protocol from the specified
* provider.
- *
+ *
* @param protocol The name of the protocol to get a context for.
* @param provider The name of the provider to get the implementation from.
* @return The new context.
diff --git a/libjava/classpath/javax/net/ssl/SSLEngine.java b/libjava/classpath/javax/net/ssl/SSLEngine.java
index efab972..2ba7bb6 100644
--- a/libjava/classpath/javax/net/ssl/SSLEngine.java
+++ b/libjava/classpath/javax/net/ssl/SSLEngine.java
@@ -73,7 +73,7 @@ public abstract class SSLEngine
this.peerPort = peerPort;
}
-
+
/**
* Begin, or restart, the SSL handshake.
@@ -359,8 +359,8 @@ public abstract class SSLEngine
* negative, or if 'length+offset' is greater than 'sinks.length'.
*/
public abstract SSLEngineResult unwrap (ByteBuffer source,
- ByteBuffer[] sinks, int offset,
- int length)
+ ByteBuffer[] sinks, int offset,
+ int length)
throws javax.net.ssl.SSLException;
/**
@@ -436,7 +436,7 @@ public abstract class SSLEngine
* negative, or if 'length+offset' is greater than 'sources.length'.
*/
public abstract SSLEngineResult wrap (ByteBuffer[] sources, int offset,
- int length, ByteBuffer sink)
+ int length, ByteBuffer sink)
throws SSLException;
}
diff --git a/libjava/classpath/javax/net/ssl/SSLEngineResult.java b/libjava/classpath/javax/net/ssl/SSLEngineResult.java
index 0d6a435..4d15258 100644
--- a/libjava/classpath/javax/net/ssl/SSLEngineResult.java
+++ b/libjava/classpath/javax/net/ssl/SSLEngineResult.java
@@ -1,4 +1,4 @@
-/* SSLEngineResult.java --
+/* SSLEngineResult.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -64,7 +64,7 @@ public class SSLEngineResult
* null, or if either integer is negative.
*/
public SSLEngineResult (Status status, HandshakeStatus handshakeStatus,
- int bytesConsumed, int bytesProduced)
+ int bytesConsumed, int bytesProduced)
{
if (status == null)
throw new IllegalArgumentException ("'status' may not be null");
@@ -80,7 +80,7 @@ public class SSLEngineResult
this.bytesProduced = bytesProduced;
}
-
+
/**
* An enumeration of possible general states.
@@ -143,7 +143,7 @@ public class SSLEngineResult
NEED_UNWRAP
}
-
+
/**
* Returns the number of bytes consumed by the previous operation.
@@ -188,7 +188,7 @@ public class SSLEngineResult
public String toString ()
{
return (super.toString () + " [ status: " + status + "; handshakeStatus: "
- + handshakeStatus + "; bytesConsumed: " + bytesConsumed
- + "; bytesProduced: " + bytesProduced + " ]");
+ + handshakeStatus + "; bytesConsumed: " + bytesConsumed
+ + "; bytesProduced: " + bytesProduced + " ]");
}
}
diff --git a/libjava/classpath/javax/net/ssl/SSLException.java b/libjava/classpath/javax/net/ssl/SSLException.java
index 3213b0b..c726717 100644
--- a/libjava/classpath/javax/net/ssl/SSLException.java
+++ b/libjava/classpath/javax/net/ssl/SSLException.java
@@ -45,7 +45,7 @@ import java.io.IOException;
* exception is thrown instead of this exception.
*
* @author Casey Marshall (rsdio@metastatic.org)
- *
+ *
* @since 1.4
*/
public class SSLException extends IOException
@@ -64,7 +64,7 @@ public class SSLException extends IOException
{
super(message);
}
-
+
/**
* Create a new instance with a descriptive error message and
* a cause.
@@ -77,7 +77,7 @@ public class SSLException extends IOException
super(message);
initCause(cause);
}
-
+
/**
* Create a new instance with a cause.
* @param cause the cause
diff --git a/libjava/classpath/javax/net/ssl/TrustManagerFactory.java b/libjava/classpath/javax/net/ssl/TrustManagerFactory.java
index f868ae7..e08501a 100644
--- a/libjava/classpath/javax/net/ssl/TrustManagerFactory.java
+++ b/libjava/classpath/javax/net/ssl/TrustManagerFactory.java
@@ -96,7 +96,7 @@ public class TrustManagerFactory
/**
* Returns an instance of a trust manager factory for the given algorithm from
* the first provider that implements it.
- *
+ *
* @param algorithm The name of the algorithm to get.
* @return The instance of the trust manager factory.
* @throws NoSuchAlgorithmException If no provider implements the given
@@ -126,7 +126,7 @@ public class TrustManagerFactory
/**
* Returns an instance of a trust manager factory for the given algorithm from
* the named provider.
- *
+ *
* @param algorithm The name of the algorithm to get.
* @param provider The name of the provider to get the instance from.
* @return The instance of the trust manager factory.
@@ -152,7 +152,7 @@ public class TrustManagerFactory
/**
* Returns an instance of a trust manager factory for the given algorithm from
* the specified provider.
- *
+ *
* @param algorithm The name of the algorithm to get.
* @param provider The provider to get the instance from.
* @return The instance of the trust manager factory.
diff --git a/libjava/classpath/javax/net/ssl/X509ExtendedKeyManager.java b/libjava/classpath/javax/net/ssl/X509ExtendedKeyManager.java
index ccd146f..0e7c4d4 100644
--- a/libjava/classpath/javax/net/ssl/X509ExtendedKeyManager.java
+++ b/libjava/classpath/javax/net/ssl/X509ExtendedKeyManager.java
@@ -1,4 +1,4 @@
-/* X509ExtendedKeyManager.java --
+/* X509ExtendedKeyManager.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is a part of GNU Classpath.
diff --git a/libjava/classpath/javax/print/AttributeException.java b/libjava/classpath/javax/print/AttributeException.java
index 1251b00..9a72c53 100644
--- a/libjava/classpath/javax/print/AttributeException.java
+++ b/libjava/classpath/javax/print/AttributeException.java
@@ -46,29 +46,29 @@ import javax.print.attribute.Attribute;
* provide further information of printing errors if unsupported
* attribute classes or values of attributes are involved.
*
- * There exists no PrintException class implementing this
- * interface. Providing these extensions in PrintException
- * subclasses is left to the concrete print service implementation.
- *
- *
+ * There exists no PrintException class implementing this
+ * interface. Providing these extensions in PrintException
+ * subclasses is left to the concrete print service implementation.
+ *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface AttributeException
{
/**
* Returns the unsupported printing attribute classes for a print service
- * that does not support the attribute category at all. The returned
+ * that does not support the attribute category at all. The returned
* class instances are sublcasses of the base interface {@link Attribute}.
- *
+ *
* @return The unsupported attribute classes, or null if there
* are no such attribute classes.
*/
Class[] getUnsupportedAttributes();
-
+
/**
* Returns the unsupported attribute values of printing attributes a specific
* print service does support but not the particular provided value.
- *
+ *
* @return The unsupported attribute values, or null if there
* are no such attributes values.
*/
diff --git a/libjava/classpath/javax/print/CancelablePrintJob.java b/libjava/classpath/javax/print/CancelablePrintJob.java
index 39a2544..60ad584 100644
--- a/libjava/classpath/javax/print/CancelablePrintJob.java
+++ b/libjava/classpath/javax/print/CancelablePrintJob.java
@@ -39,18 +39,18 @@ exception statement from your version. */
package javax.print;
/**
- * CancelablePrintJob represents a print job which can be
+ * CancelablePrintJob represents a print job which can be
* canceled.
*
- * It is implemented by DocPrintJobs which support to cancel
- * a print job during processing. Clients need to explicitly test if a given
- * DocPrintJob object from a print service implementes this
+ * It is implemented by DocPrintJobs which support to cancel
+ * a print job during processing. Clients need to explicitly test if a given
+ * DocPrintJob object from a print service implementes this
* interface and therefore supports cancelling.
*
* Implementor of java print services should implement this interface if
* cancelling is supported by the underlying print system. If implemented the
- * corresponding print job event
- * {@link javax.print.event.PrintJobEvent#JOB_CANCELED} should be delivered to
+ * corresponding print job event
+ * {@link javax.print.event.PrintJobEvent#JOB_CANCELED} should be delivered to
* registered clients. Implementations have to be thread-safe.
*
*
diff --git a/libjava/classpath/javax/print/Doc.java b/libjava/classpath/javax/print/Doc.java
index c489de1..d8b6ff0 100644
--- a/libjava/classpath/javax/print/Doc.java
+++ b/libjava/classpath/javax/print/Doc.java
@@ -45,29 +45,29 @@ import java.io.Reader;
import javax.print.attribute.DocAttributeSet;
/**
- * Doc specifies the interface for print services how to obtain
- * the print data and document specific attributes for printing.
+ * Doc specifies the interface for print services how to obtain
+ * the print data and document specific attributes for printing.
*
- * The print data is always passed to a {@link javax.print.DocPrintJob} object
+ * The print data is always passed to a {@link javax.print.DocPrintJob} object
* as a Doc object which allows the print services to:
*
*
Determine the actual document format of the supplied print data. This
* is supplied as a {@link javax.print.DocFlavor} object with the MIME type
* and the representation class of the print data.
*
Obtain the print data either in its representation class or depending
- * on the document format through convenience methods as a
+ * on the document format through convenience methods as a
* {@link java.io.Reader} or an {@link java.io.InputStream}.
*
Obtain the document's attribute set specifying the attributes which
* apply to this document instance.
- *
+ *
*
- * Every method of a Doc implementation has to return always the
- * same object on every method call. Therefore if the print job consumes the
- * print data via a stream or a reader object it can read only once the
- * supplied print data. Implementations of this interface have to be thread
- * safe.
+ * Every method of a Doc implementation has to return always the
+ * same object on every method call. Therefore if the print job consumes the
+ * print data via a stream or a reader object it can read only once the
+ * supplied print data. Implementations of this interface have to be thread
+ * safe.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface Doc
@@ -75,20 +75,20 @@ public interface Doc
/**
* Returns the unmodifiable view of the attributes of this doc object.
*
- * The attributes of this doc's attributes set overrides attributes of
- * the same category in the print job's attribute set. If an attribute
+ * The attributes of this doc's attributes set overrides attributes of
+ * the same category in the print job's attribute set. If an attribute
* is not available in this doc's attributes set or null
* is returned the attributes of the same category of the print job are
- * used.
+ * used.
*
- *
+ *
* @return The unmodifiable attributes set, or null.
*/
DocAttributeSet getAttributes();
/**
* Returns the flavor of this doc objects print data.
- *
+ *
* @return The document flavor.
*/
DocFlavor getDocFlavor();
@@ -100,7 +100,7 @@ public interface Doc
* document flavor ({@link DocFlavor#getRepresentationClassName()})
* and can be cast to this representation class.
*
- *
+ *
* @return The print data in the representation class.
* @throws IOException if representation class is a stream and I/O
* exception occures.
@@ -118,10 +118,10 @@ public interface Doc
*
java.io.Reader
*
* otherwise this method returns null.
- *
- *
+ *
+ *
* @return The Reader object, or null.
- *
+ *
* @throws IOException if an error occurs.
*/
Reader getReaderForText() throws IOException;
@@ -136,11 +136,11 @@ public interface Doc
*
java.io.InputStream
*
* otherwise this method returns null.
- *
- *
+ *
+ *
* @return The InputStream object, or null.
- *
+ *
* @throws IOException if an error occurs.
*/
InputStream getStreamForBytes() throws IOException;
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/print/DocFlavor.java b/libjava/classpath/javax/print/DocFlavor.java
index 6030595..b95f462 100644
--- a/libjava/classpath/javax/print/DocFlavor.java
+++ b/libjava/classpath/javax/print/DocFlavor.java
@@ -49,71 +49,71 @@ import java.util.Map;
import java.util.TreeMap;
/**
- * DocFlavor provides a description of the format in which the
+ * DocFlavor provides a description of the format in which the
* print data will be supplied in a print job to the print service.
*
* A doc flavor consists of two parts:
*
*
- * The MIME type (Multipurpose Internet Mail Extensions types as described
+ * The MIME type (Multipurpose Internet Mail Extensions types as described
* in RFC 2045/2046) specifying the media format of the print data.
*
- * The representation class name which is the fully qualified name of the
- * class providing the print data to the print job. For example if the print
- * data is supplied as a byte array the representation class name will be
+ * The representation class name which is the fully qualified name of the
+ * class providing the print data to the print job. For example if the print
+ * data is supplied as a byte array the representation class name will be
* "[B" or for an input stream "java.io.InputStream".
*
*
- * The DocFlavor class is therefore used in several places in the
- * Java Print Service API. A print service provides its supported document
+ * The DocFlavor class is therefore used in several places in the
+ * Java Print Service API. A print service provides its supported document
* flavors as an array of DocFlavor objects and a print job gets the flavor of
* its data to print from the Doc object provided as a DocFlavor
* instance.
*
*
- * It has to be differentiated between client formatted and service
- * formatted print data. Client formatted print data is already provided
- * formatted by the client e.g. in an image format or as postscript. For
- * service formatted print data, the Java Print Service instance produces
- * the formatted print data. Here the doc flavor's representation class name
- * does specify an interface instead of the actual print data source. The
+ * It has to be differentiated between client formatted and service
+ * formatted print data. Client formatted print data is already provided
+ * formatted by the client e.g. in an image format or as postscript. For
+ * service formatted print data, the Java Print Service instance produces
+ * the formatted print data. Here the doc flavor's representation class name
+ * does specify an interface instead of the actual print data source. The
* print service will call the methods of the given implementation of this
* interface with a special Graphics object capable of producing formatted
* print data from the graphics routines inside the interface methods.
*
*
*
Client formatted print data document flavors
- * The print service uses the representation class of the doc flavor to know
- * how to retrieve the print data. If the representation class is a
- * URL it will open the URL to read the print data from it. If it is
- * a byte[] it will directly use the array and send it to the
- * printer. There are predefined doc flavor as inner class for the most common
+ * The print service uses the representation class of the doc flavor to know
+ * how to retrieve the print data. If the representation class is a
+ * URL it will open the URL to read the print data from it. If it is
+ * a byte[] it will directly use the array and send it to the
+ * printer. There are predefined doc flavor as inner class for the most common
* representation class types:
*
- *
Character arrays (char[]): The characters of the array
+ *
Character arrays (char[]): The characters of the array
* represent the print data.
- *
Character streams (java.io.Reader): The whole characters
+ *
Character streams (java.io.Reader): The whole characters
* read from the stream represent the print data.
- *
String (java.lang.String): The characters of the String
+ *
String (java.lang.String): The characters of the String
* represent the print data.
- *
Byte arrays (byte[]): The bytes of the array represent the
+ *
Byte arrays (byte[]): The bytes of the array represent the
* print data. Encoding if text content is given in the mime type.
- *
Byte streams (java.io.InputStream): The whole bytes read
- * from the stream represent the print data. If text content the encoding is
+ *
Byte streams (java.io.InputStream): The whole bytes read
+ * from the stream represent the print data. If text content the encoding is
* specified in the mime type.
- *
Uniform Resource Locator (java.net.URL): The bytes read
- * from the stream through opening of the URL represent the print data.
+ *
Uniform Resource Locator (java.net.URL): The bytes read
+ * from the stream through opening of the URL represent the print data.
* If text content the encoding is specified in the mime type.
*
*
*
*
Service formatted print data document flavors
* The print service uses the provided object implementing the interface
- * specified by the representation class to produce the formatted print data.
- * The mime type of service formatted data is always
- * "application/x-java-jvm-local-objectref" to signal the local
+ * specified by the representation class to produce the formatted print data.
+ * The mime type of service formatted data is always
+ * "application/x-java-jvm-local-objectref" to signal the local
* reference to the print data object implementing the interface. Predefined
- * doc flavor classes exist as an inner class for the three available interface
+ * doc flavor classes exist as an inner class for the three available interface
* to produce print data:
*
Printable object (java.awt.print.Printable): A printable object
* is supplied to the print service. The print service will call the methods of
* the interface with a Grahics object to produce the formatted print data.
- *
Renderable Image object
+ *
Renderable Image object
* (java.awt.image.renderable.RenderableImage): A renderable image
* object is supplied to the print service. The print service calls methods of
* this interface to obtain the image to be printed.
*
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -137,9 +137,9 @@ public class DocFlavor implements Cloneable, Serializable
/**
* Predefined static DocFlavor objects for document
* types which use a byte array for the print data representation.
- *
All the defined doc flavors have a print data representation
+ *
All the defined doc flavors have a print data representation
* classname of "[B" (byte array).
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class BYTE_ARRAY
@@ -206,7 +206,7 @@ public class DocFlavor implements Cloneable, Serializable
/**
* Byte array doc flavor with a MIME Type of "text/plain; charset=us-ascii".
*/
- public static final BYTE_ARRAY TEXT_PLAIN_US_ASCII = new BYTE_ARRAY("text/plain; charset=us-ascii");
+ public static final BYTE_ARRAY TEXT_PLAIN_US_ASCII = new BYTE_ARRAY("text/plain; charset=us-ascii");
/**
* Byte array doc flavor with a MIME Type of "text/plain; charset=utf-16".
*/
@@ -223,13 +223,13 @@ public class DocFlavor implements Cloneable, Serializable
* Byte array doc flavor with a MIME Type of "text/plain; charset=utf-8".
*/
public static final BYTE_ARRAY TEXT_PLAIN_UTF_8 = new BYTE_ARRAY("text/plain; charset=utf-8");
-
+
/**
- * Constructor for doc flavor objects with the given MIME type
+ * Constructor for doc flavor objects with the given MIME type
* and a print data representation class name of "[B".
- *
+ *
* @param mimeType the mime type string
- *
+ *
* @throws NullPointerException if mimeType is null.
* @throws IllegalArgumentException if mimeType has the wrong syntax.
*/
@@ -238,20 +238,20 @@ public class DocFlavor implements Cloneable, Serializable
super(mimeType, "[B");
}
}
-
+
/**
* Predefined static DocFlavor objects for document
* types which use a char array for the print data representation.
- *
All the defined doc flavors have a print data representation
+ *
All the defined doc flavors have a print data representation
* classname of "[C" (char array).
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class CHAR_ARRAY
extends DocFlavor
{
private static final long serialVersionUID = -8720590903724405128L;
-
+
/**
* Char array doc flavor with a MIME Type of "text/html; charset=utf-16".
*/
@@ -262,11 +262,11 @@ public class DocFlavor implements Cloneable, Serializable
public static final DocFlavor.CHAR_ARRAY TEXT_PLAIN = new CHAR_ARRAY("text/plain; charset=utf-16");
/**
- * Constructor for doc flavor objects with the given MIME type
+ * Constructor for doc flavor objects with the given MIME type
* and a print data representation class name of "[C".
- *
+ *
* @param mimeType the mime type string
- *
+ *
* @throws NullPointerException if mimeType is null.
* @throws IllegalArgumentException if mimeType has the wrong syntax.
*/
@@ -275,13 +275,13 @@ public class DocFlavor implements Cloneable, Serializable
super(mimeType, "[C");
}
}
-
+
/**
* Predefined static DocFlavor objects for document
* types which use an InputStream to retrieve the print data.
- *
All the defined doc flavors have a print data representation
+ *
All the defined doc flavors have a print data representation
* classname of "java.io.InputStream".
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class INPUT_STREAM
@@ -365,13 +365,13 @@ public class DocFlavor implements Cloneable, Serializable
* InputStream doc flavor with a MIME Type of "text/plain; charset=utf-8".
*/
public static final INPUT_STREAM TEXT_PLAIN_UTF_8 = new INPUT_STREAM("text/plain; charset=utf-8");
-
+
/**
- * Constructor for doc flavor objects with the given MIME type
+ * Constructor for doc flavor objects with the given MIME type
* and a print data representation class name of "java.io.InputStream".
- *
+ *
* @param mimeType the mime type string
- *
+ *
* @throws NullPointerException if mimeType is null.
* @throws IllegalArgumentException if mimeType has the wrong syntax.
*/
@@ -380,13 +380,13 @@ public class DocFlavor implements Cloneable, Serializable
super(mimeType, "java.io.InputStream");
}
}
-
+
/**
* Predefined static DocFlavor objects for document
* types which use an Reader to retrieve the print data.
- *
All the defined doc flavors have a print data representation
+ *
All the defined doc flavors have a print data representation
* classname of "java.io.Reader".
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class READER
@@ -402,13 +402,13 @@ public class DocFlavor implements Cloneable, Serializable
* Reader doc flavor with a MIME Type of "text/plain; charset=utf-16".
*/
public static final DocFlavor.READER TEXT_PLAIN = new READER("text/plain; charset=utf-16");
-
+
/**
- * Constructor for doc flavor objects with the given MIME type
+ * Constructor for doc flavor objects with the given MIME type
* and a print data representation class name of "java.io.Reader".
- *
+ *
* @param mimeType the mime type string
- *
+ *
* @throws NullPointerException if mimeType is null.
* @throws IllegalArgumentException if mimeType has the wrong syntax.
*/
@@ -417,13 +417,13 @@ public class DocFlavor implements Cloneable, Serializable
super(mimeType, "java.io.Reader");
}
}
-
+
/**
* Predefined static DocFlavor objects for document
* types which use service formatted print data.
- *
All the defined doc flavors have a MIME type of
+ *
All the defined doc flavors have a MIME type of
* "application/x-java-jvm-local-objectref".
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class SERVICE_FORMATTED
@@ -432,28 +432,28 @@ public class DocFlavor implements Cloneable, Serializable
private static final long serialVersionUID = 6181337766266637256L;
/**
- * Service formatted doc flavor with a representation class of
+ * Service formatted doc flavor with a representation class of
* "java.awt.print.Pageable".
*/
public static final DocFlavor.SERVICE_FORMATTED PAGEABLE = new SERVICE_FORMATTED("java.awt.print.Pageable");
/**
- * Service formatted doc flavor with a representation class of
+ * Service formatted doc flavor with a representation class of
* "java.awt.print.Printable".
*/
public static final DocFlavor.SERVICE_FORMATTED PRINTABLE = new SERVICE_FORMATTED("java.awt.print.Printable");
/**
- * Service formatted doc flavor with a representation class of
+ * Service formatted doc flavor with a representation class of
* "java.awt.image.renderable.RenderableImage".
*/
public static final DocFlavor.SERVICE_FORMATTED RENDERABLE_IMAGE = new SERVICE_FORMATTED("java.awt.image.renderable.RenderableImage");
-
+
/**
- * Constructor for doc flavor objects with a MIME type of
+ * Constructor for doc flavor objects with a MIME type of
* "application/x-java-jvm-local-objectref" and the given
* print data representation classname.
- *
+ *
* @param className the representation classname
- *
+ *
* @throws NullPointerException if className is null.
*/
public SERVICE_FORMATTED(String className)
@@ -461,13 +461,13 @@ public class DocFlavor implements Cloneable, Serializable
super("application/x-java-jvm-local-objectref", className);
}
}
-
+
/**
* Predefined static DocFlavor objects for document
* types which use a String for the print data representation.
- *
All the defined doc flavors have a print data representation
+ *
All the defined doc flavors have a print data representation
* classname of "java.lang.String".
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class STRING
@@ -483,13 +483,13 @@ public class DocFlavor implements Cloneable, Serializable
* String doc flavor with a MIME Type of "text/plain; charset=utf-16".
*/
public static final DocFlavor.STRING TEXT_PLAIN = new STRING("text/plain; charset=utf-16");
-
+
/**
- * Constructor for doc flavor objects with the given MIME type
+ * Constructor for doc flavor objects with the given MIME type
* and a print data representation class name of "java.lang.String".
- *
+ *
* @param mimeType the mime type string
- *
+ *
* @throws NullPointerException if mimeType is null.
* @throws IllegalArgumentException if mimeType has the wrong syntax.
*/
@@ -498,13 +498,13 @@ public class DocFlavor implements Cloneable, Serializable
super(mimeType, "java.lang.String");
}
}
-
+
/**
* Predefined static DocFlavor objects for document
* types which have an URL where to retrieve the print data.
- *
All the defined doc flavors have a print data representation
+ *
All the defined doc flavors have a print data representation
* classname of "java.net.URL".
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public static class URL
@@ -588,13 +588,13 @@ public class DocFlavor implements Cloneable, Serializable
* URL doc flavor with a MIME Type of "text/plain; charset=utf-8".
*/
public static final DocFlavor.URL TEXT_PLAIN_UTF_8 = new URL("text/plain; charset=utf-8");
-
+
/**
- * Constructor for doc flavor objects with the given MIME type
+ * Constructor for doc flavor objects with the given MIME type
* and a print data representation class name of "java.net.URL".
- *
+ *
* @param mimeType the mime type string
- *
+ *
* @throws NullPointerException if mimeType is null.
* @throws IllegalArgumentException if mimeType has the wrong syntax.
*/
@@ -603,12 +603,12 @@ public class DocFlavor implements Cloneable, Serializable
super(mimeType, "java.net.URL");
}
}
-
+
private static final long serialVersionUID = -4512080796965449721L;
-
+
/**
* The string representing the host encoding. This is the encoding
- * used in the predefined HOST doc flavors
+ * used in the predefined HOST doc flavors
* (e.g. {@link BYTE_ARRAY#TEXT_HTML_HOST}).
*/
public static final String hostEncoding = Charset.defaultCharset().name();
@@ -616,17 +616,17 @@ public class DocFlavor implements Cloneable, Serializable
private transient String mediaSubtype;
private transient String mediaType;
private transient TreeMap params;
-
+
// name as defined in Serialized Form JDK 1.4
private String myClassName;
-
+
/**
- * Constructs a DocFlavor object with the given MIME type and
+ * Constructs a DocFlavor object with the given MIME type and
* representation class name.
- *
+ *
* @param mimeType the MIME type string.
* @param className the fully-qualified name of the representation class.
- *
+ *
* @throws NullPointerException if mimeType or className are null.
* @throws IllegalArgumentException if given mimeType has syntax errors.
*/
@@ -637,15 +637,15 @@ public class DocFlavor implements Cloneable, Serializable
params = new TreeMap();
parseMimeType(mimeType);
-
+
myClassName = className;
}
-
+
/**
* Parses the given string as MIME type.
* The mediatype, mediasubtype and all parameter/value
* combinations are extracted, comments are dropped.
- *
+ *
* @param mimeType the string to parse
* @throws IllegalArgumentException if not conformant.
*/
@@ -656,11 +656,11 @@ public class DocFlavor implements Cloneable, Serializable
int PARAM_NAME = 3;
int PARAM_VALUE = 4;
int COMMENT_START = 5;
-
+
int state = 0;
int lastState = 0; // keeps track of state before comment
int tok;
-
+
try
{
String paramName = null;
@@ -778,7 +778,7 @@ public class DocFlavor implements Cloneable, Serializable
throw new InternalError("IOException during parsing String " + mimeType);
}
}
-
+
/**
* Checks if this doc flavor object is equal to the given object.
*
@@ -787,7 +787,7 @@ public class DocFlavor implements Cloneable, Serializable
* types has to be equal in their media type, media subtype, their
* paramter/value combinations and the representation classname.
*
- *
+ *
* @param obj the object to test.
* @return true if equal, false otherwise.
*/
@@ -799,14 +799,14 @@ public class DocFlavor implements Cloneable, Serializable
DocFlavor tmp = (DocFlavor) obj;
return (getMimeType().equals(tmp.getMimeType())
- && getRepresentationClassName().equals(tmp.getRepresentationClassName()));
+ && getRepresentationClassName().equals(tmp.getRepresentationClassName()));
}
/**
* Returns the media subtype of this flavor object.
* A mimetype of "text/html; charset=us-ascii" will
- * return "html" as the media subtype.
- *
+ * return "html" as the media subtype.
+ *
* @return The media subtype.
*/
public String getMediaSubtype()
@@ -818,7 +818,7 @@ public class DocFlavor implements Cloneable, Serializable
* Returns the media type of this flavor object.
* A mimetype of "text/html; charset=us-ascii" will
* return "text" as the media type.
- *
+ *
* @return The media type.
*/
public String getMediaType()
@@ -830,7 +830,7 @@ public class DocFlavor implements Cloneable, Serializable
* Returns the mime type of this flavor object.
* The mimetype will have every parameter value
* enclosed in quotes.
- *
+ *
* @return The mime type.
*/
public String getMimeType()
@@ -840,8 +840,8 @@ public class DocFlavor implements Cloneable, Serializable
while (it.hasNext())
{
- Map.Entry entry = (Map.Entry) it.next();
- mimeType += "; " + entry.getKey() + "=\"" + entry.getValue() + "\"";
+ Map.Entry entry = (Map.Entry) it.next();
+ mimeType += "; " + entry.getKey() + "=\"" + entry.getValue() + "\"";
}
return mimeType;
@@ -850,7 +850,7 @@ public class DocFlavor implements Cloneable, Serializable
/**
* Returns the value for an optional parameter of the mime type of this
* flavor object.
- *
+ *
* @param paramName the name of the parameter
* @return The value for the parameter, or null if none bound.
* @throws NullPointerException if paramName is null.
@@ -859,13 +859,13 @@ public class DocFlavor implements Cloneable, Serializable
{
if (paramName == null)
throw new NullPointerException();
-
+
return (String) params.get(paramName.toLowerCase());
}
/**
* Returns the name of the representation class of this flavor object.
- *
+ *
* @return The representation classname.
*/
public String getRepresentationClassName()
@@ -875,30 +875,30 @@ public class DocFlavor implements Cloneable, Serializable
/**
* Returns a hash code for this doc flavor object.
- *
+ *
* @return The hashcode.
*/
public int hashCode()
{
return ((mediaType.hashCode()
- * mediaSubtype.hashCode()
- * myClassName.hashCode()) ^ params.hashCode());
+ * mediaSubtype.hashCode()
+ * myClassName.hashCode()) ^ params.hashCode());
}
/**
* Returns a string representation of this doc flavor object.
* The returned string is of the form
* getMimeType() + "; class=\"" + getRepresentationClassName() + "\"";
- *
+ *
* @return The constructed string representation.
*/
public String toString()
{
return getMimeType() + "; class=\"" + getRepresentationClassName() + "\"";
}
-
+
// needs special treatment for serialization
- private void readObject(ObjectInputStream stream)
+ private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException
{
params = new TreeMap();
diff --git a/libjava/classpath/javax/print/DocPrintJob.java b/libjava/classpath/javax/print/DocPrintJob.java
index eec4e2a..ffafa47 100644
--- a/libjava/classpath/javax/print/DocPrintJob.java
+++ b/libjava/classpath/javax/print/DocPrintJob.java
@@ -44,14 +44,14 @@ import javax.print.event.PrintJobAttributeListener;
import javax.print.event.PrintJobListener;
/**
- * DocPrintJob represents a print job which supports printing
- * of a single document.
+ * DocPrintJob represents a print job which supports printing
+ * of a single document.
*
- * An instance can be obtained from every PrintService available
- * by calling the {@link javax.print.PrintService#createPrintJob()} method.
+ * An instance can be obtained from every PrintService available
+ * by calling the {@link javax.print.PrintService#createPrintJob()} method.
* A print job is bound to the print service it is created from.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface DocPrintJob
@@ -63,62 +63,62 @@ public interface DocPrintJob
* If the given attribute set is empty no changes will be reported.
* If the set is null all attributes are monitored.
*
- *
+ *
* @param listener the listener to register.
* @param attributes the attributes to observe.
- *
+ *
* @see #removePrintJobAttributeListener(PrintJobAttributeListener)
*/
void addPrintJobAttributeListener(PrintJobAttributeListener listener,
- PrintJobAttributeSet attributes);
+ PrintJobAttributeSet attributes);
/**
* Registers a listener for events occuring during processing
* of this print job.
- *
+ *
* @param listener the listener to add, if null nothing is done.
- *
+ *
* @see #removePrintJobListener(PrintJobListener)
*/
void addPrintJobListener(PrintJobListener listener);
/**
- * Returns the print job's attributes.
+ * Returns the print job's attributes.
*
- * The returned set of attributes is a snapshot at the time of calling this
+ * The returned set of attributes is a snapshot at the time of calling this
* method and will not be updated if changes to the print job's attributes
* happens. To monitor changes register a print job listener.
*
- *
- * @return The attributes of this print job,
+ *
+ * @return The attributes of this print job,
* may be empty but never null.
*/
PrintJobAttributeSet getAttributes();
/**
* Returns the PrintService object this print job is bound to.
- *
+ *
* @return The print service.
*/
PrintService getPrintService();
/**
* Prints a document with the specified print job attributes.
- *
+ *
*
- * If the doc flavor provided by the Doc implementation is
- * not supported by this print service a PrintException
+ * If the doc flavor provided by the Doc implementation is
+ * not supported by this print service a PrintException
* implementing the FlavorException interface will be thrown.
*
- *
+ *
* @param doc the document to print
- * @param attributes the job attributes to use. If null the
+ * @param attributes the job attributes to use. If null the
* default attribute values of the print service will be used.
- *
- * @throws PrintException if an error occurs. The thrown exception may
- * implement refining print exception interface to provide more detail of
+ *
+ * @throws PrintException if an error occurs. The thrown exception may
+ * implement refining print exception interface to provide more detail of
* the error.
- *
+ *
* @see AttributeException
* @see FlavorException
*/
@@ -127,22 +127,22 @@ public interface DocPrintJob
/**
* Removes the given listener from the listeners registered for changes
* in their provided attribute set during processing of this print job.
- *
+ *
* @param listener the listener to remove, if null or not
* registered nothing will be done.
- *
+ *
* @see #addPrintJobAttributeListener(PrintJobAttributeListener, PrintJobAttributeSet)
- */
+ */
void removePrintJobAttributeListener(PrintJobAttributeListener listener);
/**
- * Removes the given listener from the listeners registered for events
+ * Removes the given listener from the listeners registered for events
* occuring during processing of this print job.
- *
+ *
* @param listener the listener to remove, if null or not
* registered nothing will be done.
- *
+ *
* @see #addPrintJobListener(PrintJobListener)
*/
void removePrintJobListener(PrintJobListener listener);
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/print/FlavorException.java b/libjava/classpath/javax/print/FlavorException.java
index 879f108..3e2fde2 100644
--- a/libjava/classpath/javax/print/FlavorException.java
+++ b/libjava/classpath/javax/print/FlavorException.java
@@ -44,19 +44,19 @@ package javax.print;
* provide further information of printing errors if unsupported
* document flavors are involved.
*
- * There exists no PrintException class implementing this
- * interface. Providing this extension in PrintException
+ * There exists no PrintException class implementing this
+ * interface. Providing this extension in PrintException
* subclasses is left to the concrete print service implementation.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface FlavorException
{
/**
* Returns the unsupported document flavors.
- *
+ *
* @return The unsupported document flavors.
*/
DocFlavor[] getUnsupportedFlavors();
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/print/MultiDoc.java b/libjava/classpath/javax/print/MultiDoc.java
index 6e9ec84..40a83ab 100644
--- a/libjava/classpath/javax/print/MultiDoc.java
+++ b/libjava/classpath/javax/print/MultiDoc.java
@@ -46,30 +46,30 @@ import java.io.IOException;
* documents for use in a print job.
*
* Implementations of this interface are used to pass multiple documents, to be
- * printed as one print job, to the MultiDocPrintJob instance.
+ * printed as one print job, to the MultiDocPrintJob instance.
*
- * There exists no implementation of this interface in the Java Print Service
+ * There exists no implementation of this interface in the Java Print Service
* API. Implementors may assume the following usage in print jobs and the needed
- * behaviour for implementations: The print job fetches the single documents via
- * iteration by consecutive calls of the {@link #getDoc()} method to obtain the
- * current document follwing calls of the {@link #next()} method to get the next
+ * behaviour for implementations: The print job fetches the single documents via
+ * iteration by consecutive calls of the {@link #getDoc()} method to obtain the
+ * current document follwing calls of the {@link #next()} method to get the next
* multidoc object for the next getDoc() method call (if returned
- * multidoc object is not null). The print service will fetch the
- * document object and then retrieve the print data from the document before it
+ * multidoc object is not null). The print service will fetch the
+ * document object and then retrieve the print data from the document before it
* proceeds with the next call for the next MultiDoc object in the sequence.
*
* Implementations of this interface have to be multiple thread-safe.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface MultiDoc
{
/**
* Returns the current document.
- *
+ *
* @return The current document.
- *
+ *
* @throws IOException if an error occurs
*/
Doc getDoc() throws IOException;
@@ -77,11 +77,11 @@ public interface MultiDoc
/**
* Returns the next MultiDoc object that contains the
* next document for retrieval.
- *
+ *
* @return The next MultiDoc object, or null
* if no more documents are available.
- *
+ *
* @throws IOException if an error occurs
*/
MultiDoc next() throws IOException;
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/print/MultiDocPrintJob.java b/libjava/classpath/javax/print/MultiDocPrintJob.java
index 36089b5..c030c4d 100644
--- a/libjava/classpath/javax/print/MultiDocPrintJob.java
+++ b/libjava/classpath/javax/print/MultiDocPrintJob.java
@@ -42,36 +42,35 @@ import javax.print.attribute.PrintRequestAttributeSet;
/**
- * MultiDocPrintJob represents a print job which supports
+ * MultiDocPrintJob represents a print job which supports
* printing of multiple documents as one print job.
*
* An instance can be obtained from every MultiDocPrintService
- * available by calling the
- * {@link javax.print.MultiDocPrintService#createMultiDocPrintJob()} method.
+ * available by calling the
+ * {@link javax.print.MultiDocPrintService#createMultiDocPrintJob()} method.
* A print job is bound to the print service it is created from.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface MultiDocPrintJob extends DocPrintJob
{
/**
- * Prints the documents supplied in the given MultiDoc object
+ * Prints the documents supplied in the given MultiDoc object
* as one print job with the given printing attributes.
- *
- * @param multiDoc the documents to print. Every document must have a
+ *
+ * @param multiDoc the documents to print. Every document must have a
* flavor supported by the bound print service.
- * @param attributes the printing attributes to apply to the print job. If
+ * @param attributes the printing attributes to apply to the print job. If
* null the default attribute values will be used.
- *
- * @throws PrintException if an error occurs. The thrown exception may
- * implement refining print exception interface to provide more detail of
+ *
+ * @throws PrintException if an error occurs. The thrown exception may
+ * implement refining print exception interface to provide more detail of
* the error.
- *
+ *
* @see FlavorException
* @see AttributeException
*/
void print(MultiDoc multiDoc, PrintRequestAttributeSet attributes)
throws PrintException;
}
-
\ No newline at end of file
diff --git a/libjava/classpath/javax/print/MultiDocPrintService.java b/libjava/classpath/javax/print/MultiDocPrintService.java
index 105e722..b0ebfd1 100644
--- a/libjava/classpath/javax/print/MultiDocPrintService.java
+++ b/libjava/classpath/javax/print/MultiDocPrintService.java
@@ -40,21 +40,21 @@ package javax.print;
/**
- * MultiDocPrintService represents print services that are
- * capable of printing multiple documents as one print job. It provides an
+ * MultiDocPrintService represents print services that are
+ * capable of printing multiple documents as one print job. It provides an
* additional method for the creation of a print job for multiple documents.
- *
+ *
* @see javax.print.MultiDoc
* @see javax.print.MultiDocPrintJob
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface MultiDocPrintService extends PrintService
{
/**
* Create a job that can print a MultiDoc object.
- *
+ *
* @return The created print job.
*/
MultiDocPrintJob createMultiDocPrintJob();
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/print/PrintException.java b/libjava/classpath/javax/print/PrintException.java
index 6fd46b5..8ff29b2 100644
--- a/libjava/classpath/javax/print/PrintException.java
+++ b/libjava/classpath/javax/print/PrintException.java
@@ -42,8 +42,8 @@ package javax.print;
* PrintException is used to report exceptions during the
* usage of a print service implementation.
*
- * This base class only provides the possibility to report a message as
- * exception. A concrete print service implementation may provide
+ * This base class only provides the possibility to report a message as
+ * exception. A concrete print service implementation may provide
* specialised subclasses implementing one or more of the following
* exception interfaces:
*
@@ -52,7 +52,7 @@ package javax.print;
*
{@link javax.print.URIException}
*
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintException extends Exception
@@ -67,7 +67,7 @@ public class PrintException extends Exception
/**
* Construct a print exception.
- *
+ *
* @param e chained exception
*/
public PrintException(Exception e)
@@ -77,7 +77,7 @@ public class PrintException extends Exception
/**
* Construct a print exception.
- *
+ *
* @param s detailed message, or null for no message
*/
public PrintException(String s)
@@ -87,7 +87,7 @@ public class PrintException extends Exception
/**
* Construct a print exception.
- *
+ *
* @param s detailed message, or null for no message
* @param e chained exception
*/
@@ -95,4 +95,4 @@ public class PrintException extends Exception
{
super(s, e);
}
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/print/PrintService.java b/libjava/classpath/javax/print/PrintService.java
index 125d270..b7bd500 100644
--- a/libjava/classpath/javax/print/PrintService.java
+++ b/libjava/classpath/javax/print/PrintService.java
@@ -48,57 +48,57 @@ import javax.print.event.PrintServiceAttributeListener;
* A PrintService represents a printer available for printing.
*
* The print service hereby may be a real physical printer device, a printer
- * group with same capabilities or a logical print service (like for example
+ * group with same capabilities or a logical print service (like for example
* a PDF writer). The print service is used to query the capabilities of the
* represented printer instance. If a suitable print service is found it is
- * used to create a print job for the actual printing process.
+ * used to create a print job for the actual printing process.
*
* @see javax.print.DocPrintJob
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintService
{
/**
- * Creates and returns a new print job which is capable to handle all
+ * Creates and returns a new print job which is capable to handle all
* the document flavors supported by this print service.
- *
+ *
* @return The created print job object.
*/
DocPrintJob createPrintJob();
-
+
/**
* Determines if two services refer to the same underlying service.
- *
+ *
* @param obj the service to check against
- *
+ *
* @return true if both services refer to the same underlying
* service, false otherwise.
*/
boolean equals(Object obj);
-
+
/**
* Returns the value of the single specified attribute.
- *
+ *
* @param category the category of a PrintServiceAttribute
- *
+ *
* @return The value of the attribute, or null if the attribute
* category is not supported by this print service implementation.
- *
+ *
* @throws NullPointerException if category is null.
* @throws IllegalArgumentException if category is not a class that
* implements PrintServiceAttribute.
*/
T getAttribute(Class category);
-
+
/**
- * Returns the attributes describing this print service. The returned
+ * Returns the attributes describing this print service. The returned
* attributes set is unmodifiable and represents the current state of
- * the print service. As some print service attributes may change
+ * the print service. As some print service attributes may change
* (depends on the print service implementation) a subsequent call to
- * this method may return a different set. To monitor changes a
- * PrintServiceAttributeListener may be registered.
- *
+ * this method may return a different set. To monitor changes a
+ * PrintServiceAttributeListener may be registered.
+ *
* @return All the description attributes of this print service.
* @see #addPrintServiceAttributeListener(PrintServiceAttributeListener)
*/
@@ -111,67 +111,67 @@ public interface PrintService
* A return value of null means either that the print service
* does not support the attribute category or there is no default value
* available for this category. To distinguish these two case one can test
- * with {@link #isAttributeCategorySupported(Class)} if the category is
+ * with {@link #isAttributeCategorySupported(Class)} if the category is
* supported.
*
- *
+ *
* @param category the category of the attribute
- *
+ *
* @return The default value, or null.
- *
+ *
* @throws NullPointerException if category is null
* @throws IllegalArgumentException if category is a class
- * not implementing Attribute
+ * not implementing Attribute
*/
Object getDefaultAttributeValue(Class extends Attribute> category);
-
+
/**
* Returns the name of this print service.
* This may be the value of the PrinterName attribute.
- *
+ *
* @return The print service name.
*/
String getName();
-
+
/**
* Returns a factory for UI components if supported by the print service.
- *
+ *
* @return A factory for UI components or null.
*/
ServiceUIFactory getServiceUIFactory();
-
+
/**
* Returns all supported attribute categories.
- *
+ *
* @return The class array of all supported attribute categories.
*/
Class>[] getSupportedAttributeCategories();
-
+
/**
- * Determines and returns all supported attribute values of a given
- * attribute category a client can use when setting up a print job
- * for this print service.
+ * Determines and returns all supported attribute values of a given
+ * attribute category a client can use when setting up a print job
+ * for this print service.
*
* The returned object may be one of the following types:
*
- *
A single instance of the attribute category to indicate that any
+ *
A single instance of the attribute category to indicate that any
* value will be supported.
- *
An array of the same type as the attribute category to test,
+ *
An array of the same type as the attribute category to test,
* containing all the supported values for this category.
- *
A single object (of any other type than the attribute category)
- * which indicates bounds on the supported values.
- *
+ *
A single object (of any other type than the attribute category)
+ * which indicates bounds on the supported values.
+ *
*
- *
+ *
* @param category the attribute category to test
* @param flavor the document flavor to use, or null
- * @param attributes set of attributes for a supposed job,
+ * @param attributes set of attributes for a supposed job,
* or null
- *
- * @return A object (as defined above) indicating the supported values
- * for the given attribute category, or null if this print
+ *
+ * @return A object (as defined above) indicating the supported values
+ * for the given attribute category, or null if this print
* service doesn't support the given attribute category at all.
- *
+ *
* @throws NullPointerException if category is null
* @throws IllegalArgumentException if category is a class not
* implementing Attribute, or if flavor is not
@@ -180,116 +180,116 @@ public interface PrintService
Object getSupportedAttributeValues(Class extends Attribute> category,
DocFlavor flavor,
AttributeSet attributes);
-
+
/**
* Determines and returns an array of all supported document flavors which
- * can be used to supply print data to this print service.
+ * can be used to supply print data to this print service.
*
* The supported attribute categories may differ between the supported
* document flavors. To test for supported attributes one can use the
* {@link #getUnsupportedAttributes(DocFlavor, AttributeSet)} method with
* the specific doc flavor and attributes set.
*
- *
+ *
* @return the supported document flavors
*/
DocFlavor[] getSupportedDocFlavors();
-
+
/**
* Identifies all the unsupported attributes of the given set of attributes
- * in the context of the specified document flavor.
+ * in the context of the specified document flavor.
*
- * The given flavor has to be supported by the print service (use
- * {@link #isDocFlavorSupported(DocFlavor)} to verify). The method will
+ * The given flavor has to be supported by the print service (use
+ * {@link #isDocFlavorSupported(DocFlavor)} to verify). The method will
* return null if all given attributes are supported. Otherwise
* a set of unsupported attributes are returned. The attributes in the
* returned set may be completely unsupported or only the specific requested
- * value. If flavor is null the default document flavor of the
+ * value. If flavor is null the default document flavor of the
* print service is used in the identification process.
*
- *
+ *
* @param flavor document flavor to test, or null.
* @param attributes set of printing attributes for a supposed job
- *
- * @return null if this print service supports all the given
+ *
+ * @return null if this print service supports all the given
* attributes for the specified doc flavor. Otherwise the set of unsupported
* attributes are returned.
- *
+ *
* @throws IllegalArgumentException if flavor is unsupported
*/
AttributeSet getUnsupportedAttributes(DocFlavor flavor, AttributeSet attributes);
-
+
/**
* Returns a hashcode for this print service.
- *
+ *
* @return The hashcode.
*/
int hashCode();
-
+
/**
- * Determines a given attribute category is supported by this
+ * Determines a given attribute category is supported by this
* print service implementation. This only tests for the category
* not for any specific values of this category nor in the context
* of a specific document flavor.
- *
+ *
* @param category the category to check
- *
+ *
* @return true if category is supported,
* false otherwise.
- *
+ *
* @throws NullPointerException if category is null
* @throws IllegalArgumentException if category is a class not
* implementing Attribute.
*/
boolean isAttributeCategorySupported(Class extends Attribute> category);
-
+
/**
- * Determines if a given attribute value is supported when creating a print
- * job for this print service.
+ * Determines if a given attribute value is supported when creating a print
+ * job for this print service.
*
- * If either the document flavor or the provided attributes are
- * null it is determined if the given attribute value is
+ * If either the document flavor or the provided attributes are
+ * null it is determined if the given attribute value is
* supported in some combination of the available document flavors and
* attributes of the print service. Otherwise it is checked for the
* specific context of the given document flavor/attributes set.
*
- *
+ *
* @param attrval the attribute value to check
* @param flavor the document flavor to use, or null.
* @param attributes set of attributes to use, or null.
- *
+ *
* @return true if the attribute value is supported in the
* requested context, false otherwise.
- *
+ *
* @throws NullPointerException if attrval is null.
* @throws IllegalArgumentException if flavor is not supported
* by this print service
*/
boolean isAttributeValueSupported(Attribute attrval, DocFlavor flavor, AttributeSet attributes);
-
+
/**
* Determines if a given document flavor is supported or not.
- *
+ *
* @param flavor the document flavor to check
- *
+ *
* @return true if flavor is supported,
* false otherwise.
- *
+ *
* @throws NullPointerException if flavor is null.
*/
boolean isDocFlavorSupported(DocFlavor flavor);
-
+
/**
* Registers a print service attribute listener to this print service.
- *
+ *
* @param listener the listener to add
*/
void addPrintServiceAttributeListener(PrintServiceAttributeListener listener);
-
+
/**
* De-registers a print service attribute listener from this print service.
- *
+ *
* @param listener the listener to remove
*/
void removePrintServiceAttributeListener(PrintServiceAttributeListener listener);
diff --git a/libjava/classpath/javax/print/PrintServiceLookup.java b/libjava/classpath/javax/print/PrintServiceLookup.java
index 57cb8dc..1ea1f95 100644
--- a/libjava/classpath/javax/print/PrintServiceLookup.java
+++ b/libjava/classpath/javax/print/PrintServiceLookup.java
@@ -50,54 +50,54 @@ import javax.print.attribute.AttributeSet;
/**
- * PrintServiceLookup implementations provide a way to lookup
+ * PrintServiceLookup implementations provide a way to lookup
* print services based on different constraints.
*
- * Implementations are located and loaded automatically through the SPI JAR
- * file specification. Therefore implementation classes must provide a default
- * constructor for instantiation. Furthermore, applications are able to
+ * Implementations are located and loaded automatically through the SPI JAR
+ * file specification. Therefore implementation classes must provide a default
+ * constructor for instantiation. Furthermore, applications are able to
* register further instances directly at runtime.
*
- * If an SecurityManager is installed implementors should call
- * checkPrintJobAccess() to disable access for untrusted code.
- * This check is to be made in every lookup service implementation for
- * flexibility. Print services registered by applications through
- * registerService(PrintService) are suppressed in the
- * lookup results if a security manager is installed and disallows access.
+ * If an SecurityManager is installed implementors should call
+ * checkPrintJobAccess() to disable access for untrusted code.
+ * This check is to be made in every lookup service implementation for
+ * flexibility. Print services registered by applications through
+ * registerService(PrintService) are suppressed in the
+ * lookup results if a security manager is installed and disallows access.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public abstract class PrintServiceLookup
{
-
+
private static final CupsPrintServiceLookup systemProvider;
private static final HashSet printServices;
private static final HashSet printServiceLookups;
-
+
static
{
systemProvider = new CupsPrintServiceLookup();
-
+
printServices = new HashSet();
printServiceLookups = new HashSet();
-
+
// check for service providers
Iterator it = ServiceFactory.lookupProviders(PrintServiceLookup.class);
-
+
while (it.hasNext())
- printServiceLookups.add(it.next());
- }
-
+ printServiceLookups.add(it.next());
+ }
+
/**
* Constructs a PrintServiceLookup object.
*/
public PrintServiceLookup()
{
- // nothing to do here
+ // nothing to do here
}
-
+
/**
* Explicitly registers the provided print service lookup implementation.
*
@@ -106,22 +106,22 @@ public abstract class PrintServiceLookup
* else fails.
*
*
- * @param sp the print service lookup implementation to register.
+ * @param sp the print service lookup implementation to register.
* @return true if registered, false otherwise.
*/
public static boolean registerServiceProvider(PrintServiceLookup sp)
- {
+ {
return printServiceLookups.add(sp);
}
-
+
/**
* Explicitly registers the provided print service instance.
*
* The registration will silently fail (returning false) if
- * the print service instance is already registered or the registration
+ * the print service instance is already registered or the registration
* somehow else fails.
*
- * @param service the single print service to register.
+ * @param service the single print service to register.
* @return true if registered, false otherwise.
*/
public static boolean registerService(PrintService service)
@@ -143,78 +143,78 @@ public abstract class PrintServiceLookup
return false;
}
}
-
+
/**
* Searches print services capable of printing in the given document flavor
* which supports the specified printing attributes.
- *
- * @param flavor the document flavor to support. If null this
+ *
+ * @param flavor the document flavor to support. If null this
* constraint is ignored during lookup.
- * @param attributes the printing attributes to support. If
+ * @param attributes the printing attributes to support. If
* null this constraint is ignored during lookup.
- * @return The resulting available print services, or an array of length 0
- * if none is found.
+ * @return The resulting available print services, or an array of length 0
+ * if none is found.
*/
public static final PrintService[] lookupPrintServices(DocFlavor flavor,
AttributeSet attributes)
- {
+ {
ArrayList result = new ArrayList();
-
- PrintService[] services =
- systemProvider.getPrintServices(flavor, attributes);
+
+ PrintService[] services =
+ systemProvider.getPrintServices(flavor, attributes);
result.addAll(Arrays.asList(services));
-
+
for (Iterator it = printServiceLookups.iterator(); it.hasNext(); )
{
PrintServiceLookup lookup = (PrintServiceLookup) it.next();
- services = lookup.getPrintServices(flavor, attributes);
+ services = lookup.getPrintServices(flavor, attributes);
result.addAll(Arrays.asList(services));
}
-
+
for (Iterator it = printServices.iterator(); it.hasNext(); )
{
PrintService service = (PrintService) it.next();
- if (systemProvider.checkPrintService(flavor, attributes, service))
+ if (systemProvider.checkPrintService(flavor, attributes, service))
result.add(service);
}
-
+
return (PrintService[]) result.toArray(new PrintService[result.size()]);
}
-
+
/**
- * Searches print services capable of multi document printing in all of the
+ * Searches print services capable of multi document printing in all of the
* given document flavors and supporting the specified printing attributes.
- *
- * @param flavors the document flavors to support. If null this
+ *
+ * @param flavors the document flavors to support. If null this
* constraint is ignored during lookup.
- * @param attributes the printing attributes to support. If
+ * @param attributes the printing attributes to support. If
* null this constraint is ignored during lookup.
- * @return The resulting available multi document print services, or an
- * array of length 0 if none is found.
+ * @return The resulting available multi document print services, or an
+ * array of length 0 if none is found.
*/
public static final MultiDocPrintService[] lookupMultiDocPrintServices(
DocFlavor[] flavors, AttributeSet attributes)
{
ArrayList result = new ArrayList();
-
- MultiDocPrintService[] services =
- systemProvider.getMultiDocPrintServices(flavors, attributes);
+
+ MultiDocPrintService[] services =
+ systemProvider.getMultiDocPrintServices(flavors, attributes);
result.addAll(Arrays.asList(services));
-
+
for (Iterator it = printServiceLookups.iterator(); it.hasNext(); )
{
PrintServiceLookup lookup = (PrintServiceLookup) it.next();
- services = lookup.getMultiDocPrintServices(flavors, attributes);
+ services = lookup.getMultiDocPrintServices(flavors, attributes);
result.addAll(Arrays.asList(services));
}
-
+
for (Iterator it = printServices.iterator(); it.hasNext(); )
{
PrintService service = (PrintService) it.next();
- if (systemProvider.checkMultiDocPrintService(flavors, attributes, service))
+ if (systemProvider.checkMultiDocPrintService(flavors, attributes, service))
result.add(service);
}
-
+
return (MultiDocPrintService[]) result.toArray(
new MultiDocPrintService[result.size()]);
}
@@ -224,32 +224,32 @@ public abstract class PrintServiceLookup
* Searches the default print service in the current environment.
*
* If multiple lookup services are registered and each has a default
- * print service the result is not specified. Usually the default
+ * print service the result is not specified. Usually the default
* print service of the native platform lookup service is returned.
*
* The GNU classpath implementation will return the CUPS default
* printing service as the default print service, if available.
*
* The default print service may be overriden by users through
- * the property javax.print.defaultPrinter. A service
+ * the property javax.print.defaultPrinter. A service
* specified must be found to be returned as the default.
*
- *
+ *
* @return The default print service, or null if none found.
*/
public static final PrintService lookupDefaultPrintService()
{
// TODO Find out what the property controls and use it
// String defaultPrinter = System.getProperty("javax.print.defaultPrinter");
-
+
// first test for platform specified default services
PrintService service = systemProvider.getDefaultPrintService();
-
- if (service != null)
+
+ if (service != null)
return service;
-
+
// none available by systemDefaultProvider
- // search in other registered ones and take first
+ // search in other registered ones and take first
for (Iterator it = printServiceLookups.iterator(); it.hasNext(); )
{
service = ((PrintServiceLookup) it.next()).getDefaultPrintService();
@@ -259,10 +259,10 @@ public abstract class PrintServiceLookup
return null;
}
-
+
/**
* Not to be called directly by applications.
- *
+ *
* @return The default lookup service of the implementing lookup service or
* null if there is no default one.
*/
@@ -270,34 +270,34 @@ public abstract class PrintServiceLookup
/**
* Not to be called directly by applications.
- *
+ *
* @param flavors the document flavors which have to be supported.
* @param attributes the attributes which have to be supported.
- *
+ *
* @return The multidoc print services of the implementing lookup service
* for the given parameters, or an array of length 0 if none is available.
*/
- public abstract MultiDocPrintService[]
+ public abstract MultiDocPrintService[]
getMultiDocPrintServices(DocFlavor[] flavors, AttributeSet attributes);
/**
* Not to be called directly by applications.
- *
+ *
* @return All known print services of the implementing lookup service
- * regardless of supported features, or an array of length 0 if none is
+ * regardless of supported features, or an array of length 0 if none is
* available.
*/
public abstract PrintService[] getPrintServices();
/**
* Not to be called directly by applications.
- *
+ *
* @param flavor the document flavor which has to be supported.
* @param attributes the attributes which have to be supported.
- *
+ *
* @return The print services of the implementing lookup service
* for the given parameters, or an array of length 0 if none is available.
*/
- public abstract PrintService[]
+ public abstract PrintService[]
getPrintServices(DocFlavor flavor, AttributeSet attributes);
}
diff --git a/libjava/classpath/javax/print/ServiceUI.java b/libjava/classpath/javax/print/ServiceUI.java
index 4a7b5bd..fa5086e 100644
--- a/libjava/classpath/javax/print/ServiceUI.java
+++ b/libjava/classpath/javax/print/ServiceUI.java
@@ -1,4 +1,4 @@
-/* ServiceUI.java --
+/* ServiceUI.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,19 +48,19 @@ import java.util.Arrays;
import javax.print.attribute.PrintRequestAttributeSet;
/**
- * ServiceUI provides a method to create a graphical
+ * ServiceUI provides a method to create a graphical
* print dialog.
*
* The graphical print dialog enables the user to browse the available
- * print services on the system. It provides user interfaces to interact
- * with the most common printing attributes likes specifying the number of
+ * print services on the system. It provides user interfaces to interact
+ * with the most common printing attributes likes specifying the number of
* copies to print or the page ranges.
*
- * The initial appearance of the print dialog as shown to the user may be
- * specified by providing the default selected print service as well as
+ * The initial appearance of the print dialog as shown to the user may be
+ * specified by providing the default selected print service as well as
* initial values for the printing attributes in the user interface.
*
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class ServiceUI
@@ -73,65 +73,65 @@ public class ServiceUI
{
// nothing to do here - only one static method
}
-
+
/**
- * Creates a modal graphical printing dialog at the specified location on
+ * Creates a modal graphical printing dialog at the specified location on
* the screen.
*
- * The dialog will return the user selected print service and the given
- * attributes set will contain the modified printing attributes. If the
- * user cancels the printing dialog null will be returned and
+ * The dialog will return the user selected print service and the given
+ * attributes set will contain the modified printing attributes. If the
+ * user cancels the printing dialog null will be returned and
* the printing attributes set will be unmodified.
*
* The values of the given attributes set (if not empty) will be displayed
- * initially unless the are unsupported by the print service. If a print
+ * initially unless the are unsupported by the print service. If a print
* service does not support a particular value it is substituted with the
* default value of the print service.
- *
- *
+ *
+ *
* @param gc the screen to use. null is default screen.
- * @param x the coordinate of the upper left edge of the dialog in screen
+ * @param x the coordinate of the upper left edge of the dialog in screen
* coordinates (not relative to the parent frame).
- * @param y the coordinate of the upper left edge of the dialog in screen
+ * @param y the coordinate of the upper left edge of the dialog in screen
* coordinates (not relative to the parent frame).
* @param services the print services to browse (not null).
* @param defaultService the default service. If null
* the first of the print services in the services array will be used.
* @param flavor the flavours to be printed.
- * @param attributes the attributes requested. Will be updated
- * by selections done by the user in the dialog.
- *
+ * @param attributes the attributes requested. Will be updated
+ * by selections done by the user in the dialog.
+ *
* @return The selected print service or null if user
* has cancelled the printer dialog.
- *
+ *
* @throws HeadlessException if GraphicsEnvironment is headless
- * @throws IllegalArgumentException if services is null or an
- * empty array, attributes are null or the given default
+ * @throws IllegalArgumentException if services is null or an
+ * empty array, attributes are null or the given default
* PrintService is not part of the print service array.
*/
- public static PrintService printDialog(GraphicsConfiguration gc, int x,
+ public static PrintService printDialog(GraphicsConfiguration gc, int x,
int y, PrintService[] services, PrintService defaultService,
DocFlavor flavor, PrintRequestAttributeSet attributes)
throws HeadlessException
- {
+ {
if (GraphicsEnvironment.isHeadless())
throw new HeadlessException("GraphicsEnvironment is headless.");
-
+
if (services == null || services.length == 0 || attributes == null)
- throw new IllegalArgumentException("Given print service array / "
+ throw new IllegalArgumentException("Given print service array / "
+ "attributes may not be null");
-
- if (defaultService != null &&
+
+ if (defaultService != null &&
! Arrays.asList(services).contains(defaultService))
- throw new IllegalArgumentException("defaultService is not contained "
+ throw new IllegalArgumentException("defaultService is not contained "
+ " in the print service array");
-
- PrinterDialog dialog = new PrinterDialog(gc, services, defaultService,
+
+ PrinterDialog dialog = new PrinterDialog(gc, services, defaultService,
flavor, attributes);
-
+
dialog.setLocation(x, y);
dialog.show();
-
+
return dialog.getSelectedPrintService();
}
}
diff --git a/libjava/classpath/javax/print/ServiceUIFactory.java b/libjava/classpath/javax/print/ServiceUIFactory.java
index 1a5c1cf..4b660b6 100644
--- a/libjava/classpath/javax/print/ServiceUIFactory.java
+++ b/libjava/classpath/javax/print/ServiceUIFactory.java
@@ -39,46 +39,46 @@ exception statement from your version. */
package javax.print;
/**
- * ServiceUIFactory enables print services to provide additional
+ * ServiceUIFactory enables print services to provide additional
* user interface dialogs.
*
- * A print service may provide a ServiceUIFactory implementation
+ * A print service may provide a ServiceUIFactory implementation
* if its getServiceUIFactory() method is called. If a factory
- * object is returned it can be queried for provided user interface dialogs.
+ * object is returned it can be queried for provided user interface dialogs.
* Different roles are defined to denote dialogs providing informations about
- * the print service, dialogs for administration of a print service and for
+ * the print service, dialogs for administration of a print service and for
* end-user browsing dialogs.
*
- * The factory can support providing these UI roles in different dialog types
+ * The factory can support providing these UI roles in different dialog types
* (AWT, Swing, JComponent, Panel). The support and use of Swing interfaces is
* however preferred.
*
- *
+ *
* @author Michael Koch
*/
public abstract class ServiceUIFactory
{
/** A user interface providing informations about the print service. */
public static final int ABOUT_UIROLE = 1;
-
+
/** A user interface to administer the print service. */
public static final int ADMIN_UIROLE = 2;
-
+
/** A user interface for end-user browsing of the print service. */
public static final int MAIN_UIROLE = 3;
-
+
/** Role IDs greater than this may be used for other private roles. */
public static final int RESERVED_UIROLE = 99;
/** Identifies a UI provided as an AWT dialog. */
public static final String DIALOG_UI = "java.awt.Dialog";
-
+
/** Identifies a UI provided as a Swing JComponent. */
public static final String JCOMPONENT_UI = "javax.swing.JComponent";
-
+
/** Identifies a UI provided as a Swing JDialog. */
public static final String JDIALOG_UI = "javax.swing.JDialog";
-
+
/** Identifies a UI provided as an AWT Panel. */
public static final String PANEL_UI = "java.awt.Panel";
@@ -87,18 +87,18 @@ public abstract class ServiceUIFactory
*/
public ServiceUIFactory()
{
- // Do nothing here.
+ // Do nothing here.
}
/**
* Returns an UI object which may be cast to the requested UI type.
- *
+ *
* @param role the role requested. Must be one of the standard roles
* or a private role supported by this factory
* @param ui type in which the role is requested
- *
+ *
* @return the UI role or null of this role is not supported by this factory
- *
+ *
* @throws IllegalArgumentException if role is neither one of
* the standard ones nor a private one supported by this factory
*/
@@ -106,13 +106,13 @@ public abstract class ServiceUIFactory
/**
* Returns the UI types supported by this factory for an UI role.
- *
+ *
* @param role the role to be looked up
- *
+ *
* @return an array of UI types
- *
+ *
* @throws IllegalArgumentException if role is neither one of
* the standard ones nor a private one supported by this factory
*/
public abstract String[] getUIClassNamesForRole(int role);
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/print/SimpleDoc.java b/libjava/classpath/javax/print/SimpleDoc.java
index a49406b..16b2d82 100644
--- a/libjava/classpath/javax/print/SimpleDoc.java
+++ b/libjava/classpath/javax/print/SimpleDoc.java
@@ -1,4 +1,4 @@
-/* SimpleDoc.java --
+/* SimpleDoc.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,23 +49,23 @@ import javax.print.attribute.AttributeSetUtilities;
import javax.print.attribute.DocAttributeSet;
/**
- * Simple implementation of the Doc interface capable of handling
+ * Simple implementation of the Doc interface capable of handling
* the predefined document flavors of DocFlavor.
*
- * This implementation can construct a reader or stream for the service from
+ * This implementation can construct a reader or stream for the service from
* the print data and ensures that always the same object is returned on each
- * method call. It does simple checks that the supplied data matches the
+ * method call. It does simple checks that the supplied data matches the
* specified flavor of the doc object and supports thread safe access.
- *
- *
+ *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public final class SimpleDoc implements Doc
-{
+{
private final Object printData;
private final DocFlavor flavor;
private final DocAttributeSet attributes;
-
+
private InputStream stream;
private Reader reader;
@@ -74,17 +74,17 @@ public final class SimpleDoc implements Doc
* @param printData the object with the data to print.
* @param flavor the document flavor of the print data.
* @param attributes the attributes of the doc (may be null).
- *
+ *
* @throws IllegalArgumentException if either printData or
* flavor are null, or the print data is not
* supplied in the document format specified by the given flavor object.
*/
- public SimpleDoc(Object printData, DocFlavor flavor,
+ public SimpleDoc(Object printData, DocFlavor flavor,
DocAttributeSet attributes)
{
if (printData == null || flavor == null)
throw new IllegalArgumentException("printData/flavor may not be null");
-
+
if (! (printData.getClass().getName().equals(
flavor.getRepresentationClassName())
|| flavor.getRepresentationClassName().equals("java.io.Reader")
@@ -93,16 +93,16 @@ public final class SimpleDoc implements Doc
&& printData instanceof InputStream))
{
throw new IllegalArgumentException("data is not of declared flavor type");
- }
-
+ }
+
this.printData = printData;
this.flavor = flavor;
-
+
if (attributes != null)
this.attributes = AttributeSetUtilities.unmodifiableView(attributes);
else
this.attributes = null;
-
+
stream = null;
reader = null;
}
@@ -110,13 +110,13 @@ public final class SimpleDoc implements Doc
/**
* Returns the unmodifiable view of the attributes of this doc object.
*
- * The attributes of this doc's attributes set overrides attributes of
- * the same category in the print job's attribute set. If an attribute
+ * The attributes of this doc's attributes set overrides attributes of
+ * the same category in the print job's attribute set. If an attribute
* is not available in this doc's attributes set or null
* is returned the attributes of the same category of the print job are
- * used.
+ * used.
*
- *
+ *
* @return The unmodifiable attributes set, or null.
*/
public DocAttributeSet getAttributes()
@@ -126,7 +126,7 @@ public final class SimpleDoc implements Doc
/**
* Returns the flavor of this doc objects print data.
- *
+ *
* @return The document flavor.
*/
public DocFlavor getDocFlavor()
@@ -141,7 +141,7 @@ public final class SimpleDoc implements Doc
* document flavor ({@link DocFlavor#getRepresentationClassName()})
* and can be cast to this representation class.
*
- *
+ *
* @return The print data in the representation class.
* @throws IOException if representation class is a stream and I/O
* exception occures.
@@ -162,10 +162,10 @@ public final class SimpleDoc implements Doc
*
java.io.Reader
*
* otherwise this method returns null.
- *
- *
+ *
+ *
* @return The Reader object, or null.
- *
+ *
* @throws IOException if an error occurs.
*/
public Reader getReaderForText() throws IOException
@@ -182,9 +182,9 @@ public final class SimpleDoc implements Doc
else if (flavor instanceof DocFlavor.READER)
reader = (Reader) printData;
}
-
+
return reader;
- }
+ }
}
/**
@@ -197,10 +197,10 @@ public final class SimpleDoc implements Doc
*
java.io.InputStream
*
* otherwise this method returns null.
- *
- *
+ *
+ *
* @return The InputStream object, or null.
- *
+ *
* @throws IOException if an error occurs.
*/
public InputStream getStreamForBytes() throws IOException
@@ -215,9 +215,9 @@ public final class SimpleDoc implements Doc
else if (flavor instanceof DocFlavor.INPUT_STREAM)
stream = (InputStream) printData;
}
-
+
return stream;
- }
+ }
}
}
diff --git a/libjava/classpath/javax/print/StreamPrintService.java b/libjava/classpath/javax/print/StreamPrintService.java
index 8398a73..4b82ef76 100644
--- a/libjava/classpath/javax/print/StreamPrintService.java
+++ b/libjava/classpath/javax/print/StreamPrintService.java
@@ -46,21 +46,21 @@ import java.io.OutputStream;
* printing into a supplied output stream.
*
* Beside providing the same functionality as a print service it additionally
- * allows to specify the output stream for the print data. A stream print
- * service is obtained via the {@link javax.print.StreamPrintServiceFactory}
+ * allows to specify the output stream for the print data. A stream print
+ * service is obtained via the {@link javax.print.StreamPrintServiceFactory}
* by looking for services supporting a given output format type.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public abstract class StreamPrintService implements PrintService
{
private boolean disposed;
private OutputStream out;
-
+
/**
* Constructs a StreamPrintService object.
- *
+ *
* @param out the OutputStream to use
*/
protected StreamPrintService(OutputStream out)
@@ -78,16 +78,16 @@ public abstract class StreamPrintService implements PrintService
/**
* Returns the document format emitted by this print service.
- * The returned string is a MIME type compatible with the
+ * The returned string is a MIME type compatible with the
* {@link DocFlavor} class.
- *
+ *
* @return The document format of the output.
*/
public abstract String getOutputFormat();
/**
* Returns the OutputStream of this object.
- *
+ *
* @return The OutputStream
*/
public OutputStream getOutputStream()
@@ -97,7 +97,7 @@ public abstract class StreamPrintService implements PrintService
/**
* Determines if this StreamPrintService object is disposed.
- *
+ *
* @return true if disposed already,
* otherwise false
*/
@@ -105,4 +105,4 @@ public abstract class StreamPrintService implements PrintService
{
return disposed;
}
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/print/StreamPrintServiceFactory.java b/libjava/classpath/javax/print/StreamPrintServiceFactory.java
index 90496b3..44f7159 100644
--- a/libjava/classpath/javax/print/StreamPrintServiceFactory.java
+++ b/libjava/classpath/javax/print/StreamPrintServiceFactory.java
@@ -1,4 +1,4 @@
-/* StreamPrintServiceFactory.java --
+/* StreamPrintServiceFactory.java --
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,83 +46,83 @@ import java.util.HashSet;
import java.util.Iterator;
/**
- * StreamPrintServiceFactory provides a static method to lookup
+ * StreamPrintServiceFactory provides a static method to lookup
* registered factories to construct StreamPrintService instances.
*
- * StreamPrintService are used to print into a provided output
- * stream in the document format provided by the stream print service
+ * StreamPrintService are used to print into a provided output
+ * stream in the document format provided by the stream print service
* implementation.
*
- * Implementations are located and loaded automatically through the SPI JAR
- * file specification. Therefore implementation classes must provide a default
+ * Implementations are located and loaded automatically through the SPI JAR
+ * file specification. Therefore implementation classes must provide a default
* constructor for instantiation.
*
- *
+ *
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public abstract class StreamPrintServiceFactory
-{
+{
/**
* Default public constructor.
- * Used for automatic loading and instantiation through
+ * Used for automatic loading and instantiation through
* the SPI jar file specification.
*/
public StreamPrintServiceFactory()
{
// nothing to do
}
-
+
/**
- * Searches for matching factories providing stream print services that
- * support the printing of documents with the given document flavor into
+ * Searches for matching factories providing stream print services that
+ * support the printing of documents with the given document flavor into
* the given output mime type.
- *
- * @param flavor the document flavor needed, null doesn't
+ *
+ * @param flavor the document flavor needed, null doesn't
* constrain the lookup result.
- * @param outputMimeType the mime type needed, null doesn't
+ * @param outputMimeType the mime type needed, null doesn't
* constrain the lookup result.
- *
+ *
* @return The matching StreamPrintServiceFactory instances.
*/
public static StreamPrintServiceFactory[] lookupStreamPrintServiceFactories(
DocFlavor flavor, String outputMimeType)
{
HashSet set = new HashSet();
-
- Iterator it =
+
+ Iterator it =
ServiceFactory.lookupProviders(StreamPrintServiceFactory.class);
-
+
while (it.hasNext())
{
StreamPrintServiceFactory tmp = (StreamPrintServiceFactory) it.next();
if (tmp.getOutputFormat().equals(outputMimeType)
&& Arrays.asList(tmp.getSupportedDocFlavors()).contains(flavor))
- set.add(tmp);
+ set.add(tmp);
}
-
+
StreamPrintServiceFactory[] tmp = new StreamPrintServiceFactory[set.size()];
- return (StreamPrintServiceFactory[]) set.toArray(tmp);
- }
-
+ return (StreamPrintServiceFactory[]) set.toArray(tmp);
+ }
+
/**
* Returns the output format supported by this factory.
- *
+ *
* @return The mime type of the output format as string representation.
*/
public abstract String getOutputFormat();
-
+
/**
* Returns the document flavors this factory supports as flavors
* for the input documents.
- *
+ *
* @return The array of supported document flavors.
*/
public abstract DocFlavor[] getSupportedDocFlavors();
-
+
/**
* Constructs a StreamPrintService which directs its output
* the given output stream.
- *
+ *
* @param out the output stream for the produced document.
* @return The constructed stream print service.
*/
diff --git a/libjava/classpath/javax/print/URIException.java b/libjava/classpath/javax/print/URIException.java
index 9b22bdf..cedcbaa 100644
--- a/libjava/classpath/javax/print/URIException.java
+++ b/libjava/classpath/javax/print/URIException.java
@@ -41,15 +41,15 @@ package javax.print;
import java.net.URI;
/**
- * URIException specifies methods a specific subclass of
- * {@link javax.print.PrintException} may implement to provide further
+ * URIException specifies methods a specific subclass of
+ * {@link javax.print.PrintException} may implement to provide further
* informations of printing errors if URI problems are involved.
*
- * There exists no PrintException class implementing this
- * interface. Providing this extension in PrintException
- * subclasses is left to the concrete print service implementation.
+ * There exists no PrintException class implementing this
+ * interface. Providing this extension in PrintException
+ * subclasses is left to the concrete print service implementation.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface URIException
@@ -58,30 +58,30 @@ public interface URIException
* Indicates that the provided URI is not accessible.
*/
int URIInaccessible = 1;
-
+
/**
* Indicates any other problem which is not defined by
* the other reason constants.
*/
int URIOtherProblem = -1;
-
+
/**
* Indicates that the print service does not support a specific
* uri scheme (for example the ftp scheme).
*/
int URISchemeNotSupported = 2;
-
+
/**
* Returns the reason for this exception as
* predefined constants in this interface.
- *
+ *
* @return The reason.
*/
int getReason();
-
+
/**
* Returns the unsupported URI which caused this exception.
- *
+ *
* @return The unsupported URI.
*/
URI getUnsupportedURI();
diff --git a/libjava/classpath/javax/print/attribute/Attribute.java b/libjava/classpath/javax/print/attribute/Attribute.java
index 8b98377..0fc7e4d 100644
--- a/libjava/classpath/javax/print/attribute/Attribute.java
+++ b/libjava/classpath/javax/print/attribute/Attribute.java
@@ -1,4 +1,4 @@
-/* Attribute.java --
+/* Attribute.java --
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ import java.io.Serializable;
/**
* Base interface of every printing attribute of the Java Print Service API.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface Attribute extends Serializable
@@ -49,17 +49,17 @@ public interface Attribute extends Serializable
/**
* Returns the category of the printing attribute which is the specific
* attribute class implementing this interface.
- *
+ *
* @return The concrete {@link Class} instance of the attribute class.
*/
Class< ? extends Attribute> getCategory ();
/**
* Returns the descriptive name of the attribute category.
- *
+ *
* Implementations of the Attribute interfaces providing equal
* category values have to return equal name values.
- *
+ *
* @return The name of the attribute category.
*/
String getName ();
diff --git a/libjava/classpath/javax/print/attribute/AttributeSet.java b/libjava/classpath/javax/print/attribute/AttributeSet.java
index c8130c1..d211141 100644
--- a/libjava/classpath/javax/print/attribute/AttributeSet.java
+++ b/libjava/classpath/javax/print/attribute/AttributeSet.java
@@ -1,4 +1,4 @@
-/* AttributeSet.java --
+/* AttributeSet.java --
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,26 +57,26 @@ package javax.print.attribute;
*
*
*
- * Attribute sets may be unmodifiable depending on the context of usage. If
- * used as read-only attribute set modifying operations throw an
+ * Attribute sets may be unmodifiable depending on the context of usage. If
+ * used as read-only attribute set modifying operations throw an
* {@link javax.print.attribute.UnmodifiableSetException}.
*
*
* The Java Print Service API provides implementation classes for the existing
* attribute set interfaces but applications may use their own implementations.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface AttributeSet
{
/**
- * Adds the specified attribute value to this attribute set
+ * Adds the specified attribute value to this attribute set
* if it is not already present.
- *
- * This operation removes any existing attribute of the same category
- * before adding the given attribute to the set.
- *
+ *
+ * This operation removes any existing attribute of the same category
+ * before adding the given attribute to the set.
+ *
* @param attribute the attribute to add.
* @return true if the set is changed, false otherwise.
* @throws NullPointerException if the attribute is null.
@@ -86,73 +86,73 @@ public interface AttributeSet
/**
* Adds all of the elements in the specified set to this attribute set.
- *
+ *
* @param attributes the set of attributes to add.
* @return true if the set is changed, false otherwise.
* @throws UnmodifiableSetException if the set does not support modification.
- *
+ *
* @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
-
+
/**
* Removes all attributes from this attribute set.
- *
+ *
* @throws UnmodifiableSetException if the set does not support modification.
*/
void clear ();
-
+
/**
- * Checks if this attributes set contains an attribute with the given
+ * Checks if this attributes set contains an attribute with the given
* category.
- *
+ *
* @param category the category to test for.
* @return true if an attribute of the category is contained
* in the set, false otherwise.
*/
boolean containsKey (Class> category);
-
+
/**
* Checks if this attribute set contains the given attribute.
- *
+ *
* @param attribute the attribute to test for.
* @return true if the attribute is contained in the set,
* false otherwise.
*/
boolean containsValue (Attribute attribute);
-
+
/**
* Tests this set for equality with the given object. true is
* returned, if the given object is also of type AttributeSet
* and the contained attributes are the same as in this set.
- *
+ *
* @param obj the Object to test.
* @return true if equal, false otherwise.
*/
boolean equals (Object obj);
-
+
/**
* Returns the attribute object contained in this set for the given attribute
- * category.
- *
- * @param category the category of the attribute. A Class
- * instance of a class implementing the Attribute interface.
- * @return The attribute for this category or null if no
- * attribute is contained for the given category.
+ * category.
+ *
+ * @param category the category of the attribute. A Class
+ * instance of a class implementing the Attribute interface.
+ * @return The attribute for this category or null if no
+ * attribute is contained for the given category.
* @throws NullPointerException if category is null.
- * @throws ClassCastException if category is not implementing
+ * @throws ClassCastException if category is not implementing
* Attribute.
*/
Attribute get (Class> category);
-
+
/**
* Returns the hashcode value. The hashcode value is the sum of all hashcodes
* of the attributes contained in this set.
- *
+ *
* @return The hashcode for this attribute set.
*/
int hashCode ();
-
+
/**
* Checks if the attribute set is empty.
*
@@ -163,30 +163,30 @@ public interface AttributeSet
/**
* Removes the given attribute from the set. If the given attribute is null
* nothing is done and false is returned.
- *
- * @param attribute the attribute to remove.
- * @return true if removed, false in all other cases.
+ *
+ * @param attribute the attribute to remove.
+ * @return true if removed, false in all other cases.
* @throws UnmodifiableSetException if the set does not support modification.
*/
boolean remove (Attribute attribute);
-
+
/**
* Removes the attribute entry of the given category from the set. If the given
* category is null nothing is done and false is returned.
- *
+ *
* @param category the category of the entry to be removed.
- * @return true if an attribute is removed, false in all other cases.
+ * @return true if an attribute is removed, false in all other cases.
* @throws UnmodifiableSetException if the set does not support modification.
*/
boolean remove (Class> category);
-
+
/**
* Returns the number of elements in this attribute set.
*
* @return The number of elements.
*/
int size ();
-
+
/**
* Returns the content of the attribute set as an array
*
diff --git a/libjava/classpath/javax/print/attribute/AttributeSetUtilities.java b/libjava/classpath/javax/print/attribute/AttributeSetUtilities.java
index 95c11a6..4b7378a 100644
--- a/libjava/classpath/javax/print/attribute/AttributeSetUtilities.java
+++ b/libjava/classpath/javax/print/attribute/AttributeSetUtilities.java
@@ -1,4 +1,4 @@
-/* AttributeSetUtilities.java --
+/* AttributeSetUtilities.java --
Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,7 +50,7 @@ import java.io.Serializable;
* if state changing methods are invoked.
*
*
- * Methods for getting a synchronized view of an attribute set are also
+ * Methods for getting a synchronized view of an attribute set are also
* available. This view provides synchronized (thread safe) access to the
* underlying wrapped attribute set.
*
the given object is an attribute of the given interface.
*
the category of given attribute is equals to a given category.
- *
the given object is a Class that implements the given
+ *
the given object is a Class that implements the given
* interface name.
*
- *
+ *
*/
public final class AttributeSetUtilities
{
/**
* This class isn't intended to be instantiated.
*/
- private AttributeSetUtilities()
+ private AttributeSetUtilities()
{
// only static methods
}
@@ -97,7 +97,7 @@ public final class AttributeSetUtilities
{
throw new UnmodifiableSetException();
}
-
+
public void clear()
{
throw new UnmodifiableSetException();
@@ -117,7 +117,7 @@ public final class AttributeSetUtilities
{
return attrset.equals(obj);
}
-
+
public Attribute get(Class interfaceName)
{
return attrset.get(interfaceName);
@@ -127,7 +127,7 @@ public final class AttributeSetUtilities
{
return attrset.hashCode();
}
-
+
public boolean isEmpty()
{
return attrset.isEmpty();
@@ -216,7 +216,7 @@ public final class AttributeSetUtilities
{
return attrset.addAll(attributes);
}
-
+
public synchronized void clear()
{
attrset.clear();
@@ -236,7 +236,7 @@ public final class AttributeSetUtilities
{
return attrset.equals(obj);
}
-
+
public synchronized Attribute get(Class interfaceName)
{
return attrset.get(interfaceName);
@@ -246,7 +246,7 @@ public final class AttributeSetUtilities
{
return attrset.hashCode();
}
-
+
public synchronized boolean isEmpty()
{
return attrset.isEmpty();
@@ -334,7 +334,7 @@ public final class AttributeSetUtilities
{
return new SynchronizedDocAttributeSet(attributeSet);
}
-
+
/**
* Returns a synchronized view of the given attribute set.
*
@@ -345,7 +345,7 @@ public final class AttributeSetUtilities
{
return new SynchronizedPrintJobAttributeSet(attributeSet);
}
-
+
/**
* Returns a synchronized view of the given attribute set.
*
@@ -356,7 +356,7 @@ public final class AttributeSetUtilities
{
return new SynchronizedPrintRequestAttributeSet(attributeSet);
}
-
+
/**
* Returns a synchronized view of the given attribute set.
*
@@ -367,7 +367,7 @@ public final class AttributeSetUtilities
{
return new SynchronizedPrintServiceAttributeSet(attributeSet);
}
-
+
/**
* Returns an unmodifiable view of the given attribute set.
*
@@ -378,7 +378,7 @@ public final class AttributeSetUtilities
{
return new UnmodifiableAttributeSet(attributeSet);
}
-
+
/**
* Returns an unmodifiable view of the given attribute set.
*
@@ -389,7 +389,7 @@ public final class AttributeSetUtilities
{
return new UnmodifiableDocAttributeSet(attributeSet);
}
-
+
/**
* Returns an unmodifiable view of the given attribute set.
*
@@ -400,7 +400,7 @@ public final class AttributeSetUtilities
{
return new UnmodifiablePrintJobAttributeSet(attributeSet);
}
-
+
/**
* Returns an unmodifiable view of the given attribute set.
*
@@ -411,7 +411,7 @@ public final class AttributeSetUtilities
{
return new UnmodifiablePrintRequestAttributeSet(attributeSet);
}
-
+
/**
* Returns an unmodifiable view of the given attribute set.
*
@@ -426,7 +426,7 @@ public final class AttributeSetUtilities
/**
* Verifies that the given object is a Class that
* implements the given interface name and returns it casted.
- *
+ *
* @param object the object to test.
* @param interfaceName the Class to verify against.
* @return object casted to Class
@@ -448,11 +448,11 @@ public final class AttributeSetUtilities
throw new ClassCastException();
}
-
+
/**
* Verifies that the given object is an attribute of the given interface.
* and returns it casted to the interface type.
- *
+ *
* @param object the object to test.
* @param interfaceName the Class to verify against.
* @return the object casted to Attribute
@@ -475,7 +475,7 @@ public final class AttributeSetUtilities
/**
* Verifies that the category of attribute is equals to the given category
* class.
- *
+ *
* @param category the category to test.
* @param attribute the attribute to verify.
*
diff --git a/libjava/classpath/javax/print/attribute/DateTimeSyntax.java b/libjava/classpath/javax/print/attribute/DateTimeSyntax.java
index 8cff702..7d587db 100644
--- a/libjava/classpath/javax/print/attribute/DateTimeSyntax.java
+++ b/libjava/classpath/javax/print/attribute/DateTimeSyntax.java
@@ -1,4 +1,4 @@
-/* DateTimeSyntax.java --
+/* DateTimeSyntax.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,17 +41,17 @@ import java.io.Serializable;
import java.util.Date;
/**
- * DateTimeSyntax is the abstract base class of all attribute
+ * DateTimeSyntax is the abstract base class of all attribute
* classes having a date and a time as value.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public abstract class DateTimeSyntax implements Cloneable, Serializable
{
private static final long serialVersionUID = -1400819079791208582L;
-
+
private Date value;
-
+
/**
* Creates a DateTimeSyntax with a given value.
*
@@ -79,10 +79,10 @@ public abstract class DateTimeSyntax implements Cloneable, Serializable
/**
* Tests if the given object is equal to this one.
- *
+ *
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
@@ -102,14 +102,14 @@ public abstract class DateTimeSyntax implements Cloneable, Serializable
{
return value.hashCode();
}
-
+
/**
* Returns the string representation for this object.
*
* @return The string representation.
*/
- public String toString()
+ public String toString()
{
- return value.toString();
+ return value.toString();
}
}
diff --git a/libjava/classpath/javax/print/attribute/DocAttribute.java b/libjava/classpath/javax/print/attribute/DocAttribute.java
index 9af3a70..56114f7 100644
--- a/libjava/classpath/javax/print/attribute/DocAttribute.java
+++ b/libjava/classpath/javax/print/attribute/DocAttribute.java
@@ -1,4 +1,4 @@
-/* DocAttribute.java --
+/* DocAttribute.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,20 +38,20 @@ exception statement from your version. */
package javax.print.attribute;
/**
- * Marker interface for all attribute classes describing attributes of
- * a {@link javax.print.Doc} object.
+ * Marker interface for all attribute classes describing attributes of
+ * a {@link javax.print.Doc} object.
*
- * Instances of implementing attribute classes may be collected in a
- * {@link javax.print.attribute.DocAttributeSet}.
+ * Instances of implementing attribute classes may be collected in a
+ * {@link javax.print.attribute.DocAttributeSet}.
*
* Attributes attached to a {@link javax.print.Doc} instance specify how the
- * data should be printed.
- * For example {@link javax.print.attribute.standard.Chromaticity} can be
+ * data should be printed.
+ * For example {@link javax.print.attribute.standard.Chromaticity} can be
* used to specify that a doc should be printed in color or monochrome.
*
- *
+ *
* @see javax.print.attribute.DocAttributeSet
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface DocAttribute extends Attribute
diff --git a/libjava/classpath/javax/print/attribute/DocAttributeSet.java b/libjava/classpath/javax/print/attribute/DocAttributeSet.java
index d8d09eb..35a2676 100644
--- a/libjava/classpath/javax/print/attribute/DocAttributeSet.java
+++ b/libjava/classpath/javax/print/attribute/DocAttributeSet.java
@@ -1,4 +1,4 @@
-/* DocAttributeSet.java --
+/* DocAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,28 +39,28 @@ package javax.print.attribute;
/**
* DocAttributeSet specifies an attribute set which only
- * allows printing attributes of type
+ * allows printing attributes of type
* {@link javax.print.attribute.DocAttribute}.
*
* The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are
- * respecified in this interface to indicate that only
+ * respecified in this interface to indicate that only
* DocAttribute instances are allowed in this set.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface DocAttributeSet extends AttributeSet
{
/**
- * Adds the specified attribute value to this attribute set
+ * Adds the specified attribute value to this attribute set
* if it is not already present.
- *
- * This operation removes any existing attribute of the same category
- * before adding the given attribute.
- *
+ *
+ * This operation removes any existing attribute of the same category
+ * before adding the given attribute.
+ *
* @param attribute the attribute to add.
* @return true if the set is changed, false otherwise.
- * @throws ClassCastException if attribute is not of type
+ * @throws ClassCastException if attribute is not of type
* DocAttribute.
* @throws NullPointerException if the attribute is null.
* @throws UnmodifiableSetException if the set does not support modification.
@@ -69,13 +69,13 @@ public interface DocAttributeSet extends AttributeSet
/**
* Adds all of the elements in the specified set to this attribute set.
- *
+ *
* @param attributes the set of attributes to add.
* @return true if the set is changed, false otherwise.
- * @throws ClassCastException if one of the attributes is not of type
+ * @throws ClassCastException if one of the attributes is not of type
* DocAttribute.
* @throws UnmodifiableSetException if the set does not support modification.
- *
+ *
* @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
diff --git a/libjava/classpath/javax/print/attribute/EnumSyntax.java b/libjava/classpath/javax/print/attribute/EnumSyntax.java
index 9a5e62d..e848dfc 100644
--- a/libjava/classpath/javax/print/attribute/EnumSyntax.java
+++ b/libjava/classpath/javax/print/attribute/EnumSyntax.java
@@ -1,4 +1,4 @@
-/* EnumSyntax.java --
+/* EnumSyntax.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,16 +43,16 @@ import java.io.Serializable;
/**
* EnumSyntax is the abstract base class of all enumeration
- * classes in the Java Print Service API.
+ * classes in the Java Print Service API.
*
- * Every enumeration class which extends from EnumSyntax provides several
+ * Every enumeration class which extends from EnumSyntax provides several
* enumeration objects as singletons of its class.
*
*
* Notes for implementing subclasses:
*
*
- * The values of all enumeration singelton instances have to be in a
+ * The values of all enumeration singelton instances have to be in a
* sequence which may start at any value. See: {@link #getOffset()}
*
* public class PrinterState extends EnumSyntax
* {
* public static final PrinterState IDLE = new PrinterState(1);
* public static final PrinterState PROCESSING = new PrinterState(2);
* public static final PrinterState STOPPED = new PrinterState(3);
- *
+ *
* protected PrinterState(int value)
* {
* super(value);
* }
- *
+ *
* // Overridden because values start not at zero !
* protected int getOffset()
* {
* return 1;
* }
- *
- * private static final String[] stringTable = { "idle", "processing",
+ *
+ * private static final String[] stringTable = { "idle", "processing",
* "stopped" };
- *
+ *
* protected String[] getStringTable()
* {
* return stringTable;
* }
- *
- * private static final PrinterState[] enumValueTable = { IDLE,
+ *
+ * private static final PrinterState[] enumValueTable = { IDLE,
* PROCESSING, STOPPED};
- *
+ *
* protected EnumSyntax[] getEnumValueTable()
* {
* return enumValueTable;
* }
* }
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public abstract class EnumSyntax implements Cloneable, Serializable
{
private static final long serialVersionUID = -2739521845085831642L;
-
+
private int value;
/**
@@ -146,7 +146,7 @@ public abstract class EnumSyntax implements Cloneable, Serializable
}
/**
- * Returns the hashcode for this object.
+ * Returns the hashcode for this object.
* The hashcode is the value of this enumeration object.
*
* @return The hashcode.
@@ -173,7 +173,7 @@ public abstract class EnumSyntax implements Cloneable, Serializable
&& index >= 0
&& index < table.length)
return table[index];
-
+
return "" + value;
}
@@ -193,12 +193,12 @@ public abstract class EnumSyntax implements Cloneable, Serializable
/**
* Needed for singelton semantics during deserialisation.
- *
+ *
* Subclasses must not override this class. Subclasses have to override
- * getEnumValueTable() and should override
+ * getEnumValueTable() and should override
* getStringTable() for correct serialization.
- *
- * @return The Object at index value - getOffset()
+ *
+ * @return The Object at index value - getOffset()
* in getEnumValueTable.
* @throws ObjectStreamException if getEnumValueTable() returns null.
*/
@@ -227,10 +227,10 @@ public abstract class EnumSyntax implements Cloneable, Serializable
}
/**
- * Returns the lowest used value by the enumerations of this class.
- *
+ * Returns the lowest used value by the enumerations of this class.
+ *
* The default implementation returns 0. This is enough if enumerations
- * start with a zero value. Otherwise subclasses need to override this
+ * start with a zero value. Otherwise subclasses need to override this
* method for serialization and return the lowest value they use.
* .
* @return The lowest used value used.
diff --git a/libjava/classpath/javax/print/attribute/HashAttributeSet.java b/libjava/classpath/javax/print/attribute/HashAttributeSet.java
index 0f6b007..39d0052 100644
--- a/libjava/classpath/javax/print/attribute/HashAttributeSet.java
+++ b/libjava/classpath/javax/print/attribute/HashAttributeSet.java
@@ -1,4 +1,4 @@
-/* HashAttributeSet.java --
+/* HashAttributeSet.java --
Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,7 +51,7 @@ import java.util.Iterator;
public class HashAttributeSet implements AttributeSet, Serializable
{
private static final long serialVersionUID = 5311560590283707917L;
-
+
private Class myInterface;
private transient HashMap attributeMap = new HashMap();
@@ -95,7 +95,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
* Creates a HashAttributeSet object with attributes
* of the given attributes set in it.
*
- * @param attributes the attributes set to put into the set. If
+ * @param attributes the attributes set to put into the set. If
* null an empty set is created.
*/
public HashAttributeSet(AttributeSet attributes)
@@ -114,14 +114,14 @@ public class HashAttributeSet implements AttributeSet, Serializable
{
if (interfaceName == null)
throw new NullPointerException("interfaceName may not be null");
-
+
myInterface = interfaceName;
}
-
+
/**
* Creates a HashAttributeSet object with the given
* attribute in it.
- *
+ *
* @param attribute the attribute to put into the set.
* @param interfaceName the interface that all members must implement.
*
@@ -132,10 +132,10 @@ public class HashAttributeSet implements AttributeSet, Serializable
protected HashAttributeSet(Attribute attribute, Class> interfaceName)
{
this(interfaceName);
-
+
if (attribute == null)
throw new NullPointerException();
-
+
addInternal(attribute, interfaceName);
}
@@ -154,7 +154,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
protected HashAttributeSet(Attribute[] attributes, Class> interfaceName)
{
this(interfaceName);
-
+
if (attributes != null)
{
for (int index = 0; index < attributes.length; index++)
@@ -166,7 +166,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
* Creates a HashAttributeSet object with attributes
* of the given attributes set in it.
*
- * @param attributes the attributes set to put into the set. If
+ * @param attributes the attributes set to put into the set. If
* null an empty set is created.
* @param interfaceName the interface that all members must implement.
*
@@ -176,18 +176,18 @@ public class HashAttributeSet implements AttributeSet, Serializable
protected HashAttributeSet(AttributeSet attributes, Class> interfaceName)
{
this(interfaceName);
-
+
if (attributes != null)
addAllInternal(attributes, interfaceName);
}
/**
- * Adds the specified attribute value to this attribute set
+ * Adds the specified attribute value to this attribute set
* if it is not already present.
- *
- * This operation removes any existing attribute of the same category
- * before adding the given attribute to the set.
- *
+ *
+ * This operation removes any existing attribute of the same category
+ * before adding the given attribute to the set.
+ *
* @param attribute the attribute to add.
* @return true if the set is changed, false otherwise.
* @throws NullPointerException if the attribute is null.
@@ -214,11 +214,11 @@ public class HashAttributeSet implements AttributeSet, Serializable
/**
* Adds all of the elements in the specified set to this attribute set.
- *
+ *
* @param attributes the set of attributes to add.
* @return true if the set is changed, false otherwise.
* @throws UnmodifiableSetException if the set does not support modification.
- *
+ *
* @see #add(Attribute)
*/
public boolean addAll(AttributeSet attributes)
@@ -240,7 +240,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
/**
* Removes all attributes from this attribute set.
- *
+ *
* @throws UnmodifiableSetException if the set does not support modification.
*/
public void clear()
@@ -249,9 +249,9 @@ public class HashAttributeSet implements AttributeSet, Serializable
}
/**
- * Checks if this attributes set contains an attribute with the given
+ * Checks if this attributes set contains an attribute with the given
* category.
- *
+ *
* @param category the category to test for.
* @return true if an attribute of the category is contained
* in the set, false otherwise.
@@ -263,7 +263,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
/**
* Checks if this attribute set contains the given attribute.
- *
+ *
* @param attribute the attribute to test for.
* @return true if the attribute is contained in the set,
* false otherwise.
@@ -277,7 +277,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
* Tests this set for equality with the given object. true is
* returned, if the given object is also of type AttributeSet
* and the contained attributes are the same as in this set.
- *
+ *
* @param obj the Object to test.
* @return true if equal, false otherwise.
*/
@@ -291,28 +291,28 @@ public class HashAttributeSet implements AttributeSet, Serializable
/**
* Returns the attribute object contained in this set for the given attribute
- * category.
- *
- * @param category the category of the attribute. A Class
- * instance of a class implementing the Attribute interface.
- * @return The attribute for this category or null if no
- * attribute is contained for the given category.
+ * category.
+ *
+ * @param category the category of the attribute. A Class
+ * instance of a class implementing the Attribute interface.
+ * @return The attribute for this category or null if no
+ * attribute is contained for the given category.
* @throws NullPointerException if category is null.
- * @throws ClassCastException if category is not implementing
+ * @throws ClassCastException if category is not implementing
* Attribute.
*/
public Attribute get(Class> category)
{
if (category == null)
throw new NullPointerException("category may not be null");
-
+
return (Attribute) attributeMap.get(category);
}
-
+
/**
* Returns the hashcode value. The hashcode value is the sum of all hashcodes
* of the attributes contained in this set.
- *
+ *
* @return The hashcode for this attribute set.
*/
public int hashCode()
@@ -321,7 +321,7 @@ public class HashAttributeSet implements AttributeSet, Serializable
Iterator it = attributeMap.values().iterator();
while (it.hasNext())
hashcode = hashcode + it.next().hashCode();
-
+
return hashcode;
}
@@ -338,9 +338,9 @@ public class HashAttributeSet implements AttributeSet, Serializable
/**
* Removes the given attribute from the set. If the given attribute is null
* nothing is done and false is returned.
- *
- * @param attribute the attribute to remove.
- * @return true if removed, false in all other cases.
+ *
+ * @param attribute the attribute to remove.
+ * @return true if removed, false in all other cases.
* @throws UnmodifiableSetException if the set does not support modification.
*/
public boolean remove(Attribute attribute)
@@ -354,9 +354,9 @@ public class HashAttributeSet implements AttributeSet, Serializable
/**
* Removes the attribute entry of the given category from the set. If the given
* category is null nothing is done and false is returned.
- *
+ *
* @param category the category of the entry to be removed.
- * @return true if an attribute is removed, false in all other cases.
+ * @return true if an attribute is removed, false in all other cases.
* @throws UnmodifiableSetException if the set does not support modification.
*/
public boolean remove(Class> category)
@@ -393,10 +393,10 @@ public class HashAttributeSet implements AttributeSet, Serializable
array[index] = (Attribute) it.next();
index++;
}
-
+
return array;
}
-
+
// Implemented as specified in serialized form
private void readObject(ObjectInputStream s)
throws ClassNotFoundException, IOException
@@ -407,13 +407,13 @@ public class HashAttributeSet implements AttributeSet, Serializable
for (int i=0; i < size; i++)
add((Attribute) s.readObject());
}
-
+
private void writeObject(ObjectOutputStream s) throws IOException
{
s.writeObject(myInterface);
s.writeInt(size());
Iterator it = attributeMap.values().iterator();
while (it.hasNext())
- s.writeObject(it.next());
+ s.writeObject(it.next());
}
}
diff --git a/libjava/classpath/javax/print/attribute/HashDocAttributeSet.java b/libjava/classpath/javax/print/attribute/HashDocAttributeSet.java
index 2317db3..73c2586 100644
--- a/libjava/classpath/javax/print/attribute/HashDocAttributeSet.java
+++ b/libjava/classpath/javax/print/attribute/HashDocAttributeSet.java
@@ -1,4 +1,4 @@
-/* HashDocAttributeSet.java --
+/* HashDocAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,7 +47,7 @@ public class HashDocAttributeSet extends HashAttributeSet
implements DocAttributeSet, Serializable
{
private static final long serialVersionUID = -1128534486061432528L;
-
+
/**
* Creates an empty HashDocAttributeSet object.
*/
@@ -88,7 +88,7 @@ public class HashDocAttributeSet extends HashAttributeSet
* Creates a HashDocAttributeSet object with the attributes
* of the given attributes set in it.
*
- * @param attributes the attributes set to put into the set. If
+ * @param attributes the attributes set to put into the set. If
* null an empty set is created.
* @exception ClassCastException if any element of attributes is not
* an instance of DocAttribute
diff --git a/libjava/classpath/javax/print/attribute/HashPrintJobAttributeSet.java b/libjava/classpath/javax/print/attribute/HashPrintJobAttributeSet.java
index ac4c902..ddeda3b 100644
--- a/libjava/classpath/javax/print/attribute/HashPrintJobAttributeSet.java
+++ b/libjava/classpath/javax/print/attribute/HashPrintJobAttributeSet.java
@@ -1,4 +1,4 @@
-/* HashPrintJobAttributeSet.java --
+/* HashPrintJobAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,7 +47,7 @@ public class HashPrintJobAttributeSet extends HashAttributeSet
implements Serializable, PrintJobAttributeSet
{
private static final long serialVersionUID = -4204473656070350348L;
-
+
/**
* Creates an empty HashPrintJobAttributeSet object.
*/
@@ -55,7 +55,7 @@ public class HashPrintJobAttributeSet extends HashAttributeSet
{
super(PrintJobAttribute.class);
}
-
+
/**
* Creates a HashPrintJobAttributeSet object with the given
* attribute in it.
@@ -68,7 +68,7 @@ public class HashPrintJobAttributeSet extends HashAttributeSet
{
super(attribute, PrintJobAttribute.class);
}
-
+
/**
* Creates a HashPrintJobAttributeSet object with the given
* attributes in it.
@@ -83,12 +83,12 @@ public class HashPrintJobAttributeSet extends HashAttributeSet
{
super(attributes, PrintJobAttribute.class);
}
-
+
/**
* Creates a HashPrintJobAttributeSet object with the attributes
* of the given attributes set in it.
*
- * @param attributes the attributes set to put into the set. If
+ * @param attributes the attributes set to put into the set. If
* null an empty set is created.
* @exception ClassCastException if any element of attributes is not
* an instance of PrintJobAttribute
diff --git a/libjava/classpath/javax/print/attribute/HashPrintRequestAttributeSet.java b/libjava/classpath/javax/print/attribute/HashPrintRequestAttributeSet.java
index e74c0e0..61c2537 100644
--- a/libjava/classpath/javax/print/attribute/HashPrintRequestAttributeSet.java
+++ b/libjava/classpath/javax/print/attribute/HashPrintRequestAttributeSet.java
@@ -1,4 +1,4 @@
-/* HashPrintRequestAttributeSet.java --
+/* HashPrintRequestAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,7 +47,7 @@ public class HashPrintRequestAttributeSet extends HashAttributeSet
implements Serializable, PrintRequestAttributeSet
{
private static final long serialVersionUID = 2364756266107751933L;
-
+
/**
* Creates an empty HashPrintRequestAttributeSet object.
*/
@@ -55,7 +55,7 @@ public class HashPrintRequestAttributeSet extends HashAttributeSet
{
super(PrintRequestAttribute.class);
}
-
+
/**
* Creates a HashPrintRequestAttributeSet object with the given
* attribute in it.
@@ -68,7 +68,7 @@ public class HashPrintRequestAttributeSet extends HashAttributeSet
{
super(attribute, PrintRequestAttribute.class);
}
-
+
/**
* Creates a HashPrintRequestAttributeSet object with the given
* attributes in it.
@@ -83,12 +83,12 @@ public class HashPrintRequestAttributeSet extends HashAttributeSet
{
super(attributes, PrintRequestAttribute.class);
}
-
+
/**
* Creates a HashPrintRequestAttributeSet object with the attributes
* of the given attributes set in it.
*
- * @param attributes the attributes set to put into the set. If
+ * @param attributes the attributes set to put into the set. If
* null an empty set is created.
* @exception ClassCastException if any element of attributes is not
* an instance of PrintRequestAttribute
diff --git a/libjava/classpath/javax/print/attribute/HashPrintServiceAttributeSet.java b/libjava/classpath/javax/print/attribute/HashPrintServiceAttributeSet.java
index 155514f..bc934de 100644
--- a/libjava/classpath/javax/print/attribute/HashPrintServiceAttributeSet.java
+++ b/libjava/classpath/javax/print/attribute/HashPrintServiceAttributeSet.java
@@ -1,4 +1,4 @@
-/* HashPrintServiceAttributeSet.java --
+/* HashPrintServiceAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,7 +47,7 @@ public class HashPrintServiceAttributeSet extends HashAttributeSet
implements Serializable, PrintServiceAttributeSet
{
private static final long serialVersionUID = 6642904616179203070L;
-
+
/**
* Creates an empty HashPrintServiceAttributeSet object.
*/
@@ -55,7 +55,7 @@ public class HashPrintServiceAttributeSet extends HashAttributeSet
{
super(PrintServiceAttribute.class);
}
-
+
/**
* Creates a HashPrintServiceAttributeSet object with the given
* attribute in it.
@@ -68,7 +68,7 @@ public class HashPrintServiceAttributeSet extends HashAttributeSet
{
super(attribute, PrintServiceAttribute.class);
}
-
+
/**
* Creates a HashPrintServiceAttributeSet object with the given
* attributes in it.
@@ -83,12 +83,12 @@ public class HashPrintServiceAttributeSet extends HashAttributeSet
{
super(attributes, PrintServiceAttribute.class);
}
-
+
/**
* Creates a HashPrintServiceAttributeSet object with the attributes
* of the given attributes set in it.
*
- * @param attributes the attributes set to put into the set. If
+ * @param attributes the attributes set to put into the set. If
* null an empty set is created.
* @exception ClassCastException if any element of attributes is not
* an instance of PrintServiceAttribute
diff --git a/libjava/classpath/javax/print/attribute/IntegerSyntax.java b/libjava/classpath/javax/print/attribute/IntegerSyntax.java
index c2f9224..b53faa2 100644
--- a/libjava/classpath/javax/print/attribute/IntegerSyntax.java
+++ b/libjava/classpath/javax/print/attribute/IntegerSyntax.java
@@ -1,4 +1,4 @@
-/* IntegerSyntax.java --
+/* IntegerSyntax.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,9 +40,9 @@ package javax.print.attribute;
import java.io.Serializable;
/**
- * IntegerSyntax is the abstract base class of all attribute
+ * IntegerSyntax is the abstract base class of all attribute
* classes having an integer as value.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public abstract class IntegerSyntax implements Cloneable, Serializable
@@ -94,7 +94,7 @@ public abstract class IntegerSyntax implements Cloneable, Serializable
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/PrintJobAttribute.java b/libjava/classpath/javax/print/attribute/PrintJobAttribute.java
index fd36634..5954824 100644
--- a/libjava/classpath/javax/print/attribute/PrintJobAttribute.java
+++ b/libjava/classpath/javax/print/attribute/PrintJobAttribute.java
@@ -1,4 +1,4 @@
-/* PrintJobAttribute.java --
+/* PrintJobAttribute.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,19 +39,19 @@ package javax.print.attribute;
/**
* Marker interface for all attribute classes describing attributes or the
- * status of a ({@link javax.print.DocPrintJob} object.
+ * status of a ({@link javax.print.DocPrintJob} object.
*
- * Instances of implementing attribute classes may be collected in a
+ * Instances of implementing attribute classes may be collected in a
* {@link javax.print.attribute.PrintJobAttributeSet}.
*
* A print service uses attributes of this type to inform about the status
- * of a print job.
- * For example {@link javax.print.attribute.standard.DateTimeAtProcessing}
- * is used to report at which date and time a job has started processing.
+ * of a print job.
+ * For example {@link javax.print.attribute.standard.DateTimeAtProcessing}
+ * is used to report at which date and time a job has started processing.
*
- *
+ *
* @see javax.print.attribute.PrintJobAttributeSet
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintJobAttribute extends Attribute
diff --git a/libjava/classpath/javax/print/attribute/PrintJobAttributeSet.java b/libjava/classpath/javax/print/attribute/PrintJobAttributeSet.java
index 6283ae1..232f4b3 100644
--- a/libjava/classpath/javax/print/attribute/PrintJobAttributeSet.java
+++ b/libjava/classpath/javax/print/attribute/PrintJobAttributeSet.java
@@ -1,4 +1,4 @@
-/* PrintJobAttributeSet.java --
+/* PrintJobAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,28 +39,28 @@ package javax.print.attribute;
/**
* PrintJobAttributeSet specifies an attribute set which only
- * allows printing attributes of type
+ * allows printing attributes of type
* {@link javax.print.attribute.PrintJobAttribute}.
*
* The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are
- * respecified in this interface to indicate that only
+ * respecified in this interface to indicate that only
* PrintJobAttribute instances are allowed in this set.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintJobAttributeSet extends AttributeSet
{
/**
- * Adds the specified attribute value to this attribute set
+ * Adds the specified attribute value to this attribute set
* if it is not already present.
- *
- * This operation removes any existing attribute of the same category
- * before adding the given attribute.
- *
+ *
+ * This operation removes any existing attribute of the same category
+ * before adding the given attribute.
+ *
* @param attribute the attribute to add.
* @return true if the set is changed, false otherwise.
- * @throws ClassCastException if attribute is not of type
+ * @throws ClassCastException if attribute is not of type
* PrintJobAttribute.
* @throws NullPointerException if the attribute is null.
* @throws UnmodifiableSetException if the set does not support modification.
@@ -69,13 +69,13 @@ public interface PrintJobAttributeSet extends AttributeSet
/**
* Adds all of the elements in the specified set to this attribute set.
- *
+ *
* @param attributes the set of attributes to add.
* @return true if the set is changed, false otherwise.
- * @throws ClassCastException if one of the attributes is not of type
+ * @throws ClassCastException if one of the attributes is not of type
* PrintJobAttribute.
* @throws UnmodifiableSetException if the set does not support modification.
- *
+ *
* @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
diff --git a/libjava/classpath/javax/print/attribute/PrintRequestAttribute.java b/libjava/classpath/javax/print/attribute/PrintRequestAttribute.java
index 8a05b75d..037838c 100644
--- a/libjava/classpath/javax/print/attribute/PrintRequestAttribute.java
+++ b/libjava/classpath/javax/print/attribute/PrintRequestAttribute.java
@@ -1,4 +1,4 @@
-/* PrintRequestAttribute.java --
+/* PrintRequestAttribute.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,14 +39,14 @@ package javax.print.attribute;
/**
* Marker interface for all attribute classes which specify a requested
- * attribute of {@link javax.print.DocPrintJob} object.
+ * attribute of {@link javax.print.DocPrintJob} object.
*
- * Instances of implementing attribute classes may be collected in a
+ * Instances of implementing attribute classes may be collected in a
* {@link javax.print.attribute.PrintRequestAttributeSet}.
*
- *
+ *
* @see javax.print.attribute.PrintRequestAttributeSet
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintRequestAttribute extends Attribute
diff --git a/libjava/classpath/javax/print/attribute/PrintRequestAttributeSet.java b/libjava/classpath/javax/print/attribute/PrintRequestAttributeSet.java
index 350d9a6..6009806 100644
--- a/libjava/classpath/javax/print/attribute/PrintRequestAttributeSet.java
+++ b/libjava/classpath/javax/print/attribute/PrintRequestAttributeSet.java
@@ -1,4 +1,4 @@
-/* PrintRequestAttributeSet.java --
+/* PrintRequestAttributeSet.java --
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,28 +39,28 @@ package javax.print.attribute;
/**
* PrintRequestAttributeSet specifies an attribute set which only
- * allows printing attributes of type
+ * allows printing attributes of type
* {@link javax.print.attribute.PrintRequestAttribute}.
*
* The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are
- * respecified in this interface to indicate that only
+ * respecified in this interface to indicate that only
* PrintRequestAttribute instances are allowed in this set.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintRequestAttributeSet extends AttributeSet
{
/**
- * Adds the specified attribute value to this attribute set
+ * Adds the specified attribute value to this attribute set
* if it is not already present.
- *
- * This operation removes any existing attribute of the same category
- * before adding the given attribute.
- *
+ *
+ * This operation removes any existing attribute of the same category
+ * before adding the given attribute.
+ *
* @param attribute the attribute to add.
* @return true if the set is changed, false otherwise.
- * @throws ClassCastException if attribute is not of type
+ * @throws ClassCastException if attribute is not of type
* PrintRequestAttribute.
* @throws NullPointerException if the attribute is null.
* @throws UnmodifiableSetException if the set does not support modification.
@@ -69,13 +69,13 @@ public interface PrintRequestAttributeSet extends AttributeSet
/**
* Adds all of the elements in the specified set to this attribute set.
- *
+ *
* @param attributes the set of attributes to add.
* @return true if the set is changed, false otherwise.
- * @throws ClassCastException if one of the attributes is not of type
+ * @throws ClassCastException if one of the attributes is not of type
* PrintRequestAttribute.
* @throws UnmodifiableSetException if the set does not support modification.
- *
+ *
* @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
diff --git a/libjava/classpath/javax/print/attribute/PrintServiceAttribute.java b/libjava/classpath/javax/print/attribute/PrintServiceAttribute.java
index 213f437..82d2692 100644
--- a/libjava/classpath/javax/print/attribute/PrintServiceAttribute.java
+++ b/libjava/classpath/javax/print/attribute/PrintServiceAttribute.java
@@ -1,4 +1,4 @@
-/* PrintServiceAttribute.java --
+/* PrintServiceAttribute.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,19 +39,19 @@ package javax.print.attribute;
/**
* Marker interface for all attribute classes describing parameters
- * or the status of a {@link javax.print.PrintService}.
+ * or the status of a {@link javax.print.PrintService}.
*
- * Instances of implementing attribute classes may be collected in a
+ * Instances of implementing attribute classes may be collected in a
* {@link javax.print.attribute.PrintServiceAttributeSet}.
*
* A print service uses attributes of this type to inform about the status
- * or the specific capabilities of itself.
+ * or the specific capabilities of itself.
* For example {@link javax.print.attribute.standard.PagesPerMinute} is used
- * to specify the average printable pages per minute of the print service.
+ * to specify the average printable pages per minute of the print service.
*
- *
+ *
* @see javax.print.attribute.PrintServiceAttributeSet
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintServiceAttribute extends Attribute
diff --git a/libjava/classpath/javax/print/attribute/PrintServiceAttributeSet.java b/libjava/classpath/javax/print/attribute/PrintServiceAttributeSet.java
index fa22ee0..418a599 100644
--- a/libjava/classpath/javax/print/attribute/PrintServiceAttributeSet.java
+++ b/libjava/classpath/javax/print/attribute/PrintServiceAttributeSet.java
@@ -1,4 +1,4 @@
-/* PrintServiceAttributeSet.java --
+/* PrintServiceAttributeSet.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -39,28 +39,28 @@ package javax.print.attribute;
/**
* PrintServiceAttributeSet specifies an attribute set which only
- * allows printing attributes of type
+ * allows printing attributes of type
* {@link javax.print.attribute.PrintServiceAttribute}.
*
* The methods {@link #add(Attribute)} and {@link #addAll(AttributeSet)} are
- * respecified in this interface to indicate that only
+ * respecified in this interface to indicate that only
* PrintServiceAttribute instances are allowed in this set.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintServiceAttributeSet extends AttributeSet
{
/**
- * Adds the specified attribute value to this attribute set
+ * Adds the specified attribute value to this attribute set
* if it is not already present.
- *
- * This operation removes any existing attribute of the same category
- * before adding the given attribute.
- *
+ *
+ * This operation removes any existing attribute of the same category
+ * before adding the given attribute.
+ *
* @param attribute the attribute to add.
* @return true if the set is changed, false otherwise.
- * @throws ClassCastException if attribute is not of type
+ * @throws ClassCastException if attribute is not of type
* PrintServiceAttribute.
* @throws NullPointerException if the attribute is null.
* @throws UnmodifiableSetException if the set does not support modification.
@@ -69,13 +69,13 @@ public interface PrintServiceAttributeSet extends AttributeSet
/**
* Adds all of the elements in the specified set to this attribute set.
- *
+ *
* @param attributes the set of attributes to add.
* @return true if the set is changed, false otherwise.
- * @throws ClassCastException if one of the attributes is not of type
+ * @throws ClassCastException if one of the attributes is not of type
* PrintServiceAttribute.
* @throws UnmodifiableSetException if the set does not support modification.
- *
+ *
* @see #add(Attribute)
*/
boolean addAll (AttributeSet attributes);
diff --git a/libjava/classpath/javax/print/attribute/ResolutionSyntax.java b/libjava/classpath/javax/print/attribute/ResolutionSyntax.java
index aca4c01..54468d0 100644
--- a/libjava/classpath/javax/print/attribute/ResolutionSyntax.java
+++ b/libjava/classpath/javax/print/attribute/ResolutionSyntax.java
@@ -1,4 +1,4 @@
-/* ResolutionSyntax.java --
+/* ResolutionSyntax.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,11 +40,11 @@ package javax.print.attribute;
import java.io.Serializable;
/**
- * ResolutionSyntax is the abstract base class of all attribute
+ * ResolutionSyntax is the abstract base class of all attribute
* classes which provide a resolution as value (e.g. printer resolution).
*
* A ResolutionSyntax instance consists of two integer values
- * describing the resolution in feed and cross feed direction. The units of
+ * describing the resolution in feed and cross feed direction. The units of
* the given values is determined by two defined constants:
*
*
DPCM - dots per centimeter
@@ -56,25 +56,25 @@ import java.io.Serializable;
* one of the two constants defining the actual units of the given values.
*
*
- * There are different methods provided to return the resolution values in
+ * There are different methods provided to return the resolution values in
* either of the both units and to compare if a resolution is less than or
* equal to a given other resolution attribute.
*
*
* Internal storage:
- * The resolutions are stored internally as dots per 100 inches (dphi). The
+ * The resolutions are stored internally as dots per 100 inches (dphi). The
* values of the provided constants for dots per inch (value 100) and dots
* per centimeter (value 254) are used as conversion factors to the internal
* storage units. To get the internal dphi values a multiplication of a given
- * resolution value with its units constant value is needed. Retrieving the
- * resolution for specific units is done by dividing the internal stored
- * value through the units constant value. Clients are therefore able to
+ * resolution value with its units constant value is needed. Retrieving the
+ * resolution for specific units is done by dividing the internal stored
+ * value through the units constant value. Clients are therefore able to
* provide their own resolution units by supplying other conversion factors.
* Subclasses of ResolutionSyntax have access to the internal
- * resolution values through the protected methods
+ * resolution values through the protected methods
* {@link #getCrossFeedResolutionDphi()} and {@link #getFeedResolutionDphi()}.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public abstract class ResolutionSyntax
@@ -94,7 +94,7 @@ public abstract class ResolutionSyntax
private int crossFeedResolution;
private int feedResolution;
-
+
/**
* Creates a ResolutionSyntax object with the given arguments.
*
@@ -121,7 +121,7 @@ public abstract class ResolutionSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
@@ -130,7 +130,7 @@ public abstract class ResolutionSyntax
return false;
ResolutionSyntax tmp = (ResolutionSyntax) obj;
-
+
return (crossFeedResolution == tmp.getCrossFeedResolutionDphi()
&& feedResolution == tmp.getFeedResolutionDphi());
}
@@ -186,7 +186,7 @@ public abstract class ResolutionSyntax
{
return feedResolution;
}
-
+
/**
* Returns the resolution as two field array. Index 0 is the cross feed
* resolution, index 1 the feed resolution.
@@ -214,7 +214,7 @@ public abstract class ResolutionSyntax
}
/**
- * Checks if the given resolution attribute is a lower or equal
+ * Checks if the given resolution attribute is a lower or equal
* to this resolution object.
*
* @param other the resolution to check against
@@ -252,7 +252,7 @@ public abstract class ResolutionSyntax
* for the cross feed and F for the feed direction resolution.
* U denotes the units name if one is supplied.
*
- *
+ *
* @param units the units to use
* @param unitsName the name of the units. If null
* it is ommitted from the string representation.
@@ -263,7 +263,7 @@ public abstract class ResolutionSyntax
{
if (unitsName == null)
return getCrossFeedResolution(units) + "x" + getFeedResolution(units);
-
+
return ("" + getCrossFeedResolution(units)
+ "x" + getFeedResolution(units)
+ " " + unitsName);
diff --git a/libjava/classpath/javax/print/attribute/SetOfIntegerSyntax.java b/libjava/classpath/javax/print/attribute/SetOfIntegerSyntax.java
index 4c0dd2f..b1e0af1 100644
--- a/libjava/classpath/javax/print/attribute/SetOfIntegerSyntax.java
+++ b/libjava/classpath/javax/print/attribute/SetOfIntegerSyntax.java
@@ -1,4 +1,4 @@
-/* SetOfIntegerSyntax.java --
+/* SetOfIntegerSyntax.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,14 +45,14 @@ import java.util.Arrays;
import java.util.Comparator;
/**
- * SetOfIntegerSyntax is the abstract base class of all attribute
+ * SetOfIntegerSyntax is the abstract base class of all attribute
* classes which provide a set of non-negative integers as value (e.g. the
* page ranges to print) represented as single values or ranges of values.
*
* A SetOfIntegerSyntax instance consists of an integer array of
* ranges. Ranges may have the same lower and upper bound representing a single
- * integer value. Ranges with a lower bound greater than the upper bound are
- * null ranges and discarded. Ranges may overlap in their values. In no case
+ * integer value. Ranges with a lower bound greater than the upper bound are
+ * null ranges and discarded. Ranges may overlap in their values. In no case
* negative integers are allowed.
*
*
@@ -65,21 +65,21 @@ import java.util.Comparator;
* Constructor for an instance with one range of integer values.
*
*
SetOfIntegerSyntax(int[][] members)
- * Flexible constructor for an instance with several single integer values
- * and/or several ranges of integer values. The allowed array form is an
- * array of integer arrays of length one or two. Examples are:
+ * Flexible constructor for an instance with several single integer values
+ * and/or several ranges of integer values. The allowed array form is an
+ * array of integer arrays of length one or two. Examples are:
* int[0][] for empty set of integers, int[][] {{1}}
* , int[][] {{1,5}}, int[][] {{1,5},{7,9}},
* int[][] {{3,7},{19}}.
*
*
SetOfIntegerSyntax(String s)
- * Flexible constructor for an instance with several single integer values
+ * Flexible constructor for an instance with several single integer values
* and/or several ranges of integer values. The allowed String instance have
- * to be a String with comma separated ranges of integer values or single
+ * to be a String with comma separated ranges of integer values or single
* values. Ranges are represented by two integer with a hypen (-) or colon (:)
* between the lower and upper bound value. Whitespace characters are ignored.
- * Examples are: "" for an empty set of integers,
- * "1", "1-5", "1-5,7-9",
+ * Examples are: "" for an empty set of integers,
+ * "1", "1-5", "1-5,7-9",
* "3-7,19" and "1:2,4".
*
*
@@ -88,9 +88,9 @@ import java.util.Comparator;
* Internal storage:
* The set of integers are stored internally in a normalized array form.
* In the normalized array form the set of integer ranges are represented
- * in as few ranges as possible and overlapping ranges are merged. The ranges
- * are always represented as an integer array of length two with ranges
- * stored in {lower bound, upper bound} form. The ranges are stored in
+ * in as few ranges as possible and overlapping ranges are merged. The ranges
+ * are always represented as an integer array of length two with ranges
+ * stored in {lower bound, upper bound} form. The ranges are stored in
* ascending order, without any null ranges.
*
* @author Michael Koch (konqueror@gmx.de)
@@ -132,13 +132,13 @@ public abstract class SetOfIntegerSyntax
}
values[outIndex++] = values[save];
}
-
+
int[][] result = new int[outIndex][];
System.arraycopy(values, 0, result, 0, outIndex);
-
+
return result;
}
-
+
/**
* Creates a SetOfIntegerSyntax object.
*
@@ -203,17 +203,17 @@ public abstract class SetOfIntegerSyntax
}
}
}
-
+
this.members = normalize(newMembers, outIndex);
}
-
+
private boolean skipWhitespace(StringCharacterIterator i)
{
while (Character.isWhitespace(i.current()))
i.next();
return i.current() == CharacterIterator.DONE;
}
-
+
private boolean skipNumber(StringCharacterIterator i)
{
boolean readAny = false;
@@ -238,24 +238,24 @@ public abstract class SetOfIntegerSyntax
if (s == null)
this.members = normalize(new int[0][], 0);
else
- {
+ {
ArrayList vals = new ArrayList();
-
+
StringCharacterIterator it = new StringCharacterIterator(s);
-
+
while (true)
{
// Skip whitespace.
if (skipWhitespace(it))
break;
-
+
// Parse integer.
int index = it.getIndex();
if (! skipNumber(it))
throw new IllegalArgumentException();
int[] item = new int[2];
item[0] = Integer.parseInt(s.substring(index, it.getIndex()));
-
+
if (! skipWhitespace(it))
{
char c = it.current();
@@ -274,17 +274,17 @@ public abstract class SetOfIntegerSyntax
}
else
item[1] = item[0];
-
- if (item[0] <= item[1])
+
+ if (item[0] <= item[1])
vals.add(item);
-
+
if (skipWhitespace(it))
break;
if (it.current() != ',')
throw new IllegalArgumentException();
it.next();
}
-
+
members = normalize((int[][]) vals.toArray(new int[0][]), vals.size());
}
}
@@ -393,7 +393,7 @@ public abstract class SetOfIntegerSyntax
*
* @param x an integer value
*
- * @return The next smallest integer value, or -1 if there
+ * @return The next smallest integer value, or -1 if there
* is no greater integer in the set.
*/
public int next(int x)
diff --git a/libjava/classpath/javax/print/attribute/Size2DSyntax.java b/libjava/classpath/javax/print/attribute/Size2DSyntax.java
index 0b5c100..b9e0e25 100644
--- a/libjava/classpath/javax/print/attribute/Size2DSyntax.java
+++ b/libjava/classpath/javax/print/attribute/Size2DSyntax.java
@@ -1,4 +1,4 @@
-/* Size2DSyntax.java --
+/* Size2DSyntax.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,12 +40,12 @@ package javax.print.attribute;
import java.io.Serializable;
/**
- * Size2DSyntax is the abstract base class of all attribute
+ * Size2DSyntax is the abstract base class of all attribute
* classes which provide a two dimensional size as value (e.g. the size of
* a media like Letter or A4).
*
* A Size2DSyntax instance consists of two integer values
- * describing the size in the x and y dimension. The units of
+ * describing the size in the x and y dimension. The units of
* the given values is determined by two defined constants:
*
* A size 2D attribute is constructed by two values for the size of the x and
- * y dimension and the actual units of the given values as defined by the
+ * y dimension and the actual units of the given values as defined by the
* constants.
*
* Internal storage:
- * The size of the x,y dimensions are stored internally in micrometers. The
+ * The size of the x,y dimensions are stored internally in micrometers. The
* values of the provided constants for inch (value 25400) and millimeters
* (value 1000) are used as conversion factors to the internal storage units.
* To get the internal micrometers values a multiplication of a given
* size value with its units constant value is done. Retrieving the size value
- * for specific units is done by dividing the internal stored value by the
- * units constant value. Clients are therefore able to provide their own
+ * for specific units is done by dividing the internal stored value by the
+ * units constant value. Clients are therefore able to provide their own
* size units by supplying other conversion factors.
* Subclasses of Size2DSyntax have access to the internal
- * size values through the protected methods
+ * size values through the protected methods
* {@link #getXMicrometers()} and {@link #getYMicrometers()}.
*
*
@@ -221,7 +221,7 @@ public abstract class Size2DSyntax implements Cloneable, Serializable
return ((float) y) / ((float) units);
}
-
+
/**
* Returns the size in y direction in mircometers.
* To be used by sublcasses that need access to the internal storage value.
@@ -247,10 +247,10 @@ public abstract class Size2DSyntax implements Cloneable, Serializable
* Returns the string representation for this object.
*
* The returned string is in the form "XxY um" with X standing
- * for size in x and Y for the size in y direction. The used
+ * for size in x and Y for the size in y direction. The used
* micrometers units is indicated by the appended "um" notation.
*
- *
+ *
* @return The string representation in micrometers.
*/
public String toString()
@@ -262,11 +262,11 @@ public abstract class Size2DSyntax implements Cloneable, Serializable
* Returns the string representation for this object.
*
* The returned string is in the form "XxY U" with X standing
- * for size in x and Y for the size in y direction. U denotes
+ * for size in x and Y for the size in y direction. U denotes
* the units name if one is supplied. The values are given as
* floating point values.
*
- *
+ *
* @param units the units to use
* @param unitsName the name of the units. If null
* it is ommitted from the string representation.
@@ -277,7 +277,7 @@ public abstract class Size2DSyntax implements Cloneable, Serializable
{
if (unitsName == null)
return getX(units) + "x" + getY(units);
-
+
return getX(units) + "x" + getY(units) + " " + unitsName;
}
}
diff --git a/libjava/classpath/javax/print/attribute/SupportedValuesAttribute.java b/libjava/classpath/javax/print/attribute/SupportedValuesAttribute.java
index a001e7e..5380b46 100644
--- a/libjava/classpath/javax/print/attribute/SupportedValuesAttribute.java
+++ b/libjava/classpath/javax/print/attribute/SupportedValuesAttribute.java
@@ -1,4 +1,4 @@
-/* SupportedValuesAttribute.java --
+/* SupportedValuesAttribute.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -38,7 +38,7 @@ exception statement from your version. */
package javax.print.attribute;
/**
- * Marker interface for all attribute classes specifying the
+ * Marker interface for all attribute classes specifying the
* supported/allowed values for another printing attribute class.
*
* A {@link javax.print.PrintService} instance for example provides
@@ -46,11 +46,11 @@ package javax.print.attribute;
* that a specific attribute type is supported and if the supported values.
*
* E.g. a {@link javax.print.attribute.standard.JobPrioritySupported}
- * instance indicates that the attribute class
+ * instance indicates that the attribute class
* {@link javax.print.attribute.standard.JobPriority} is supported and
* provides the number of the possible priority levels.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface SupportedValuesAttribute extends Attribute
diff --git a/libjava/classpath/javax/print/attribute/TextSyntax.java b/libjava/classpath/javax/print/attribute/TextSyntax.java
index 2daab6e..43e3a9d 100644
--- a/libjava/classpath/javax/print/attribute/TextSyntax.java
+++ b/libjava/classpath/javax/print/attribute/TextSyntax.java
@@ -1,4 +1,4 @@
-/* TextSyntax.java --
+/* TextSyntax.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ import java.io.Serializable;
import java.util.Locale;
/**
- * TextSyntax is the abstract base class of all attribute
+ * TextSyntax is the abstract base class of all attribute
* classes which provide a string as value (e.g. the location of the printer).
*
* A TextSyntax instance consists of a string value and a
@@ -53,7 +53,7 @@ import java.util.Locale;
public abstract class TextSyntax implements Cloneable, Serializable
{
private static final long serialVersionUID = -8130648736378144102L;
-
+
private String value;
private Locale locale;
@@ -71,7 +71,7 @@ public abstract class TextSyntax implements Cloneable, Serializable
{
if (value == null)
throw new NullPointerException("value may not be null");
-
+
this.value = value;
this.locale = (locale == null ? Locale.getDefault() : locale);
}
@@ -119,7 +119,7 @@ public abstract class TextSyntax implements Cloneable, Serializable
return false;
TextSyntax tmp = (TextSyntax) obj;
-
+
return (value.equals(tmp.getValue())
&& locale.equals(tmp.getLocale()));
}
@@ -127,7 +127,7 @@ public abstract class TextSyntax implements Cloneable, Serializable
/**
* Returns a string representing the object. The returned
* string is the underlying text value of this object.
- *
+ *
* @return The string representation.
*/
public String toString()
diff --git a/libjava/classpath/javax/print/attribute/URISyntax.java b/libjava/classpath/javax/print/attribute/URISyntax.java
index 07deb4b..a0903a4 100644
--- a/libjava/classpath/javax/print/attribute/URISyntax.java
+++ b/libjava/classpath/javax/print/attribute/URISyntax.java
@@ -1,4 +1,4 @@
-/* URISyntax.java --
+/* URISyntax.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,9 +41,9 @@ import java.io.Serializable;
import java.net.URI;
/**
- * URISyntax is the abstract base class of all attribute
+ * URISyntax is the abstract base class of all attribute
* classes having an Uniform Resource Identifier URI as value.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public abstract class URISyntax
@@ -73,7 +73,7 @@ public abstract class URISyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/UnmodifiableSetException.java b/libjava/classpath/javax/print/attribute/UnmodifiableSetException.java
index ed1687c..6712266 100644
--- a/libjava/classpath/javax/print/attribute/UnmodifiableSetException.java
+++ b/libjava/classpath/javax/print/attribute/UnmodifiableSetException.java
@@ -1,4 +1,4 @@
-/* UnmodifiableSetException.java --
+/* UnmodifiableSetException.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -41,7 +41,7 @@ package javax.print.attribute;
/**
* Exception which is thrown if an operation on an unmodifiable set
* is invoked.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*
* @since 1.4
diff --git a/libjava/classpath/javax/print/attribute/standard/Chromaticity.java b/libjava/classpath/javax/print/attribute/standard/Chromaticity.java
index 3dec798..619341f 100644
--- a/libjava/classpath/javax/print/attribute/standard/Chromaticity.java
+++ b/libjava/classpath/javax/print/attribute/standard/Chromaticity.java
@@ -49,7 +49,7 @@ import javax.print.attribute.PrintRequestAttribute;
* should be printed in monochrome or color.
*
* The attribute interacts with the document to be printed. If the document
- * to be printed is a monochrome document it will be printed monochrome
+ * to be printed is a monochrome document it will be printed monochrome
* regardless of the value of this attribute category. However if it is a
* color document supplying the attribute value MONOCHROME
* will prepare the document to be printed in monochrome instead of color.
@@ -63,20 +63,20 @@ import javax.print.attribute.PrintRequestAttribute;
*
* IPP Compatibility: Chromaticity is not an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class Chromaticity extends EnumSyntax
implements DocAttribute, PrintRequestAttribute, PrintJobAttribute
{
private static final long serialVersionUID = 4660543931355214012L;
-
+
/** Specifies monochrome printing. */
public static final Chromaticity MONOCHROME = new Chromaticity(0);
-
+
/** Specifies color printing. */
public static final Chromaticity COLOR = new Chromaticity(1);
-
+
private static final String[] stringTable = { "monochrome", "color" };
private static final Chromaticity[] enumValueTable = { MONOCHROME, COLOR };
@@ -109,7 +109,7 @@ public final class Chromaticity extends EnumSyntax
{
return "chromaticity";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
@@ -130,5 +130,5 @@ public final class Chromaticity extends EnumSyntax
{
return enumValueTable;
}
-
+
}
diff --git a/libjava/classpath/javax/print/attribute/standard/ColorSupported.java b/libjava/classpath/javax/print/attribute/standard/ColorSupported.java
index c5e251a..2fa8fd7 100644
--- a/libjava/classpath/javax/print/attribute/standard/ColorSupported.java
+++ b/libjava/classpath/javax/print/attribute/standard/ColorSupported.java
@@ -43,7 +43,7 @@ import javax.print.attribute.PrintServiceAttribute;
/**
- * The ColorSupported printing attribute specifies if a
+ * The ColorSupported printing attribute specifies if a
* printing device is capable of color printing.
*
* This attributes just tells if a printer device supports color printing
@@ -56,7 +56,7 @@ import javax.print.attribute.PrintServiceAttribute;
* in the Java Print Service API. The IPP boolean value true corresponds
* to SUPPORTED and "false" to NOT_SUPPORTED.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class ColorSupported extends EnumSyntax
@@ -66,17 +66,17 @@ public final class ColorSupported extends EnumSyntax
/** The printer does not support printing in color. */
public static final ColorSupported NOT_SUPPORTED = new ColorSupported(0);
-
+
/** The printer supports printing in color. */
public static final ColorSupported SUPPORTED = new ColorSupported(1);
private static final String[] stringTable = { "not-supported", "supported" };
private static final ColorSupported[] enumValueTable = { NOT_SUPPORTED,
SUPPORTED };
-
+
/**
* Constructs a ColorSupported object.
- *
+ *
* @param value the enum value
*/
protected ColorSupported(int value)
@@ -103,7 +103,7 @@ public final class ColorSupported extends EnumSyntax
{
return "color-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/Compression.java b/libjava/classpath/javax/print/attribute/standard/Compression.java
index f2f4f1cc..412ed5a 100644
--- a/libjava/classpath/javax/print/attribute/standard/Compression.java
+++ b/libjava/classpath/javax/print/attribute/standard/Compression.java
@@ -52,7 +52,7 @@ import javax.print.attribute.EnumSyntax;
*
* IPP Compatibility: Compression is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class Compression extends EnumSyntax
@@ -62,24 +62,24 @@ public class Compression extends EnumSyntax
/** The print data is not compressed. */
public static final Compression NONE = new Compression(0);
-
+
/** The print data is ZIP compressed. */
public static final Compression DEFLATE = new Compression(1);
-
+
/** The print data is GNU Zip compressed. */
public static final Compression GZIP = new Compression(2);
-
+
/** The print data is UNIX compressed. */
public static final Compression COMPRESS = new Compression(3);
-
- private static final String[] stringTable = { "none", "deflate",
+
+ private static final String[] stringTable = { "none", "deflate",
"gzip", "compress" };
- private static final Compression[] enumValueTable = { NONE, DEFLATE,
+ private static final Compression[] enumValueTable = { NONE, DEFLATE,
GZIP, COMPRESS };
/**
* Constructs a Compression object.
- *
+ *
* @param value the enum value
*/
protected Compression(int value)
@@ -106,7 +106,7 @@ public class Compression extends EnumSyntax
{
return "compression";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/Copies.java b/libjava/classpath/javax/print/attribute/standard/Copies.java
index ea9a099..c4bc249 100644
--- a/libjava/classpath/javax/print/attribute/standard/Copies.java
+++ b/libjava/classpath/javax/print/attribute/standard/Copies.java
@@ -1,4 +1,4 @@
-/* Copies.java --
+/* Copies.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,22 +46,22 @@ import javax.print.attribute.PrintRequestAttribute;
* The Copies printing attribute specifies the number
* of copies to be printed.
*
- * Note: The effect of this attribute on jobs with multiple documents
- * is controlled by the job attribute
+ * Note: The effect of this attribute on jobs with multiple documents
+ * is controlled by the job attribute
* {@link javax.print.attribute.standard.MultipleDocumentHandling}.
*
*
* IPP Compatibility: Copies is an IPP 1.1 attribute.
*
* @see javax.print.attribute.standard.MultipleDocumentHandling
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class Copies extends IntegerSyntax
implements PrintJobAttribute, PrintRequestAttribute
{
private static final long serialVersionUID = -6426631521680023833L;
-
+
/**
* Creates a Copies object.
*
@@ -76,13 +76,13 @@ public final class Copies extends IntegerSyntax
if (value < 1)
throw new IllegalArgumentException("value may not be less than 1");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/CopiesSupported.java b/libjava/classpath/javax/print/attribute/standard/CopiesSupported.java
index 1f62f48..d8af8eb 100644
--- a/libjava/classpath/javax/print/attribute/standard/CopiesSupported.java
+++ b/libjava/classpath/javax/print/attribute/standard/CopiesSupported.java
@@ -44,12 +44,12 @@ import javax.print.attribute.SupportedValuesAttribute;
/**
* The CopiesSupported attribute specifies the supported
- * value or range of values for the
- * {@link javax.print.attribute.standard.Copies} attribute.
+ * value or range of values for the
+ * {@link javax.print.attribute.standard.Copies} attribute.
*
* IPP Compatibility: CopiesSupported is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -60,25 +60,25 @@ public final class CopiesSupported extends SetOfIntegerSyntax
/**
* Constructs a CopiesSupported object with
- * the given value. This means that only this value is
+ * the given value. This means that only this value is
* supported for copies.
- *
+ *
* @param member the member value
* @exception IllegalArgumentException if member is < 1
*/
public CopiesSupported(int member)
{
super(member);
-
+
if (member < 1)
throw new IllegalArgumentException("member may not be less than 1");
}
/**
* Constructs a CopiesSupported object with
- * the given range of values. This means that values for
+ * the given range of values. This means that values for
* copies are supported inside the specified range.
- *
+ *
* @param lowerBound the lower bound value
* @param upperBound the upper bound value
*
@@ -87,17 +87,17 @@ public final class CopiesSupported extends SetOfIntegerSyntax
public CopiesSupported(int lowerBound, int upperBound)
{
super(lowerBound, upperBound);
-
+
if (lowerBound < 1)
throw new IllegalArgumentException("lowerBound may not be less than 1");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/DateTimeAtCompleted.java b/libjava/classpath/javax/print/attribute/standard/DateTimeAtCompleted.java
index 324bab7..285fc0d 100644
--- a/libjava/classpath/javax/print/attribute/standard/DateTimeAtCompleted.java
+++ b/libjava/classpath/javax/print/attribute/standard/DateTimeAtCompleted.java
@@ -1,4 +1,4 @@
-/* DateTimeAtCompleted.java --
+/* DateTimeAtCompleted.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,14 +45,14 @@ import javax.print.attribute.DateTimeSyntax;
import javax.print.attribute.PrintJobAttribute;
/**
- * The DateTimeAtCompleted attribute specifies the date and
+ * The DateTimeAtCompleted attribute specifies the date and
* the time at which a print job completed (or was canceled or aborted).
*
* IPP Compatibility: DateTimeAtCompleted is an IPP 1.1 attribute.
*
* @see javax.print.attribute.standard.DateTimeAtCreation
* @see javax.print.attribute.standard.DateTimeAtProcessing
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class DateTimeAtCompleted extends DateTimeSyntax
@@ -77,7 +77,7 @@ public final class DateTimeAtCompleted extends DateTimeSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/DateTimeAtCreation.java b/libjava/classpath/javax/print/attribute/standard/DateTimeAtCreation.java
index 5e975b6..60b885a 100644
--- a/libjava/classpath/javax/print/attribute/standard/DateTimeAtCreation.java
+++ b/libjava/classpath/javax/print/attribute/standard/DateTimeAtCreation.java
@@ -1,4 +1,4 @@
-/* DateTimeAtCreation.java --
+/* DateTimeAtCreation.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,14 +45,14 @@ import javax.print.attribute.DateTimeSyntax;
import javax.print.attribute.PrintJobAttribute;
/**
- * The DateTimeAtCreation attribute specifies the
+ * The DateTimeAtCreation attribute specifies the
* date and the time at which a print job was created.
*
* IPP Compatibility: DateTimeAtCreation is an IPP 1.1 attribute.
*
* @see javax.print.attribute.standard.DateTimeAtCompleted
* @see javax.print.attribute.standard.DateTimeAtProcessing
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class DateTimeAtCreation extends DateTimeSyntax
@@ -77,7 +77,7 @@ public final class DateTimeAtCreation extends DateTimeSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/DateTimeAtProcessing.java b/libjava/classpath/javax/print/attribute/standard/DateTimeAtProcessing.java
index b407d2b..733c565 100644
--- a/libjava/classpath/javax/print/attribute/standard/DateTimeAtProcessing.java
+++ b/libjava/classpath/javax/print/attribute/standard/DateTimeAtProcessing.java
@@ -1,4 +1,4 @@
-/* DateTimeAtProcessing.java --
+/* DateTimeAtProcessing.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -52,7 +52,7 @@ import javax.print.attribute.PrintJobAttribute;
*
* @see javax.print.attribute.standard.DateTimeAtCompleted
* @see javax.print.attribute.standard.DateTimeAtCreation
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class DateTimeAtProcessing extends DateTimeSyntax
@@ -77,7 +77,7 @@ public final class DateTimeAtProcessing extends DateTimeSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/Destination.java b/libjava/classpath/javax/print/attribute/standard/Destination.java
index a82aa4b..d37340a 100644
--- a/libjava/classpath/javax/print/attribute/standard/Destination.java
+++ b/libjava/classpath/javax/print/attribute/standard/Destination.java
@@ -49,22 +49,22 @@ import javax.print.attribute.URISyntax;
* The Destination attribute provides a URI for an alternate
* destination of the printing output.
*
- * As not an IPP attribute many print services will not support this
+ * As not an IPP attribute many print services will not support this
* attribute and only provide the printer device as a destination.
* An alternate output destination would be a file on the local harddisk
* given as a file scheme URI.
*
- *
- * If a print service does not support the destination attributes URI it
+ *
+ * If a print service does not support the destination attributes URI it
* will throw a PrintException. This exception may further implement the
- * interface {@link javax.print.URIException}.
+ * interface {@link javax.print.URIException}.
*
*
* IPP Compatibility: Destination is not an IPP 1.1 attribute.
*
* @see javax.print.PrintException
* @see javax.print.URIException
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -75,7 +75,7 @@ public final class Destination extends URISyntax
/**
* Constructs a Destination object.
- *
+ *
* @param uri the URI of the output destination.
* @throws NullPointerException if the given uri is null.
*/
@@ -83,13 +83,13 @@ public final class Destination extends URISyntax
{
super(uri);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/DocumentName.java b/libjava/classpath/javax/print/attribute/standard/DocumentName.java
index 6a377d5..f6f79272 100644
--- a/libjava/classpath/javax/print/attribute/standard/DocumentName.java
+++ b/libjava/classpath/javax/print/attribute/standard/DocumentName.java
@@ -1,4 +1,4 @@
-/* DocumentName.java --
+/* DocumentName.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,15 +48,15 @@ import javax.print.attribute.TextSyntax;
* The DocumentName printing attribute specifies a document name.
*
* The document name may be different than the name of the job. It must not be
- * unique across multiple documents in the same print job. Normally, an
- * application provides the document name for the user by using e.g. the file
+ * unique across multiple documents in the same print job. Normally, an
+ * application provides the document name for the user by using e.g. the file
* name or a name generated automatically by the application.
*
*
* IPP Compatibility: DocumentName is an IPP 1.1 attribute.
*
* @see javax.print.attribute.standard.JobName
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class DocumentName extends TextSyntax
@@ -83,7 +83,7 @@ public final class DocumentName extends TextSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/Fidelity.java b/libjava/classpath/javax/print/attribute/standard/Fidelity.java
index 5e25f5b..39d26a1 100644
--- a/libjava/classpath/javax/print/attribute/standard/Fidelity.java
+++ b/libjava/classpath/javax/print/attribute/standard/Fidelity.java
@@ -53,20 +53,20 @@ import javax.print.attribute.PrintRequestAttribute;
* through the client by providing this attribute to indicate the wanted
* conflict handling mechanism:
*
- *
{@link #FIDELITY_TRUE}: Reject the job since the job can not be
+ *
{@link #FIDELITY_TRUE}: Reject the job since the job can not be
* processed exactly as specified by the attributes of the client.
- *
{@link #FIDELITY_FALSE}: The Printer may make any changes necessary
+ *
{@link #FIDELITY_FALSE}: The Printer may make any changes necessary
* to proceed with processing the Job as good as possible.
*
- *
+ *
*
* IPP Compatibility: Fidelity is an IPP 1.1 attribute. The IPP name
- * is "ipp-attribute-fidelity". The IPP specification treats Fidelity as a
+ * is "ipp-attribute-fidelity". The IPP specification treats Fidelity as a
* boolean type which is not available in the Java Print Service API. The IPP
- * boolean value "true" corresponds to FIDELITY_TRUE and "false"
+ * boolean value "true" corresponds to FIDELITY_TRUE and "false"
* to FIDELITY_FALSE.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -75,27 +75,27 @@ public final class Fidelity extends EnumSyntax
{
private static final long serialVersionUID = 6320827847329172308L;
- /**
- * Requests that the job is printed exactly as specified,
+ /**
+ * Requests that the job is printed exactly as specified,
* or rejected otherwise.
*/
public static final Fidelity FIDELITY_TRUE = new Fidelity(0);
-
- /**
+
+ /**
* Requests that the job is printed as exactly as reasonable. This means
- * that the print service may choose to substitute the default value
- * associated with that attribute, or use some other supported value that
- * is similar to the unsupported requested value.
+ * that the print service may choose to substitute the default value
+ * associated with that attribute, or use some other supported value that
+ * is similar to the unsupported requested value.
*/
public static final Fidelity FIDELITY_FALSE = new Fidelity(1);
-
+
private static final String[] stringTable = { "true", "false" };
private static final Fidelity[] enumValueTable = { FIDELITY_TRUE,
FIDELITY_FALSE };
/**
* Constructs a Fidelity object.
- *
+ *
* @param value the value
*/
protected Fidelity(int value)
@@ -122,7 +122,7 @@ public final class Fidelity extends EnumSyntax
{
return "ipp-attribute-fidelity";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/Finishings.java b/libjava/classpath/javax/print/attribute/standard/Finishings.java
index cd8f675..bb38ceb 100644
--- a/libjava/classpath/javax/print/attribute/standard/Finishings.java
+++ b/libjava/classpath/javax/print/attribute/standard/Finishings.java
@@ -49,30 +49,30 @@ import javax.print.attribute.PrintRequestAttribute;
* The Finishings attribute specifies the finishing operations
* that the Printer applies to every copy of each printed document in the Job.
*
- * The following values are more specific:
- * STAPLE_TOP_LEFT, STAPLE_BOTTOM_LEFT,
- * STAPLE_TOP_RIGHT, STAPLE_BOTTOM_RIGHT,
- * EDGE_STITCH_LEFT, EDGE_STITCH_TOP,
- * EDGE_STITCH_RIGHT, EDGE_STITCH_BOTTOM,
- * STAPLE_DUAL_LEFT, STAPLE_DUAL_TOP,
+ * The following values are more specific:
+ * STAPLE_TOP_LEFT, STAPLE_BOTTOM_LEFT,
+ * STAPLE_TOP_RIGHT, STAPLE_BOTTOM_RIGHT,
+ * EDGE_STITCH_LEFT, EDGE_STITCH_TOP,
+ * EDGE_STITCH_RIGHT, EDGE_STITCH_BOTTOM,
+ * STAPLE_DUAL_LEFT, STAPLE_DUAL_TOP,
* STAPLE_DUAL_RIGHT, STAPLE_DUAL_BOTTOM.
- *
+ *
*
- * Note: The effect of this attribute on jobs with multiple documents
- * is controlled by the job attribute
+ * Note: The effect of this attribute on jobs with multiple documents
+ * is controlled by the job attribute
* {@link javax.print.attribute.standard.MultipleDocumentHandling}.
*
*
- * IPP Compatibility: Finishings is an IPP 1.1 attribute. Differences
- * to the IPP specification are that in the Java Print Service API only one
- * enum value is supported (in IPP a set of enums). Further the enum
+ * IPP Compatibility: Finishings is an IPP 1.1 attribute. Differences
+ * to the IPP specification are that in the Java Print Service API only one
+ * enum value is supported (in IPP a set of enums). Further the enum
* punch is not supported.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -81,119 +81,119 @@ public class Finishings extends EnumSyntax
{
private static final long serialVersionUID = -627840419548391754L;
- /**
+ /**
* Perform no finishings of the documents.
*/
public static final Finishings NONE = new Finishings(3);
-
- /**
- * Selects binding of the documents with one or more staples.
+
+ /**
+ * Selects binding of the documents with one or more staples.
*/
public static final Finishings STAPLE = new Finishings(4);
-
+
/**
- * Selects the use of a non-printed (or pre-printed) cover for
+ * Selects the use of a non-printed (or pre-printed) cover for
* the document.
*/
public static final Finishings COVER = new Finishings(6);
-
+
/**
* Selects that a binding is to be applied to the document.
* The type and placement of the binding is site-defined.
*/
public static final Finishings BIND = new Finishings(7);
-
+
/**
* Selects binding of the documents with one or more staples
- * along the middle fold.
+ * along the middle fold.
*/
public static final Finishings SADDLE_STITCH = new Finishings(8);
-
+
/**
- * Selects binding of the documents with one or more staples
- * along one edge.
+ * Selects binding of the documents with one or more staples
+ * along one edge.
*/
public static final Finishings EDGE_STITCH = new Finishings(9);
-
- /**
- * Selects binding of the documents with one or more staples
- * in the top left corner.
+
+ /**
+ * Selects binding of the documents with one or more staples
+ * in the top left corner.
*/
public static final Finishings STAPLE_TOP_LEFT = new Finishings(20);
-
- /**
- * Selects binding of the documents with one or more staples in the bottom
- * left corner.
+
+ /**
+ * Selects binding of the documents with one or more staples in the bottom
+ * left corner.
*/
public static final Finishings STAPLE_BOTTOM_LEFT = new Finishings(21);
-
+
/**
- * Selects binding of the documents with one or more staples in
+ * Selects binding of the documents with one or more staples in
* the top right corner.
*/
public static final Finishings STAPLE_TOP_RIGHT = new Finishings(22);
-
+
/**
- * Selects binding of the documents with one or more staples in
+ * Selects binding of the documents with one or more staples in
* the bottom right corner.
*/
public static final Finishings STAPLE_BOTTOM_RIGHT = new Finishings(23);
-
+
/**
* Selects binding of the documents with one or more staples
* along the left edge.
*/
public static final Finishings EDGE_STITCH_LEFT = new Finishings(24);
-
+
/**
- * Selects binding of the documents with one or more staples along
+ * Selects binding of the documents with one or more staples along
* the top edge.
*/
public static final Finishings EDGE_STITCH_TOP = new Finishings(25);
-
+
/**
- * Selects binding of the documents with one or more staples along
+ * Selects binding of the documents with one or more staples along
* the right edge.
*/
public static final Finishings EDGE_STITCH_RIGHT = new Finishings(26);
-
+
/**
* Selects binding of the documents with one or more staples along
- * the bottom edge.
+ * the bottom edge.
*/
public static final Finishings EDGE_STITCH_BOTTOM = new Finishings(27);
-
+
/**
- * Selects binding of the documents with two staples along the
+ * Selects binding of the documents with two staples along the
* left edge assuming a portrait document.
*/
public static final Finishings STAPLE_DUAL_LEFT = new Finishings(28);
-
+
/**
- * Selects binding of the documents with two staples along the
+ * Selects binding of the documents with two staples along the
* top edge assuming a portrait document.
*/
public static final Finishings STAPLE_DUAL_TOP = new Finishings(29);
-
+
/**
- * Selects binding of the documents with two staples along the
+ * Selects binding of the documents with two staples along the
* right edge assuming a portrait document.
*/
public static final Finishings STAPLE_DUAL_RIGHT = new Finishings(30);
-
+
/**
- * Selects binding of the documents with two staples along the
+ * Selects binding of the documents with two staples along the
* bottom edge assuming a portrait document.
*/
public static final Finishings STAPLE_DUAL_BOTTOM = new Finishings(31);
- private static final String[] stringTable = { "none", "staple", null,
+ private static final String[] stringTable = { "none", "staple", null,
"cover", "bind", "saddle-stitch",
"edge-stitch", null, null, null,
null, null, null, null, null,
null, null, "staple-top-left",
- "staple-bottom-left",
- "staple-top-right",
+ "staple-bottom-left",
+ "staple-top-right",
"staple-bottom-right",
"edge-stitch-left",
"edge-stitch-top",
@@ -203,14 +203,14 @@ public class Finishings extends EnumSyntax
"staple-dual-top",
"staple-dual-right",
"staple-dual-bottom" };
-
- private static final Finishings[] enumValueTable = { NONE, STAPLE, null,
- COVER, BIND,
+
+ private static final Finishings[] enumValueTable = { NONE, STAPLE, null,
+ COVER, BIND,
SADDLE_STITCH,
- EDGE_STITCH, null,
- null, null, null,
- null, null, null,
- null, null, null,
+ EDGE_STITCH, null,
+ null, null, null,
+ null, null, null,
+ null, null, null,
STAPLE_TOP_LEFT,
STAPLE_BOTTOM_LEFT,
STAPLE_TOP_RIGHT,
@@ -223,10 +223,10 @@ public class Finishings extends EnumSyntax
STAPLE_DUAL_TOP,
STAPLE_DUAL_RIGHT,
STAPLE_DUAL_BOTTOM };
-
+
/**
* Constructs a Finishings object.
- *
+ *
* @param value the value
*/
protected Finishings(int value)
@@ -253,7 +253,7 @@ public class Finishings extends EnumSyntax
{
return "finishings";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
@@ -283,5 +283,5 @@ public class Finishings extends EnumSyntax
protected int getOffset()
{
return 3;
- }
+ }
}
diff --git a/libjava/classpath/javax/print/attribute/standard/JobHoldUntil.java b/libjava/classpath/javax/print/attribute/standard/JobHoldUntil.java
index 7c137cc..97d3c15 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobHoldUntil.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobHoldUntil.java
@@ -1,4 +1,4 @@
-/* JobHoldUntil.java --
+/* JobHoldUntil.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,17 +48,17 @@ import javax.print.attribute.PrintRequestAttribute;
/**
* The JobHoldUntil attribute specifies the date
* and the time at which a print job must become a candidate
- * for printing.
+ * for printing.
*
* IPP Compatibility: JobHoldUntil is an IPP 1.1 attribute.
* However the attribute in IPP is based on keywords of named
* time periods like day-time or evening. It will depend on the
- * concrete implementation of a print service how a mapping of the
+ * concrete implementation of a print service how a mapping of the
* detailed provided date and time of this attribute to the named
* keyword or an alternate extension attribute will be done. E.g.
* CUPS supports also a HH:MM format as extension to the keywords.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobHoldUntil extends DateTimeSyntax
@@ -83,7 +83,7 @@ public final class JobHoldUntil extends DateTimeSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/JobImpressions.java b/libjava/classpath/javax/print/attribute/standard/JobImpressions.java
index a2c7d4d..11d51ca 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobImpressions.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobImpressions.java
@@ -1,4 +1,4 @@
-/* JobImpressions.java --
+/* JobImpressions.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,16 +45,16 @@ import javax.print.attribute.PrintRequestAttribute;
/**
* The JobImpressions printing attribute specifies
* the total size in number of impressions of the documents
- * of a a print job.
+ * of a a print job.
*
- * An impression is specified by the IPP specification as the image
- * (possibly many print-stream pages in different configurations)
+ * An impression is specified by the IPP specification as the image
+ * (possibly many print-stream pages in different configurations)
* imposed onto a single media sheet. This attribute must not include
* a multiplication factor from the number of copies which maybe specified
* in a Copies attribute.
*
*
- * This attribute belongs to a group of job size attributes which are
+ * This attribute belongs to a group of job size attributes which are
* describing the size of a job to be printed. The values supplied by
* these attributes are intended to be used for routing and scheduling
* of jobs on the print service. A client may specify these attributes.
@@ -67,14 +67,14 @@ import javax.print.attribute.PrintRequestAttribute;
*
* @see javax.print.attribute.standard.JobKOctets
* @see javax.print.attribute.standard.JobMediaSheets
- *
+ *
* @author Michael Koch
*/
public final class JobImpressions extends IntegerSyntax
implements PrintJobAttribute, PrintRequestAttribute
{
private static final long serialVersionUID = 8225537206784322464L;
-
+
/**
* Creates a JobImpressions object.
*
@@ -89,13 +89,13 @@ public final class JobImpressions extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/JobImpressionsCompleted.java b/libjava/classpath/javax/print/attribute/standard/JobImpressionsCompleted.java
index 55d3fd6..d1594ea 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobImpressionsCompleted.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobImpressionsCompleted.java
@@ -1,4 +1,4 @@
-/* JobImpressionsCompleted.java --
+/* JobImpressionsCompleted.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,12 +45,12 @@ import javax.print.attribute.PrintJobAttribute;
* The JobImpressionsCompleted printing attribute reports
* the number of impressions already processed.
*
- * An impression is specified by the IPP specification as the image imposed
- * onto a single media sheet. This attribute will not include a multiplication
+ * An impression is specified by the IPP specification as the image imposed
+ * onto a single media sheet. This attribute will not include a multiplication
* factor from the number of copies.
*
*
- * This attribute belongs to a group of job progress attributes which are
+ * This attribute belongs to a group of job progress attributes which are
* reporting on the progress of a print job.
*
* @see javax.print.attribute.standard.JobMediaSheetsCompleted
* @see javax.print.attribute.standard.JobKOctetsProcessed
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobImpressionsCompleted extends IntegerSyntax
implements PrintJobAttribute
{
private static final long serialVersionUID = 6722648442432393294L;
-
+
/**
* Creates a JobImpressionsCompleted object.
*
@@ -80,13 +80,13 @@ public final class JobImpressionsCompleted extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/JobImpressionsSupported.java b/libjava/classpath/javax/print/attribute/standard/JobImpressionsSupported.java
index 5be3fc0..583db4e 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobImpressionsSupported.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobImpressionsSupported.java
@@ -43,13 +43,13 @@ import javax.print.attribute.SupportedValuesAttribute;
/**
- * The JobImpressionsSupported printing attribute specifies the
- * supported range of values for the
+ * The JobImpressionsSupported printing attribute specifies the
+ * supported range of values for the
* {@link javax.print.attribute.standard.JobImpressions} attribute.
*
* IPP Compatibility: JobImpressionsSupported is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -59,7 +59,7 @@ public final class JobImpressionsSupported extends SetOfIntegerSyntax
private static final long serialVersionUID = -4887354803843173692L;
/**
- * Constructs a JobImpressionsSupported object with the
+ * Constructs a JobImpressionsSupported object with the
* given range of supported job impressions values.
*
* @param lowerBound the lower bound value
@@ -71,24 +71,24 @@ public final class JobImpressionsSupported extends SetOfIntegerSyntax
public JobImpressionsSupported(int lowerBound, int upperBound)
{
super(lowerBound, upperBound);
-
+
if (lowerBound < 1)
throw new IllegalArgumentException("lowerBound may not be less than 1");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
{
if (! (obj instanceof JobImpressionsSupported))
return false;
-
+
return super.equals(obj);
}
diff --git a/libjava/classpath/javax/print/attribute/standard/JobKOctets.java b/libjava/classpath/javax/print/attribute/standard/JobKOctets.java
index ac9a7ef..c4427ea 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobKOctets.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobKOctets.java
@@ -1,4 +1,4 @@
-/* JobKOctets.java --
+/* JobKOctets.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,12 +48,12 @@ import javax.print.attribute.PrintRequestAttribute;
*
* The supplied value has to be rounded up, so that a range between
* 1 and 1024 octects is specified as 1 and a range between 1025 and
- * 2048 octects as 2, etc. This attribute must not include a multiplication
- * factor from the number of copies which maybe specified in a Copies
+ * 2048 octects as 2, etc. This attribute must not include a multiplication
+ * factor from the number of copies which maybe specified in a Copies
* attribute.
*
*
- * This attribute belongs to a group of job size attributes which are
+ * This attribute belongs to a group of job size attributes which are
* describing the size of a job to be printed. The values supplied by
* these attributes are intended to be used for routing and scheduling
* of jobs on the print service. A client may specify these attributes.
@@ -66,17 +66,17 @@ import javax.print.attribute.PrintRequestAttribute;
*
* @see javax.print.attribute.standard.JobMediaSheets
* @see javax.print.attribute.standard.JobImpressions
- *
+ *
* @author Michael Koch
*/
public final class JobKOctets extends IntegerSyntax
implements PrintJobAttribute, PrintRequestAttribute
{
private static final long serialVersionUID = -8959710146498202869L;
-
+
/**
* Creates a JobKOctets object.
- * The value is in units of K (1024) octets rounded up to the next highest K.
+ * The value is in units of K (1024) octets rounded up to the next highest K.
*
* @param value the number of K octets
*
@@ -89,13 +89,13 @@ public final class JobKOctets extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/JobKOctetsProcessed.java b/libjava/classpath/javax/print/attribute/standard/JobKOctetsProcessed.java
index 34616ed..55bee6a 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobKOctetsProcessed.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobKOctetsProcessed.java
@@ -1,4 +1,4 @@
-/* JobKOctetsProcessed.java --
+/* JobKOctetsProcessed.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,11 +46,11 @@ import javax.print.attribute.PrintJobAttribute;
* the total number of octets already processed in K octets units.
*
* The supplied value will be rounded up to the next highest K octets.
- * This attribute will not include a multiplication factor from the number
+ * This attribute will not include a multiplication factor from the number
* of copies.
*
*
- * This attribute belongs to a group of job progress attributes which are
+ * This attribute belongs to a group of job progress attributes which are
* reporting on the progress of a print job.
*
* @see javax.print.attribute.standard.JobMediaSheetsCompleted
* @see javax.print.attribute.standard.JobImpressionsCompleted
- *
+ *
* @author Michael Koch
*/
public final class JobKOctetsProcessed extends IntegerSyntax
implements PrintJobAttribute
{
private static final long serialVersionUID = -6265238509657881806L;
-
+
/**
* Creates a JobKOctetsProcessed object.
- * The value is in units of K (1024) octets rounded up to the next highest K.
+ * The value is in units of K (1024) octets rounded up to the next highest K.
*
* @param value the number of processed K octets
*
@@ -81,13 +81,13 @@ public final class JobKOctetsProcessed extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/JobKOctetsSupported.java b/libjava/classpath/javax/print/attribute/standard/JobKOctetsSupported.java
index 4936fd4..6990a53 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobKOctetsSupported.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobKOctetsSupported.java
@@ -43,13 +43,13 @@ import javax.print.attribute.SupportedValuesAttribute;
/**
- * The JobKOctetsSupported printing attribute specifies the
- * supported range of values for the
+ * The JobKOctetsSupported printing attribute specifies the
+ * supported range of values for the
* {@link javax.print.attribute.standard.JobKOctets} attribute.
*
* IPP Compatibility: JobKOctetsSupported is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -71,24 +71,24 @@ public final class JobKOctetsSupported extends SetOfIntegerSyntax
public JobKOctetsSupported(int lowerBound, int upperBound)
{
super(lowerBound, upperBound);
-
+
if (lowerBound < 1)
throw new IllegalArgumentException("lowerBound may not be less than 1");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
{
if (! (obj instanceof JobKOctetsSupported))
return false;
-
+
return super.equals(obj);
}
diff --git a/libjava/classpath/javax/print/attribute/standard/JobMediaSheets.java b/libjava/classpath/javax/print/attribute/standard/JobMediaSheets.java
index 17cf96f..c92cf30 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobMediaSheets.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobMediaSheets.java
@@ -1,4 +1,4 @@
-/* JobMediaSheets.java --
+/* JobMediaSheets.java --
Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,7 +51,7 @@ import javax.print.attribute.PrintRequestAttribute;
* was specified for the job.
*
*
- * This attribute belongs to a group of job size attributes which are
+ * This attribute belongs to a group of job size attributes which are
* describing the size of a job to be printed. The values supplied by
* these attributes are intended to be used for routing and scheduling
* of jobs on the print service. A client may specify these attributes.
@@ -64,14 +64,14 @@ import javax.print.attribute.PrintRequestAttribute;
*
* @see javax.print.attribute.standard.JobKOctets
* @see javax.print.attribute.standard.JobImpressions
- *
+ *
* @author Michael Koch
*/
public class JobMediaSheets extends IntegerSyntax
implements PrintJobAttribute, PrintRequestAttribute
{
private static final long serialVersionUID = 408871131531979741L;
-
+
/**
* Creates a JobMediaSheets object.
*
@@ -86,13 +86,13 @@ public class JobMediaSheets extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsCompleted.java b/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsCompleted.java
index 353c044..5ec7d8d 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsCompleted.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsCompleted.java
@@ -1,4 +1,4 @@
-/* JobMediaSheetsCompleted.java --
+/* JobMediaSheetsCompleted.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,9 +43,9 @@ import javax.print.attribute.PrintJobAttribute;
/**
* The JobMediaSheetsCompleted printing attribute reports
- * the number of media sheets already processed.
+ * the number of media sheets already processed.
*
- * This attribute belongs to a group of job progress attributes which are
+ * This attribute belongs to a group of job progress attributes which are
* reporting on the progress of a print job.
*
* @see javax.print.attribute.standard.JobImpressionsCompleted
* @see javax.print.attribute.standard.JobKOctetsProcessed
- *
+ *
* @author Michael Koch
*/
public final class JobMediaSheetsCompleted extends IntegerSyntax
implements PrintJobAttribute
{
private static final long serialVersionUID = 1739595973810840475L;
-
+
/**
* Creates a JobMediaSheetsCompleted object.
*
@@ -75,13 +75,13 @@ public final class JobMediaSheetsCompleted extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java b/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java
index d9a0ed2..32d6ac5 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java
@@ -43,13 +43,13 @@ import javax.print.attribute.SupportedValuesAttribute;
/**
- * The JobMediaSheetsSupported printing attribute specifies the
- * supported range of values for the
+ * The JobMediaSheetsSupported printing attribute specifies the
+ * supported range of values for the
* {@link javax.print.attribute.standard.JobMediaSheets} attribute.
*
* IPP Compatibility: JobMediaSheetsSupported is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -59,7 +59,7 @@ public final class JobMediaSheetsSupported extends SetOfIntegerSyntax
private static final long serialVersionUID = 2953685470388672940L;
/**
- * Constructs a JobMediaSheetsSupported object with the
+ * Constructs a JobMediaSheetsSupported object with the
* given range of supported job media sheets values.
*
* @param lowerBound the lower bound value
@@ -71,24 +71,24 @@ public final class JobMediaSheetsSupported extends SetOfIntegerSyntax
public JobMediaSheetsSupported(int lowerBound, int upperBound)
{
super(lowerBound, upperBound);
-
+
if (lowerBound < 1)
throw new IllegalArgumentException("lowerBound may not be less than 1");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
{
if (! (obj instanceof JobMediaSheetsSupported))
return false;
-
+
return super.equals(obj);
}
diff --git a/libjava/classpath/javax/print/attribute/standard/JobMessageFromOperator.java b/libjava/classpath/javax/print/attribute/standard/JobMessageFromOperator.java
index f2a589a..bf1dedb 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobMessageFromOperator.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobMessageFromOperator.java
@@ -1,4 +1,4 @@
-/* JobMessageFromOperator.java --
+/* JobMessageFromOperator.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,15 +45,15 @@ import javax.print.attribute.PrintJobAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The JobMessageFromOperator printing attribute provides
+ * The JobMessageFromOperator printing attribute provides
* a message from an operator or a system administrator related to the
* print job. This may include information why a certain action has been
* taken on the print job like a modification.
*
- * IPP Compatibility: JobMessageFromOperator is an IPP 1.1
+ * IPP Compatibility: JobMessageFromOperator is an IPP 1.1
* attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobMessageFromOperator extends TextSyntax
@@ -80,7 +80,7 @@ public final class JobMessageFromOperator extends TextSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/JobName.java b/libjava/classpath/javax/print/attribute/standard/JobName.java
index 5f5310e..dc84cb6 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobName.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobName.java
@@ -1,4 +1,4 @@
-/* JobName.java --
+/* JobName.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,12 +46,12 @@ import javax.print.attribute.PrintRequestAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The JobName printing attribute provides the name of a
+ * The JobName printing attribute provides the name of a
* print job for identification.
*
* IPP Compatibility: JobName is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobName extends TextSyntax
@@ -78,7 +78,7 @@ public final class JobName extends TextSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/JobOriginatingUserName.java b/libjava/classpath/javax/print/attribute/standard/JobOriginatingUserName.java
index 62073da..c7246dd 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobOriginatingUserName.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobOriginatingUserName.java
@@ -1,4 +1,4 @@
-/* JobOriginatingUserName.java --
+/* JobOriginatingUserName.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,12 +45,12 @@ import javax.print.attribute.PrintJobAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The JobOriginatingUserName attribute specifies the name of
+ * The JobOriginatingUserName attribute specifies the name of
* the user which submitted the print job.
*
* IPP Compatibility: JobOriginatingUserName is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobOriginatingUserName extends TextSyntax
@@ -77,7 +77,7 @@ public final class JobOriginatingUserName extends TextSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/JobPriority.java b/libjava/classpath/javax/print/attribute/standard/JobPriority.java
index 88fc685..0f669a0 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobPriority.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobPriority.java
@@ -1,4 +1,4 @@
-/* JobPriority.java --
+/* JobPriority.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,14 +47,14 @@ import javax.print.attribute.PrintRequestAttribute;
* The JobPriority printing attribute specifies
* the priority for scheduling a job on the print service.
*
- * A client may specify any value between 1 (lowest priority) and 100
+ * A client may specify any value between 1 (lowest priority) and 100
* (highest priority). A print service prints jobs with a priority
* value of n before those with a priority value of n-1.
*
*
* IPP Compatibility: JobPriority is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobPriority extends IntegerSyntax
@@ -82,7 +82,7 @@ public final class JobPriority extends IntegerSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/JobPrioritySupported.java b/libjava/classpath/javax/print/attribute/standard/JobPrioritySupported.java
index e7ebca2..b2e5772 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobPrioritySupported.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobPrioritySupported.java
@@ -1,4 +1,4 @@
-/* JobPrioritySupported.java --
+/* JobPrioritySupported.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -48,7 +48,7 @@ import javax.print.attribute.SupportedValuesAttribute;
*
* A client may specify any JobPriority value between 1 and 100. If a
* print service supports fewer priority levels it indicates the maximum
- * levels through this attribute. The print service then automatically
+ * levels through this attribute. The print service then automatically
* maps the job priority value provided by the client in an even distribution
* over the whole range of 1 to 100.
*
@@ -56,7 +56,7 @@ import javax.print.attribute.SupportedValuesAttribute;
* IPP Compatibility: JobPrioritySupported is an IPP 1.1 attribute.
*
* @see javax.print.attribute.standard.JobPriority
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class JobPrioritySupported extends IntegerSyntax
@@ -84,7 +84,7 @@ public final class JobPrioritySupported extends IntegerSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/JobSheets.java b/libjava/classpath/javax/print/attribute/standard/JobSheets.java
index a930f63..7d20692 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobSheets.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobSheets.java
@@ -45,11 +45,11 @@ import javax.print.attribute.PrintRequestAttribute;
/**
* The JobSheets printing attribute specifies if a
- * job start/end sheets should be printed.
+ * job start/end sheets should be printed.
*
* IPP Compatibility: JobSheets is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -59,24 +59,24 @@ public class JobSheets extends EnumSyntax
private static final long serialVersionUID = -4735258056132519759L;
/**
- * No job sheet is printed.
+ * No job sheet is printed.
*/
public static final JobSheets NONE = new JobSheets(0);
-
+
/**
- * The standard job sheet is printed. The sheet and if it
+ * The standard job sheet is printed. The sheet and if it
* is printed only as start sheet or also as end sheet is
* site specific.
*/
public static final JobSheets STANDARD = new JobSheets(1);
private static final String[] stringTable = { "none", "standard" };
-
+
private static final JobSheets[] enumValueTable = { NONE, STANDARD };
-
+
/**
* Constructs a JobSheets object.
- *
+ *
* @param value the enum value.
*/
protected JobSheets(int value)
@@ -103,7 +103,7 @@ public class JobSheets extends EnumSyntax
{
return "job-sheets";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/JobState.java b/libjava/classpath/javax/print/attribute/standard/JobState.java
index fa769bb..5efbe08 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobState.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobState.java
@@ -50,11 +50,11 @@ import javax.print.attribute.PrintJobAttribute;
* attribute provides further detailed information about
* the given job state. Detailed information about the job
* state and job state reasons can be found in the RFC 2911.
- *
+ *
*
* IPP Compatibility: JobState is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -67,12 +67,12 @@ public class JobState extends EnumSyntax
* The job state is currently unknown.
*/
public static final JobState UNKNOWN = new JobState(0);
-
+
/**
* The job is pending processing.
*/
public static final JobState PENDING = new JobState(3);
-
+
/**
* The job is currently not a candidate for printing because
* of reasons reported by the job-state-reasons attribute. If
@@ -80,52 +80,52 @@ public class JobState extends EnumSyntax
* pending state.
*/
public static final JobState PENDING_HELD = new JobState(4);
-
+
/**
* The job is currently processed.
*/
public static final JobState PROCESSING = new JobState(5);
-
+
/**
* The job's processing has stopped. The job-state-reasons
* attribute may indicate the reason(s). The job will return
* to the processing state if the reasons are no longer present.
*/
public static final JobState PROCESSING_STOPPED = new JobState(6);
-
+
/**
* The job has been canceled by the client.
*/
public static final JobState CANCELED = new JobState(7);
-
+
/**
* The job has been aborted by the system.
*/
public static final JobState ABORTED = new JobState(8);
-
+
/**
* The job has completed successfully.
*/
public static final JobState COMPLETED = new JobState(9);
- private static final String[] stringTable = { "unknown", null, null,
+ private static final String[] stringTable = { "unknown", null, null,
"pending", "pending-held",
- "processing",
+ "processing",
"processing-stopped",
- "canceled", "aborted",
+ "canceled", "aborted",
"completed"};
-
+
private static final JobState[] enumValueTable = { UNKNOWN, null, null,
PENDING, PENDING_HELD,
PROCESSING,
PROCESSING_STOPPED,
CANCELED, ABORTED,
COMPLETED };
-
+
/**
* Constructs a JobState object.
- *
+ *
* @param value the enum value.
*/
protected JobState(int value)
@@ -152,7 +152,7 @@ public class JobState extends EnumSyntax
{
return "job-state";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/JobStateReason.java b/libjava/classpath/javax/print/attribute/standard/JobStateReason.java
index b8420b1..52aae15 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobStateReason.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobStateReason.java
@@ -45,13 +45,13 @@ import javax.print.attribute.EnumSyntax;
* The JobStateReason attribute provides additional
* information about the current state of a job. Its always part
* of the {@link javax.print.attribute.standard.JobStateReasons}
- * printing attribute.
+ * printing attribute.
*
- * IPP Compatibility: JobStateReason is not an IPP 1.1
+ * IPP Compatibility: JobStateReason is not an IPP 1.1
* attribute itself but used inside the JobStateReasons
* attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -65,179 +65,179 @@ public class JobStateReason extends EnumSyntax
* data for processing.
*/
public static final JobStateReason JOB_INCOMING = new JobStateReason(0);
-
+
/**
* The printer is expecting additional document data before it
* can move this job into the processing state.
*/
public static final JobStateReason JOB_DATA_INSUFFICIENT = new JobStateReason(1);
-
+
/**
* The printer is unable to access one or more documents provided
* by reference in the print job.
*/
public static final JobStateReason DOCUMENT_ACCESS_ERROR = new JobStateReason(2);
-
+
/**
* The printer has not received the whole job submission. This
* indicates no reason for the interruption.
*/
public static final JobStateReason SUBMISSION_INTERRUPTED = new JobStateReason(3);
-
+
/**
* The printer transfers the job to the actual output device.
*/
public static final JobStateReason JOB_OUTGOING = new JobStateReason(4);
-
+
/**
- * The job was submitted with a JobHoldUntil attribute which
- * specifies a time period still in the future and causes the job to
+ * The job was submitted with a JobHoldUntil attribute which
+ * specifies a time period still in the future and causes the job to
* be on hold.
*/
public static final JobStateReason JOB_HOLD_UNTIL_SPECIFIED = new JobStateReason(5);
-
+
/**
* One or more resources needed by the job are not ready. E.g. needed
* media type.
*/
public static final JobStateReason RESOURCES_ARE_NOT_READY = new JobStateReason(6);
-
+
/**
* The printer stopped partly.
*/
public static final JobStateReason PRINTER_STOPPED_PARTLY = new JobStateReason(7);
-
+
/**
* The printer stopped complete.
*/
public static final JobStateReason PRINTER_STOPPED = new JobStateReason(8);
-
+
/**
* The printer is currently interpreting the jobs document data.
* Detailed state of the job's processing state.
*/
public static final JobStateReason JOB_INTERPRETING = new JobStateReason(9);
-
+
/**
* The printer has queued the document data.
* Detailed state of the job's processing state.
*/
public static final JobStateReason JOB_QUEUED = new JobStateReason(10);
-
+
/**
* The printer is transforming the document data to another representation.
* Detailed state of the job's processing state.
*/
public static final JobStateReason JOB_TRANSFORMING = new JobStateReason(11);
-
+
/**
* The job is queued for marking.
*/
public static final JobStateReason JOB_QUEUED_FOR_MARKER = new JobStateReason(12);
-
+
/**
* The job is currently printing.
*/
public static final JobStateReason JOB_PRINTING = new JobStateReason(13);
-
+
/**
* The job was canceled by the user (the owner of the job).
*/
public static final JobStateReason JOB_CANCELED_BY_USER = new JobStateReason(14);
-
+
/**
* The job was canceled by the operator.
*/
public static final JobStateReason JOB_CANCELED_BY_OPERATOR = new JobStateReason(15);
-
+
/**
* The job was canceled by an unidentified local user at the device.
*/
public static final JobStateReason JOB_CANCELED_AT_DEVICE = new JobStateReason(16);
-
+
/**
* The job has been aborted by the system.
*/
public static final JobStateReason ABORTED_BY_SYSTEM = new JobStateReason(17);
-
+
/**
* The printer aborted the job because of an unsupported compression while
* trying to decompress the document data.
*/
public static final JobStateReason UNSUPPORTED_COMPRESSION = new JobStateReason(18);
-
+
/**
* The printer aborted the job because of a compression error while
* trying to decompress the document data. If this state is given the test
* for supported compression has already been passed.
*/
public static final JobStateReason COMPRESSION_ERROR = new JobStateReason(19);
-
+
/**
* The printer aborted the job because of the document format is not supported.
- * This may happen if a job is specified as application/octet-stream format.
+ * This may happen if a job is specified as application/octet-stream format.
*/
public static final JobStateReason UNSUPPORTED_DOCUMENT_FORMAT = new JobStateReason(20);
-
+
/**
- * The printer aborted the job because of an error in the document data.
+ * The printer aborted the job because of an error in the document data.
*/
public static final JobStateReason DOCUMENT_FORMAT_ERROR = new JobStateReason(21);
-
+
/**
* The client has either canceled the job or the printer aborted the job.
- * However the printer still performs some action on the job e.g. to cleanup.
+ * However the printer still performs some action on the job e.g. to cleanup.
*/
public static final JobStateReason PROCESSING_TO_STOP_POINT = new JobStateReason(22);
-
+
/**
* The printer is offline and therefore is not accepting jobs.
*/
public static final JobStateReason SERVICE_OFF_LINE = new JobStateReason(23);
-
+
/**
- * The printer completed the job successfully.
+ * The printer completed the job successfully.
*/
public static final JobStateReason JOB_COMPLETED_SUCCESSFULLY = new JobStateReason(24);
-
+
/**
* The printer completed the job with warnings.
*/
public static final JobStateReason JOB_COMPLETED_WITH_WARNINGS = new JobStateReason(25);
-
+
/**
* The printer completed the job with errors.
*/
public static final JobStateReason JOB_COMPLETED_WITH_ERRORS = new JobStateReason(26);
-
+
/**
- * The job is retained and is able to be restared.
+ * The job is retained and is able to be restared.
*/
public static final JobStateReason JOB_RESTARTABLE = new JobStateReason(27);
-
+
/**
* The printer has forwarded the job to the actual output device. This device
* is not capable of reporting the state back so that the job state is set
- * to completed by the printer.
+ * to completed by the printer.
*/
public static final JobStateReason QUEUED_IN_DEVICE = new JobStateReason(28);
- private static final String[] stringTable =
- { "job-incoming", "job-data-insufficient", "document-access-error",
+ private static final String[] stringTable =
+ { "job-incoming", "job-data-insufficient", "document-access-error",
"submission-interrupted", "job-outgoing", "job-hold-until-specified",
"resources-are-not-ready", "printer-stopped-partly", "printer-stopped",
- "job-interpreting", "job-queued", "job-transforming",
+ "job-interpreting", "job-queued", "job-transforming",
"job-queued-for-marker", "job-printing", "job-canceled-by-user",
- "job-canceled-by-operator", "job-canceled-at-device",
+ "job-canceled-by-operator", "job-canceled-at-device",
"aborted-by-system", "unsupported-compression", "compression-error",
- "unsupported-document-format", "document-format-error",
- "processing-to-stop-point", "service-off-line",
- "job-completed-successfully", "job-completed-with-warnings",
+ "unsupported-document-format", "document-format-error",
+ "processing-to-stop-point", "service-off-line",
+ "job-completed-successfully", "job-completed-with-warnings",
"job-completed-with-errors", "job-restartable", "queued-in-device" };
-
- private static final JobStateReason[] enumValueTable =
- { JOB_INCOMING, JOB_DATA_INSUFFICIENT, DOCUMENT_ACCESS_ERROR,
- SUBMISSION_INTERRUPTED, JOB_OUTGOING, JOB_HOLD_UNTIL_SPECIFIED,
+
+ private static final JobStateReason[] enumValueTable =
+ { JOB_INCOMING, JOB_DATA_INSUFFICIENT, DOCUMENT_ACCESS_ERROR,
+ SUBMISSION_INTERRUPTED, JOB_OUTGOING, JOB_HOLD_UNTIL_SPECIFIED,
RESOURCES_ARE_NOT_READY, PRINTER_STOPPED_PARTLY, PRINTER_STOPPED,
JOB_INTERPRETING, JOB_QUEUED, JOB_TRANSFORMING, JOB_QUEUED_FOR_MARKER,
JOB_PRINTING, JOB_CANCELED_BY_USER, JOB_CANCELED_BY_OPERATOR,
@@ -246,10 +246,10 @@ public class JobStateReason extends EnumSyntax
PROCESSING_TO_STOP_POINT, SERVICE_OFF_LINE, JOB_COMPLETED_SUCCESSFULLY,
JOB_COMPLETED_WITH_WARNINGS, JOB_COMPLETED_WITH_ERRORS, JOB_RESTARTABLE,
QUEUED_IN_DEVICE };
-
+
/**
* Constructs a JobStateReason object.
- *
+ *
* @param value the enum value.
*/
protected JobStateReason(int value)
@@ -276,7 +276,7 @@ public class JobStateReason extends EnumSyntax
{
return "job-state-reason";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/JobStateReasons.java b/libjava/classpath/javax/print/attribute/standard/JobStateReasons.java
index 6c7a9f4..af6eb5e 100644
--- a/libjava/classpath/javax/print/attribute/standard/JobStateReasons.java
+++ b/libjava/classpath/javax/print/attribute/standard/JobStateReasons.java
@@ -44,14 +44,14 @@ import javax.print.attribute.Attribute;
import javax.print.attribute.PrintJobAttribute;
/**
- * The JobStateReasons attribute provides the set of
- * additional informations available about the current state of a print job.
+ * The JobStateReasons attribute provides the set of
+ * additional informations available about the current state of a print job.
*
* IPP Compatibility: JobStateReasons is an IPP 1.1 attribute.
*
* @see javax.print.attribute.standard.JobState
* @see javax.print.attribute.standard.JobStateReason
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -62,7 +62,7 @@ public final class JobStateReasons extends HashSet
/**
* Constructs an empty JobStateReasons attribute.
- */
+ */
public JobStateReasons()
{
super();
@@ -71,10 +71,10 @@ public final class JobStateReasons extends HashSet
/**
* Constructs an empty JobStateReasons attribute
* with the given initial capacity and load factor.
- *
+ *
* @param initialCapacity the intial capacity.
* @param loadFactor the load factor of the underlying HashSet.
- *
+ *
* @throws IllegalArgumentException if initialCapacity < 0
* @throws IllegalArgumentException if initialCapacity or loadFactor < 0
*/
@@ -86,9 +86,9 @@ public final class JobStateReasons extends HashSet
/**
* Constructs an empty JobStateReasons attribute
* with the given initial capacity and the default load factor.
- *
+ *
* @param initialCapacity the intial capacity.
- *
+ *
* @throws IllegalArgumentException if initialCapacity < 0
*/
public JobStateReasons(int initialCapacity)
@@ -99,12 +99,12 @@ public final class JobStateReasons extends HashSet
/**
* Constructs a JobStateReasons attribute
* with the content of the given collection.
- *
+ *
* @param collection the collection for the initial values.
- *
- * @throws NullPointerException if collection or any value is
+ *
+ * @throws NullPointerException if collection or any value is
* null.
- * @throws ClassCastException if values of collection are not of type
+ * @throws ClassCastException if values of collection are not of type
* JobStateReason.
*/
public JobStateReasons(Collection collection)
@@ -116,10 +116,10 @@ public final class JobStateReasons extends HashSet
/**
* Adds the given job state reason object to the set.
- *
+ *
* @param o the reason of type JobStateReason.
* @return true if set changed, false otherwise.
- *
+ *
* @throws NullPointerException if given object is null.
* @throws ClassCastException if given object is not an instance of
* JobStateReason.
@@ -127,11 +127,11 @@ public final class JobStateReasons extends HashSet
public boolean add(JobStateReason o)
{
if (o == null)
- throw new NullPointerException("reason is null");
-
+ throw new NullPointerException("reason is null");
+
return super.add(o);
}
-
+
/**
* Returns category of this class.
*
diff --git a/libjava/classpath/javax/print/attribute/standard/Media.java b/libjava/classpath/javax/print/attribute/standard/Media.java
index 4c0af0e..dad8d35 100644
--- a/libjava/classpath/javax/print/attribute/standard/Media.java
+++ b/libjava/classpath/javax/print/attribute/standard/Media.java
@@ -50,7 +50,7 @@ import javax.print.attribute.PrintRequestAttribute;
*
* The media to be used can be specified in three ways represented
* by the media subclasses {@link javax.print.attribute.standard.MediaTray},
- * {@link javax.print.attribute.standard.MediaName} and
+ * {@link javax.print.attribute.standard.MediaName} and
* {@link javax.print.attribute.standard.MediaSizeName}:
*
*
Selection by paper source - selection of printer tray to be used.
* Each of the sublcasses represents the IPP attribute media
* and provides predefined values to be used.
- *
+ *
*
* IPP Compatibility: Media is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -74,14 +74,14 @@ public abstract class Media extends EnumSyntax
/**
* Constructs a Media object.
- *
+ *
* @param value the enum value.
*/
protected Media(int value)
{
super(value);
}
-
+
/**
* Tests if the given object is equal to this object.
* The objects are considered equal if both are of the same
@@ -89,14 +89,14 @@ public abstract class Media extends EnumSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
{
if (obj == null)
return false;
-
+
return (obj.getClass() == this.getClass()
&& ((Media) obj).getValue() == this.getValue());
}
diff --git a/libjava/classpath/javax/print/attribute/standard/MediaName.java b/libjava/classpath/javax/print/attribute/standard/MediaName.java
index 2fa7cea..78a052f 100644
--- a/libjava/classpath/javax/print/attribute/standard/MediaName.java
+++ b/libjava/classpath/javax/print/attribute/standard/MediaName.java
@@ -40,53 +40,53 @@ package javax.print.attribute.standard;
import javax.print.attribute.EnumSyntax;
/**
- * MediaName is a subclass of the Media printing
- * attribute and provides selection of media to be used by the means of
- * defined names. The class pre-defines commonly available media names.
- * This media type enumeration may be used in alternative to
+ * MediaName is a subclass of the Media printing
+ * attribute and provides selection of media to be used by the means of
+ * defined names. The class pre-defines commonly available media names.
+ * This media type enumeration may be used in alternative to
* MediaSizeName/MediaTray.
*
* IPP Compatibility: MediaName is not an IPP 1.1 attribute on its own.
* It provides parts of the media attribute type values.
*
- *
+ *
* @author Sven de Marothy
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class MediaName extends Media
{
private static final long serialVersionUID = 4653117714524155448L;
-
+
/**
* The North American letter white medium.
*/
public static final MediaName NA_LETTER_WHITE = new MediaName(0);
-
+
/**
* The North American letter transparent medium.
*/
public static final MediaName NA_LETTER_TRANSPARENT = new MediaName(1);
-
+
/**
* The ISO A4 white medium.
*/
public static final MediaName ISO_A4_WHITE = new MediaName(2);
-
+
/**
- * The ISO A4 transparent medium.
+ * The ISO A4 transparent medium.
*/
public static final MediaName ISO_A4_TRANSPARENT = new MediaName(3);
- private static final String[] stringTable = { "na-letter-white",
- "na-letter-transparent",
+ private static final String[] stringTable = { "na-letter-white",
+ "na-letter-transparent",
"iso-a4-white",
"iso-a4-transparent" };
-
- private static final MediaName[] enumValueTable = { NA_LETTER_WHITE,
- NA_LETTER_TRANSPARENT,
- ISO_A4_WHITE,
- ISO_A4_TRANSPARENT };
-
+
+ private static final MediaName[] enumValueTable = { NA_LETTER_WHITE,
+ NA_LETTER_TRANSPARENT,
+ ISO_A4_WHITE,
+ ISO_A4_TRANSPARENT };
+
/**
* Creates a MediaName object.
*
@@ -96,7 +96,7 @@ public class MediaName extends Media
{
super( i );
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
@@ -118,4 +118,3 @@ public class MediaName extends Media
return enumValueTable;
}
}
-
diff --git a/libjava/classpath/javax/print/attribute/standard/MediaPrintableArea.java b/libjava/classpath/javax/print/attribute/standard/MediaPrintableArea.java
index 84ebd61..7219992 100644
--- a/libjava/classpath/javax/print/attribute/standard/MediaPrintableArea.java
+++ b/libjava/classpath/javax/print/attribute/standard/MediaPrintableArea.java
@@ -1,4 +1,4 @@
-/* MediaPrintableArea.java --
+/* MediaPrintableArea.java --
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -47,10 +47,10 @@ import javax.print.attribute.PrintRequestAttribute;
* The MediaPrintableArea attribute specifies the area
* of a media sheet which is available for printing.
*
- * Due to hardware limitation its not possible with most printers to use the
- * whole area of a media sheet for printing. This attribute defines the area
+ * Due to hardware limitation its not possible with most printers to use the
+ * whole area of a media sheet for printing. This attribute defines the area
* for printing through the values of the upper left corner position (x,y)
- * on the sheet and the available width and height of the area. The units of
+ * on the sheet and the available width and height of the area. The units of
* the values are determined by two defined constants:
*
* Internal storage:
- * The values of x, y, width and height are stored internally in micrometers.
+ * The values of x, y, width and height are stored internally in micrometers.
* The values of the provided constants for inch (value 25400) and millimeters
* (value 1000) are used as conversion factors to the internal storage units.
* To get the internal micrometers values a multiplication of a given
* size value with its units constant value is done. Retrieving the size value
- * for specific units is done by dividing the internal stored value by the
+ * for specific units is done by dividing the internal stored value by the
* units constant value.
*
*
@@ -84,13 +84,13 @@ public final class MediaPrintableArea
* The actual value is the conversion factor to micrometers.
*/
public static final int INCH = 25400;
-
+
/**
* Constant for the units of millimeters.
* The actual value is the conversion factor to micrometers.
*/
public static final int MM = 1000;
-
+
/** x in micrometers. */
private int x;
/** y in micrometers. */
@@ -99,17 +99,17 @@ public final class MediaPrintableArea
private int w;
/** height in micrometers. */
private int h;
-
+
/**
* Creates a new MediaPrintableArea object with the given
* float values for the given units.
- *
+ *
* @param x start of the printable area on the sheet in x direction.
* @param y start of the printable area on the sheet in y direction.
* @param w the width of the printable area.
* @param h the height of the printable area.
* @param units the units of the given values.
- *
+ *
* @throws IllegalArgumentException if x i< 0 or y i< 0 or w i<= 0
* or h i<= 0 or units i< 1
*/
@@ -127,13 +127,13 @@ public final class MediaPrintableArea
/**
* Creates a new MediaPrintableArea object with the given
* int values for the given units.
- *
+ *
* @param x start of the printable area on the sheet in x direction.
* @param y start of the printable area on the sheet in y direction.
* @param w the width of the printable area.
* @param h the height of the printable area.
* @param units the units of the given values.
- *
+ *
* @throws IllegalArgumentException if x i< 0 or y i< 0 or w i<= 0
* or h i<= 0 or units i< 1
*/
@@ -170,10 +170,10 @@ public final class MediaPrintableArea
/**
* Returns the height of the printable area for the given units.
- *
+ *
* @param units the units conversion factor.
* @return The height.
- *
+ *
* @throws IllegalArgumentException if units is < 1
*/
public float getHeight(int units)
@@ -186,10 +186,10 @@ public final class MediaPrintableArea
/**
* Returns the width of the printable area for the given units.
- *
+ *
* @param units the units conversion factor.
* @return The width.
- *
+ *
* @throws IllegalArgumentException if units is < 1
*/
public float getWidth(int units)
@@ -201,12 +201,12 @@ public final class MediaPrintableArea
}
/**
- * Returns the position in x direction of the printable area
+ * Returns the position in x direction of the printable area
* for the given units.
- *
+ *
* @param units the units conversion factor.
* @return The position in x direction.
- *
+ *
* @throws IllegalArgumentException if units is < 1
*/
public float getX(int units)
@@ -218,12 +218,12 @@ public final class MediaPrintableArea
}
/**
- * Returns the position in y direction of the printable area
+ * Returns the position in y direction of the printable area
* for the given units.
- *
+ *
* @param units the units conversion factor.
* @return The position in y direction.
- *
+ *
* @throws IllegalArgumentException if units is < 1
*/
public float getY(int units)
@@ -233,7 +233,7 @@ public final class MediaPrintableArea
return y / ((float)units);
}
-
+
/**
* Tests if the given object is equal to this object.
*
@@ -256,7 +256,7 @@ public final class MediaPrintableArea
* Returns the string representation for this object in units of millimeters..
*
* The returned string is in the form "(x,y)->(width,height)mm".
- *
+ *
* @return The string representation in millimeters.
*/
public String toString()
@@ -273,7 +273,7 @@ public final class MediaPrintableArea
{
return x ^ y + w ^ h;
}
-
+
/**
* Returns the string representation for this object in units of millimeters..
*
@@ -283,30 +283,30 @@ public final class MediaPrintableArea
* @param unitsName the name of the used units, appended to the resulting
* string if not null.
* @return The string representation in millimeters.
- *
+ *
* @throws IllegalArgumentException if units is < 1
*/
public String toString(int units, String unitsName)
{
if (units < 1)
throw new IllegalArgumentException("units may not be less than 1");
-
+
String tmp = "(" + getX(units) + "," + getY(units) + ")->("
+ getWidth(units) + "," + getHeight(units) + ")";
-
+
return unitsName == null ? tmp : tmp + unitsName;
}
/**
- * Returns the printable area as an float[] with 4 values
+ * Returns the printable area as an float[] with 4 values
* (order x, y, width, height) in the given units.
- *
+ *
* @param units the units to use.
* @return The printable area as float array.
*/
public float[] getPrintableArea(int units)
{
- return new float[] { getX(units), getY(units),
+ return new float[] { getX(units), getY(units),
getWidth(units), getHeight(units) };
- }
+ }
}
diff --git a/libjava/classpath/javax/print/attribute/standard/MediaSize.java b/libjava/classpath/javax/print/attribute/standard/MediaSize.java
index f2fa100..7df22cd 100644
--- a/libjava/classpath/javax/print/attribute/standard/MediaSize.java
+++ b/libjava/classpath/javax/print/attribute/standard/MediaSize.java
@@ -1,4 +1,4 @@
-/* MediaSize.java --
+/* MediaSize.java --
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,20 +45,20 @@ import javax.print.attribute.Size2DSyntax;
/**
* The MediaSize printing attribute class specifies the size
- * of a printing media. The size is defined in portrait orientation with
+ * of a printing media. The size is defined in portrait orientation with
* x at the bottom edge and y at the left edge.
*
* There are several media sizes predefined through the nested classes. Further
* sizes may be provided by the application. MediaSize is not used
- * as a printing attribute currently. It may be used to get the actual sizes
+ * as a printing attribute currently. It may be used to get the actual sizes
* for a named media or to find a suitable MediaSizeName instance
* by querying with the needed sizes.
- *
+ *
*
* IPP Compatibility: MediaSize is not an IPP 1.1 attribute.
*
* @see javax.print.attribute.standard.MediaSizeName
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -66,9 +66,9 @@ public class MediaSize extends Size2DSyntax
implements Attribute
{
private static final long serialVersionUID = -1967958664615414771L;
-
+
private static ArrayList mediaCache;
-
+
static
{
mediaCache = new ArrayList();
@@ -76,10 +76,10 @@ public class MediaSize extends Size2DSyntax
// We call one instance of every container class to make sure it gets
// loaded during class initialization and therefore all other static
// fields of this container class also.
-
+
// This is needed to put all MediaSize instance into the mediaCache
// for use by the static methods in this class.
-
+
MediaSize tmp = MediaSize.ISO.A0;
tmp = MediaSize.JIS.B0;
tmp = MediaSize.Engineering.A;
@@ -88,10 +88,10 @@ public class MediaSize extends Size2DSyntax
}
private MediaSizeName mediaName;
-
+
/**
- * Creates a MediaSize object. The created object will be added
- * to an internal cache used in the static methods of this class for lookup
+ * Creates a MediaSize object. The created object will be added
+ * to an internal cache used in the static methods of this class for lookup
* of available MediaSize instances.
*
* @param x the size in x direction
@@ -99,7 +99,7 @@ public class MediaSize extends Size2DSyntax
* @param units the units to use for the sizes
*
* @exception IllegalArgumentException if x or y < 0 or units < 1
- *
+ *
* @see #findMedia(float, float, int)
* @see #getMediaSizeForName(MediaSizeName)
*/
@@ -108,11 +108,11 @@ public class MediaSize extends Size2DSyntax
super(x, y, units);
mediaCache.add(this);
}
-
+
/**
* Creates a MediaSize object associated with the given
- * media name. The created object will be added to an internal cache used
- * in the static methods of this class for lookup of available
+ * media name. The created object will be added to an internal cache used
+ * in the static methods of this class for lookup of available
* MediaSize instances.
*
* @param x the size in x direction
@@ -121,7 +121,7 @@ public class MediaSize extends Size2DSyntax
* @param media the media name to associate
*
* @exception IllegalArgumentException if x or y < 0 or units < 1
- *
+ *
* @see #findMedia(float, float, int)
* @see #getMediaSizeForName(MediaSizeName)
*/
@@ -131,10 +131,10 @@ public class MediaSize extends Size2DSyntax
mediaName = media;
mediaCache.add(this);
}
-
+
/**
- * Creates a MediaSize object. The created object will be added
- * to an internal cache used in the static methods of this class for lookup
+ * Creates a MediaSize object. The created object will be added
+ * to an internal cache used in the static methods of this class for lookup
* of available MediaSize instances.
*
* @param x the size in x direction
@@ -142,7 +142,7 @@ public class MediaSize extends Size2DSyntax
* @param units the units to use for the sizes
*
* @exception IllegalArgumentException if x or y < 0 or units < 1
- *
+ *
* @see #findMedia(float, float, int)
* @see #getMediaSizeForName(MediaSizeName)
*/
@@ -151,11 +151,11 @@ public class MediaSize extends Size2DSyntax
super(x, y, units);
mediaCache.add(this);
}
-
+
/**
* Creates a MediaSize object associated with the given
- * media name. The created object will be added to an internal cache used
- * in the static methods of this class for lookup of available
+ * media name. The created object will be added to an internal cache used
+ * in the static methods of this class for lookup of available
* MediaSize instances.
*
* @param x the size in x direction
@@ -164,7 +164,7 @@ public class MediaSize extends Size2DSyntax
* @param media the media name to associate
*
* @exception IllegalArgumentException if x or y < 0 or units < 1
- *
+ *
* @see #findMedia(float, float, int)
* @see #getMediaSizeForName(MediaSizeName)
*/
@@ -174,7 +174,7 @@ public class MediaSize extends Size2DSyntax
mediaName = media;
mediaCache.add(this);
}
-
+
/**
* Returns category of this class.
*
@@ -185,13 +185,13 @@ public class MediaSize extends Size2DSyntax
return MediaSize.class;
}
-
+
/**
* Searches for a MediaSize object with the given dimensions.
* If none is found with exact dimensions, the closest match is used.
- * Afterwards the MediaSizeName of the found MediaSize object is
+ * Afterwards the MediaSizeName of the found MediaSize object is
* returned - which might be null if none is specified.
- *
+ *
* @param x the dimension for x
* @param y the dimension for y
* @param units the units to be used for comparison
@@ -202,7 +202,7 @@ public class MediaSize extends Size2DSyntax
if (x <= 0.0f || y <= 0.0f)
throw new IllegalArgumentException(
"x and/or y may not be less or equal 0");
-
+
if (units < 1)
throw new IllegalArgumentException("units may not be less then 1");
@@ -215,7 +215,7 @@ public class MediaSize extends Size2DSyntax
for (int i = 0; i < mediaCache.size(); i++)
{
MediaSize size = mediaCache.get(i);
- int dist = (Math.abs(size.getXMicrometers() - xMicro)
+ int dist = (Math.abs(size.getXMicrometers() - xMicro)
+ Math.abs(size.getYMicrometers() - yMicro));
if (dist < bestDistance)
@@ -227,34 +227,34 @@ public class MediaSize extends Size2DSyntax
return bestMatch.getMediaSizeName();
}
-
+
/**
- * Returns the associated MediaSize instance for the
+ * Returns the associated MediaSize instance for the
* given named media MediaSizeName instance.
- *
+ *
* @param media the named media to search for.
- * @return The corresponding MediaSize instance or
+ * @return The corresponding MediaSize instance or
* null if none found.
*/
public static MediaSize getMediaSizeForName(MediaSizeName media)
{
for (int i = 0; i < mediaCache.size(); i++)
{
- MediaSize size = mediaCache.get(i);
-
- if (size.getMediaSizeName().equals(media))
- return size;
+ MediaSize size = mediaCache.get(i);
+
+ if (size.getMediaSizeName().equals(media))
+ return size;
}
return null;
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
@@ -266,10 +266,10 @@ public class MediaSize extends Size2DSyntax
return (tmp.getXMicrometers() == this.getXMicrometers()
&& tmp.getYMicrometers() == this.getYMicrometers());
}
-
+
/**
* Returns the media name of this size.
- *
+ *
* @return The media name.
*/
public MediaSizeName getMediaSizeName()
@@ -289,28 +289,28 @@ public class MediaSize extends Size2DSyntax
/**
* Container class for predefined ISO media sizes.
- *
+ *
* @author Sven de Marothy (sven@physto.se)
*/
- public static final class ISO
+ public static final class ISO
{
private ISO()
{
// prevent instantiation
}
-
+
/**
* ISO A0 paper, 841 mm x 1189 mm.
*/
- public static final MediaSize A0 = new MediaSize(841, 1189,
- MediaSize.MM,
- MediaSizeName.ISO_A0);
+ public static final MediaSize A0 = new MediaSize(841, 1189,
+ MediaSize.MM,
+ MediaSizeName.ISO_A0);
/**
* ISO A1 paper, 594 mm x 841 mm
*/
- public static final MediaSize A1 = new MediaSize(594, 841, MediaSize.MM,
- MediaSizeName.ISO_A1);
+ public static final MediaSize A1 = new MediaSize(594, 841, MediaSize.MM,
+ MediaSizeName.ISO_A1);
/**
* ISO A2 paper, 420 mm x 594 mm
@@ -412,7 +412,7 @@ public class MediaSize extends Size2DSyntax
* ISO B10 paper, 31 mm x 44 mm
*/
public static final MediaSize B10 = new MediaSize(31, 44, MediaSize.MM, MediaSizeName.ISO_B10);
-
+
/**
* ISO C3 envelope, 324 mm x 458 mm
*/
@@ -436,13 +436,13 @@ public class MediaSize extends Size2DSyntax
/**
* ISO ISO Designated Long paper, 324 mm x 458 mm
*/
- public static final MediaSize DESIGNATED_LONG =
+ public static final MediaSize DESIGNATED_LONG =
new MediaSize(324, 458, MediaSize.MM, MediaSizeName.ISO_DESIGNATED_LONG);
- }
+ }
/**
* Container class for predefined North American media sizes.
- *
+ *
* @author Sven de Marothy (sven@physto.se)
*/
public static final class NA
@@ -451,170 +451,170 @@ public class MediaSize extends Size2DSyntax
{
// prevent instantiation
}
-
+
/**
* US Legal paper size, 8.5 inch x 14 inch
*/
- public static final MediaSize LEGAL = new MediaSize(8.5f, 14f, MediaSize.INCH,
- MediaSizeName.NA_LEGAL);
+ public static final MediaSize LEGAL = new MediaSize(8.5f, 14f, MediaSize.INCH,
+ MediaSizeName.NA_LEGAL);
/**
* US Letter paper size, 8.5 inch x 11 inch
*/
public static final MediaSize LETTER = new MediaSize(8.5f, 11f, MediaSize.INCH,
- MediaSizeName.NA_LETTER);
+ MediaSizeName.NA_LETTER);
/**
* 5 inch x 7 inch paper size.
*/
public static final MediaSize NA_5X7 = new MediaSize(5, 7, MediaSize.INCH,
- MediaSizeName.NA_5X7);
+ MediaSizeName.NA_5X7);
/**
* 8 inch x 10 inch paper size.
*/
public static final MediaSize NA_8X10 = new MediaSize(8, 10, MediaSize.INCH,
- MediaSizeName.NA_8X10);
+ MediaSizeName.NA_8X10);
/**
* 6 inch x 9 inch envelope size.
*/
- public static final MediaSize NA_6X9_ENVELOPE = new MediaSize(6f, 9f,
- MediaSize.INCH,
- MediaSizeName.NA_6X9_ENVELOPE);
+ public static final MediaSize NA_6X9_ENVELOPE = new MediaSize(6f, 9f,
+ MediaSize.INCH,
+ MediaSizeName.NA_6X9_ENVELOPE);
/**
* 7 inch x 9 inch envelope size.
*/
- public static final MediaSize NA_7X9_ENVELOPE = new MediaSize(7f, 9f,
- MediaSize.INCH,
- MediaSizeName.NA_7X9_ENVELOPE);
+ public static final MediaSize NA_7X9_ENVELOPE = new MediaSize(7f, 9f,
+ MediaSize.INCH,
+ MediaSizeName.NA_7X9_ENVELOPE);
/**
* 9 inch x 11 inch envelope size.
*/
- public static final MediaSize NA_9x11_ENVELOPE = new MediaSize(9f, 11f,
- MediaSize.INCH,
- MediaSizeName.NA_9X11_ENVELOPE);
+ public static final MediaSize NA_9x11_ENVELOPE = new MediaSize(9f, 11f,
+ MediaSize.INCH,
+ MediaSizeName.NA_9X11_ENVELOPE);
/**
* 9 inch x 12 inch envelope size.
*/
- public static final MediaSize NA_9x12_ENVELOPE = new MediaSize(9f, 12f,
- MediaSize.INCH,
- MediaSizeName.NA_9X12_ENVELOPE);
+ public static final MediaSize NA_9x12_ENVELOPE = new MediaSize(9f, 12f,
+ MediaSize.INCH,
+ MediaSizeName.NA_9X12_ENVELOPE);
/**
* 10 inch x 13 inch envelope size.
*/
- public static final MediaSize NA_10x13_ENVELOPE = new MediaSize(10f, 13f,
- MediaSize.INCH,
- MediaSizeName.NA_10X13_ENVELOPE);
+ public static final MediaSize NA_10x13_ENVELOPE = new MediaSize(10f, 13f,
+ MediaSize.INCH,
+ MediaSizeName.NA_10X13_ENVELOPE);
/**
* 10 inch x 14 inch envelope size.
*/
- public static final MediaSize NA_10x14_ENVELOPE = new MediaSize(10f, 14f,
- MediaSize.INCH,
- MediaSizeName.NA_10X14_ENVELOPE);
+ public static final MediaSize NA_10x14_ENVELOPE = new MediaSize(10f, 14f,
+ MediaSize.INCH,
+ MediaSizeName.NA_10X14_ENVELOPE);
/**
* 10 inch x 15 inch envelope size.
*/
- public static final MediaSize NA_10X15_ENVELOPE = new MediaSize(10f, 15f,
- MediaSize.INCH,
- MediaSizeName.NA_10X15_ENVELOPE);
+ public static final MediaSize NA_10X15_ENVELOPE = new MediaSize(10f, 15f,
+ MediaSize.INCH,
+ MediaSizeName.NA_10X15_ENVELOPE);
/**
* Number 9 envelope size. 4.5 inch x 10.375 inch
*/
public static final MediaSize NA_NUMBER_9_ENVELOPE = new MediaSize(3.875f, 8.875f,
- MediaSize.INCH,
- MediaSizeName.NA_NUMBER_9_ENVELOPE);
+ MediaSize.INCH,
+ MediaSizeName.NA_NUMBER_9_ENVELOPE);
/**
* Number 10 envelope size. 4.125 inch x 9.5 inch
*/
- public static final MediaSize NA_NUMBER_10_ENVELOPE =
+ public static final MediaSize NA_NUMBER_10_ENVELOPE =
new MediaSize(4.125f, 9.5f, MediaSize.INCH, MediaSizeName.NA_NUMBER_10_ENVELOPE);
/**
* Number 11 envelope size. 4.5 inch x 10.375 inch
*/
public static final MediaSize NA_NUMBER_11_ENVELOPE = new MediaSize(4.5f, 10.375f, MediaSize.INCH,
- MediaSizeName.NA_NUMBER_11_ENVELOPE);
-
+ MediaSizeName.NA_NUMBER_11_ENVELOPE);
+
/**
* Number 12 envelope size. 4.75 inch x 11 inch
*/
- public static final MediaSize NA_NUMBER_12_ENVELOPE = new MediaSize(4.75f, 11f,
- MediaSize.INCH,
- MediaSizeName.NA_NUMBER_12_ENVELOPE);
+ public static final MediaSize NA_NUMBER_12_ENVELOPE = new MediaSize(4.75f, 11f,
+ MediaSize.INCH,
+ MediaSizeName.NA_NUMBER_12_ENVELOPE);
/**
* Number 14 envelope size. 5 inch x 11.5 inch
*/
- public static final MediaSize NA_NUMBER_14_ENVELOPE = new MediaSize(5f, 11.5f,
- MediaSize.INCH,
- MediaSizeName.NA_NUMBER_14_ENVELOPE);
+ public static final MediaSize NA_NUMBER_14_ENVELOPE = new MediaSize(5f, 11.5f,
+ MediaSize.INCH,
+ MediaSizeName.NA_NUMBER_14_ENVELOPE);
}
/**
* Container class for predefined US Engineering media sizes.
- *
+ *
* @author Sven de Marothy (sven@physto.se)
*/
- public static final class Engineering
+ public static final class Engineering
{
private Engineering()
{
// prevent instantiation
}
-
+
/**
* ANSI A paper size. 8.5 inch x 11 inch
*/
- public static final MediaSize A = new MediaSize(8.5f, 11f,
- MediaSize.INCH, MediaSizeName.A);
+ public static final MediaSize A = new MediaSize(8.5f, 11f,
+ MediaSize.INCH, MediaSizeName.A);
/**
* ANSI B paper size. 11 inch x 17 inch
*/
- public static final MediaSize B = new MediaSize(11f, 17f,
- MediaSize.INCH, MediaSizeName.B);
+ public static final MediaSize B = new MediaSize(11f, 17f,
+ MediaSize.INCH, MediaSizeName.B);
/**
* ANSI C paper size. 17 inch x 22 inch
*/
- public static final MediaSize C = new MediaSize(17f, 22f,
- MediaSize.INCH, MediaSizeName.C);
+ public static final MediaSize C = new MediaSize(17f, 22f,
+ MediaSize.INCH, MediaSizeName.C);
/**
* ANSI D paper size. 22 inch x 34 inch
*/
- public static final MediaSize D = new MediaSize(22f, 34f,
- MediaSize.INCH, MediaSizeName.D);
+ public static final MediaSize D = new MediaSize(22f, 34f,
+ MediaSize.INCH, MediaSizeName.D);
/**
* ANSI E paper size. 33 inch x 44 inch
*/
- public static final MediaSize E = new MediaSize(34f, 44f,
- MediaSize.INCH, MediaSizeName.E);
+ public static final MediaSize E = new MediaSize(34f, 44f,
+ MediaSize.INCH, MediaSizeName.E);
}
/**
* Container class for predefined Japanese JIS media sizes.
- *
+ *
* @author Sven de Marothy (sven@physto.se)
*/
- public static final class JIS
+ public static final class JIS
{
private JIS()
{
// prevent instantiation
}
-
+
/**
* JIS B0 paper. 1030 mm x 1456 mm
* Note: The JIS B-series is not identical to the ISO B-series.
@@ -804,7 +804,7 @@ public class MediaSize extends Size2DSyntax
/**
* Container class for miscellaneous media sizes.
- *
+ *
* @author Sven de Marothy (sven@physto.se)
*/
public static final class Other
@@ -813,12 +813,12 @@ public class MediaSize extends Size2DSyntax
{
// prevent instantiation
}
-
+
/**
* US Executive paper size, 7.25 inch x 10.5 inch
*/
- public static final MediaSize EXECUTIVE = new MediaSize(7.25f, 10.5f,
- MediaSize.INCH, MediaSizeName.EXECUTIVE);
+ public static final MediaSize EXECUTIVE = new MediaSize(7.25f, 10.5f,
+ MediaSize.INCH, MediaSizeName.EXECUTIVE);
/**
* US Folio paper size, 8.5 inch x 13 inch
@@ -829,39 +829,39 @@ public class MediaSize extends Size2DSyntax
* US Quarto paper size, 8.5 inches by 10.83 inches.
*/
public static final MediaSize QUARTO = new MediaSize(8.5f, 10.83f, MediaSize.INCH,
- MediaSizeName.QUARTO);
+ MediaSizeName.QUARTO);
/**
* US Invoice size, 5.5 inch x 8.5 inch
*/
- public static final MediaSize INVOICE = new MediaSize(5.5f, 8.5f,
- MediaSize.INCH, MediaSizeName.INVOICE);
+ public static final MediaSize INVOICE = new MediaSize(5.5f, 8.5f,
+ MediaSize.INCH, MediaSizeName.INVOICE);
/**
* US Ledger size, 11 inch x 17 inch
*/
- public static final MediaSize LEDGER = new MediaSize(11, 17, MediaSize.INCH,
- MediaSizeName.LEDGER);
+ public static final MediaSize LEDGER = new MediaSize(11, 17, MediaSize.INCH,
+ MediaSizeName.LEDGER);
/**
* Monarch (7 3/4) envelope size, 3.87 inch x 7.5 inch
*/
- public static final MediaSize MONARCH_ENVELOPE = new MediaSize(3.87f, 7.5f,
- MediaSize.INCH,
- MediaSizeName.MONARCH_ENVELOPE);
+ public static final MediaSize MONARCH_ENVELOPE = new MediaSize(3.87f, 7.5f,
+ MediaSize.INCH,
+ MediaSizeName.MONARCH_ENVELOPE);
/**
* Personal envelope size, 3.625 inch x 6.5 inch.
*/
public static final MediaSize PERSONAL_ENVELOPE = new MediaSize(3.625f, 6.5f, MediaSize.INCH,
- MediaSizeName.PERSONAL_ENVELOPE);
+ MediaSizeName.PERSONAL_ENVELOPE);
/**
* Italian envelope size, 110 mm x 230 mm
*/
- public static final MediaSize ITALY_ENVELOPE = new MediaSize(110, 230,
- MediaSize.MM,
- MediaSizeName.ITALY_ENVELOPE);
+ public static final MediaSize ITALY_ENVELOPE = new MediaSize(110, 230,
+ MediaSize.MM,
+ MediaSizeName.ITALY_ENVELOPE);
/**
* Japanese postcard, 100 mm x 148 mm
@@ -872,13 +872,12 @@ public class MediaSize extends Size2DSyntax
* Japanese double postcard, 148 mm x 200 mm
*/
public static final MediaSize JAPANESE_DOUBLE_POSTCARD = new MediaSize(148, 200, MediaSize.MM, MediaSizeName.JAPANESE_DOUBLE_POSTCARD);
-
+
/**
* Tabloid size, 11 inch x 17 inch.
* @since 1.5
*/
- public static final MediaSize TABLOID =
+ public static final MediaSize TABLOID =
new MediaSize(11, 17, Size2DSyntax.INCH, MediaSizeName.TABLOID);
}
}
-
diff --git a/libjava/classpath/javax/print/attribute/standard/MediaSizeName.java b/libjava/classpath/javax/print/attribute/standard/MediaSizeName.java
index e29b1ae..a6b26b1 100644
--- a/libjava/classpath/javax/print/attribute/standard/MediaSizeName.java
+++ b/libjava/classpath/javax/print/attribute/standard/MediaSizeName.java
@@ -40,16 +40,16 @@ package javax.print.attribute.standard;
import javax.print.attribute.EnumSyntax;
/**
- * MediaSizeName is a subclass of the Media printing
- * attribute and provides selection of media to be used by the means of
- * defined size names. The class pre-defines commonly available media sizes.
- * This media type enumeration may be used in alternative to
+ * MediaSizeName is a subclass of the Media printing
+ * attribute and provides selection of media to be used by the means of
+ * defined size names. The class pre-defines commonly available media sizes.
+ * This media type enumeration may be used in alternative to
* MediaName/MediaTray.
*
- * IPP Compatibility: MediaSizeName is not an IPP 1.1 attribute on its
+ * IPP Compatibility: MediaSizeName is not an IPP 1.1 attribute on its
* own. It provides parts of the media attribute type values.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -61,412 +61,412 @@ public class MediaSizeName extends Media
* The ISO A0 size: 841 mm by 1189 mm.
*/
public static final MediaSizeName ISO_A0 = new MediaSizeName(0);
-
+
/**
* The ISO A1 size: 594 mm by 841 mm.
*/
public static final MediaSizeName ISO_A1 = new MediaSizeName(1);
-
+
/**
* The ISO A2 size: 420 mm by 594 mm.
*/
public static final MediaSizeName ISO_A2 = new MediaSizeName(2);
-
+
/**
* The ISO A3 size: 297 mm by 420 mm.
*/
public static final MediaSizeName ISO_A3 = new MediaSizeName(3);
-
+
/**
* The ISO A4 size: 210 mm by 297 mm.
*/
public static final MediaSizeName ISO_A4 = new MediaSizeName(4);
-
+
/**
* The ISO A5 size: 148 mm by 210 mm.
*/
public static final MediaSizeName ISO_A5 = new MediaSizeName(5);
-
+
/**
* The ISO A6 size: 105 mm by 148 mm.
*/
public static final MediaSizeName ISO_A6 = new MediaSizeName(6);
-
+
/**
* The ISO A7 size: 74 mm by 105 mm.
*/
public static final MediaSizeName ISO_A7 = new MediaSizeName(7);
-
+
/**
* The ISO A8 size: 52 mm by 74 mm.
*/
public static final MediaSizeName ISO_A8 = new MediaSizeName(8);
-
+
/**
* The ISO A9 size: 37 mm by 52 mm.
*/
public static final MediaSizeName ISO_A9 = new MediaSizeName(9);
-
+
/**
* The ISO A10 size: 26 mm by 37 mm.
*/
public static final MediaSizeName ISO_A10 = new MediaSizeName(10);
-
+
/**
* The ISO B0 size: 1000 mm by 1414 mm.
*/
public static final MediaSizeName ISO_B0 = new MediaSizeName(11);
-
+
/**
* The ISO B1 size: 707 mm by 1000 mm.
*/
public static final MediaSizeName ISO_B1 = new MediaSizeName(12);
-
+
/**
* The ISO B2 size: 500 mm by 707 mm.
*/
public static final MediaSizeName ISO_B2 = new MediaSizeName(13);
-
+
/**
* The ISO B3 size: 353 mm by 500 mm.
*/
public static final MediaSizeName ISO_B3 = new MediaSizeName(14);
-
+
/**
* The ISO B4 size: 250 mm by 353 mm.
*/
public static final MediaSizeName ISO_B4 = new MediaSizeName(15);
-
+
/**
* The ISO B5 size: 176 mm by 250 mm.
*/
public static final MediaSizeName ISO_B5 = new MediaSizeName(16);
-
+
/**
* The ISO B6 size: 125 mm by 176 mm.
*/
public static final MediaSizeName ISO_B6 = new MediaSizeName(17);
-
+
/**
* The ISO B7 size: 88 mm by 125 mm.
*/
public static final MediaSizeName ISO_B7 = new MediaSizeName(18);
-
+
/**
* The ISO B8 size: 62 mm by 88 mm.
*/
public static final MediaSizeName ISO_B8 = new MediaSizeName(19);
-
+
/**
* The ISO B9 size: 44 mm by 62 mm.
*/
public static final MediaSizeName ISO_B9 = new MediaSizeName(20);
-
+
/**
* The ISO B10 size: 31 mm by 44 mm.
*/
public static final MediaSizeName ISO_B10 = new MediaSizeName(21);
-
+
/**
* The JIS B0 size: 1030mm x 1456mm.
*/
public static final MediaSizeName JIS_B0 = new MediaSizeName(22);
-
+
/**
* The JIS B1 size: 728mm x 1030mm.
*/
public static final MediaSizeName JIS_B1 = new MediaSizeName(23);
-
+
/**
* The JIS B2 size: 515mm x 728mm.
*/
public static final MediaSizeName JIS_B2 = new MediaSizeName(24);
-
+
/**
* The JIS B3 size: 364mm x 515mm.
*/
public static final MediaSizeName JIS_B3 = new MediaSizeName(25);
-
+
/**
* The JIS B4 size: 257mm x 364mm.
*/
public static final MediaSizeName JIS_B4 = new MediaSizeName(26);
-
+
/**
* The JIS B5 size: 182mm x 257mm.
*/
public static final MediaSizeName JIS_B5 = new MediaSizeName(27);
-
+
/**
* The JIS B6 size: 128mm x 182mm.
*/
public static final MediaSizeName JIS_B6 = new MediaSizeName(28);
-
+
/**
* The JIS B7 size: 91mm x 128mm.
*/
public static final MediaSizeName JIS_B7 = new MediaSizeName(29);
-
+
/**
* The JIS B8 size: 64mm x 91mm.
*/
public static final MediaSizeName JIS_B8 = new MediaSizeName(30);
-
+
/**
* The JIS B9 size: 45mm x 64mm.
*/
public static final MediaSizeName JIS_B9 = new MediaSizeName(31);
-
+
/**
* The JIS B10 size: 32mm x 45mm.
*/
public static final MediaSizeName JIS_B10 = new MediaSizeName(32);
-
+
/**
* The ISO C0 size: 917 mm by 1297 mm.
*/
public static final MediaSizeName ISO_C0 = new MediaSizeName(33);
-
+
/**
* The ISO C1 size: 648 mm by 917 mm.
*/
public static final MediaSizeName ISO_C1 = new MediaSizeName(34);
-
+
/**
* The ISO C2 size: 458 mm by 648 mm.
*/
public static final MediaSizeName ISO_C2 = new MediaSizeName(35);
-
+
/**
* The ISO C3 size: 324 mm by 458 mm.
*/
public static final MediaSizeName ISO_C3 = new MediaSizeName(36);
-
+
/**
* The ISO C4 size: 229 mm by 324 mm.
*/
public static final MediaSizeName ISO_C4 = new MediaSizeName(37);
-
+
/**
* The ISO C5 size: 162 mm by 229 mm.
*/
public static final MediaSizeName ISO_C5 = new MediaSizeName(38);
-
+
/**
* The ISO C6 size: 114 mm by 162 mm.
*/
public static final MediaSizeName ISO_C6 = new MediaSizeName(39);
-
+
/**
* The North American letter size: 8.5 inches by 11 inches.
*/
public static final MediaSizeName NA_LETTER = new MediaSizeName(40);
-
+
/**
* The North American legal size: 8.5 inches by 14 inches.
*/
public static final MediaSizeName NA_LEGAL = new MediaSizeName(41);
-
+
/**
* The executive size: 7.25 inches by 10.5 inches.
*/
public static final MediaSizeName EXECUTIVE = new MediaSizeName(42);
-
+
/**
* The ledger size: 11 inches by 17 inches.
*/
public static final MediaSizeName LEDGER = new MediaSizeName(43);
-
+
/**
* The tabloid size: 11 inches by 17 inches.
*/
public static final MediaSizeName TABLOID = new MediaSizeName(44);
-
+
/**
* The invoice size: 5.5 inches by 8.5 inches.
*/
public static final MediaSizeName INVOICE = new MediaSizeName(45);
-
+
/**
* The folio size: 8.5 inches by 13 inches.
*/
public static final MediaSizeName FOLIO = new MediaSizeName(46);
-
+
/**
* The quarto size: 8.5 inches by 10.83 inches.
*/
public static final MediaSizeName QUARTO = new MediaSizeName(47);
-
+
/**
* The Japanese postcard size, 100 mm by 148 mm.
*/
public static final MediaSizeName JAPANESE_POSTCARD = new MediaSizeName(48);
-
+
/**
* The Japanese Double postcard size: 148 mm by 200 mm.
*/
public static final MediaSizeName JAPANESE_DOUBLE_POSTCARD =
new MediaSizeName(49);
-
+
/**
* The engineering ANSI A size medium: 8.5 inches x 11 inches.
*/
public static final MediaSizeName A = new MediaSizeName(50);
-
+
/**
* The engineering ANSI B size medium: 11 inches x 17 inches.
*/
public static final MediaSizeName B = new MediaSizeName(51);
-
+
/**
* The engineering ANSI C size medium: 17 inches x 22 inches.
*/
public static final MediaSizeName C = new MediaSizeName(52);
-
+
/**
* The engineering ANSI D size medium: 22 inches x 34 inches.
*/
public static final MediaSizeName D = new MediaSizeName(53);
-
+
/**
* The engineering ANSI E size medium: 34 inches x 44 inches.
*/
public static final MediaSizeName E = new MediaSizeName(54);
-
+
/**
* The ISO Designated Long size: 110 mm by 220 mm.
*/
public static final MediaSizeName ISO_DESIGNATED_LONG =
new MediaSizeName(55);
-
+
/**
* The Italy envelope size: 110 mm by 230 mm.
*/
public static final MediaSizeName ITALY_ENVELOPE = new MediaSizeName(56);
-
+
/**
* The Monarch envelope size: 3.87 inch by 7.5 inch.
*/
public static final MediaSizeName MONARCH_ENVELOPE = new MediaSizeName(57);
-
+
/**
* The Personal envelope size: 3.625 inch by 6.5 inch.
*/
public static final MediaSizeName PERSONAL_ENVELOPE = new MediaSizeName(58);
-
+
/**
- * The North American number 9 business envelope size:
+ * The North American number 9 business envelope size:
* 3.875 inches by 8.875 inches.
*/
public static final MediaSizeName NA_NUMBER_9_ENVELOPE =
new MediaSizeName(59);
-
+
/**
- * The North American number 10 business envelope size:
+ * The North American number 10 business envelope size:
* 4.125 inches by 9.5 inches.
*/
public static final MediaSizeName NA_NUMBER_10_ENVELOPE =
new MediaSizeName(60);
-
+
/**
- * The North American number 11 business envelope size:
+ * The North American number 11 business envelope size:
* 4.5 inches by 10.375 inches.
*/
public static final MediaSizeName NA_NUMBER_11_ENVELOPE =
new MediaSizeName(61);
-
+
/**
- * The North American number 12 business envelope size:
+ * The North American number 12 business envelope size:
* 4.75 inches by 11 inches.
*/
public static final MediaSizeName NA_NUMBER_12_ENVELOPE =
new MediaSizeName(62);
-
+
/**
- * The North American number 14 business envelope size:
+ * The North American number 14 business envelope size:
* 5 inches by 11.5 inches.
*/
public static final MediaSizeName NA_NUMBER_14_ENVELOPE =
new MediaSizeName(63);
-
+
/**
* The North American 6x9 inch envelope size.
*/
public static final MediaSizeName NA_6X9_ENVELOPE = new MediaSizeName(64);
-
+
/**
* The North American 7x9 inch envelope size.
*/
public static final MediaSizeName NA_7X9_ENVELOPE = new MediaSizeName(65);
-
+
/**
* The North American 9x11 inch envelope size.
*/
public static final MediaSizeName NA_9X11_ENVELOPE = new MediaSizeName(66);
-
+
/**
* The North American 9x12 inch envelope size.
*/
public static final MediaSizeName NA_9X12_ENVELOPE = new MediaSizeName(67);
-
+
/**
* The North American 10x13 inch envelope size.
*/
public static final MediaSizeName NA_10X13_ENVELOPE = new MediaSizeName(68);
-
+
/**
* The North American 10x14 inch envelope size.
*/
public static final MediaSizeName NA_10X14_ENVELOPE = new MediaSizeName(69);
-
+
/**
* The North American 10x15 inch envelope size.
*/
public static final MediaSizeName NA_10X15_ENVELOPE = new MediaSizeName(70);
-
+
/**
* The North American 5 inches by 7 inches.
*/
public static final MediaSizeName NA_5X7 = new MediaSizeName(71);
-
+
/**
* The North American 8 inches by 10 inches.
*/
public static final MediaSizeName NA_8X10 = new MediaSizeName(72);
- private static final String[] stringTable =
- { "iso-a0", "iso-a1", "iso-a2", "iso-a3", "iso-a4", "iso-a5", "iso-a6",
- "iso-a7", "iso-a8", "iso-a9", "iso-a10", "iso-b0", "iso-b1", "iso-b2",
- "iso-b3", "iso-b4", "iso-b5", "iso-b6", "iso-b7", "iso-b8", "iso-b9",
- "iso-b10", "jis-b0", "jis-b1", "jis-b2", "jis-b3", "jis-b4", "jis-b5",
- "jis-b6", "jis-b7", "jis-b8", "jis-b9", "jis-b10", "iso-c0", "iso-c1",
- "iso-c2", "iso-c3", "iso-c4", "iso-c5", "iso-c6", "na-letter",
- "na-legal", "executive", "ledger", "tabloid", "invoice", "folio",
- "quarto", "japanese-postcard", "oufuko-postcard", "a", "b", "c", "d",
- "e", "iso-designated-long", "italian-envelope", "monarch-envelope",
- "personal-envelope", "na-number-9-envelope", "na-number-10-envelope",
- "na-number-11-envelope", "na-number-12-envelope",
- "na-number-14-envelope", "na-6x9-envelope", "na-7x9-envelope",
- "na-9x11-envelope", "na-9x12-envelope", "na-10x13-envelope",
+ private static final String[] stringTable =
+ { "iso-a0", "iso-a1", "iso-a2", "iso-a3", "iso-a4", "iso-a5", "iso-a6",
+ "iso-a7", "iso-a8", "iso-a9", "iso-a10", "iso-b0", "iso-b1", "iso-b2",
+ "iso-b3", "iso-b4", "iso-b5", "iso-b6", "iso-b7", "iso-b8", "iso-b9",
+ "iso-b10", "jis-b0", "jis-b1", "jis-b2", "jis-b3", "jis-b4", "jis-b5",
+ "jis-b6", "jis-b7", "jis-b8", "jis-b9", "jis-b10", "iso-c0", "iso-c1",
+ "iso-c2", "iso-c3", "iso-c4", "iso-c5", "iso-c6", "na-letter",
+ "na-legal", "executive", "ledger", "tabloid", "invoice", "folio",
+ "quarto", "japanese-postcard", "oufuko-postcard", "a", "b", "c", "d",
+ "e", "iso-designated-long", "italian-envelope", "monarch-envelope",
+ "personal-envelope", "na-number-9-envelope", "na-number-10-envelope",
+ "na-number-11-envelope", "na-number-12-envelope",
+ "na-number-14-envelope", "na-6x9-envelope", "na-7x9-envelope",
+ "na-9x11-envelope", "na-9x12-envelope", "na-10x13-envelope",
"na-10x14-envelope", "na-10x15-envelope", "na-5x7", "na-8x10" };
-
- private static final MediaSizeName[] enumValueTable =
- { ISO_A0, ISO_A1, ISO_A2, ISO_A3, ISO_A4, ISO_A5, ISO_A6, ISO_A7, ISO_A8,
+
+ private static final MediaSizeName[] enumValueTable =
+ { ISO_A0, ISO_A1, ISO_A2, ISO_A3, ISO_A4, ISO_A5, ISO_A6, ISO_A7, ISO_A8,
ISO_A9, ISO_A10, ISO_B0, ISO_B1, ISO_B2, ISO_B3, ISO_B4, ISO_B5, ISO_B6,
- ISO_B7, ISO_B8, ISO_B9, ISO_B10, JIS_B0, JIS_B1, JIS_B2, JIS_B3, JIS_B4,
+ ISO_B7, ISO_B8, ISO_B9, ISO_B10, JIS_B0, JIS_B1, JIS_B2, JIS_B3, JIS_B4,
JIS_B5, JIS_B6, JIS_B7, JIS_B8, JIS_B9, JIS_B10, ISO_C0, ISO_C1, ISO_C2,
- ISO_C3, ISO_C4, ISO_C5, ISO_C6, NA_LETTER, NA_LEGAL, EXECUTIVE, LEDGER,
- TABLOID, INVOICE, FOLIO, QUARTO, JAPANESE_POSTCARD,
- JAPANESE_DOUBLE_POSTCARD, A, B, C, D, E, ISO_DESIGNATED_LONG,
- ITALY_ENVELOPE, MONARCH_ENVELOPE, PERSONAL_ENVELOPE,
+ ISO_C3, ISO_C4, ISO_C5, ISO_C6, NA_LETTER, NA_LEGAL, EXECUTIVE, LEDGER,
+ TABLOID, INVOICE, FOLIO, QUARTO, JAPANESE_POSTCARD,
+ JAPANESE_DOUBLE_POSTCARD, A, B, C, D, E, ISO_DESIGNATED_LONG,
+ ITALY_ENVELOPE, MONARCH_ENVELOPE, PERSONAL_ENVELOPE,
NA_NUMBER_9_ENVELOPE, NA_NUMBER_10_ENVELOPE, NA_NUMBER_11_ENVELOPE,
NA_NUMBER_12_ENVELOPE, NA_NUMBER_14_ENVELOPE, NA_6X9_ENVELOPE,
NA_7X9_ENVELOPE, NA_9X11_ENVELOPE, NA_9X12_ENVELOPE, NA_10X13_ENVELOPE,
- NA_10X14_ENVELOPE, NA_10X15_ENVELOPE, NA_5X7, NA_8X10 };
-
+ NA_10X14_ENVELOPE, NA_10X15_ENVELOPE, NA_5X7, NA_8X10 };
+
/**
* Constructs a MediaSizeName object.
- *
+ *
* @param value the enum value.
*/
protected MediaSizeName(int value)
diff --git a/libjava/classpath/javax/print/attribute/standard/MediaTray.java b/libjava/classpath/javax/print/attribute/standard/MediaTray.java
index 23811a0..836640c 100644
--- a/libjava/classpath/javax/print/attribute/standard/MediaTray.java
+++ b/libjava/classpath/javax/print/attribute/standard/MediaTray.java
@@ -40,7 +40,7 @@ package javax.print.attribute.standard;
import javax.print.attribute.EnumSyntax;
/**
- * MediaTray is a subclass of the Media printing
+ * MediaTray is a subclass of the Media printing
* attribute and provides selection of media to be used by the means of the
* input tray of the printer. The class pre-defines commonly available types
* of input trays in printers. This media type enumeration may be used in
@@ -49,25 +49,25 @@ import javax.print.attribute.EnumSyntax;
* IPP Compatibility: MediaTray is not an IPP 1.1 attribute on its own.
* It provides parts of the media attribute type values.
*
- *
+ *
* @author Sven de Marothy
* @author Wolfgang Baer (WBaer@gmx.de)
*/
public class MediaTray extends Media
{
-
+
private static final long serialVersionUID = -982503611095214703L;
-
+
/**
* Top tray
*/
public static final MediaTray TOP = new MediaTray(0);
-
+
/**
* Middle tray
*/
public static final MediaTray MIDDLE = new MediaTray(1);
-
+
/**
* Bottom tray
*/
@@ -80,9 +80,9 @@ public class MediaTray extends Media
/**
* Manual-feed tray
- */
+ */
public static final MediaTray MANUAL = new MediaTray(4);
-
+
/**
* Large capacity tray
*/
@@ -92,22 +92,22 @@ public class MediaTray extends Media
* Main tray
*/
public static final MediaTray MAIN = new MediaTray(6);
-
+
/**
* Side tray
*/
- public static final MediaTray SIDE = new MediaTray(7);
-
+ public static final MediaTray SIDE = new MediaTray(7);
+
private static final String[] stringTable = { "top", "middle", "bottom",
- "envelope", "manual",
- "large-capacity", "main",
+ "envelope", "manual",
+ "large-capacity", "main",
"side" };
-
- private static final MediaTray[] enumValueTable = { TOP, MIDDLE, BOTTOM,
+
+ private static final MediaTray[] enumValueTable = { TOP, MIDDLE, BOTTOM,
ENVELOPE, MANUAL,
LARGE_CAPACITY, MAIN,
- SIDE };
-
+ SIDE };
+
/**
* Creates a MediaTray object.
*
@@ -117,7 +117,7 @@ public class MediaTray extends Media
{
super( i );
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
@@ -139,4 +139,3 @@ public class MediaTray extends Media
return enumValueTable;
}
}
-
diff --git a/libjava/classpath/javax/print/attribute/standard/MultipleDocumentHandling.java b/libjava/classpath/javax/print/attribute/standard/MultipleDocumentHandling.java
index 3ee1b41..feb01ea 100644
--- a/libjava/classpath/javax/print/attribute/standard/MultipleDocumentHandling.java
+++ b/libjava/classpath/javax/print/attribute/standard/MultipleDocumentHandling.java
@@ -45,13 +45,13 @@ import javax.print.attribute.PrintRequestAttribute;
/**
* The MultipleDocumentHandling printing attribute controls
- * how certain printing attributes affect printing in case of multiple
- * documents in a print job. This attribute is only relevant if a job
+ * how certain printing attributes affect printing in case of multiple
+ * documents in a print job. This attribute is only relevant if a job
* has multiple documents.
*
* IPP Compatibility: MultipleDocumentHandling is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -60,43 +60,43 @@ public class MultipleDocumentHandling extends EnumSyntax
{
private static final long serialVersionUID = 8098326460746413466L;
- /**
+ /**
* Multiple documents are treated as a single document.
*/
public static final MultipleDocumentHandling SINGLE_DOCUMENT =
new MultipleDocumentHandling(0);
-
- /**
+
+ /**
* Multiple documents are treated as uncollated copies.
*/
public static final MultipleDocumentHandling SEPARATE_DOCUMENTS_UNCOLLATED_COPIES =
new MultipleDocumentHandling(1);
-
- /**
- * Multiple documents are treated as collated copies.
+
+ /**
+ * Multiple documents are treated as collated copies.
*/
public static final MultipleDocumentHandling SEPARATE_DOCUMENTS_COLLATED_COPIES =
new MultipleDocumentHandling(2);
-
- /**
+
+ /**
* Multiple documents are treated so that every single document starts
- * with a new sheet.
+ * with a new sheet.
*/
public static final MultipleDocumentHandling SINGLE_DOCUMENT_NEW_SHEET =
new MultipleDocumentHandling(3);
-
- private static final String[] stringTable = { "single-document",
+
+ private static final String[] stringTable = { "single-document",
"separate-documents-uncollated-copies",
"separate-documents-collated-copies",
"single-document-new-sheet" };
-
- private static final MultipleDocumentHandling[] enumValueTable =
+
+ private static final MultipleDocumentHandling[] enumValueTable =
{ SINGLE_DOCUMENT, SEPARATE_DOCUMENTS_UNCOLLATED_COPIES,
SEPARATE_DOCUMENTS_COLLATED_COPIES, SINGLE_DOCUMENT_NEW_SHEET};
/**
* Constructs a MultipleDocumentHandling object.
- *
+ *
* @param value the enum value
*/
protected MultipleDocumentHandling(int value)
@@ -123,7 +123,7 @@ public class MultipleDocumentHandling extends EnumSyntax
{
return "multiple-document-handling";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/NumberOfDocuments.java b/libjava/classpath/javax/print/attribute/standard/NumberOfDocuments.java
index 1121a1f..217df0d 100644
--- a/libjava/classpath/javax/print/attribute/standard/NumberOfDocuments.java
+++ b/libjava/classpath/javax/print/attribute/standard/NumberOfDocuments.java
@@ -1,4 +1,4 @@
-/* NumberOfDocuments.java --
+/* NumberOfDocuments.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,7 +42,7 @@ import javax.print.attribute.IntegerSyntax;
import javax.print.attribute.PrintJobAttribute;
/**
- * The NumberOfDocuments printing attribute specifies
+ * The NumberOfDocuments printing attribute specifies
* the number of documents in a job.
*
* IPP Compatibility: NumberOfDocuments is an IPP 1.1 attribute.
@@ -54,7 +54,7 @@ public final class NumberOfDocuments extends IntegerSyntax
implements PrintJobAttribute
{
private static final long serialVersionUID = 7891881310684461097L;
-
+
/**
* Creates a NumberOfDocuments object.
*
@@ -69,13 +69,13 @@ public final class NumberOfDocuments extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/NumberOfInterveningJobs.java b/libjava/classpath/javax/print/attribute/standard/NumberOfInterveningJobs.java
index b968f9a..d33d826 100644
--- a/libjava/classpath/javax/print/attribute/standard/NumberOfInterveningJobs.java
+++ b/libjava/classpath/javax/print/attribute/standard/NumberOfInterveningJobs.java
@@ -1,4 +1,4 @@
-/* NumberOfInterveningJobs.java --
+/* NumberOfInterveningJobs.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,19 +43,19 @@ import javax.print.attribute.PrintJobAttribute;
/**
* The NumberOfInterveningJobs printing attribute provides
- * the number of jobs ahead in the print service queue before the
+ * the number of jobs ahead in the print service queue before the
* requested job.
*
* IPP Compatibility: NumberOfInterveningJobs is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch
*/
public final class NumberOfInterveningJobs extends IntegerSyntax
implements PrintJobAttribute
{
private static final long serialVersionUID = 2568141124844982746L;
-
+
/**
* Creates a NumberOfInterveningJobs object.
*
@@ -70,13 +70,13 @@ public final class NumberOfInterveningJobs extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/NumberUp.java b/libjava/classpath/javax/print/attribute/standard/NumberUp.java
index 219a1c1..8277907 100644
--- a/libjava/classpath/javax/print/attribute/standard/NumberUp.java
+++ b/libjava/classpath/javax/print/attribute/standard/NumberUp.java
@@ -1,4 +1,4 @@
-/* NumberUp.java --
+/* NumberUp.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,24 +44,24 @@ import javax.print.attribute.PrintJobAttribute;
import javax.print.attribute.PrintRequestAttribute;
/**
- * The NumberUp printing attribute specifies the number of pages
+ * The NumberUp printing attribute specifies the number of pages
* to be arranged upon a single media sheet.
*
- * Note: The effect of this attribute on jobs with multiple documents
- * is controlled by the job attribute
+ * Note: The effect of this attribute on jobs with multiple documents
+ * is controlled by the job attribute
* {@link javax.print.attribute.standard.MultipleDocumentHandling}.
*
*
* IPP Compatibility: NumberUp is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch
*/
public final class NumberUp extends IntegerSyntax
implements DocAttribute, PrintJobAttribute, PrintRequestAttribute
{
private static final long serialVersionUID = -3040436486786527811L;
-
+
/**
* Creates a NumberUp object.
*
@@ -74,13 +74,13 @@ public final class NumberUp extends IntegerSyntax
{
super(value);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/NumberUpSupported.java b/libjava/classpath/javax/print/attribute/standard/NumberUpSupported.java
index 20bd9c9..62f417b 100644
--- a/libjava/classpath/javax/print/attribute/standard/NumberUpSupported.java
+++ b/libjava/classpath/javax/print/attribute/standard/NumberUpSupported.java
@@ -43,13 +43,13 @@ import javax.print.attribute.SupportedValuesAttribute;
/**
- * The NumberUpSupported printing attribute specifies the
- * supported value or range of values for the
+ * The NumberUpSupported printing attribute specifies the
+ * supported value or range of values for the
* {@link javax.print.attribute.standard.NumberUp} attribute.
*
* IPP Compatibility: NumberUpSupported is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -68,7 +68,7 @@ public final class NumberUpSupported extends SetOfIntegerSyntax
public NumberUpSupported(int member)
{
super(member);
-
+
if (member < 1)
throw new IllegalArgumentException("member may not be less than 1");
}
@@ -79,13 +79,13 @@ public final class NumberUpSupported extends SetOfIntegerSyntax
* @param members the members supported for number up.
*
* @exception IllegalArgumentException if any element is invalid
- * @exception NullPointerException if members is null or any
+ * @exception NullPointerException if members is null or any
* element of members is null.
*/
public NumberUpSupported(int[][] members)
{
super(members);
-
+
if (members == null)
throw new NullPointerException("members may not be null");
}
@@ -103,24 +103,24 @@ public final class NumberUpSupported extends SetOfIntegerSyntax
public NumberUpSupported(int lowerBound, int upperBound)
{
super(lowerBound, upperBound);
-
+
if (lowerBound < 1)
throw new IllegalArgumentException("lowerBound may not be less than 1");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
{
if (! (obj instanceof NumberUpSupported))
return false;
-
+
return super.equals(obj);
}
diff --git a/libjava/classpath/javax/print/attribute/standard/OrientationRequested.java b/libjava/classpath/javax/print/attribute/standard/OrientationRequested.java
index 8d34685..c24fab4 100644
--- a/libjava/classpath/javax/print/attribute/standard/OrientationRequested.java
+++ b/libjava/classpath/javax/print/attribute/standard/OrientationRequested.java
@@ -56,7 +56,7 @@ import javax.print.attribute.PrintRequestAttribute;
*
* IPP Compatibility: OrientationRequested is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -65,42 +65,42 @@ public final class OrientationRequested extends EnumSyntax
{
private static final long serialVersionUID = -4447437289862822276L;
- /**
- * Orientation as portrait.
+ /**
+ * Orientation as portrait.
*/
public static final OrientationRequested PORTRAIT =
new OrientationRequested(3);
-
- /**
- * Orientation as landscape.
+
+ /**
+ * Orientation as landscape.
*/
public static final OrientationRequested LANDSCAPE =
new OrientationRequested(4);
-
- /**
- * Orientation as reversed landscape.
+
+ /**
+ * Orientation as reversed landscape.
*/
public static final OrientationRequested REVERSE_LANDSCAPE =
new OrientationRequested(5);
-
- /**
- * Orientation as reversed portrait.
+
+ /**
+ * Orientation as reversed portrait.
*/
public static final OrientationRequested REVERSE_PORTRAIT =
new OrientationRequested(6);
-
+
private static final String[] stringTable = { "portrait", "landscape",
"reverse-landscape",
"reverse-portrait" };
-
- private static final OrientationRequested[]
- enumValueTable = { PORTRAIT, LANDSCAPE,
+
+ private static final OrientationRequested[]
+ enumValueTable = { PORTRAIT, LANDSCAPE,
REVERSE_LANDSCAPE, REVERSE_PORTRAIT };
/**
* Constructs a OrientationRequested object.
- *
+ *
* @param value the value
*/
protected OrientationRequested(int value)
@@ -127,7 +127,7 @@ public final class OrientationRequested extends EnumSyntax
{
return "orientation-requested";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
@@ -148,7 +148,7 @@ public final class OrientationRequested extends EnumSyntax
{
return enumValueTable;
}
-
+
/**
* Returns the lowest used value by the enumerations of this class.
* .
@@ -157,5 +157,5 @@ public final class OrientationRequested extends EnumSyntax
protected int getOffset()
{
return 3;
- }
+ }
}
diff --git a/libjava/classpath/javax/print/attribute/standard/OutputDeviceAssigned.java b/libjava/classpath/javax/print/attribute/standard/OutputDeviceAssigned.java
index df8a545..769cef1 100644
--- a/libjava/classpath/javax/print/attribute/standard/OutputDeviceAssigned.java
+++ b/libjava/classpath/javax/print/attribute/standard/OutputDeviceAssigned.java
@@ -1,4 +1,4 @@
-/* OutputDeviceAssigned.java --
+/* OutputDeviceAssigned.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,17 +46,17 @@ import javax.print.attribute.TextSyntax;
/**
* The OutputDeviceAssigned printing attribute specifies the
- * output printer device assigned by a print service to a print job.
+ * output printer device assigned by a print service to a print job.
*
* This may be empty if a print service is embedded in a printer, e.g. is the
- * output device. However there exist print services with several physical
+ * output device. However there exist print services with several physical
* output devices (e.g. CUPS classes) where this attribute provides the actual
* output device.
*
*
* IPP Compatibility: OutputDeviceAssigned is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class OutputDeviceAssigned extends TextSyntax
@@ -83,7 +83,7 @@ public final class OutputDeviceAssigned extends TextSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/PDLOverrideSupported.java b/libjava/classpath/javax/print/attribute/standard/PDLOverrideSupported.java
index 02c9c19..310264a 100644
--- a/libjava/classpath/javax/print/attribute/standard/PDLOverrideSupported.java
+++ b/libjava/classpath/javax/print/attribute/standard/PDLOverrideSupported.java
@@ -49,7 +49,7 @@ import javax.print.attribute.PrintServiceAttribute;
*
* IPP Compatibility: PDLOverrideSupported is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -64,22 +64,22 @@ public class PDLOverrideSupported extends EnumSyntax
*/
public static final PDLOverrideSupported NOT_ATTEMPTED =
new PDLOverrideSupported(0);
-
+
/**
* Indicates that the print service is capable of
* attempting to override document data instructions.
*/
public static final PDLOverrideSupported ATTEMPTED =
new PDLOverrideSupported(1);
-
+
private static final String[] stringTable = { "not-attempted", "attempted" };
-
+
private static final PDLOverrideSupported[] enumValueTable = { NOT_ATTEMPTED,
ATTEMPTED};
/**
* Constructs a PDLOverrideSupported object.
- *
+ *
* @param value the enum value
*/
protected PDLOverrideSupported(int value)
@@ -106,7 +106,7 @@ public class PDLOverrideSupported extends EnumSyntax
{
return "pdl-override-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/PageRanges.java b/libjava/classpath/javax/print/attribute/standard/PageRanges.java
index 9637a91..2250868 100644
--- a/libjava/classpath/javax/print/attribute/standard/PageRanges.java
+++ b/libjava/classpath/javax/print/attribute/standard/PageRanges.java
@@ -45,17 +45,17 @@ import javax.print.attribute.PrintRequestAttribute;
import javax.print.attribute.SetOfIntegerSyntax;
/**
- * The PageRanges printing attribute specifies the
+ * The PageRanges printing attribute specifies the
* range(s) of pages to be printed in a print job.
*
- * Note: The effect of this attribute on jobs with multiple
- * documents is controlled by the job attribute
+ * Note: The effect of this attribute on jobs with multiple
+ * documents is controlled by the job attribute
* {@link javax.print.attribute.standard.MultipleDocumentHandling}.
*
*
* IPP Compatibility: PageRanges is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -75,7 +75,7 @@ public final class PageRanges extends SetOfIntegerSyntax
public PageRanges(int member)
{
super(member);
-
+
if (member < 1)
throw new IllegalArgumentException("member may not be less than 1");
}
@@ -87,13 +87,13 @@ public final class PageRanges extends SetOfIntegerSyntax
* @param members the page ranges to be printed.
*
* @exception IllegalArgumentException if any element is invalid
- * @exception NullPointerException if members is null or any
+ * @exception NullPointerException if members is null or any
* element of members is null.
*/
public PageRanges(int[][] members)
{
super(members);
-
+
if (members == null)
throw new NullPointerException("members may not be null");
}
@@ -111,11 +111,11 @@ public final class PageRanges extends SetOfIntegerSyntax
public PageRanges(int lowerBound, int upperBound)
{
super(lowerBound, upperBound);
-
+
if (lowerBound < 1)
throw new IllegalArgumentException("lowerbound may not be less than 1");
}
-
+
/**
* Constructs a PageRanges object with a set
* of ranges to be printed in string array form.
@@ -123,30 +123,30 @@ public final class PageRanges extends SetOfIntegerSyntax
* @param members the page ranges to be printed in string form.
*
* @exception IllegalArgumentException if any element is invalid.
- * @exception NullPointerException if members is null or any
+ * @exception NullPointerException if members is null or any
* element of members is null.
*/
public PageRanges(String members)
{
super(members);
-
+
if (members == null)
throw new NullPointerException("members may not be null");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
{
if (! (obj instanceof PageRanges))
return false;
-
+
return super.equals(obj);
}
diff --git a/libjava/classpath/javax/print/attribute/standard/PagesPerMinute.java b/libjava/classpath/javax/print/attribute/standard/PagesPerMinute.java
index 6305842c..bd08681 100644
--- a/libjava/classpath/javax/print/attribute/standard/PagesPerMinute.java
+++ b/libjava/classpath/javax/print/attribute/standard/PagesPerMinute.java
@@ -1,4 +1,4 @@
-/* PagesPerMinute.java --
+/* PagesPerMinute.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,20 +43,20 @@ import javax.print.attribute.IntegerSyntax;
import javax.print.attribute.PrintServiceAttribute;
/**
- * The PagesPerMinute printing attribute specifies
+ * The PagesPerMinute printing attribute specifies
* the nominal number of pages per minute which may be printed
- * by the printer.
+ * by the printer.
*
* IPP Compatibility: PagesPerMinute is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class PagesPerMinute extends IntegerSyntax
implements PrintServiceAttribute
{
private static final long serialVersionUID = -6366403993072862015L;
-
+
/**
* Creates a PagesPerMinute object.
*
@@ -71,13 +71,13 @@ public final class PagesPerMinute extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/PagesPerMinuteColor.java b/libjava/classpath/javax/print/attribute/standard/PagesPerMinuteColor.java
index 3d5fa2c..f32bbdb 100644
--- a/libjava/classpath/javax/print/attribute/standard/PagesPerMinuteColor.java
+++ b/libjava/classpath/javax/print/attribute/standard/PagesPerMinuteColor.java
@@ -1,4 +1,4 @@
-/* PagesPerMinuteColor.java --
+/* PagesPerMinuteColor.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,20 +42,20 @@ import javax.print.attribute.IntegerSyntax;
import javax.print.attribute.PrintServiceAttribute;
/**
- * The PagesPerMinuteColor printing attribute specifies
+ * The PagesPerMinuteColor printing attribute specifies
* the nominal number of pages per minute which may be printed in
- * color by the printer.
+ * color by the printer.
*
* IPP Compatibility: PagesPerMinuteColor is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch
*/
public final class PagesPerMinuteColor extends IntegerSyntax
implements PrintServiceAttribute
{
private static final long serialVersionUID = 1684993151687470944L;
-
+
/**
* Creates a PagesPerMinuteColor object.
*
@@ -70,13 +70,13 @@ public final class PagesPerMinuteColor extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/PresentationDirection.java b/libjava/classpath/javax/print/attribute/standard/PresentationDirection.java
index 14d5605..62c19b2 100644
--- a/libjava/classpath/javax/print/attribute/standard/PresentationDirection.java
+++ b/libjava/classpath/javax/print/attribute/standard/PresentationDirection.java
@@ -45,13 +45,13 @@ import javax.print.attribute.PrintRequestAttribute;
/**
* The PresentationDirection attribute specifies
- * a value to be used together with the NumberUp attribute
+ * a value to be used together with the NumberUp attribute
* to indicate the layout of multiple pages on a single media sheet.
*
- * IPP Compatibility: PresentationDirection is not an IPP 1.1
+ * IPP Compatibility: PresentationDirection is not an IPP 1.1
* attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -61,72 +61,72 @@ public final class PresentationDirection extends EnumSyntax
private static final long serialVersionUID = 8294728067230931780L;
/**
- * The single pages are arranged on the media in columns starting
+ * The single pages are arranged on the media in columns starting
* at the top left towards the bottom left.
*/
public static final PresentationDirection TOBOTTOM_TORIGHT =
new PresentationDirection(0);
-
+
/**
- * The single pages are arranged on the media in columns starting
+ * The single pages are arranged on the media in columns starting
* at the top right towards the bottom left.
*/
public static final PresentationDirection TOBOTTOM_TOLEFT =
new PresentationDirection(1);
-
+
/**
- * The single pages are arranged on the media in columns starting
+ * The single pages are arranged on the media in columns starting
* at the bottom left towards the top right.
*/
public static final PresentationDirection TOTOP_TORIGHT =
new PresentationDirection(2);
-
+
/**
- * The single pages are arranged on the media in columns starting
+ * The single pages are arranged on the media in columns starting
* at the bottom right towards the top left.
*/
public static final PresentationDirection TOTOP_TOLEFT =
new PresentationDirection(3);
-
+
/**
- * The single pages are arranged on the media in rows starting
+ * The single pages are arranged on the media in rows starting
* at the top left towards the right bottom.
*/
public static final PresentationDirection TORIGHT_TOBOTTOM =
new PresentationDirection(4);
-
+
/**
- * The single pages are arranged on the media in rows starting
+ * The single pages are arranged on the media in rows starting
* at the bottom left towards the right top.
*/
public static final PresentationDirection TORIGHT_TOTOP =
new PresentationDirection(5);
-
+
/**
- * The single pages are arranged on the media in rows starting
+ * The single pages are arranged on the media in rows starting
* at the top right towards the left bottom.
*/
public static final PresentationDirection TOLEFT_TOBOTTOM =
new PresentationDirection(6);
-
+
/**
- * The single pages are arranged on the media in rows starting
+ * The single pages are arranged on the media in rows starting
* at the bottom right towards the left top.
*/
public static final PresentationDirection TOLEFT_TOTOP =
new PresentationDirection(7);
- private static final String[] stringTable = { "tobottom-toright",
- "tobottom-toleft", "totop-toright", "totop-toleft", "toright-tobottom",
+ private static final String[] stringTable = { "tobottom-toright",
+ "tobottom-toleft", "totop-toright", "totop-toleft", "toright-tobottom",
"toright-totop", "toleft-tobottom", "toleft-totop" };
- private static final PresentationDirection[] enumValueTable =
- { TOBOTTOM_TORIGHT, TOBOTTOM_TOLEFT, TOTOP_TORIGHT, TOTOP_TOLEFT,
+ private static final PresentationDirection[] enumValueTable =
+ { TOBOTTOM_TORIGHT, TOBOTTOM_TOLEFT, TOTOP_TORIGHT, TOTOP_TOLEFT,
TORIGHT_TOBOTTOM, TORIGHT_TOTOP, TOLEFT_TOBOTTOM, TOLEFT_TOTOP };
-
+
/**
* Constructs a PresentationDirection object.
- *
+ *
* @param value the enum value.
*/
private PresentationDirection(int value)
@@ -153,7 +153,7 @@ public final class PresentationDirection extends EnumSyntax
{
return "presentation-direction";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/PrintQuality.java b/libjava/classpath/javax/print/attribute/standard/PrintQuality.java
index bc94d53..aa65e89 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrintQuality.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrintQuality.java
@@ -50,7 +50,7 @@ import javax.print.attribute.PrintRequestAttribute;
*
* IPP Compatibility: PrintQuality is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -59,28 +59,28 @@ public class PrintQuality extends EnumSyntax
{
private static final long serialVersionUID = -3072341285225858365L;
- /**
- * Draft quality of the printer.
+ /**
+ * Draft quality of the printer.
*/
public static final PrintQuality DRAFT = new PrintQuality(3);
-
- /**
- * Normal quality of the printer.
+
+ /**
+ * Normal quality of the printer.
*/
public static final PrintQuality NORMAL = new PrintQuality(4);
-
- /**
- * High quality of the printer.
+
+ /**
+ * High quality of the printer.
*/
public static final PrintQuality HIGH = new PrintQuality(5);
private static final String[] stringTable = { "draft", "normal", "high" };
-
+
private static final PrintQuality[] enumValueTable = { DRAFT, NORMAL, HIGH };
-
+
/**
* Constructs a PrintQuality object.
- *
+ *
* @param value the value of the enum
*/
protected PrintQuality(int value)
@@ -107,7 +107,7 @@ public class PrintQuality extends EnumSyntax
{
return "print-quality";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
@@ -127,7 +127,7 @@ public class PrintQuality extends EnumSyntax
protected EnumSyntax[] getEnumValueTable()
{
return enumValueTable;
- }
+ }
/**
* Returns the lowest used value by the enumerations of this class.
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterInfo.java b/libjava/classpath/javax/print/attribute/standard/PrinterInfo.java
index e287f8c..01d2065 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrinterInfo.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrinterInfo.java
@@ -1,4 +1,4 @@
-/* PrinterInfo.java --
+/* PrinterInfo.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,12 +45,12 @@ import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The PrinterInfo printing attribute provides
+ * The PrinterInfo printing attribute provides
* informations about a printer device.
*
* IPP Compatibility: PrinterInfo is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class PrinterInfo extends TextSyntax
@@ -77,7 +77,7 @@ public final class PrinterInfo extends TextSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterIsAcceptingJobs.java b/libjava/classpath/javax/print/attribute/standard/PrinterIsAcceptingJobs.java
index 1c9c399..5ac6bf7 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrinterIsAcceptingJobs.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrinterIsAcceptingJobs.java
@@ -43,16 +43,16 @@ import javax.print.attribute.PrintServiceAttribute;
/**
- * The PrinterIsAcceptingJobs printing attribute signals
+ * The PrinterIsAcceptingJobs printing attribute signals
* if a print services is currently accepting jobs.
*
* IPP Compatibility: PrinterIsAcceptingJobs is an IPP 1.1 attribute.
- * The IPP specification treats PrinterIsAcceptingJobs as boolean type which
- * is not available in the Java Print Service API. The IPP boolean value "true"
- * corresponds to ACCEPTING_JOBS and "false"
+ * The IPP specification treats PrinterIsAcceptingJobs as boolean type which
+ * is not available in the Java Print Service API. The IPP boolean value "true"
+ * corresponds to ACCEPTING_JOBS and "false"
* to NOT_ACCEPTING_JOBS.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -66,22 +66,22 @@ public final class PrinterIsAcceptingJobs extends EnumSyntax
*/
public static final PrinterIsAcceptingJobs NOT_ACCEPTING_JOBS =
new PrinterIsAcceptingJobs(0);
-
+
/**
* The printer is accepting jobs.
*/
public static final PrinterIsAcceptingJobs ACCEPTING_JOBS =
new PrinterIsAcceptingJobs(1);
- private static final String[] stringTable = { "not-accepting-jobs",
+ private static final String[] stringTable = { "not-accepting-jobs",
"accepting-jobs" };
-
- private static final PrinterIsAcceptingJobs[] enumValueTable =
+
+ private static final PrinterIsAcceptingJobs[] enumValueTable =
{ NOT_ACCEPTING_JOBS, ACCEPTING_JOBS };
-
+
/**
* Constructs a PrinterIsAcceptingJobs object.
- *
+ *
* @param value the enum value.
*/
protected PrinterIsAcceptingJobs(int value)
@@ -108,7 +108,7 @@ public final class PrinterIsAcceptingJobs extends EnumSyntax
{
return "printer-is-accepting-jobs";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterLocation.java b/libjava/classpath/javax/print/attribute/standard/PrinterLocation.java
index 7a446ad..934f1bd 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrinterLocation.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrinterLocation.java
@@ -1,4 +1,4 @@
-/* PrinterLocation.java --
+/* PrinterLocation.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,12 +45,12 @@ import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The PrinterLocation printing attribute provides the location
+ * The PrinterLocation printing attribute provides the location
* of a printer device. This may be a room and building name for example.
*
* IPP Compatibility: PrinterLocation is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class PrinterLocation extends TextSyntax
@@ -77,7 +77,7 @@ public final class PrinterLocation extends TextSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterMakeAndModel.java b/libjava/classpath/javax/print/attribute/standard/PrinterMakeAndModel.java
index 77fd84b..a78fe14 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrinterMakeAndModel.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrinterMakeAndModel.java
@@ -1,4 +1,4 @@
-/* PrinterMakeAndModel.java --
+/* PrinterMakeAndModel.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,7 +50,7 @@ import javax.print.attribute.TextSyntax;
*
* IPP Compatibility: PrinterMakeAndModel is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class PrinterMakeAndModel extends TextSyntax
@@ -77,7 +77,7 @@ public final class PrinterMakeAndModel extends TextSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterMessageFromOperator.java b/libjava/classpath/javax/print/attribute/standard/PrinterMessageFromOperator.java
index 55bc740..3bd3ee4 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrinterMessageFromOperator.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrinterMessageFromOperator.java
@@ -1,4 +1,4 @@
-/* PrinterMessageFromOperator.java --
+/* PrinterMessageFromOperator.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,15 +45,15 @@ import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The PrinterMessageFromOperator printing attribute provides
- * a message from an operator or a system administrator related to the
+ * The PrinterMessageFromOperator printing attribute provides
+ * a message from an operator or a system administrator related to the
* printer. This may include informations about the status of the printer
* or expected downtimes, etc.
*
- * IPP Compatibility: PrinterMessageFromOperator is an IPP 1.1
+ * IPP Compatibility: PrinterMessageFromOperator is an IPP 1.1
* attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class PrinterMessageFromOperator extends TextSyntax
@@ -80,7 +80,7 @@ public final class PrinterMessageFromOperator extends TextSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfo.java b/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfo.java
index de330fe..4af33c6 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfo.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfo.java
@@ -50,11 +50,11 @@ import javax.print.attribute.URISyntax;
*
* The URI may for example contain a reference to a HTML page with information.
* The information is normally intended for end users.
- *
+ *
*
* IPP Compatibility: PrinterMoreInfo is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -65,7 +65,7 @@ public final class PrinterMoreInfo extends URISyntax
/**
* Constructs a PrinterMoreInfo object.
- *
+ *
* @param uri the URI of the information.
* @throws NullPointerException if the given uri is null.
*/
@@ -73,13 +73,13 @@ public final class PrinterMoreInfo extends URISyntax
{
super(uri);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java b/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java
index 73a627e..a0425d3 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java
@@ -45,20 +45,20 @@ import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.URISyntax;
/**
- * The PrinterMoreInfoManufacturer attribute provides a URI that
+ * The PrinterMoreInfoManufacturer attribute provides a URI that
* can be used to obtain more information about the printer device type and
* its manufacturer.
*
- * The URI may for example contain a reference to a website of the
- * manufacturer, containing informations and links to the latest firmware,
- * printer drivers, manual etc. The information is normally intended for
+ * The URI may for example contain a reference to a website of the
+ * manufacturer, containing informations and links to the latest firmware,
+ * printer drivers, manual etc. The information is normally intended for
* end users.
- *
+ *
*
- * IPP Compatibility: PrinterMoreInfoManufacturer is an IPP 1.1
+ * IPP Compatibility: PrinterMoreInfoManufacturer is an IPP 1.1
* attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -69,7 +69,7 @@ public final class PrinterMoreInfoManufacturer extends URISyntax
/**
* Constructs a PrinterMoreInfoManufacturer object.
- *
+ *
* @param uri the URI of the information..
* @throws NullPointerException if the given uri is null.
*/
@@ -77,13 +77,13 @@ public final class PrinterMoreInfoManufacturer extends URISyntax
{
super(uri);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterName.java b/libjava/classpath/javax/print/attribute/standard/PrinterName.java
index b084c2c..854826c 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrinterName.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrinterName.java
@@ -1,4 +1,4 @@
-/* PrinterName.java --
+/* PrinterName.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,14 +45,14 @@ import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The PrinterName printing attribute provides the name of a
+ * The PrinterName printing attribute provides the name of a
* print service. The name may but must not be related to parts of the
* printer URI.
*
* IPP Compatibility: PrinterName is an IPP 1.1 attribute.
*
* @see javax.print.attribute.standard.PrinterURI
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class PrinterName extends TextSyntax
@@ -79,7 +79,7 @@ public final class PrinterName extends TextSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterResolution.java b/libjava/classpath/javax/print/attribute/standard/PrinterResolution.java
index 7b60a0c..acf3a63 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrinterResolution.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrinterResolution.java
@@ -45,12 +45,12 @@ import javax.print.attribute.ResolutionSyntax;
/**
- * The PrinterResolution printing attribute specifies a
- * resolution supported by a print service or to be used by a print job.
+ * The PrinterResolution printing attribute specifies a
+ * resolution supported by a print service or to be used by a print job.
*
* IPP Compatibility: PrinterResolution is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -74,20 +74,20 @@ public final class PrinterResolution extends ResolutionSyntax
{
super(crossFeedResolution, feedResolution, units);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
{
if(! (obj instanceof PrinterResolution))
return false;
-
+
return super.equals(obj);
}
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterState.java b/libjava/classpath/javax/print/attribute/standard/PrinterState.java
index 4b85c01..7670e14 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrinterState.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrinterState.java
@@ -49,13 +49,13 @@ import javax.print.attribute.PrintServiceAttribute;
* The {@link javax.print.attribute.standard.PrinterStateReasons}
* attribute provides further detailed information about
* the given printer state. Detailed information about the printer
- * state and printer state reasons attributes can be found in the
+ * state and printer state reasons attributes can be found in the
* RFC 2911.
- *
+ *
*
* IPP Compatibility: PrinterState is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -68,35 +68,35 @@ public final class PrinterState extends EnumSyntax
* The state is unknown currently.
*/
public static final PrinterState UNKNOWN = new PrinterState(0);
-
+
/**
* The printer device is in idle state. New jobs can start
* processing without waiting.
*/
public static final PrinterState IDLE = new PrinterState(3);
-
+
/**
* The printer device is in processing state.
*/
public static final PrinterState PROCESSING = new PrinterState(4);
-
+
/**
* The printer device has stopped. No jobs can be processed and
* normally manual intervention is needed.
*/
public static final PrinterState STOPPED = new PrinterState(5);
- private static final String[] stringTable = { "unknown", null, null,
- "idle", "processing",
+ private static final String[] stringTable = { "unknown", null, null,
+ "idle", "processing",
"stopped" };
-
+
private static final PrinterState[] enumValueTable = { UNKNOWN, null, null,
- IDLE, PROCESSING,
+ IDLE, PROCESSING,
STOPPED };
-
+
/**
* Constructs a PrinterState object.
- *
+ *
* @param value the enum value.
*/
protected PrinterState(int value)
@@ -123,7 +123,7 @@ public final class PrinterState extends EnumSyntax
{
return "printer-state";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java b/libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java
index 1abb7c6..c3838b2 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java
@@ -45,13 +45,13 @@ import javax.print.attribute.EnumSyntax;
* The PrinterStateReason attribute provides additional
* information about the current state of the printer device. Its always part
* of the {@link javax.print.attribute.standard.PrinterStateReasons}
- * printing attribute.
+ * printing attribute.
*
- * IPP Compatibility: PrinterStateReason is not an IPP 1.1
+ * IPP Compatibility: PrinterStateReason is not an IPP 1.1
* attribute itself but used inside the PrinterStateReasons
* attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -64,52 +64,52 @@ public class PrinterStateReason extends EnumSyntax
* Any state other state not listed here.
*/
public static final PrinterStateReason OTHER = new PrinterStateReason(0);
-
+
/**
* A media tray has run out of media.
*/
public static final PrinterStateReason MEDIA_NEEDED =
new PrinterStateReason(1);
-
+
/**
* A media jam occured in the printer device.
*/
public static final PrinterStateReason MEDIA_JAM = new PrinterStateReason(2);
-
+
/**
* Indicates that the printer has been paused by the pause printer
* operation and is currently moving to the pause state.
*/
public static final PrinterStateReason MOVING_TO_PAUSED =
new PrinterStateReason(3);
-
+
/**
* The printer device has be paused by the pause printer operation.
*/
public static final PrinterStateReason PAUSED = new PrinterStateReason(4);
-
+
/**
* The printer device has been shutdown or removed from service.
*/
public static final PrinterStateReason SHUTDOWN = new PrinterStateReason(5);
-
+
/**
* The printer object is connecting to the device. If a printer
- * device is on the network the printer object may be unable to connect.
+ * device is on the network the printer object may be unable to connect.
*/
public static final PrinterStateReason CONNECTING_TO_DEVICE =
new PrinterStateReason(6);
-
+
/**
- * The connection to the device has timed out.
+ * The connection to the device has timed out.
*/
public static final PrinterStateReason TIMED_OUT = new PrinterStateReason(7);
-
+
/**
* The printer object is stopping the printer device.
*/
public static final PrinterStateReason STOPPING = new PrinterStateReason(8);
-
+
/**
* The printer object has stopped partly. A printer object may control
* several physical output devices (e.g. a printer class in CUPS) and
@@ -117,170 +117,170 @@ public class PrinterStateReason extends EnumSyntax
*/
public static final PrinterStateReason STOPPED_PARTLY =
new PrinterStateReason(9);
-
+
/**
* The printer device is low on toner.
*/
public static final PrinterStateReason TONER_LOW =
new PrinterStateReason(10);
-
+
/**
* The printer device is out of toner.
*/
public static final PrinterStateReason TONER_EMPTY =
new PrinterStateReason(11);
-
+
/**
* The printers spool area is currently full. The printer is
* currently not able to accept jobs.
*/
public static final PrinterStateReason SPOOL_AREA_FULL =
new PrinterStateReason(12);
-
+
/**
* One or more covers of the printer device are open.
*/
public static final PrinterStateReason COVER_OPEN =
new PrinterStateReason(13);
-
+
/**
* One or more interlocks of the printer device are open.
*/
public static final PrinterStateReason INTERLOCK_OPEN =
new PrinterStateReason(14);
-
+
/**
* One or more doors of the printer device are open.
*/
public static final PrinterStateReason DOOR_OPEN =
new PrinterStateReason(15);
-
+
/**
* One or more input trays are missing in the printer device.
*/
public static final PrinterStateReason INPUT_TRAY_MISSING =
new PrinterStateReason(16);
-
+
/**
* The printer device is low on media.
*/
public static final PrinterStateReason MEDIA_LOW =
new PrinterStateReason(17);
-
+
/**
* The printer device is out of media.
*/
public static final PrinterStateReason MEDIA_EMPTY =
new PrinterStateReason(18);
-
+
/**
* One or more output trays are missing in the printer device.
*/
public static final PrinterStateReason OUTPUT_TRAY_MISSING =
new PrinterStateReason(19);
-
+
/**
* One or more output areas of the printer device are almost full.
*/
public static final PrinterStateReason OUTPUT_AREA_ALMOST_FULL =
new PrinterStateReason(20);
-
+
/**
* One or more output areas of the printer device are full.
*/
public static final PrinterStateReason OUTPUT_AREA_FULL =
new PrinterStateReason(21);
-
+
/**
* The printer device is low on marker supply.
*/
public static final PrinterStateReason MARKER_SUPPLY_LOW =
new PrinterStateReason(22);
-
+
/**
* The printer device is out of marker supply.
*/
public static final PrinterStateReason MARKER_SUPPLY_EMPTY =
new PrinterStateReason(23);
-
+
/**
* The marker waste bin of the printer device is almost full.
*/
public static final PrinterStateReason MARKER_WASTE_ALMOST_FULL =
new PrinterStateReason(24);
-
+
/**
* The marker waste bin of the printer device is full.
*/
public static final PrinterStateReason MARKER_WASTE_FULL =
new PrinterStateReason(25);
-
+
/**
* The fuser of the printer device is over temperature.
*/
public static final PrinterStateReason FUSER_OVER_TEMP =
new PrinterStateReason(26);
-
+
/**
* The fuser of the printer device is under the needed temperature.
*/
public static final PrinterStateReason FUSER_UNDER_TEMP =
new PrinterStateReason(27);
-
+
/**
* The optical photo conductor is near its end of life (EOL).
*/
public static final PrinterStateReason OPC_NEAR_EOL =
new PrinterStateReason(28);
-
+
/**
* The optical photo conductor has reached its end of life.
*/
public static final PrinterStateReason OPC_LIFE_OVER =
new PrinterStateReason(29);
-
+
/**
* The printer device is low on developer.
*/
public static final PrinterStateReason DEVELOPER_LOW =
new PrinterStateReason(30);
-
+
/**
* The printer device is out of developer.
*/
public static final PrinterStateReason DEVELOPER_EMPTY =
new PrinterStateReason(31);
-
+
/**
* An interpreter resource (e.g. font) is unavailable.
*/
public static final PrinterStateReason INTERPRETER_RESOURCE_UNAVAILABLE =
new PrinterStateReason(32);
- private static final String[] stringTable =
- { "other", "media-needed", "media-jam", "moving-to-paused", "paused",
- "shutdown", "connecting-to-device", "timed-out", "stopping",
- "stopped-partly", "toner-low", "toner-empty", "spool-area-full",
- "cover-open", "interlock-open", "door-open", "input-tray-missing",
+ private static final String[] stringTable =
+ { "other", "media-needed", "media-jam", "moving-to-paused", "paused",
+ "shutdown", "connecting-to-device", "timed-out", "stopping",
+ "stopped-partly", "toner-low", "toner-empty", "spool-area-full",
+ "cover-open", "interlock-open", "door-open", "input-tray-missing",
"media-low", "media-empty", "output-tray-missing", "output-area-almost-full",
- "output-area-full", "marker-supply-low", "marker-supply-empty",
- "marker-waste-almost-full", "marker-waste-full", "fuser-over-temp",
- "fuser-under-temp", "opc-near-eol", "opc-life-over", "developer-low",
+ "output-area-full", "marker-supply-low", "marker-supply-empty",
+ "marker-waste-almost-full", "marker-waste-full", "fuser-over-temp",
+ "fuser-under-temp", "opc-near-eol", "opc-life-over", "developer-low",
"developer-empty", "interpreter-resource-unavailable" };
- private static final PrinterStateReason[] enumValueTable =
+ private static final PrinterStateReason[] enumValueTable =
{ OTHER, MEDIA_NEEDED, MEDIA_JAM, MOVING_TO_PAUSED, PAUSED, SHUTDOWN,
CONNECTING_TO_DEVICE, TIMED_OUT, STOPPING, STOPPED_PARTLY, TONER_LOW,
TONER_EMPTY, SPOOL_AREA_FULL, COVER_OPEN, INTERLOCK_OPEN, DOOR_OPEN,
INPUT_TRAY_MISSING, MEDIA_LOW, MEDIA_EMPTY, OUTPUT_TRAY_MISSING,
OUTPUT_AREA_ALMOST_FULL, OUTPUT_AREA_FULL, MARKER_SUPPLY_LOW,
MARKER_SUPPLY_EMPTY, MARKER_WASTE_ALMOST_FULL, MARKER_WASTE_FULL,
- FUSER_OVER_TEMP, FUSER_UNDER_TEMP, OPC_NEAR_EOL, OPC_LIFE_OVER,
+ FUSER_OVER_TEMP, FUSER_UNDER_TEMP, OPC_NEAR_EOL, OPC_LIFE_OVER,
DEVELOPER_LOW, DEVELOPER_EMPTY, INTERPRETER_RESOURCE_UNAVAILABLE };
/**
* Constructs a PrinterStateReason object.
- *
+ *
* @param value the enum value.
*/
protected PrinterStateReason(int value)
@@ -307,7 +307,7 @@ public class PrinterStateReason extends EnumSyntax
{
return "printer-state-reason";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterStateReasons.java b/libjava/classpath/javax/print/attribute/standard/PrinterStateReasons.java
index 3e77e18..5a52b8a 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrinterStateReasons.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrinterStateReasons.java
@@ -49,15 +49,15 @@ import javax.print.attribute.Attribute;
import javax.print.attribute.PrintServiceAttribute;
/**
- * The PrinterStateReasons attribute provides the set of
- * additional informations available about the current state of the printer
+ * The PrinterStateReasons attribute provides the set of
+ * additional informations available about the current state of the printer
* device.
*
* The attribute is basically a map with PrinterStateReason
- * objects as keys associated with their severity level as
- * Severity instances. The IPP keyword value can be
+ * objects as keys associated with their severity level as
+ * Severity instances. The IPP keyword value can be
* constructed as follows:
- * reason.toString() + '-' + severity.toString()
+ * reason.toString() + '-' + severity.toString()
*
*
* IPP Compatibility: PrinterStateReasons is an IPP 1.1 attribute.
@@ -65,7 +65,7 @@ import javax.print.attribute.PrintServiceAttribute;
* @see javax.print.attribute.standard.PrinterState
* @see javax.print.attribute.standard.PrinterStateReason
* @see javax.print.attribute.standard.Severity
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -77,7 +77,7 @@ public final class PrinterStateReasons
/**
* Constructs an empty PrinterStateReasons attribute.
- */
+ */
public PrinterStateReasons()
{
super();
@@ -86,10 +86,10 @@ public final class PrinterStateReasons
/**
* Constructs an empty PrinterStateReasons attribute
* with the given initial capacity and load factor.
- *
+ *
* @param initialCapacity the intial capacity.
* @param loadFactor the load factor of the underlying HashMap.
- *
+ *
* @throws IllegalArgumentException if initialCapacity < 0
* @throws IllegalArgumentException if initialCapacity or loadFactor < 0
*/
@@ -101,9 +101,9 @@ public final class PrinterStateReasons
/**
* Constructs an empty PrinterStateReasons attribute
* with the given initial capacity and the default load factor.
- *
+ *
* @param initialCapacity the intial capacity.
- *
+ *
* @throws IllegalArgumentException if initialCapacity < 0
*/
public PrinterStateReasons(int initialCapacity)
@@ -114,13 +114,13 @@ public final class PrinterStateReasons
/**
* Constructs a PrinterStateReasons attribute
* with the given content of the map.
- *
- * @param map the map for the initial values with the same
+ *
+ * @param map the map for the initial values with the same
* PrinterStateReason to Severity mappings.
- *
+ *
* @throws NullPointerException if map or any key/value is null.
- * @throws ClassCastException if values of map are not of type
- * PrinterStateReason and keys are not of type
+ * @throws ClassCastException if values of map are not of type
+ * PrinterStateReason and keys are not of type
* Severity.
*/
public PrinterStateReasons(Map map)
@@ -135,7 +135,7 @@ public final class PrinterStateReasons
/**
* Constructs an unmodifiable view of the contained printer state reasons
* associated with the given severity level.
- *
+ *
* @param severity the severity level for the constructed set.
* @return The set of printer state reasons.
*/
@@ -143,7 +143,7 @@ public final class PrinterStateReasons
{
if (severity == null)
throw new NullPointerException("severity is null");
-
+
HashSet set = new HashSet();
Iterator it = entrySet().iterator();
while (it.hasNext())
@@ -152,35 +152,35 @@ public final class PrinterStateReasons
if (entry.getValue().equals(severity))
set.add(entry.getKey());
}
-
+
return Collections.unmodifiableSet(set);
}
-
+
/**
* Puts the given reason object associated with the given severity object
* into the set.
- *
+ *
* @param reason the reason of type PrinterStateReason.
* @param severity the severity of the reason of type Severity.
- *
- * @return The previously associated severity of the reason or
+ *
+ * @return The previously associated severity of the reason or
* null if the reason object was not in the map before.
- *
+ *
* @throws NullPointerException if any of the values is null.
- * @throws ClassCastException if reason is not a
- * PrinterStateReason and severity is not a
+ * @throws ClassCastException if reason is not a
+ * PrinterStateReason and severity is not a
* Severity instance.
*/
public Severity put(PrinterStateReason reason,Severity severity)
{
if (reason == null)
- throw new NullPointerException("reason is null");
+ throw new NullPointerException("reason is null");
if (severity == null)
throw new NullPointerException("severity is null");
-
+
return super.put(reason, severity);
- }
-
+ }
+
/**
* Returns category of this class.
*
diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterURI.java b/libjava/classpath/javax/print/attribute/standard/PrinterURI.java
index 017e6b8..8127a49 100644
--- a/libjava/classpath/javax/print/attribute/standard/PrinterURI.java
+++ b/libjava/classpath/javax/print/attribute/standard/PrinterURI.java
@@ -45,16 +45,16 @@ import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.URISyntax;
/**
- * The PrinterURI attribute provides the URI of a printer.
+ * The PrinterURI attribute provides the URI of a printer.
*
- * The URI identifies the printer against all the other print services
- * available. This attribute is used to direct a print service request
+ * The URI identifies the printer against all the other print services
+ * available. This attribute is used to direct a print service request
* to this specific printer.
- *
+ *
*
* IPP Compatibility: PrinterURI is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -65,7 +65,7 @@ public final class PrinterURI extends URISyntax
/**
* Constructs a PrinterURI object.
- *
+ *
* @param uri the URI of the print service.
* @throws NullPointerException if the given uri is null.
*/
@@ -73,13 +73,13 @@ public final class PrinterURI extends URISyntax
{
super(uri);
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/QueuedJobCount.java b/libjava/classpath/javax/print/attribute/standard/QueuedJobCount.java
index d024b3d..90d4d4b 100644
--- a/libjava/classpath/javax/print/attribute/standard/QueuedJobCount.java
+++ b/libjava/classpath/javax/print/attribute/standard/QueuedJobCount.java
@@ -1,4 +1,4 @@
-/* QueuedJobCount.java --
+/* QueuedJobCount.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,22 +42,22 @@ import javax.print.attribute.IntegerSyntax;
import javax.print.attribute.PrintServiceAttribute;
/**
- * The QueuedJobCount printing attribute reports
+ * The QueuedJobCount printing attribute reports
* the number of jobs currently in the queue. These are jobs
* that are in 'pending', 'processing', 'pending-held' or
- * 'processing-stopped' state.
+ * 'processing-stopped' state.
*
* IPP Compatibility: QueuedJobCount is an IPP 1.1 attribute.
*
* @see javax.print.attribute.standard.JobState
- *
+ *
* @author Michael Koch
*/
public final class QueuedJobCount extends IntegerSyntax
implements PrintServiceAttribute
{
private static final long serialVersionUID = 7499723077864047742L;
-
+
/**
* Creates a QueuedJobCount object.
*
@@ -72,13 +72,13 @@ public final class QueuedJobCount extends IntegerSyntax
if (value < 0)
throw new IllegalArgumentException("value may not be less than 0");
}
-
+
/**
* Tests if the given object is equal to this object.
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/ReferenceUriSchemesSupported.java b/libjava/classpath/javax/print/attribute/standard/ReferenceUriSchemesSupported.java
index 9d2354b..2d47c77 100644
--- a/libjava/classpath/javax/print/attribute/standard/ReferenceUriSchemesSupported.java
+++ b/libjava/classpath/javax/print/attribute/standard/ReferenceUriSchemesSupported.java
@@ -42,14 +42,14 @@ import javax.print.attribute.EnumSyntax;
/**
- * The ReferenceUriSchemesSupported attribute provides
+ * The ReferenceUriSchemesSupported attribute provides
* the supported URI schemes (e.g. ftp) which are supported by the
* printer service to be used as uri reference for document data.
*
- * IPP Compatibility: ReferenceUriSchemesSupported is an IPP 1.1
+ * IPP Compatibility: ReferenceUriSchemesSupported is an IPP 1.1
* attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -63,59 +63,59 @@ public class ReferenceUriSchemesSupported extends EnumSyntax
*/
public static final ReferenceUriSchemesSupported FTP =
new ReferenceUriSchemesSupported(0);
-
+
/**
* The hyper text transfer protocol (HTTP).
*/
public static final ReferenceUriSchemesSupported HTTP =
new ReferenceUriSchemesSupported(1);
-
+
/**
* The secure hyper text transfer protocol (HTTPS).
*/
public static final ReferenceUriSchemesSupported HTTPS =
new ReferenceUriSchemesSupported(2);
-
+
/**
* The gopher protocol.
*/
public static final ReferenceUriSchemesSupported GOPHER =
new ReferenceUriSchemesSupported(3);
-
+
/**
* The USENET news - RFC 1738.
*/
public static final ReferenceUriSchemesSupported NEWS =
new ReferenceUriSchemesSupported(4);
-
+
/**
* The network news transfer protocol (NNTP) - RFC 1738.
*/
public static final ReferenceUriSchemesSupported NNTP =
new ReferenceUriSchemesSupported(5);
-
+
/**
* The wide area information server protocol (WAIS) - RFC 4156.
*/
public static final ReferenceUriSchemesSupported WAIS =
new ReferenceUriSchemesSupported(6);
-
+
/**
* A filename specific to the host.
*/
public static final ReferenceUriSchemesSupported FILE =
new ReferenceUriSchemesSupported(7);
- private static final String[] stringTable = { "ftp", "http", "https",
- "gopher", "news", "nntp",
+ private static final String[] stringTable = { "ftp", "http", "https",
+ "gopher", "news", "nntp",
"wais", "file" };
- private static final ReferenceUriSchemesSupported[] enumValueTable =
+ private static final ReferenceUriSchemesSupported[] enumValueTable =
{ FTP, HTTP, HTTPS, GOPHER, NEWS, NNTP, WAIS, FILE };
/**
* Constructs a ReferenceUriSchemeSupported object.
- *
+ *
* @param value the enum value.
*/
protected ReferenceUriSchemesSupported(int value)
@@ -142,7 +142,7 @@ public class ReferenceUriSchemesSupported extends EnumSyntax
{
return "reference-uri-schemes-supported";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/RequestingUserName.java b/libjava/classpath/javax/print/attribute/standard/RequestingUserName.java
index b7b85ab..52a13a8 100644
--- a/libjava/classpath/javax/print/attribute/standard/RequestingUserName.java
+++ b/libjava/classpath/javax/print/attribute/standard/RequestingUserName.java
@@ -1,4 +1,4 @@
-/* RequestingUserName.java --
+/* RequestingUserName.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -45,12 +45,12 @@ import javax.print.attribute.PrintRequestAttribute;
import javax.print.attribute.TextSyntax;
/**
- * The RequestingUserName attribute provides the name of
+ * The RequestingUserName attribute provides the name of
* the user which requests the printing of the given job.
*
* IPP Compatibility: RequestingUserName is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public final class RequestingUserName extends TextSyntax
@@ -77,7 +77,7 @@ public final class RequestingUserName extends TextSyntax
*
* @param obj the object to test
*
- * @return true if both objects are equal,
+ * @return true if both objects are equal,
* false otherwise.
*/
public boolean equals(Object obj)
diff --git a/libjava/classpath/javax/print/attribute/standard/Severity.java b/libjava/classpath/javax/print/attribute/standard/Severity.java
index 019c8c6..ee0e6a1 100644
--- a/libjava/classpath/javax/print/attribute/standard/Severity.java
+++ b/libjava/classpath/javax/print/attribute/standard/Severity.java
@@ -45,16 +45,16 @@ import javax.print.attribute.EnumSyntax;
* The Severity printing attribute specifies the severity
* for a PrinterStateReason attribute.
*
- * This attribute does not appear in the attribute set of a print service
- * itself. Its used inside the PrinterStateReasons
- * attribute which contains PrinterStateReason objects which
+ * This attribute does not appear in the attribute set of a print service
+ * itself. Its used inside the PrinterStateReasons
+ * attribute which contains PrinterStateReason objects which
* informs about the print service's status.
*
*
* IPP Compatibility: Severity is not an IPP attribute on its own
* but used in the PrinterStateReason attribute to indicate the severity.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -67,21 +67,21 @@ public final class Severity extends EnumSyntax
* Indicates that the reason is a report.
*/
public static final Severity REPORT = new Severity(0);
-
+
/**
* Indicates that the reason is a warning.
*/
public static final Severity WARNING = new Severity(1);
-
+
/**
* Indicates that the reason is an error.
*/
public static final Severity ERROR = new Severity(2);
private static final String[] stringTable = { "report", "warning", "error" };
-
+
private static final Severity[] enumValueTable = { REPORT, WARNING, ERROR };
-
+
/**
* Constructs a Severity object.
*
@@ -111,7 +111,7 @@ public final class Severity extends EnumSyntax
{
return "severity";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/SheetCollate.java b/libjava/classpath/javax/print/attribute/standard/SheetCollate.java
index 886b8d6..008a6e8 100644
--- a/libjava/classpath/javax/print/attribute/standard/SheetCollate.java
+++ b/libjava/classpath/javax/print/attribute/standard/SheetCollate.java
@@ -45,7 +45,7 @@ import javax.print.attribute.PrintRequestAttribute;
/**
- * The SheetCollate printing attribute specifies
+ * The SheetCollate printing attribute specifies
* whether or not the sheets of each copy in a print job have to be
* in sequence.
*
* IPP Compatibility: SheetCollate is not an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -71,7 +71,7 @@ public final class SheetCollate extends EnumSyntax
* The sheets of the different copies are uncollated.
*/
public static final SheetCollate UNCOLLATED = new SheetCollate(0);
-
+
/**
* The sheets of the different copies are collated.
*/
@@ -79,10 +79,10 @@ public final class SheetCollate extends EnumSyntax
private static final String[] stringTable = { "uncollated", "collated" };
-
- private static final SheetCollate[] enumValueTable = { UNCOLLATED,
- COLLATED };
-
+
+ private static final SheetCollate[] enumValueTable = { UNCOLLATED,
+ COLLATED };
+
/**
* Creates a SheetCollate object.
*
@@ -112,7 +112,7 @@ public final class SheetCollate extends EnumSyntax
{
return "sheet-collate";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/attribute/standard/Sides.java b/libjava/classpath/javax/print/attribute/standard/Sides.java
index 02fe4a1..ca2a60f 100644
--- a/libjava/classpath/javax/print/attribute/standard/Sides.java
+++ b/libjava/classpath/javax/print/attribute/standard/Sides.java
@@ -46,11 +46,11 @@ import javax.print.attribute.PrintRequestAttribute;
/**
* The Sides printing attribute specifies how consecutive
- * printing pages are arranged on the media sheet.
+ * printing pages are arranged on the media sheet.
*
* IPP Compatibility: Sides is an IPP 1.1 attribute.
*
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
* @author Wolfgang Baer (WBaer@gmx.de)
*/
@@ -59,41 +59,41 @@ public final class Sides extends EnumSyntax
{
private static final long serialVersionUID = -6890309414893262822L;
- /**
- * Specifies that each page should be printed on one sheet.
+ /**
+ * Specifies that each page should be printed on one sheet.
*/
public static final Sides ONE_SIDED = new Sides(0);
-
- /**
- * Specifies that two following pages should be printed on the
+
+ /**
+ * Specifies that two following pages should be printed on the
* front and back of one sheet for binding on the long edge.
*/
public static final Sides TWO_SIDED_LONG_EDGE = new Sides(1);
-
- /**
- * Specifies that two following pages should be printed on the
+
+ /**
+ * Specifies that two following pages should be printed on the
* front and back of one sheet for binding on the short edge.
*/
public static final Sides TWO_SIDED_SHORT_EDGE = new Sides(2);
-
- /**
- * An alias constant for "two sided long edge".
+
+ /**
+ * An alias constant for "two sided long edge".
*/
public static final Sides DUPLEX = new Sides(1);
-
- /**
- * An alias constant for "two sided short edge".
+
+ /**
+ * An alias constant for "two sided short edge".
*/
public static final Sides TUMBLE = new Sides(2);
- private static final String[] stringTable = { "one-sided",
+ private static final String[] stringTable = { "one-sided",
"two-sided-long-edge",
"two-sided-short-edge" };
-
- private static final Sides[] enumValueTable = { ONE_SIDED,
- TWO_SIDED_LONG_EDGE,
- TWO_SIDED_SHORT_EDGE };
-
+
+ private static final Sides[] enumValueTable = { ONE_SIDED,
+ TWO_SIDED_LONG_EDGE,
+ TWO_SIDED_SHORT_EDGE };
+
/**
* Creates a Sides object.
*
@@ -123,7 +123,7 @@ public final class Sides extends EnumSyntax
{
return "sides";
}
-
+
/**
* Returns a table with the enumeration values represented as strings
* for this object.
diff --git a/libjava/classpath/javax/print/event/PrintEvent.java b/libjava/classpath/javax/print/event/PrintEvent.java
index d44c206..4eaedce 100644
--- a/libjava/classpath/javax/print/event/PrintEvent.java
+++ b/libjava/classpath/javax/print/event/PrintEvent.java
@@ -1,4 +1,4 @@
-/* PrintEvent.java --
+/* PrintEvent.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,14 +42,14 @@ import java.util.EventObject;
/**
* Superclass of all events in the Java Print Service API.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintEvent extends EventObject
{
/**
* Constructs a PrintEvent object.
- *
+ *
* @param source the source of this event
*/
public PrintEvent(Object source)
@@ -59,7 +59,7 @@ public class PrintEvent extends EventObject
/**
* Returns a string representation of this object.
- *
+ *
* @return The string representation
*/
public String toString()
diff --git a/libjava/classpath/javax/print/event/PrintJobAdapter.java b/libjava/classpath/javax/print/event/PrintJobAdapter.java
index 9229d19..e8e7100 100644
--- a/libjava/classpath/javax/print/event/PrintJobAdapter.java
+++ b/libjava/classpath/javax/print/event/PrintJobAdapter.java
@@ -1,4 +1,4 @@
-/* PrintJobAdapter.java --
+/* PrintJobAdapter.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,7 +43,7 @@ package javax.print.event;
* classes. The methods in this class do nothing by default. Subclasses may
* only implement the methods for the {@link javax.print.event.PrintJobEvent}s
* they are interested in.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public abstract class PrintJobAdapter
@@ -56,13 +56,13 @@ public abstract class PrintJobAdapter
{
// Do nothing here.
}
-
+
/**
* Called to notify the client that all data has been successfully transferred
* to the print service.
*
The default implementation does nothing.
- *
- * @param event the event.
+ *
+ * @param event the event.
*/
public void printDataTransferCompleted(PrintJobEvent event)
{
@@ -70,10 +70,10 @@ public abstract class PrintJobAdapter
}
/**
- * Called to notify the client that a print job was canceled.
+ * Called to notify the client that a print job was canceled.
*
The default implementation does nothing.
- *
- * @param event the event.
+ *
+ * @param event the event.
*/
public void printJobCanceled(PrintJobEvent event)
{
@@ -83,8 +83,8 @@ public abstract class PrintJobAdapter
/**
* Called to notify the client that a print job was successfully completed.
*
The default implementation does nothing.
- *
- * @param event the event.
+ *
+ * @param event the event.
*/
public void printJobCompleted(PrintJobEvent event)
{
@@ -95,8 +95,8 @@ public abstract class PrintJobAdapter
* Called to notify the client that a print job failed to complete
* successfully.
*
The default implementation does nothing.
- *
- * @param event the event.
+ *
+ * @param event the event.
*/
public void printJobFailed(PrintJobEvent event)
{
@@ -106,8 +106,8 @@ public abstract class PrintJobAdapter
/**
* Called to notify the client that no more job events will be send.
*
The default implementation does nothing.
- *
- * @param event the event.
+ *
+ * @param event the event.
*/
public void printJobNoMoreEvents(PrintJobEvent event)
{
@@ -116,11 +116,11 @@ public abstract class PrintJobAdapter
/**
* Called to notify the client that a problem occured during printing.
- * This event signals problems a user might be able to fix
+ * This event signals problems a user might be able to fix
* (e.g. out of paper or paper jam).
*
The default implementation does nothing.
- *
- * @param event the event.
+ *
+ * @param event the event.
*/
public void printJobRequiresAttention(PrintJobEvent event)
{
diff --git a/libjava/classpath/javax/print/event/PrintJobAttributeEvent.java b/libjava/classpath/javax/print/event/PrintJobAttributeEvent.java
index d401ab1..dd242e8 100644
--- a/libjava/classpath/javax/print/event/PrintJobAttributeEvent.java
+++ b/libjava/classpath/javax/print/event/PrintJobAttributeEvent.java
@@ -1,4 +1,4 @@
-/* PrintJobAttributeEvent.java --
+/* PrintJobAttributeEvent.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,21 +42,21 @@ import javax.print.attribute.PrintJobAttributeSet;
/**
- * PrintJobAttributeEvents are generated by a
+ * PrintJobAttributeEvents are generated by a
* PrintService to inform registered listeners that attributes
* associated with a {@link javax.print.DocPrintJob} instance have changed.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintJobAttributeEvent extends PrintEvent
{
private static final long serialVersionUID = -6534469883874742101L;
-
+
private PrintJobAttributeSet attributes;
-
+
/**
* Constructs a PrintJobAttributeEvent object.
- *
+ *
* @param source the source of this event
* @param attributes the attribute changes being reported
*/
@@ -69,7 +69,7 @@ public class PrintJobAttributeEvent extends PrintEvent
/**
* Returns the print job generating this event.
- *
+ *
* @return The print job.
*/
public DocPrintJob getPrintJob()
@@ -79,7 +79,7 @@ public class PrintJobAttributeEvent extends PrintEvent
/**
* Returns the attributes that changed and their new values.
- *
+ *
* @return The changed attributes.
*/
public PrintJobAttributeSet getAttributes()
diff --git a/libjava/classpath/javax/print/event/PrintJobAttributeListener.java b/libjava/classpath/javax/print/event/PrintJobAttributeListener.java
index 9f96d26..bd2ea26 100644
--- a/libjava/classpath/javax/print/event/PrintJobAttributeListener.java
+++ b/libjava/classpath/javax/print/event/PrintJobAttributeListener.java
@@ -1,4 +1,4 @@
-/* PrintJobAttributeListener.java --
+/* PrintJobAttributeListener.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,16 +40,16 @@ package javax.print.event;
/**
* Listener interface to receive attribute changes from a print job.
- * Implementations of this interface can be registered with a
+ * Implementations of this interface can be registered with a
* {@link javax.print.DocPrintJob} instance.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintJobAttributeListener
{
/**
* Notifies the listener of an attribute change.
- *
+ *
* @param event the event
*/
void attributeUpdate(PrintJobAttributeEvent event);
diff --git a/libjava/classpath/javax/print/event/PrintJobEvent.java b/libjava/classpath/javax/print/event/PrintJobEvent.java
index cc15f97..db88564 100644
--- a/libjava/classpath/javax/print/event/PrintJobEvent.java
+++ b/libjava/classpath/javax/print/event/PrintJobEvent.java
@@ -1,4 +1,4 @@
-/* PrintEvent.java --
+/* PrintEvent.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,40 +44,40 @@ import javax.print.DocPrintJob;
* PrintJobEvents are generated by a print job during
* print job processing to inform registered listeners about the state
* of processing.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintJobEvent extends PrintEvent
{
private static final long serialVersionUID = -1711656903622072997L;
-
+
/** Indicates that the data transfer to the print service has completed. */
public static final int DATA_TRANSFER_COMPLETE = 106;
-
+
/** Indicates that the print job was canceled. */
public static final int JOB_CANCELED = 101;
-
+
/** Indicates that the print job was completed (=printed). */
public static final int JOB_COMPLETE = 102;
-
+
/** Indicates that the print job failed to complete. */
public static final int JOB_FAILED = 103;
-
+
/** Indicates that no more job events will be send.*/
public static final int NO_MORE_EVENTS = 105;
-
- /**
+
+ /**
* Indicates a situation where human intervention might be needed.
* E.g. the printer run out of paper or a paper jam occured.
*/
public static final int REQUIRES_ATTENTION = 104;
-
+
/** The reason (one of the defined constants). */
private int reason;
-
+
/**
* Constructs a PrintJobEvent object.
- *
+ *
* @param source the source generating this event
* @param reason the reason for this event
*/
@@ -89,7 +89,7 @@ public class PrintJobEvent extends PrintEvent
/**
* Returns the reason for this event.
- *
+ *
* @return The reason.
*/
public int getPrintEventType()
@@ -99,9 +99,9 @@ public class PrintJobEvent extends PrintEvent
/**
* Returns the print job that generated this event.
- *
+ *
* @return The print job.
- */
+ */
public DocPrintJob getPrintJob()
{
return (DocPrintJob) getSource();
diff --git a/libjava/classpath/javax/print/event/PrintJobListener.java b/libjava/classpath/javax/print/event/PrintJobListener.java
index 96c6d41..8ac1a01 100644
--- a/libjava/classpath/javax/print/event/PrintJobListener.java
+++ b/libjava/classpath/javax/print/event/PrintJobListener.java
@@ -1,4 +1,4 @@
-/* PrintJobListener.java --
+/* PrintJobListener.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,56 +40,56 @@ package javax.print.event;
/**
* Listener interface to receive processing events from a print job.
- * Implementations of this interface can be registered with a
+ * Implementations of this interface can be registered with a
* {@link javax.print.DocPrintJob} instance.
- *
+ *
* @see javax.print.event.PrintJobAdapter
- *
- * @author Michael Koch (konqueror@gmx.de)
+ *
+ * @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintJobListener
{
/**
* Notifies the listener that all data has been successfully transferred
* to the print service.
- *
+ *
* @param event the event
*/
void printDataTransferCompleted(PrintJobEvent event);
-
+
/**
* Notifies the listener that a print job got canceled.
- *
+ *
* @param event the event
*/
void printJobCanceled(PrintJobEvent event);
-
+
/**
* Notifies the listener that a print job has completed.
- *
+ *
* @param event the event
*/
void printJobCompleted(PrintJobEvent event);
-
+
/**
* Notifies the listener that a print job has failed to complete.
- *
+ *
* @param event the event.
*/
void printJobFailed(PrintJobEvent event);
-
+
/**
* Notifies the listener that no more events will be delivered.
- *
+ *
* @param event the event
*/
void printJobNoMoreEvents(PrintJobEvent event);
-
+
/**
* Notifies the listener that a problem occured during printing.
- * This event signals problems a user might be able to fix
+ * This event signals problems a user might be able to fix
* (e.g. out of paper or paper jam).
- *
+ *
* @param event the event
*/
void printJobRequiresAttention(PrintJobEvent event);
diff --git a/libjava/classpath/javax/print/event/PrintServiceAttributeEvent.java b/libjava/classpath/javax/print/event/PrintServiceAttributeEvent.java
index a41e213..665db52 100644
--- a/libjava/classpath/javax/print/event/PrintServiceAttributeEvent.java
+++ b/libjava/classpath/javax/print/event/PrintServiceAttributeEvent.java
@@ -1,4 +1,4 @@
-/* PrintServiceAttributeEvent.java --
+/* PrintServiceAttributeEvent.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,19 +42,19 @@ import javax.print.attribute.PrintServiceAttributeSet;
/**
- * PrintServiceAttributeEvents are generated by a
+ * PrintServiceAttributeEvents are generated by a
* PrintService to inform registered listeners that
* its associated attributes have changed.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public class PrintServiceAttributeEvent extends PrintEvent
{
private PrintServiceAttributeSet attributes;
-
+
/**
* Constructs a PrintServiceAttributeEvent object.
- *
+ *
* @param source the source of this event
* @param attributes the attribute changes being reported
*/
@@ -67,7 +67,7 @@ public class PrintServiceAttributeEvent extends PrintEvent
/**
* Returns the print service that generated this event.
- *
+ *
* @return The print service.
*/
public PrintService getPrintService()
@@ -77,7 +77,7 @@ public class PrintServiceAttributeEvent extends PrintEvent
/**
* Returns the changed attributes this event reports.
- *
+ *
* @return The changed attributes.
*/
public PrintServiceAttributeSet getAttributes()
diff --git a/libjava/classpath/javax/print/event/PrintServiceAttributeListener.java b/libjava/classpath/javax/print/event/PrintServiceAttributeListener.java
index b46bf3b..596d167 100644
--- a/libjava/classpath/javax/print/event/PrintServiceAttributeListener.java
+++ b/libjava/classpath/javax/print/event/PrintServiceAttributeListener.java
@@ -1,4 +1,4 @@
-/* PrintServiceAttributeListener.java --
+/* PrintServiceAttributeListener.java --
Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,16 +40,16 @@ package javax.print.event;
/**
* Listener interface to receive attribute changes from a print service.
- * Implementations of this interface can be registered with a
+ * Implementations of this interface can be registered with a
* {@link javax.print.PrintService} instance.
- *
+ *
* @author Michael Koch (konqueror@gmx.de)
*/
public interface PrintServiceAttributeListener
{
/**
* Notifies the listener that some attributes have changed.
- *
+ *
* @param event the event
*/
void attributeUpdate(PrintServiceAttributeEvent event);
diff --git a/libjava/classpath/javax/rmi/CORBA/ClassDesc.java b/libjava/classpath/javax/rmi/CORBA/ClassDesc.java
index c8b38ea..831cdbe 100644
--- a/libjava/classpath/javax/rmi/CORBA/ClassDesc.java
+++ b/libjava/classpath/javax/rmi/CORBA/ClassDesc.java
@@ -49,8 +49,8 @@ import java.io.Serializable;
*/
public class ClassDesc implements Serializable
{
- /**
- * Use serialVersionUID (V1.4) for interoperability.
+ /**
+ * Use serialVersionUID (V1.4) for interoperability.
*/
private static final long serialVersionUID = -3477057297839810709L;
@@ -58,7 +58,7 @@ public class ClassDesc implements Serializable
* The class repository Id.
*/
String repid;
-
+
/**
* Space separeted list of URL's from where the code can be downloaded.
*/
diff --git a/libjava/classpath/javax/rmi/CORBA/PortableRemoteObjectDelegate.java b/libjava/classpath/javax/rmi/CORBA/PortableRemoteObjectDelegate.java
index f376bed..b8f1d06 100644
--- a/libjava/classpath/javax/rmi/CORBA/PortableRemoteObjectDelegate.java
+++ b/libjava/classpath/javax/rmi/CORBA/PortableRemoteObjectDelegate.java
@@ -45,11 +45,11 @@ import java.rmi.RemoteException;
/**
* A delegate, implementing the functionality, provided by the
* {@link PortableRemoteObject}.
- *
+ *
* The default delegate can be altered by setting the system property
* "javax.rmi.CORBA.PortableRemoteObjectClass" to the name of the alternative
* class that must implement {@link PortableRemoteObjectDelegate}.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface PortableRemoteObjectDelegate
@@ -66,12 +66,12 @@ public interface PortableRemoteObjectDelegate
* {@link Stub#connect} if it is a stub or by associating its tie with an ORB
* if it is an implementation object.
*
- *
+ *
* @param target the target object that may be either an RMI/IDL stub or an
* exported RMI/IDL implementation object
* @param source the source object may also be either an RMI/IDL stub or an
* exported RMI/IDL implementation object.
- *
+ *
* @throws RemoteException if the target is already connected to another ORB.
*/
void connect(Remote target, Remote source)
@@ -83,9 +83,9 @@ public interface PortableRemoteObjectDelegate
* non-daemon thread that prevents jre from terminating until all objects are
* unexported. Also, such object cannot be collected by garbage collector.
* This is usually impemented via {@link Util#unexportObject}
- *
+ *
* @param obj the object to export.
- *
+ *
* @throws RemoteException
*/
void exportObject(Remote obj)
@@ -95,13 +95,13 @@ public interface PortableRemoteObjectDelegate
* Narrows the passed object to conform to the given interface or IDL type.
* This method may return different instance and cannot be replaced by the
* direct cast.
- *
+ *
* @param narrowFrom an object to narrow.
* @param narrowTo a type to that the object must be narrowed.
- *
+ *
* @return On success, an object of type narrowTo or null, if narrowFrom =
* null.
- *
+ *
* @throws ClassCastException if no narrowing is possible.
*/
Object narrow(Object narrowFrom, Class narrowTo)
@@ -112,10 +112,10 @@ public interface PortableRemoteObjectDelegate
* used to access that server object (target). If the target is connected, the
* returned stub is also connected to the same ORB. If the target is
* unconnected, the returned stub is unconnected.
- *
+ *
* @param obj a server side object.
* @return a stub object that can be used to access that server object.
- *
+ *
* @throws NoSuchObjectException if a stub cannot be located for the given
* target.
*/
@@ -126,9 +126,9 @@ public interface PortableRemoteObjectDelegate
* Deregister a currently exported server object from the ORB runtimes. The
* object to becomes available for garbage collection. This is usually
* impemented via {@link Util#unexportObject}
- *
+ *
* @param obj the object to unexport.
- *
+ *
* @throws NoSuchObjectException if the passed object is not currently
* exported.
*/
diff --git a/libjava/classpath/javax/rmi/CORBA/Stub.java b/libjava/classpath/javax/rmi/CORBA/Stub.java
index 190b10d..d9b45f7 100644
--- a/libjava/classpath/javax/rmi/CORBA/Stub.java
+++ b/libjava/classpath/javax/rmi/CORBA/Stub.java
@@ -60,10 +60,10 @@ import org.omg.CORBA_2_3.portable.ObjectImpl;
* "javax.rmi.CORBA.StubClass" to the name of the alternative class that must
* implement {@link StubDelegate}. Hence Stub contains two delegates, one for
* Stub-related operations and another inherited from the ObjectImpl.
- *
+ *
* @specnote GNU Classpath uses separate delegate per each Stub. The delegate
* holds information about the ORB and other data, specific for the each Stub.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public abstract class Stub
@@ -118,7 +118,7 @@ public abstract class Stub
/**
* Get the string representation of this Stub.
- *
+ *
* @return the CORBA IOR reference.
*/
public String toString()
@@ -149,13 +149,13 @@ public abstract class Stub
* It is frequently easier to call {@link PortableRemoteObject#connect} rather
* than this method.
*
- *
+ *
* @param orb the ORB where the Stub must be connected.
- *
+ *
* @throws RemoteException if the stub is already connected to some other ORB.
* If the stub is already connected to the ORB that was passed as parameter,
* the method returns without action.
- *
+ *
* @throws BAD_PARAM if the name of this stub does not match the stub name
* pattern, "_*_Stub" or if the Tie class, "_*Impl_Tie", does not exists or an
* instance of this class cannot be instantiated.
@@ -200,4 +200,4 @@ public abstract class Stub
delegate.writeObject(this, output);
}
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/rmi/CORBA/StubDelegate.java b/libjava/classpath/javax/rmi/CORBA/StubDelegate.java
index cdf76e8..a191eb4 100644
--- a/libjava/classpath/javax/rmi/CORBA/StubDelegate.java
+++ b/libjava/classpath/javax/rmi/CORBA/StubDelegate.java
@@ -51,7 +51,7 @@ import java.rmi.RemoteException;
* The default delegate can be altered by setting the system property
* "javax.rmi.CORBA.StubClass" to the name of the alternative class that must
* implement StubDelegate.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface StubDelegate
@@ -64,9 +64,9 @@ public interface StubDelegate
* It is frequently easier to call {@link PortableRemoteObject#connect} rather
* than this method.
*
- *
+ *
* @param orb the ORB where the Stub must be connected.
- *
+ *
* @throws RemoteException if the stub is already connected to some other ORB.
* If the stub is already connected to the ORB that was passed as parameter,
* the method returns without action.
@@ -100,4 +100,4 @@ public interface StubDelegate
* Get the string representation of this stub.
*/
String toString(Stub self);
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/rmi/CORBA/Tie.java b/libjava/classpath/javax/rmi/CORBA/Tie.java
index af9ddd3..90a8251 100644
--- a/libjava/classpath/javax/rmi/CORBA/Tie.java
+++ b/libjava/classpath/javax/rmi/CORBA/Tie.java
@@ -61,7 +61,7 @@ import org.omg.CORBA.portable.InvokeHandler;
* rmic compiler using -poa key. Ties can be also
* derived from {@link org.omg.CORBA_2_3.portable.ObjectImpl}.
*
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface Tie
@@ -69,7 +69,7 @@ public interface Tie
{
/**
* Get the invocation target, where all method calls should be delegated.
- *
+ *
* @return the object, implementing methods, defined in the interface being
* served by this Tie.
*/
@@ -77,12 +77,12 @@ public interface Tie
/**
* Set the invocation target, where all method calls should be delegated.
- *
+ *
* @param target the object, implementing methods, defined in the interface
* being served by this Tie. The code, produced by a typical rmic compiler
* usually requires the target to be an instance of the implementation from
* that the Tie was generated.
- *
+ *
* @throws ClassCastException if the passed parameter is not an instance of
* the implementation from that the Tie was generated.
*/
@@ -90,7 +90,7 @@ public interface Tie
/**
* Get the ORB to that this Tie is connected.
- *
+ *
* @see org.omg.PortableServer.Servant#_orb
*/
ORB orb();
@@ -102,7 +102,7 @@ public interface Tie
/**
* Get the object that delegates calls to this tie.
- *
+ *
* @see org.omg.PortableServer.Servant#_this_object()
*/
org.omg.CORBA.Object thisObject();
@@ -113,13 +113,13 @@ public interface Tie
* again. The ties that are not derived from
* {@link org.omg.PortableServer.Servant} deactivate themselves by
* {@link ORB#disconnect}.
- *
+ *
* @throws NoSuchObjectException if there are no objects served by this Tie,
* or if the these objects are already deactivated.
- *
+ *
* @see org.omg.PortableServer.POAOperations#deactivate_object
*/
void deactivate()
throws NoSuchObjectException;
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/rmi/CORBA/Util.java b/libjava/classpath/javax/rmi/CORBA/Util.java
index 04b6f63..9c6df60 100644
--- a/libjava/classpath/javax/rmi/CORBA/Util.java
+++ b/libjava/classpath/javax/rmi/CORBA/Util.java
@@ -77,7 +77,7 @@ import javax.transaction.TransactionRolledbackException;
* The functionality is forwarded to the enclosed UtilDelegate. This delegate
* can be altered by setting the system property "javax.rmi.CORBA.UtilClass" to
* the name of the alternative class that must implement {@link UtilDelegate}.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class Util
@@ -119,7 +119,7 @@ public class Util
/**
* Get the value handler that Serializes Java objects to and from CDR (GIOP)
* streams.
- *
+ *
* When using the default Util implementation, the class of the returned
* handler can be altered by setting by setting the system property
* "javax.rmi.CORBA.ValueHandlerClass" to the name of the alternative class
@@ -143,7 +143,7 @@ public class Util
* pair has not been previously registered using {@link #registerTarget},
* this method tries to locate a tie class by the name pattern. If this
* succeeds, the tie-target pair is also registered.
- *
+ *
* @return the Tie.
*/
public static Tie getTie(Remote target)
@@ -154,10 +154,10 @@ public class Util
/**
* Checks if the given stub is local. The implementation it delegates call to
* {@link ObjectImpl#_is_local().
- *
+ *
* @param stub a stub to check.
* @return true if the stub is local, false otherwise.
- *
+ *
* @throws RemoteException if the {@link ObjectImpl#_is_local()} throws a
* {@link org.omg.CORBA.SystemException}.
*/
@@ -171,7 +171,7 @@ public class Util
* Load the class. The method uses class loaders from the call stact first. If
* this fails, the further behaviour depends on the System Property
* "java.rmi.server.useCodebaseOnly" with default value "false".
- *
+ *
*
*
If remoteCodebase is non-null and useCodebaseOnly is "false" then call
* java.rmi.server.RMIClassLoader.loadClass (remoteCodebase, className)
@@ -180,12 +180,12 @@ public class Util
*
If a class is still not successfully loaded and the loader != null
* then try Class.forName(className, false, loader).
*
- *
+ *
* @param className the name of the class.
* @param remoteCodebase the codebase.
* @param loader the class loader.
* @return the loaded class.
- *
+ *
* @throws ClassNotFoundException of the class cannot be loaded.
*/
public static Class loadClass(String className, String remoteCodebase,
@@ -331,14 +331,14 @@ public class Util
*
{@link UnexpectedException}
*
*
- *
+ *
* @param exception an exception that was thrown on a server side implementation.
- *
+ *
* @return the corresponding RemoteException unless it is a RuntimeException.
- *
+ *
* @throws RuntimeException the passed exception if it is an instance of
* RuntimeException.
- *
+ *
* @specnote It is the same behavior, as in Suns implementations 1.4.0-1.5.0.
*/
public static RemoteException wrapException(Throwable exception)
@@ -354,10 +354,10 @@ public class Util
* {@link #writeRemoteObject}. The written data contains discriminator,
* defining, that was written. Another method that writes the same content is
* {@link org.omg.CORBA_2_3.portable.OutputStream#write_abstract_interface(java.lang.Object)}.
- *
+ *
* @param output a stream to write to, must be
* {@link org.omg.CORBA_2_3.portable.OutputStream}.
- *
+ *
* @param object an object to write, must be CORBA object, Remote
*/
public static void writeAbstractObject(OutputStream output,
@@ -375,7 +375,7 @@ public class Util
* method writes CORBA object, value type or value box. For value types Null
* is written with the abstract interface, its typecode having repository id
* "IDL:omg.org/CORBA/AbstractBase:1.0" and the empty string name.
- *
+ *
* @param output the object to write.
* @param object the java object that must be written in the form of the CORBA
* {@link Any}.
@@ -384,9 +384,9 @@ public class Util
{
delegate.writeAny(output, object);
}
-
+
/**
- * Read Any from the input stream.
+ * Read Any from the input stream.
*/
public static java.lang.Object readAny(InputStream input)
{
@@ -403,7 +403,7 @@ public class Util
* used in write_value(..) method group in
* {@link org.omg.CORBA_2_3.portable.OutputStream} and also may be called
* directly from generated Stubs and Ties.
- *
+ *
* @param output a stream to write to, must be
* org.omg.CORBA_2_3.portable.OutputStream
* @param object an object to write.
@@ -413,4 +413,4 @@ public class Util
{
delegate.writeRemoteObject(output, object);
}
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/rmi/CORBA/UtilDelegate.java b/libjava/classpath/javax/rmi/CORBA/UtilDelegate.java
index 79d740e..2454f53 100644
--- a/libjava/classpath/javax/rmi/CORBA/UtilDelegate.java
+++ b/libjava/classpath/javax/rmi/CORBA/UtilDelegate.java
@@ -71,11 +71,11 @@ import javax.transaction.TransactionRolledbackException;
/**
* A delegate, implementing the functionality, provided by the {@link Util}.
- *
+ *
* The default delegate can be altered by setting the system property
* "javax.rmi.CORBA.UtilClass" to the name of the alternative class that must
* implement this interface.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface UtilDelegate
@@ -195,7 +195,7 @@ public interface UtilDelegate
/**
* Get the Tie that handles invocations on the given target. The target/Tie
* pair must be previously registered using {@link #registerTarget}.
- *
+ *
* @return the Tie, or null if no such is known.
*/
Tie getTie(Remote target);
@@ -242,14 +242,14 @@ public interface UtilDelegate
*
{@link UnexpectedException}
*
*
- *
+ *
* @param e an exception that was thrown on a server side implementation.
- *
+ *
* @return the corresponding RemoteException unless it is a RuntimeException.
- *
+ *
* @throws RuntimeException the passed exception if it is an instance of
* RuntimeException.
- *
+ *
* @specnote It is the same behavior, as in Suns implementations 1.4.0-1.5.0.
*/
RemoteException wrapException(Throwable orig);
@@ -263,7 +263,7 @@ public interface UtilDelegate
* possible. This method is used in write_value(..) method group in
* {@link org.omg.CORBA_2_3.portable.OutputStream} and also may be called
* directly from generated Stubs and Ties.
- *
+ *
* @param output a stream to write to, must be
* org.omg.CORBA_2_3.portable.OutputStream
* @param obj an object to write.
@@ -278,10 +278,10 @@ public interface UtilDelegate
* {@link #writeRemoteObject}. The written data contains discriminator,
* defining, that was written. Another method that writes the same content is
* {@link org.omg.CORBA_2_3.portable.OutputStream#write_abstract_interface(java.lang.Object)}.
- *
+ *
* @param output a stream to write to, must be
* {@link org.omg.CORBA_2_3.portable.OutputStream}.
- *
+ *
* @param object an object to write, must be CORBA object, Remote
*/
void writeAbstractObject(OutputStream output, Object object);
@@ -295,7 +295,7 @@ public interface UtilDelegate
* method writes CORBA object, value type or value box. For value types Null
* is written with the abstract interface, its typecode having repository id
* "IDL:omg.org/CORBA/AbstractBase:1.0" and the empty string name.
- *
+ *
* @param output the object to write.
* @param object the java object that must be written in the form of the CORBA
* {@link Any}.
@@ -303,8 +303,8 @@ public interface UtilDelegate
void writeAny(OutputStream output, Object object);
/**
- * Read Any from the input stream.
+ * Read Any from the input stream.
*/
Object readAny(InputStream input);
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/rmi/CORBA/ValueHandler.java b/libjava/classpath/javax/rmi/CORBA/ValueHandler.java
index acc44aa..cc855b8 100644
--- a/libjava/classpath/javax/rmi/CORBA/ValueHandler.java
+++ b/libjava/classpath/javax/rmi/CORBA/ValueHandler.java
@@ -51,32 +51,32 @@ import org.omg.SendingContext.RunTime;
* of the value handler is returned by {@link Util#createValueHandler} and can
* be altered by setting the system property "javax.rmi.CORBA.ValueHandlerClass"
* to the name of the alternative class that must implement ValueHandler.
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public interface ValueHandler
{
/**
* Get CORBA repository Id for the given java class.
- *
+ *
* The syntax of the repository ID is the initial ?RMI:?, followed by the Java
* class name, followed by name, followed by a hash code string, followed
* optionally by a serialization version UID string.
- *
+ *
* For Java identifiers that contain illegal OMG IDL identifier characters
* such as ?$?, any such illegal characters are replaced by ?\U? followed by
* the 4 hexadecimal characters (in upper case) representing the Unicode
* value.
- *
+ *
* @param clz a class for that the repository Id is required.
- *
+ *
* @return the class repository id.
*/
String getRMIRepositoryID(Class clz);
/**
* Returns the CodeBase for this ValueHandler.
- *
+ *
* @return the codebase.
*/
RunTime getRunTimeCodeBase();
@@ -86,7 +86,7 @@ public interface ValueHandler
* content to the stream. Such classes implement either {@link Streamable}
* (default marshalling, generated by IDL-to-java compiler) or
* {@link CustomMarshal} (the user-programmed marshalling).
- *
+ *
* @param clz the class being checked.
* @return true if the class supports custom or default marshalling, false
* otherwise.
@@ -97,14 +97,14 @@ public interface ValueHandler
* Read value from the CORBA input stream in the case when the value is not
* Streamable or CustomMarshall'ed. The fields of the class being written will
* be accessed using reflection.
- *
+ *
* @param in a CORBA stream to read.
* @param offset the current position in the input stream.
* @param clz the type of value being read.
* @param repositoryID the repository Id of the value being read.
* @param sender the sending context that should provide data about the
* message originator.
- *
+ *
* @return the object, extracted from the stream.
*/
Serializable readValue(InputStream in, int offset, Class clz,
@@ -113,18 +113,18 @@ public interface ValueHandler
/**
* When the value provides the writeReplace method, the result of this method
* is written. Otherwise, the value itself is written.
- *
+ *
* @param value the value that should be written to the stream.
- *
+ *
* @return the value that will be actually written to the stream.
*/
Serializable writeReplace(Serializable value);
/**
* Write value to CORBA output stream using java senmatics.
- *
+ *
* @param out a stream to write into.
* @param value a java object to write.
*/
void writeValue(OutputStream out, Serializable value);
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/rmi/CORBA/ValueHandlerMultiFormat.java b/libjava/classpath/javax/rmi/CORBA/ValueHandlerMultiFormat.java
index 4db65c1..6bc6ad0 100644
--- a/libjava/classpath/javax/rmi/CORBA/ValueHandlerMultiFormat.java
+++ b/libjava/classpath/javax/rmi/CORBA/ValueHandlerMultiFormat.java
@@ -46,9 +46,9 @@ import java.io.Serializable;
* This interface extends the previous ValueHandler, supporting various stream
* format versions. The {@link ValueHandler} can be casted into this interface
* to access additional features.
- *
+ *
* @since 1.5
- *
+ *
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public interface ValueHandlerMultiFormat
@@ -58,7 +58,7 @@ public interface ValueHandlerMultiFormat
* Get the maximal supported version for the value types, supported by
* this value handler. The versions are integer numbers, the currently valid
* values being 1 and 2.
- *
+ *
* These two versions differ in how the additional data, stored by the
* writeObject method, are encoded.
*
@@ -72,7 +72,7 @@ public interface ValueHandlerMultiFormat
*
* As the version number is part of the value type record, there is no need
* to the format control during the reading.
- *
+ *
* @return the maximal supported version.
*/
byte getMaximumStreamFormatVersion();
@@ -80,13 +80,13 @@ public interface ValueHandlerMultiFormat
/**
* Write the value type to the output stream using the given format version.
* The older method {@link ValueHandler#writeValue} always uses the version 1.
- *
+ *
* @param output the stream, where the value should be written, must implement
* {@link ValueOutputStream}.
* @param value the value that should be written.
* @param version the version of the format that must be used to write the
* value.
- *
+ *
* @throws BAD_PARAM if the version number is less than 1 or greater than the
* maximal supported version.
*/
diff --git a/libjava/classpath/javax/rmi/PortableRemoteObject.java b/libjava/classpath/javax/rmi/PortableRemoteObject.java
index db2ea6b..aa7e530 100644
--- a/libjava/classpath/javax/rmi/PortableRemoteObject.java
+++ b/libjava/classpath/javax/rmi/PortableRemoteObject.java
@@ -69,7 +69,7 @@ import javax.rmi.CORBA.Util;
* the alternative class that must implement
* {@link PortableRemoteObjectDelegate}.
*
- *
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class PortableRemoteObject
@@ -81,7 +81,7 @@ public class PortableRemoteObject
/**
* The protected constructor calls {@link exportObject} (this).
- *
+ *
* @throws RemoteException if the exportObject(this) throws one.
*/
protected PortableRemoteObject()
@@ -96,14 +96,14 @@ public class PortableRemoteObject
* communication using the same communications runtime as for the passed
* a_source parameter. The a_target is connected to the same
* ORB (and, if applicable, to the same {@link POA}) as the a_source.
- *
+ *
* @param target the target to connect to ORB, must be an instance of either
* {@link ObjectImpl} (Stubs and old-style ties) or {@link Tie}.
- *
+ *
* @param source the object, providing the connection information, must be
* an instance of either {@link ObjectImpl} (Stubs and old-style ties) or
* {@link Servant} (the next-generation Ties supporting {@link POA}).
- *
+ *
* @throws RemoteException if the target is already connected to another ORB.
*/
public static void connect(Remote target, Remote source)
@@ -122,9 +122,9 @@ public class PortableRemoteObject
* This method only creates a tie object and caches it for future usage. The
* created tie does not have a delegate or an ORB associated.
*
- *
+ *
* @param object the object to export.
- *
+ *
* @throws RemoteException if export fails due any reason.
*/
public static void exportObject(Remote object)
@@ -160,16 +160,16 @@ public class PortableRemoteObject
*
A {@link Tie} can be narrowed into Remote, representing the
* implementation for this Tie (if one is set).
*
- *
+ *
* @param object the object like CORBA Object, Stub or Remote that must be
* narrowed to the given interface.
- *
+ *
* @param narrowToInstaceOf the class of the interface to that the object must
* be narrowed.
- *
+ *
* @return On success, an object of type narrowTo or null, if narrowFrom =
* null.
- *
+ *
* @throws ClassCastException if no narrowing is possible.
*/
public static Object narrow(Object object, Class narrowToInstaceOf)
@@ -183,7 +183,7 @@ public class PortableRemoteObject
* Takes a server implementation object (name pattern *imp) and returns a stub
* object that can be used to access that server object (target), name
* (pattern _*_Stub).
- *
+ *
* The returned stub is not connected to any ORB and must be explicitly
* connected using {@link #connect}.
*
@@ -191,16 +191,16 @@ public class PortableRemoteObject
* The method signature prevents it from returning stubs that does not
* implement Remote (ClassCastException will be thrown).
*
- *
+ *
* @param target a server side object implementation.
* @return a stub object that can be used to access that server object.
- *
+ *
* @throws NoSuchObjectException if a stub class cannot be located by supposed
* name pattern, or an instance of stub fails to be instantiated.
- *
+ *
* @throws ClassCastException if the stub class can be located, but it does
* not inherit from Remote.
- *
+ *
* @throws BAD_PARAM if the name of the passed class does not match the
* implementation name pattern (does not end by 'Impl').
*/
@@ -214,9 +214,9 @@ public class PortableRemoteObject
* Deregister a currently exported server object from the ORB runtimes. The
* object to becomes available for garbage collection. This is usually
* impemented via {@link Util#unexportObject}
- *
+ *
* @param object the object to unexport.
- *
+ *
* @throws NoSuchObjectException if the passed object is not currently
* exported.
*/
@@ -225,4 +225,4 @@ public class PortableRemoteObject
{
delegate.unexportObject(object);
}
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/rmi/ssl/SslRMIClientSocketFactory.java b/libjava/classpath/javax/rmi/ssl/SslRMIClientSocketFactory.java
index 3a4c6ce..1222645 100644
--- a/libjava/classpath/javax/rmi/ssl/SslRMIClientSocketFactory.java
+++ b/libjava/classpath/javax/rmi/ssl/SslRMIClientSocketFactory.java
@@ -1,4 +1,4 @@
-/* SslRMIClientSocketFactory.java --
+/* SslRMIClientSocketFactory.java --
Copyright (C) 2006 Free Software Foundation
This file is part of GNU Classpath.
@@ -52,19 +52,19 @@ import java.rmi.server.RMIClientSocketFactory;
* This class implements an RMIClientSocketFactory for SSL sockets.
* it uses the default SSLClientSocketFactory.
*
- * This class can optionally use the following system properties, if set:
+ * This class can optionally use the following system properties, if set:
* javax.rmi.ssl.client.enabledCipherSuites
* javax.rmi.ssl.client.enabledProtocols
*
* These properties will specify a list of SSL/TLS cipher suites and protocols,
- * respectively, to enable on the created sockets.
+ * respectively, to enable on the created sockets.
*
* Both properties should consist of a comma-separated list.
*
* @author Sven de Marothy
* @since 1.5
*/
-public class SslRMIClientSocketFactory
+public class SslRMIClientSocketFactory
implements RMIClientSocketFactory, Serializable
{
@@ -78,11 +78,11 @@ public class SslRMIClientSocketFactory
/**
* The SSL Socket factory.
*/
- private static SSLSocketFactory socketFactory =
+ private static SSLSocketFactory socketFactory =
(SSLSocketFactory)SSLSocketFactory.getDefault();
/**
- * Creates a new SslRMIClientSocketFactory
+ * Creates a new SslRMIClientSocketFactory
*/
public SslRMIClientSocketFactory()
{
@@ -95,11 +95,11 @@ public class SslRMIClientSocketFactory
String o;
try
{
- o = System.getProperty(p);
+ o = System.getProperty(p);
}
catch(SecurityException se)
{
- return null;
+ return null;
}
if (o == null)
@@ -116,7 +116,7 @@ public class SslRMIClientSocketFactory
}
/**
- * Creates an SSLSocket on a given port
+ * Creates an SSLSocket on a given port
*
* @throws IOException if an error occurs on socket creation.
*/
@@ -133,13 +133,13 @@ public class SslRMIClientSocketFactory
/**
* Compare two SslRMIServerSocketFactor instances
- */
+ */
public boolean equals(Object obj)
{
if( !(obj instanceof SslRMIClientSocketFactory) )
return false;
SslRMIClientSocketFactory s = (SslRMIClientSocketFactory)obj;
-
+
if(!SslRMIServerSocketFactory.
cmpStrArray(enabledCipherSuites, s.enabledCipherSuites))
return false;
@@ -159,10 +159,10 @@ public class SslRMIClientSocketFactory
int hash = 0;
if( enabledCipherSuites != null )
for(int i = 0; i < enabledCipherSuites.length; i++ )
- hash = hash ^ enabledCipherSuites[i].hashCode();
+ hash = hash ^ enabledCipherSuites[i].hashCode();
if( enabledProtocols != null )
for(int i = 0; i < enabledProtocols.length; i++ )
- hash = hash ^ enabledProtocols[i].hashCode();
+ hash = hash ^ enabledProtocols[i].hashCode();
return hash;
}
}
diff --git a/libjava/classpath/javax/rmi/ssl/SslRMIServerSocketFactory.java b/libjava/classpath/javax/rmi/ssl/SslRMIServerSocketFactory.java
index 56f6de1..d5c5398 100644
--- a/libjava/classpath/javax/rmi/ssl/SslRMIServerSocketFactory.java
+++ b/libjava/classpath/javax/rmi/ssl/SslRMIServerSocketFactory.java
@@ -1,4 +1,4 @@
-/* SslRMIServerSocketFactory.java --
+/* SslRMIServerSocketFactory.java --
Copyright (C) 2006 Free Software Foundation
This file is part of GNU Classpath.
@@ -60,7 +60,7 @@ public class SslRMIServerSocketFactory implements RMIServerSocketFactory
/**
* The SSL ServerSocket factory.
*/
- private static SSLServerSocketFactory socketFactory =
+ private static SSLServerSocketFactory socketFactory =
(SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
/**
@@ -80,33 +80,33 @@ public class SslRMIServerSocketFactory implements RMIServerSocketFactory
*
* @param enabledCipherSuites - the cypher suites to enable
* or null for the defauls.
- * @param enabledCipherSuites - the protocols to enable,
+ * @param enabledCipherSuites - the protocols to enable,
* or null for the defauls.
* @param needClientAuth - specify client authorization requirement.
* @throws IllegalArgumentException if any of the ciphers or protocols
* specified are not available.
*/
- public SslRMIServerSocketFactory(String[] enabledCipherSuites,
- String[] enabledProtocols,
- boolean needClientAuth)
+ public SslRMIServerSocketFactory(String[] enabledCipherSuites,
+ String[] enabledProtocols,
+ boolean needClientAuth)
{
this.enabledCipherSuites = enabledCipherSuites;
- this.enabledProtocols = enabledProtocols;
+ this.enabledProtocols = enabledProtocols;
this.needClientAuth = needClientAuth;
- try
+ try
{
- if( enabledProtocols != null || enabledCipherSuites != null )
- createServerSocket( 0 ); // stupid way to test the parameters
+ if( enabledProtocols != null || enabledCipherSuites != null )
+ createServerSocket( 0 ); // stupid way to test the parameters
}
catch(IOException e)
{
- // Can this happen? FIXME.
- throw new IllegalArgumentException();
+ // Can this happen? FIXME.
+ throw new IllegalArgumentException();
}
}
/**
- * Creates an SSLServerSocket on a given port
+ * Creates an SSLServerSocket on a given port
*
* @throws IOException if an error occurs on socket creation.
*/
@@ -124,7 +124,7 @@ public class SslRMIServerSocketFactory implements RMIServerSocketFactory
/**
* Compare two SslRMIServerSocketFactor instances
- */
+ */
public boolean equals(Object obj)
{
if( !(obj instanceof SslRMIServerSocketFactory) )
@@ -132,7 +132,7 @@ public class SslRMIServerSocketFactory implements RMIServerSocketFactory
SslRMIServerSocketFactory s = (SslRMIServerSocketFactory)obj;
if( needClientAuth != s.needClientAuth )
return false;
-
+
if(!cmpStrArray(enabledCipherSuites, s.enabledCipherSuites))
return false;
@@ -152,23 +152,23 @@ public class SslRMIServerSocketFactory implements RMIServerSocketFactory
if( a != null )
{
- if( a.length != b.length )
- return false;
- for( int i = 0; i < a.length; i++ )
- if(!a[i].equals(b[i]))
- return false;
+ if( a.length != b.length )
+ return false;
+ for( int i = 0; i < a.length; i++ )
+ if(!a[i].equals(b[i]))
+ return false;
}
return true;
}
/**
- * Returns the enabled cipher suites, or null
+ * Returns the enabled cipher suites, or null
* if the defaults are to be used.
* @returns a string array of cipher suite names
*/
public String[] getEnabledCipherSuites()
- {
+ {
if( enabledCipherSuites == null )
return null;
return (String[])enabledCipherSuites.clone();
@@ -203,11 +203,11 @@ public class SslRMIServerSocketFactory implements RMIServerSocketFactory
int hash = 0;
if( enabledCipherSuites != null )
for(int i = 0; i < enabledCipherSuites.length; i++ )
- hash = hash ^ enabledCipherSuites[i].hashCode();
+ hash = hash ^ enabledCipherSuites[i].hashCode();
if( enabledProtocols != null )
for(int i = 0; i < enabledProtocols.length; i++ )
- hash = hash ^ enabledProtocols[i].hashCode();
+ hash = hash ^ enabledProtocols[i].hashCode();
hash = ( needClientAuth ) ? (hash^0xFFFF) : hash;
return hash;
}
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/security/auth/Subject.java b/libjava/classpath/javax/security/auth/Subject.java
index 0383634..e9b0804 100644
--- a/libjava/classpath/javax/security/auth/Subject.java
+++ b/libjava/classpath/javax/security/auth/Subject.java
@@ -236,7 +236,7 @@ public final class Subject implements Serializable
*/
public static Object doAsPrivileged (final Subject subject,
final PrivilegedExceptionAction action,
- AccessControlContext acc)
+ AccessControlContext acc)
throws PrivilegedActionException
{
final SecurityManager sm = System.getSecurityManager();
diff --git a/libjava/classpath/javax/security/auth/callback/ChoiceCallback.java b/libjava/classpath/javax/security/auth/callback/ChoiceCallback.java
index ec12a66..30bddd5 100644
--- a/libjava/classpath/javax/security/auth/callback/ChoiceCallback.java
+++ b/libjava/classpath/javax/security/auth/callback/ChoiceCallback.java
@@ -108,7 +108,7 @@ public class ChoiceCallback implements Callback, Serializable
* choices.
*/
public ChoiceCallback(String prompt, String[] choices, int defaultChoice,
- boolean multipleSelectionsAllowed)
+ boolean multipleSelectionsAllowed)
{
super();
@@ -116,7 +116,7 @@ public class ChoiceCallback implements Callback, Serializable
setChoices(choices);
if (defaultChoice < 0 || defaultChoice >= this.choices.length)
{
- throw new IllegalArgumentException("default choice is out of bounds");
+ throw new IllegalArgumentException("default choice is out of bounds");
}
this.defaultChoice = defaultChoice;
this.multipleSelectionsAllowed = multipleSelectionsAllowed;
@@ -192,7 +192,7 @@ public class ChoiceCallback implements Callback, Serializable
{
if (!multipleSelectionsAllowed)
{
- throw new UnsupportedOperationException("not allowed");
+ throw new UnsupportedOperationException("not allowed");
}
this.selections = selections;
@@ -213,7 +213,7 @@ public class ChoiceCallback implements Callback, Serializable
{
if ((prompt == null) || (prompt.length() == 0))
{
- throw new IllegalArgumentException("invalid prompt");
+ throw new IllegalArgumentException("invalid prompt");
}
this.prompt = prompt;
}
@@ -222,14 +222,14 @@ public class ChoiceCallback implements Callback, Serializable
{
if (choices == null || choices.length == 0)
{
- throw new IllegalArgumentException("invalid choices");
+ throw new IllegalArgumentException("invalid choices");
}
for (int i = 0; i < choices.length; i++)
{
- if (choices[i] == null || choices[i].length() == 0)
- {
- throw new IllegalArgumentException("invalid choice at index #"+i);
- }
+ if (choices[i] == null || choices[i].length() == 0)
+ {
+ throw new IllegalArgumentException("invalid choice at index #"+i);
+ }
}
this.choices = choices;
}
diff --git a/libjava/classpath/javax/security/auth/callback/ConfirmationCallback.java b/libjava/classpath/javax/security/auth/callback/ConfirmationCallback.java
index 938b301..8f89bf5 100644
--- a/libjava/classpath/javax/security/auth/callback/ConfirmationCallback.java
+++ b/libjava/classpath/javax/security/auth/callback/ConfirmationCallback.java
@@ -260,7 +260,7 @@ public class ConfirmationCallback implements Callback, Serializable
* not correspond to one of the options in optionType.
*/
public ConfirmationCallback(String prompt, int messageType, int optionType,
- int defaultOption)
+ int defaultOption)
{
super();
@@ -297,7 +297,7 @@ public class ConfirmationCallback implements Callback, Serializable
* options.
*/
public ConfirmationCallback(String prompt, int messageType, String[] options,
- int defaultOption)
+ int defaultOption)
{
super();
@@ -352,7 +352,7 @@ public class ConfirmationCallback implements Callback, Serializable
{
if (options != null)
{
- return UNSPECIFIED_OPTION;
+ return UNSPECIFIED_OPTION;
}
return optionType;
}
@@ -399,11 +399,11 @@ public class ConfirmationCallback implements Callback, Serializable
{
if (options != null)
{
- setOptions(options, selection);
+ setOptions(options, selection);
}
else
{
- setOptionType(optionType, selection);
+ setOptionType(optionType, selection);
}
}
@@ -440,35 +440,35 @@ public class ConfirmationCallback implements Callback, Serializable
switch (optionType)
{
case YES_NO_OPTION:
- this.optionType = optionType;
- switch (selectedOption)
- {
- case YES:
- case NO: this.selection = selectedOption; break;
- default: throw new IllegalArgumentException("invalid option");
- }
- break;
+ this.optionType = optionType;
+ switch (selectedOption)
+ {
+ case YES:
+ case NO: this.selection = selectedOption; break;
+ default: throw new IllegalArgumentException("invalid option");
+ }
+ break;
case YES_NO_CANCEL_OPTION:
- this.optionType = optionType;
- switch (selectedOption)
- {
- case YES:
- case NO:
- case CANCEL: this.selection = selectedOption; break;
- default: throw new IllegalArgumentException("invalid option");
- }
- break;
+ this.optionType = optionType;
+ switch (selectedOption)
+ {
+ case YES:
+ case NO:
+ case CANCEL: this.selection = selectedOption; break;
+ default: throw new IllegalArgumentException("invalid option");
+ }
+ break;
case OK_CANCEL_OPTION:
- this.optionType = optionType;
- switch (selectedOption)
- {
- case OK:
- case CANCEL: this.selection = selectedOption; break;
- default: throw new IllegalArgumentException("invalid option");
- }
- break;
+ this.optionType = optionType;
+ switch (selectedOption)
+ {
+ case OK:
+ case CANCEL: this.selection = selectedOption; break;
+ default: throw new IllegalArgumentException("invalid option");
+ }
+ break;
default:
- throw new IllegalArgumentException("illegal option type");
+ throw new IllegalArgumentException("illegal option type");
}
}
@@ -477,18 +477,18 @@ public class ConfirmationCallback implements Callback, Serializable
{
if ((selectedOption < 0) || (selectedOption > options.length - 1))
{
- throw new IllegalArgumentException("invalid selection");
+ throw new IllegalArgumentException("invalid selection");
}
if ((options == null) || (options.length == 0))
{
- throw new IllegalArgumentException("options is null or empty");
+ throw new IllegalArgumentException("options is null or empty");
}
for (int i = 0; i < options.length; i++)
{
- if ((options[i] == null) || (options[i].length() == 0))
- {
- throw new IllegalArgumentException("options[" + i + "] is null or empty");
- }
+ if ((options[i] == null) || (options[i].length() == 0))
+ {
+ throw new IllegalArgumentException("options[" + i + "] is null or empty");
+ }
}
this.options = options;
this.selection = selectedOption;
@@ -498,7 +498,7 @@ public class ConfirmationCallback implements Callback, Serializable
{
if ((prompt == null) || (prompt.length() == 0))
{
- throw new IllegalArgumentException("prompt is null or empty");
+ throw new IllegalArgumentException("prompt is null or empty");
}
this.prompt = prompt;
}
diff --git a/libjava/classpath/javax/security/auth/callback/NameCallback.java b/libjava/classpath/javax/security/auth/callback/NameCallback.java
index 0e281d1..4b8bf1c 100644
--- a/libjava/classpath/javax/security/auth/callback/NameCallback.java
+++ b/libjava/classpath/javax/security/auth/callback/NameCallback.java
@@ -162,7 +162,7 @@ public class NameCallback implements Callback, Serializable
{
if ((prompt == null) || (prompt.length() == 0))
{
- throw new IllegalArgumentException("invalid prompt");
+ throw new IllegalArgumentException("invalid prompt");
}
this.prompt = prompt;
}
@@ -171,7 +171,7 @@ public class NameCallback implements Callback, Serializable
{
if ((defaultName == null) || (defaultName.length() == 0))
{
- throw new IllegalArgumentException("invalid default name");
+ throw new IllegalArgumentException("invalid default name");
}
this.defaultName = defaultName;
}
diff --git a/libjava/classpath/javax/security/auth/callback/PasswordCallback.java b/libjava/classpath/javax/security/auth/callback/PasswordCallback.java
index e8c862a..6309aac 100644
--- a/libjava/classpath/javax/security/auth/callback/PasswordCallback.java
+++ b/libjava/classpath/javax/security/auth/callback/PasswordCallback.java
@@ -149,11 +149,11 @@ public class PasswordCallback implements Callback, Serializable
{
if (inputPassword != null)
{
- for (int i = 0; i < inputPassword.length; i++)
- {
- inputPassword[i] = '\0';
- }
- inputPassword = null;
+ for (int i = 0; i < inputPassword.length; i++)
+ {
+ inputPassword[i] = '\0';
+ }
+ inputPassword = null;
}
}
@@ -161,7 +161,7 @@ public class PasswordCallback implements Callback, Serializable
{
if ((prompt == null) || (prompt.length() == 0))
{
- throw new IllegalArgumentException("invalid prompt");
+ throw new IllegalArgumentException("invalid prompt");
}
this.prompt = prompt;
}
diff --git a/libjava/classpath/javax/security/auth/callback/TextInputCallback.java b/libjava/classpath/javax/security/auth/callback/TextInputCallback.java
index 98b0ae3..1fe0713 100644
--- a/libjava/classpath/javax/security/auth/callback/TextInputCallback.java
+++ b/libjava/classpath/javax/security/auth/callback/TextInputCallback.java
@@ -161,7 +161,7 @@ public class TextInputCallback implements Callback, Serializable
{
if ((prompt == null) || (prompt.length() == 0))
{
- throw new IllegalArgumentException("invalid prompt");
+ throw new IllegalArgumentException("invalid prompt");
}
this.prompt = prompt;
}
@@ -170,7 +170,7 @@ public class TextInputCallback implements Callback, Serializable
{
if ((defaultText == null) || (defaultText.length() == 0))
{
- throw new IllegalArgumentException("invalid default text");
+ throw new IllegalArgumentException("invalid default text");
}
this.defaultText = defaultText;
}
diff --git a/libjava/classpath/javax/security/auth/callback/TextOutputCallback.java b/libjava/classpath/javax/security/auth/callback/TextOutputCallback.java
index 197cece..0ab3a04 100644
--- a/libjava/classpath/javax/security/auth/callback/TextOutputCallback.java
+++ b/libjava/classpath/javax/security/auth/callback/TextOutputCallback.java
@@ -133,7 +133,7 @@ public class TextOutputCallback implements Callback, Serializable
{
if ((message == null) || (message.length() == 0))
{
- throw new IllegalArgumentException("invalid message");
+ throw new IllegalArgumentException("invalid message");
}
this.message = message;
}
diff --git a/libjava/classpath/javax/security/auth/kerberos/DelegationPermission.java b/libjava/classpath/javax/security/auth/kerberos/DelegationPermission.java
index 33e1f98..42bb9c7 100644
--- a/libjava/classpath/javax/security/auth/kerberos/DelegationPermission.java
+++ b/libjava/classpath/javax/security/auth/kerberos/DelegationPermission.java
@@ -64,12 +64,12 @@ public final class DelegationPermission
/**
* Create a new instance with the given name and actions.
- *
+ *
* The name consists of two parts: first the subordinate
* service principal, then the target service principal.
* Each principal is surrounded by quotes; the two are separated
* by a space.
- *
+ *
* @param name the name
* @param actions the actions; this is ignored
*/
diff --git a/libjava/classpath/javax/security/auth/kerberos/KerberosKey.java b/libjava/classpath/javax/security/auth/kerberos/KerberosKey.java
index 3372a16..e5735fb 100644
--- a/libjava/classpath/javax/security/auth/kerberos/KerberosKey.java
+++ b/libjava/classpath/javax/security/auth/kerberos/KerberosKey.java
@@ -50,7 +50,7 @@ import javax.security.auth.Destroyable;
* This class represents a Kerberos key. See the Kerberos
* authentication RFC for more information:
* RFC 1510.
- *
+ *
* @since 1.4
*/
public class KerberosKey
diff --git a/libjava/classpath/javax/security/auth/kerberos/KerberosPrincipal.java b/libjava/classpath/javax/security/auth/kerberos/KerberosPrincipal.java
index d52b5cf..4ba7672 100644
--- a/libjava/classpath/javax/security/auth/kerberos/KerberosPrincipal.java
+++ b/libjava/classpath/javax/security/auth/kerberos/KerberosPrincipal.java
@@ -107,7 +107,7 @@ public final class KerberosPrincipal
* Create a new instance with the given name and type. The name is
* parsed according to the rules in the RFC. If there is no realm,
* then the local realm is used instead.
- *
+ *
* @param name the principal's name
* @param type the principal's type
*/
@@ -202,6 +202,6 @@ public final class KerberosPrincipal
public String toString()
{
// This is what came to mind.
- return name + ":" + type;
+ return name + ":" + type;
}
}
diff --git a/libjava/classpath/javax/security/auth/kerberos/ServicePermission.java b/libjava/classpath/javax/security/auth/kerberos/ServicePermission.java
index 452f8e9..4412ea4 100644
--- a/libjava/classpath/javax/security/auth/kerberos/ServicePermission.java
+++ b/libjava/classpath/javax/security/auth/kerberos/ServicePermission.java
@@ -48,7 +48,7 @@ import java.util.Vector;
* This represents permission to access to a Kerberos service principal.
* See the Kerberos authentication RFC for more information:
* RFC 1510.
- *
+ *
* @since 1.4
*/
public final class ServicePermission
@@ -64,15 +64,15 @@ public final class ServicePermission
/**
* Create a new service permission with the indicated name and actions.
- *
+ *
* The name is the name of the kerberos principal for the service.
- *
+ *
* The actions are a comma-separated list of strings. The recognized
* actions are "initiate" and "accept". The "initiate" action means
* that the holder of the permission can access the service. The
* "accept" action means that the holder of the permission can operate
* as this service.
- *
+ *
* @param name the prinicpal's name
* @param action the allowed actions
*/
diff --git a/libjava/classpath/javax/security/auth/login/AccountNotFoundException.java b/libjava/classpath/javax/security/auth/login/AccountNotFoundException.java
index a052fbf..e74ca01 100644
--- a/libjava/classpath/javax/security/auth/login/AccountNotFoundException.java
+++ b/libjava/classpath/javax/security/auth/login/AccountNotFoundException.java
@@ -40,7 +40,7 @@ package javax.security.auth.login;
/**
* An exception indicating that an account was not found.
- * @since 1.5
+ * @since 1.5
*/
public class AccountNotFoundException extends AccountException
{
diff --git a/libjava/classpath/javax/security/auth/login/AppConfigurationEntry.java b/libjava/classpath/javax/security/auth/login/AppConfigurationEntry.java
index 3c8b64d..044c910 100644
--- a/libjava/classpath/javax/security/auth/login/AppConfigurationEntry.java
+++ b/libjava/classpath/javax/security/auth/login/AppConfigurationEntry.java
@@ -97,7 +97,7 @@ public class AppConfigurationEntry
public String toString()
{
-
+
return loginModuleName + "\t"
+ String.valueOf(controlFlag) + "\t"
+ String.valueOf(options);
diff --git a/libjava/classpath/javax/security/auth/login/LoginContext.java b/libjava/classpath/javax/security/auth/login/LoginContext.java
index 17641e6..b2e4b97 100644
--- a/libjava/classpath/javax/security/auth/login/LoginContext.java
+++ b/libjava/classpath/javax/security/auth/login/LoginContext.java
@@ -230,9 +230,9 @@ public class LoginContext
Exception cause = null;
try
{
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- Class c = Class.forName(entry.getLoginModuleName(), true, cl);
- module = (LoginModule) c.newInstance();
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ Class c = Class.forName(entry.getLoginModuleName(), true, cl);
+ module = (LoginModule) c.newInstance();
}
catch (ClassNotFoundException cnfe)
{
diff --git a/libjava/classpath/javax/security/sasl/Sasl.java b/libjava/classpath/javax/security/sasl/Sasl.java
index 52210d9..402ad6e 100644
--- a/libjava/classpath/javax/security/sasl/Sasl.java
+++ b/libjava/classpath/javax/security/sasl/Sasl.java
@@ -1,4 +1,4 @@
-/* Sasl.java --
+/* Sasl.java --
Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/sound/midi/ControllerEventListener.java b/libjava/classpath/javax/sound/midi/ControllerEventListener.java
index eb075b3..8349de0 100644
--- a/libjava/classpath/javax/sound/midi/ControllerEventListener.java
+++ b/libjava/classpath/javax/sound/midi/ControllerEventListener.java
@@ -41,9 +41,9 @@ package javax.sound.midi;
import java.util.EventListener;
/**
- * The interface defines the methods to be implemented by classes wanting
+ * The interface defines the methods to be implemented by classes wanting
* to be notified on MIDI controller events from a Sequencer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
diff --git a/libjava/classpath/javax/sound/midi/Instrument.java b/libjava/classpath/javax/sound/midi/Instrument.java
index f2821db..a8626fa 100644
--- a/libjava/classpath/javax/sound/midi/Instrument.java
+++ b/libjava/classpath/javax/sound/midi/Instrument.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* The abstract base class for all MIDI instruments.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -49,29 +49,29 @@ public abstract class Instrument extends SoundbankResource
{
// The instrument patch.
private Patch patch;
-
+
/**
* Create a new Instrument.
- *
+ *
* @param soundbank the Soundbank containing the instrument.
* @param patch the patch for this instrument
* @param name the name of this instrument
* @param dataClass the class used to represent sample data for this instrument
*/
- protected Instrument(Soundbank soundbank, Patch patch,
+ protected Instrument(Soundbank soundbank, Patch patch,
String name, Class> dataClass)
{
super(soundbank, name, dataClass);
- this.patch = patch;
+ this.patch = patch;
}
-
+
/**
* Get the patch for this instrument.
- *
+ *
* @return the patch for this instrument
*/
public Patch getPatch()
{
return patch;
- }
+ }
}
diff --git a/libjava/classpath/javax/sound/midi/InvalidMidiDataException.java b/libjava/classpath/javax/sound/midi/InvalidMidiDataException.java
index 9f56900..6325b04 100644
--- a/libjava/classpath/javax/sound/midi/InvalidMidiDataException.java
+++ b/libjava/classpath/javax/sound/midi/InvalidMidiDataException.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* This exception is thrown when we encounter bad MIDI data.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -48,7 +48,7 @@ package javax.sound.midi;
public class InvalidMidiDataException extends Exception
{
private static final long serialVersionUID = 2780771756789932067L;
-
+
/**
* Create an InvalidMidiDataException object.
*/
@@ -59,7 +59,7 @@ public class InvalidMidiDataException extends Exception
/**
* Create an InvalidMidiDataException object.
- *
+ *
* @param s the exception message string
*/
public InvalidMidiDataException(String s)
diff --git a/libjava/classpath/javax/sound/midi/MetaEventListener.java b/libjava/classpath/javax/sound/midi/MetaEventListener.java
index dd7b8a2..28a7a9d 100644
--- a/libjava/classpath/javax/sound/midi/MetaEventListener.java
+++ b/libjava/classpath/javax/sound/midi/MetaEventListener.java
@@ -41,9 +41,9 @@ package javax.sound.midi;
import java.util.EventListener;
/**
- * The interface defines the methods to be implemented by classes wanting
+ * The interface defines the methods to be implemented by classes wanting
* to be notified on MIDI meta events from a Sequencer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
diff --git a/libjava/classpath/javax/sound/midi/MetaMessage.java b/libjava/classpath/javax/sound/midi/MetaMessage.java
index f7c4fb4..4d43975 100644
--- a/libjava/classpath/javax/sound/midi/MetaMessage.java
+++ b/libjava/classpath/javax/sound/midi/MetaMessage.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* A system exclusive MIDI message.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,15 +51,15 @@ public class MetaMessage extends MidiMessage
* The META status code. Only valid for MIDI files, not the wire protocol.
*/
public static final int META = 0xFF;
-
+
// The length of the variable length data length encoding.
private int lengthLength = 0;
-
+
/**
* Create a default valid meta message.
- *
+ *
* The official specs don't specify what message is to be
- * created. For now, we create a zero length meta message
+ * created. For now, we create a zero length meta message
* with a type code of 0.
*/
public MetaMessage()
@@ -71,7 +71,7 @@ public class MetaMessage extends MidiMessage
data[3] = (byte) 0; // Length
lengthLength = 1;
}
-
+
/**
* Create a MetaMessage object.
* @param data a complete system exclusive message
@@ -84,10 +84,10 @@ public class MetaMessage extends MidiMessage
while ((data[index++] & 0x80) > 0)
lengthLength++;
}
-
+
/**
* Set the meta message.
- *
+ *
* @param type the meta type byte (< 128)
* @param data the message data
* @param length the length of the message data
@@ -101,9 +101,9 @@ public class MetaMessage extends MidiMessage
+ Integer.toHexString(type)
+ " must be less than 128");
- // For a nice description of how variable length values are handled,
+ // For a nice description of how variable length values are handled,
// see http://www.borg.com/~jglatt/tech/midifile.htm
-
+
// First compute the length of the length value
lengthLength = 0;
int lengthValue = length;
@@ -111,13 +111,13 @@ public class MetaMessage extends MidiMessage
lengthValue = lengthValue >> 7;
lengthLength++;
} while (lengthValue > 0);
-
+
// Now allocate our data array
this.length = 2 + lengthLength + length;
this.data = new byte[this.length];
this.data[0] = (byte) META;
this.data[1] = (byte) type;
-
+
// Now compute the length representation
long buffer = length & 0x7F;
while ((length >>= 7) > 0)
@@ -125,7 +125,7 @@ public class MetaMessage extends MidiMessage
buffer <<= 8;
buffer |= ((length & 0x7F) | 0x80);
}
-
+
// Now store the variable length length value
int index = 2;
do
@@ -135,25 +135,25 @@ public class MetaMessage extends MidiMessage
break;
buffer >>= 8;
} while (true);
-
+
// Now copy the real data.
System.arraycopy(data, 0, this.data, index, length);
}
-
+
/**
* Get the meta message type.
- *
+ *
* @return the meta message type
*/
public int getType()
{
return data[1];
}
-
+
/**
* Get the data for this message, not including the status,
* type, or length information.
- *
+ *
* @return the message data, not including status, type or lenght info
*/
public byte[] getData()
@@ -163,7 +163,7 @@ public class MetaMessage extends MidiMessage
System.arraycopy(data, 2 + lengthLength, result, 0, dataLength);
return result;
}
-
+
/* Create a deep-copy clone of this object.
* @see java.lang.Object#clone()
*/
@@ -171,6 +171,6 @@ public class MetaMessage extends MidiMessage
{
byte message[] = new byte[length];
System.arraycopy(data, 0, message, 0, length);
- return new MetaMessage(message);
+ return new MetaMessage(message);
}
}
diff --git a/libjava/classpath/javax/sound/midi/MidiChannel.java b/libjava/classpath/javax/sound/midi/MidiChannel.java
index fe3b511..36da51d 100644
--- a/libjava/classpath/javax/sound/midi/MidiChannel.java
+++ b/libjava/classpath/javax/sound/midi/MidiChannel.java
@@ -40,22 +40,22 @@ package javax.sound.midi;
/**
* A MIDI channel.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
*/
public interface MidiChannel
{
-
+
/**
* Start playing a note.
- *
+ *
* @param noteNumber the MIDI note number
* @param velocity the velocity at which the key was pressed
*/
public void noteOn(int noteNumber, int velocity);
-
+
/**
* Stop playing a note.
*
@@ -63,173 +63,173 @@ public interface MidiChannel
* @param velocity the volcity at which the ket was released
*/
public void noteOff(int noteNumber, int velocity);
-
+
/**
* Stop playing a note.
- *
+ *
* @param noteNumber the MIDI note number
*/
public void noteOff(int noteNumber);
-
+
/**
* Change in a key pressure for a note.
- *
+ *
* @param noteNumber the MIDI note number
* @param pressure the key pressure
*/
public void setPolyPressure(int noteNumber, int pressure);
-
+
/**
* Get the key pressure for a note.
- *
+ *
* @param noteNumber the MIDI note number
* @return the key pressure
*/
public int getPolyPressure(int noteNumber);
-
+
/**
* Set the key pressure for the channel.
- *
+ *
* @param pressure the key pressure
*/
public void setChannelPressure(int pressure);
-
+
/**
* Get the key pressure for the channel.
- *
+ *
* @return the key pressure
*/
public int getChannelPressure();
-
+
/**
* Set a change in a controller's value.
- *
+ *
* @param controller the MIDI controller number (0 to 127)
* @param value the new value (0 to 127)
*/
public void controlChange(int controller, int value);
-
+
/**
* Get a controller's value.
- *
+ *
* @param controller the MIDI controller number (0 to 127)
* @return the controller's value (0 to 127)
*/
public int getController(int controller);
-
+
/**
* Change the patch for this channel.
- *
+ *
* @param program the patch number to switch to (0 to 127)
*/
public void programChange(int program);
-
+
/**
* Change the bank and patch for this channel.
- *
+ *
* @param bank the bank to switch to (0 to 16383)
* @param program the patch to switch to (0 to 127)
*/
public void programChange(int bank, int program);
-
+
/**
* Get the current patch for this channel.
- *
+ *
* @return current patch (0 to 127)
*/
public int getProgram();
-
+
/**
* Change the pitch bend for this channel using a positive 14-bit value.
- *
+ *
* @param bend the new pitch bend value
*/
public void setPitchBend(int bend);
-
+
/**
* Get the pitch bend for this channel as a positive 14-bit value.
- *
+ *
* @return the current patch bend value
*/
public int getPitchBend();
-
+
/**
* Reset all MIDI controllers to their default values.
*/
public void resetAllControllers();
-
+
/**
* Stop playing all notes. Sound may not stop.
*/
public void allNotesOff();
-
+
/**
* Stop all sound.
*/
public void allSoundOff();
-
+
/**
* Set whether or not local controls are on or off. They are on by
* default.
- *
+ *
* @param on true to enable local controls, false to disable
* @return the new value
*/
public boolean localControl(boolean on);
-
+
/**
* Turns mono mode on or off.
- *
- * @param on true to enable mono mode, false to disable
+ *
+ * @param on true to enable mono mode, false to disable
*/
public void setMono(boolean on);
-
+
/**
* Get the current mono mode.
- *
+ *
* @return true if mono is enabled, false otherwise
*/
public boolean getMono();
-
+
/**
* Turns omni mode on or off.
- *
+ *
* @param on true to enable omni mode, false to disable
*/
public void setOmni(boolean on);
-
+
/**
* Get the current omni mode.
- *
+ *
* @return true if omni is enabled, false otherwise
*/
public boolean getOmni();
-
+
/**
* Turns mute mode on or off.
- *
+ *
* @param mute true to enable mute mode, false to disable
*/
public void setMute(boolean mute);
-
+
/**
* Get the current mute mode.
- *
+ *
* @return true if mute is enabled, false otherwise
*/
public boolean getMute();
-
+
/**
* Turns solo mode on or off. If any channels are soloed, then only those
* channels make sounds, otherwise all channels will make sound.
- *
+ *
* @param solo true to enable solo mode, false to disable
*/
public void setSolo(boolean solo);
-
+
/**
* Get the current solo mode.
- *
+ *
* @return true is solo is enabled, false otherwise.
*/
public boolean getSolo();
diff --git a/libjava/classpath/javax/sound/midi/MidiDevice.java b/libjava/classpath/javax/sound/midi/MidiDevice.java
index 387ccea..7a0ca7f 100644
--- a/libjava/classpath/javax/sound/midi/MidiDevice.java
+++ b/libjava/classpath/javax/sound/midi/MidiDevice.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* Interface for all MIDI devices.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -52,69 +52,69 @@ public interface MidiDevice
* @return the Info object describing this device
*/
public Info getDeviceInfo();
-
+
/**
* Open this MIDI device and allocate any system resource we need.
- *
+ *
* @throws MidiUnavailableException if we're not able to open for some reason
*/
public void open() throws MidiUnavailableException;
-
+
/**
* Close this MIDI device, and release any system resources we're using.
*/
public void close();
-
+
/**
* Returns true if this MIDI device is open and false otherwise.
- *
+ *
* @return true if this is open, false otherwise
*/
public boolean isOpen();
-
+
/**
* If this device supports time-stamps, then it will return the number
* of microseconds since this device has been open, and -1 otherwise.
- *
+ *
* @return -1 or the number of microseconds since this was opened
*/
public long getMicrosecondPosition();
-
+
/**
* The maximum number of MIDI IN connections we can get as Receivers,
* or -1 if there is no maximum.
- *
+ *
* @return -1 or the maximum number of Receivers we can get
*/
public int getMaxReceivers();
-
+
/**
* The maximum number of MIDI OUT connections we can get as Transmitters,
* or -1 if there is no maximum.
- *
+ *
* @return -1 or the maximum number of Transmitters we can get
*/
public int getMaxTransmitters();
-
+
/**
* Get a MIDI IN Receiver for this device.
- *
+ *
* @return a MIDI IN Receiver for this device
* @throws MidiUnavailableException if we can't get a Receiver
*/
public Receiver getReceiver() throws MidiUnavailableException;
-
+
/**
* Get a MIDI OUT Transmitter for this device.
- *
+ *
* @return a MIDI OUT Transmitter for this device
* @throws MidiUnavailableException if we can't get a Transmitter
*/
public Transmitter getTransmitter() throws MidiUnavailableException;
-
+
/**
* A MIDI device descriptor object.
- *
+ *
* @author green@redhat.com
*
*/
@@ -125,10 +125,10 @@ public interface MidiDevice
private String vendor;
private String description;
private String version;
-
+
/**
* Create an Info object for a MIDI device
- *
+ *
* @param name the device name
* @param vendor the vendor name
* @param description the device description
@@ -141,11 +141,11 @@ public interface MidiDevice
this.description = description;
this.version = version;
}
-
+
/**
* This equals method only returns true if this object
* is the same as obj.
- *
+ *
* @param obj the object we're comparing to
* @return true if this is the same object
* @see java.lang.Object#equals(java.lang.Object)
@@ -154,10 +154,10 @@ public interface MidiDevice
{
return super.equals(obj);
}
-
+
/**
* A hash code for this object.
- *
+ *
* @return the hash code for this object
* @see java.lang.Object#hashCode()
*/
@@ -165,50 +165,50 @@ public interface MidiDevice
{
return super.hashCode();
}
-
+
/**
* Get the device name.
- *
+ *
* @return the device name
*/
public final String getName()
{
return name;
}
-
+
/**
* Get the device vendor.
- *
+ *
* @return the device vendor
*/
public final String getVendor()
{
return vendor;
}
-
+
/**
* Get the device description
- *
+ *
* @return the device description
*/
public final String getDescription()
{
return description;
}
-
+
/**
* get the device version
- *
+ *
* @return the device version
*/
public final String getVersion()
{
return version;
}
-
+
/**
* Simple return the name of the device.
- *
+ *
* @return the device name
* @see java.lang.Object#toString()
*/
diff --git a/libjava/classpath/javax/sound/midi/MidiEvent.java b/libjava/classpath/javax/sound/midi/MidiEvent.java
index 3ca5c21..3b0072c 100644
--- a/libjava/classpath/javax/sound/midi/MidiEvent.java
+++ b/libjava/classpath/javax/sound/midi/MidiEvent.java
@@ -41,7 +41,7 @@ package javax.sound.midi;
/**
* A MIDI event is the combination of a MIDI message and a timestamp specified
* in MIDI ticks.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -50,10 +50,10 @@ public class MidiEvent
{
private final MidiMessage message;
private long tick;
-
+
/**
* Create a MIDI event object from the given MIDI message and timestamp.
- *
+ *
* @param message the MidiMessage for this event
* @param tick the timestamp for this event
*/
@@ -62,30 +62,30 @@ public class MidiEvent
this.message = message;
this.tick = tick;
}
-
+
/**
* Get the MIDI message for this event.
- *
+ *
* @return the MidiMessage for this event
*/
public MidiMessage getMessage()
{
return message;
}
-
+
/**
* Set the timestemp for this event in MIDI ticks.
- *
+ *
* @param tick the timestamp
*/
public void setTick(long tick)
{
this.tick = tick;
}
-
+
/**
* Get the timestamp for this event in MIDI ticks.
- *
+ *
* @return the timestamp for this even in MIDI ticks
*/
public long getTick()
diff --git a/libjava/classpath/javax/sound/midi/MidiFileFormat.java b/libjava/classpath/javax/sound/midi/MidiFileFormat.java
index 79fa9fe..7374452 100644
--- a/libjava/classpath/javax/sound/midi/MidiFileFormat.java
+++ b/libjava/classpath/javax/sound/midi/MidiFileFormat.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* Describe a MIDI file, including specifics about its type, length and timing.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -48,44 +48,44 @@ package javax.sound.midi;
public class MidiFileFormat
{
/**
- * The MIDI file type. This is either 0, 1 or 2.
- *
+ * The MIDI file type. This is either 0, 1 or 2.
+ *
* Type 0 files contain a single track and represents a single song
* performance.
* Type 1 may contain multiple tracks for a single song performance.
* Type 2 may contain multiple tracks, each representing a
* separate song performance.
- *
+ *
* See http://en.wikipedia.org/wiki/MIDI#MIDI_file_formats for more
* information.
*/
protected int type;
/**
- * The division type of the MIDI file.
+ * The division type of the MIDI file.
*/
protected float divisionType;
-
+
/**
* The timing resolution of the MIDI file.
*/
protected int resolution;
-
+
/**
- * The size of the MIDI file in bytes.
+ * The size of the MIDI file in bytes.
*/
protected int byteLength = UNKNOWN_LENGTH;
-
+
/**
- * The length of the MIDI file in microseconds.
+ * The length of the MIDI file in microseconds.
*/
protected long microsecondLength = UNKNOWN_LENGTH;
-
+
/**
* A special value indicating an unknown quantity.
*/
public static final int UNKNOWN_LENGTH = -1; // FIXME is this really -1?
-
+
/**
* Create a MidiFileFormat object from the given parameters.
*
@@ -95,8 +95,8 @@ public class MidiFileFormat
* @param bytes the MIDI file size in bytes
* @param microseconds the MIDI file length in microseconds
*/
- public MidiFileFormat(int type, float divisionType,
- int resolution, int bytes, long microseconds)
+ public MidiFileFormat(int type, float divisionType,
+ int resolution, int bytes, long microseconds)
{
this.type = type;
this.divisionType = divisionType;
@@ -104,41 +104,41 @@ public class MidiFileFormat
this.byteLength = bytes;
this.microsecondLength = microseconds;
}
-
+
/**
* Get the MIDI file type (0, 1, or 2).
- *
+ *
* @return the MIDI file type (0, 1, or 2)
*/
public int getType()
{
return type;
}
-
+
/**
* Get the file division type.
- *
+ *
* @return the file divison type
*/
public float getDivisionType()
{
- return divisionType;
+ return divisionType;
}
-
+
/**
* Get the file timing resolution. If the division type is PPQ, then this
* is value represents ticks per beat, otherwise it's ticks per frame (SMPTE).
- *
+ *
* @return the timing resolution in ticks per beat or ticks per frame
*/
public int getResolution()
{
return resolution;
}
-
+
/**
* Get the file length in bytes.
- *
+ *
* @return the file length in bytes or UNKNOWN_LENGTH
*/
public int getByteLength()
@@ -148,7 +148,7 @@ public class MidiFileFormat
/**
* Get the file length in microseconds.
- *
+ *
* @return the file length in microseconds or UNKNOWN_LENGTH
*/
public long getMicrosecondLength()
diff --git a/libjava/classpath/javax/sound/midi/MidiMessage.java b/libjava/classpath/javax/sound/midi/MidiMessage.java
index e265b5e..8066151 100644
--- a/libjava/classpath/javax/sound/midi/MidiMessage.java
+++ b/libjava/classpath/javax/sound/midi/MidiMessage.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* The base class for all MIDI messages.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,15 +51,15 @@ public abstract class MidiMessage implements Cloneable
* MIDI message data.
*/
protected byte data[];
-
+
/**
* The total length of the MIDI message.
*/
protected int length;
-
+
/**
* MidiMessage contructor.
- *
+ *
* @param data a valid MIDI message
*/
protected MidiMessage(byte[] data)
@@ -67,59 +67,59 @@ public abstract class MidiMessage implements Cloneable
this.data = data;
this.length = data.length;
}
-
+
/**
* Set the complete MIDI message.
- *
+ *
* @param data The complete MIDI message.
* @param length The length of the MIDI message.
* @throws InvalidMidiDataException Thrown when the MIDI message is invalid.
*/
- protected void setMessage(byte[] data, int length)
+ protected void setMessage(byte[] data, int length)
throws InvalidMidiDataException
{
this.data = new byte[length];
System.arraycopy(data, 0, this.data, 0, length);
this.length = length;
}
-
+
/**
* Get the MIDI message data.
- *
+ *
* @return an array containing the MIDI message data
*/
public byte[] getMessage()
{
byte copy[] = new byte[length];
System.arraycopy(data, 0, copy, 0, length);
- return copy;
+ return copy;
}
-
+
/**
* Get the status byte of the MIDI message (as an int)
- *
+ *
* @return the status byte of the MIDI message (as an int), or zero if the message length is zero.
*/
public int getStatus()
{
if (length > 0)
return (data[0] & 0xff);
- else
+ else
return 0;
}
-
+
/**
* Get the length of the MIDI message.
- *
+ *
* @return the length of the MIDI messsage
*/
public int getLength()
{
return length;
}
-
+
/* Create a clone of this object.
- *
+ *
* @see java.lang.Object#clone()
*/
public abstract Object clone();
diff --git a/libjava/classpath/javax/sound/midi/MidiSystem.java b/libjava/classpath/javax/sound/midi/MidiSystem.java
index 627dd95..b273b98 100644
--- a/libjava/classpath/javax/sound/midi/MidiSystem.java
+++ b/libjava/classpath/javax/sound/midi/MidiSystem.java
@@ -55,9 +55,9 @@ import javax.sound.midi.spi.MidiFileWriter;
import javax.sound.midi.spi.SoundbankReader;
/**
- * MidiSystem provides access to the computer system's MIDI resources,
+ * MidiSystem provides access to the computer system's MIDI resources,
* as well as utility routines for reading MIDI files and more.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -71,15 +71,15 @@ public class MidiSystem
/**
* Get an array of all available MIDI devices.
- *
+ *
* @return a possibly empty array of all available MIDI devices
*/
public static MidiDevice.Info[] getMidiDeviceInfo()
{
- Iterator deviceProviders =
- ServiceFactory.lookupProviders(MidiDeviceProvider.class);
+ Iterator deviceProviders =
+ ServiceFactory.lookupProviders(MidiDeviceProvider.class);
List infoList = new ArrayList();
-
+
while (deviceProviders.hasNext())
{
MidiDeviceProvider provider = (MidiDeviceProvider) deviceProviders.next();
@@ -87,44 +87,44 @@ public class MidiSystem
for (int i = infos.length; i > 0; )
infoList.add(infos[--i]);
}
-
- return (MidiDevice.Info[])
- infoList.toArray(new MidiDevice.Info[infoList.size()]);
+
+ return (MidiDevice.Info[])
+ infoList.toArray(new MidiDevice.Info[infoList.size()]);
}
-
+
/**
* Get the specified MIDI device.
- *
+ *
* @param info a description of the device we're looking for
* @return the requested MIDI device
* @throws MidiUnavailableException if no MIDI devices are configured or found
* @throws IllegalArgumentException if the device described by info is not found
*/
- public static MidiDevice getMidiDevice(MidiDevice.Info info)
+ public static MidiDevice getMidiDevice(MidiDevice.Info info)
throws MidiUnavailableException
{
- Iterator deviceProviders =
- ServiceFactory.lookupProviders(MidiDeviceProvider.class);
-
+ Iterator deviceProviders =
+ ServiceFactory.lookupProviders(MidiDeviceProvider.class);
+
if (! deviceProviders.hasNext())
throw new MidiUnavailableException("No MIDI device providers available.");
-
+
do
{
- MidiDeviceProvider provider =
+ MidiDeviceProvider provider =
(MidiDeviceProvider) deviceProviders.next();
if (provider.isDeviceSupported(info))
return provider.getDevice(info);
} while (deviceProviders.hasNext());
-
- throw new IllegalArgumentException("MIDI device "
- + info + " not available.");
+
+ throw new IllegalArgumentException("MIDI device "
+ + info + " not available.");
}
-
+
/**
* Get the default Receiver instance. This just picks the first one
* it finds for now.
- *
+ *
* @return the default Receiver instance
* @throws MidiUnavailableException if no Receiver is found
*/
@@ -145,7 +145,7 @@ public class MidiSystem
/**
* Get the default Transmitter instance. This just picks the first one
* it finds for now.
- *
+ *
* @return the default Transmitter instance
* @throws MidiUnavailableException if no Transmitter is found
*/
@@ -166,7 +166,7 @@ public class MidiSystem
/**
* Get the default Synthesizer instance. This just picks the first one
* it finds for now.
- *
+ *
* @return the default Synthesizer instance
* @throws MidiUnavailableException if no Synthesizer is found
*/
@@ -183,11 +183,11 @@ public class MidiSystem
}
throw new MidiUnavailableException("No Synthesizer device available");
}
-
+
/**
* Get the default Sequencer instance. This just picks the first one
* it finds for now.
- *
+ *
* @return the default Sequencer instance
* @throws MidiUnavailableException if no Sequencer is found
*/
@@ -203,11 +203,11 @@ public class MidiSystem
return (Sequencer) device;
}
throw new MidiUnavailableException("No Sequencer device available");
- }
-
+ }
+
/**
* Read a Soundbank object from the given stream.
- *
+ *
* @param stream the stream from which to read the Soundbank
* @return the Soundbank object
* @throws InvalidMidiDataException if we were unable to read the soundbank
@@ -229,7 +229,7 @@ public class MidiSystem
/**
* Read a Soundbank object from the given url.
- *
+ *
* @param url the url from which to read the Soundbank
* @return the Soundbank object
* @throws InvalidMidiDataException if we were unable to read the soundbank
@@ -251,7 +251,7 @@ public class MidiSystem
/**
* Read a Soundbank object from the given file.
- *
+ *
* @param file the file from which to read the Soundbank
* @return the Soundbank object
* @throws InvalidMidiDataException if we were unable to read the soundbank
@@ -268,13 +268,13 @@ public class MidiSystem
if (sb != null)
return sb;
}
- throw new InvalidMidiDataException("Cannot read soundbank from file "
- + file);
- }
+ throw new InvalidMidiDataException("Cannot read soundbank from file "
+ + file);
+ }
/**
* Read a MidiFileFormat object from the given stream.
- *
+ *
* @param stream the stream from which to read the MidiFileFormat
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if we were unable to read the MidiFileFormat
@@ -296,7 +296,7 @@ public class MidiSystem
/**
* Read a MidiFileFormat object from the given url.
- *
+ *
* @param url the url from which to read the MidiFileFormat
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if we were unable to read the MidiFileFormat
@@ -318,7 +318,7 @@ public class MidiSystem
/**
* Read a MidiFileFormat object from the given file.
- *
+ *
* @param file the file from which to read the MidiFileFormat
* @return the MidiFileFormat object
* @throws InvalidMidiDataException if we were unable to read the MidiFileFormat
@@ -335,13 +335,13 @@ public class MidiSystem
if (sb != null)
return sb;
}
- throw new InvalidMidiDataException("Can't read MidiFileFormat from file "
+ throw new InvalidMidiDataException("Can't read MidiFileFormat from file "
+ file);
- }
-
+ }
+
/**
* Read a Sequence object from the given stream.
- *
+ *
* @param stream the stream from which to read the Sequence
* @return the Sequence object
* @throws InvalidMidiDataException if we were unable to read the Sequence
@@ -363,7 +363,7 @@ public class MidiSystem
/**
* Read a Sequence object from the given url.
- *
+ *
* @param url the url from which to read the Sequence
* @return the Sequence object
* @throws InvalidMidiDataException if we were unable to read the Sequence
@@ -385,7 +385,7 @@ public class MidiSystem
/**
* Read a Sequence object from the given file.
- *
+ *
* @param file the file from which to read the Sequence
* @return the Sequence object
* @throws InvalidMidiDataException if we were unable to read the Sequence
@@ -402,13 +402,13 @@ public class MidiSystem
if (sq != null)
return sq;
}
- throw new InvalidMidiDataException("Can't read Sequence from file "
+ throw new InvalidMidiDataException("Can't read Sequence from file "
+ file);
- }
-
+ }
+
/**
* Return an array of supported MIDI file types on this system.
- *
+ *
* @return the array of supported MIDI file types
*/
public static int[] getMidiFileTypes()
@@ -443,7 +443,7 @@ public class MidiSystem
/**
* Return true if the system supports writing files of type fileType.
- *
+ *
* @param fileType the MIDI file type we want to write
* @return true if we can write fileType files, false otherwise
*/
@@ -453,17 +453,17 @@ public class MidiSystem
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
-
+
if (fw.isFileTypeSupported(fileType))
return true;
}
return false;
}
-
+
/**
* Return an array of supported MIDI file types on this system
* for the given sequnce.
- *
+ *
* @param sequence the sequnce to write
* @return the array of supported MIDI file types
*/
@@ -496,11 +496,11 @@ public class MidiSystem
}
return result;
}
-
+
/**
* Return true if the system supports writing files of type fileType
* for the given sequence.
- *
+ *
* @param fileType the MIDI file type we want to write
* @param sequence the Sequence we want to write
* @return true if we can write fileType files for sequence, false otherwise
@@ -511,7 +511,7 @@ public class MidiSystem
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
-
+
if (fw.isFileTypeSupported(fileType, sequence))
return true;
}
@@ -520,7 +520,7 @@ public class MidiSystem
/**
* Write a sequence to an output stream using a specific MIDI file format.
- *
+ *
* @param in the sequence to write
* @param fileType the MIDI file format to use
* @param out the output stream to write to
@@ -535,17 +535,17 @@ public class MidiSystem
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
-
+
if (fw.isFileTypeSupported(fileType, in))
return fw.write(in, fileType, out);
}
- throw new IllegalArgumentException("File type "
- + fileType + " is not supported");
+ throw new IllegalArgumentException("File type "
+ + fileType + " is not supported");
}
/**
* Write a sequence to a file using a specific MIDI file format.
- *
+ *
* @param in the sequence to write
* @param fileType the MIDI file format to use
* @param out the file to write to
@@ -560,12 +560,11 @@ public class MidiSystem
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
-
+
if (fw.isFileTypeSupported(fileType, in))
return fw.write(in, fileType, out);
}
- throw new IllegalArgumentException("File type "
- + fileType + " is not supported");
+ throw new IllegalArgumentException("File type "
+ + fileType + " is not supported");
}
}
-
diff --git a/libjava/classpath/javax/sound/midi/MidiUnavailableException.java b/libjava/classpath/javax/sound/midi/MidiUnavailableException.java
index a992c16..5403e42 100644
--- a/libjava/classpath/javax/sound/midi/MidiUnavailableException.java
+++ b/libjava/classpath/javax/sound/midi/MidiUnavailableException.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* This exception is thrown when MIDI resources are not available.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -48,7 +48,7 @@ package javax.sound.midi;
public class MidiUnavailableException extends Exception
{
private static final long serialVersionUID = 6093809578628944323L;
-
+
/**
* Create a MidiUnavailableException.
*/
@@ -59,7 +59,7 @@ public class MidiUnavailableException extends Exception
/**
* Create an MidiUnavailableException object.
- *
+ *
* @param s the exception message string
*/
public MidiUnavailableException(String s)
diff --git a/libjava/classpath/javax/sound/midi/Patch.java b/libjava/classpath/javax/sound/midi/Patch.java
index eb9d8bc..75e347f 100644
--- a/libjava/classpath/javax/sound/midi/Patch.java
+++ b/libjava/classpath/javax/sound/midi/Patch.java
@@ -40,7 +40,7 @@ package javax.sound.midi;
/**
* A Patch describes where an Instrument is loaded on a Synthesizer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -50,11 +50,11 @@ public class Patch
// Private data describing the patch
private int bank = 0;
private int program = 0;
-
+
/**
* Create a Patch object, specifying the bank and program in which this Patch
* is located.
- *
+ *
* @param bank the bank in which this Patch is located
* @param program the program in which this Patch is located
*/
@@ -63,20 +63,20 @@ public class Patch
this.bank = bank;
this.program = program;
}
-
+
/**
* Get the bank in which this Patch is located.
- *
+ *
* @return the bank in which this Patch is located
*/
public int getBank()
{
return bank;
}
-
+
/**
* Get the program in which this Patch is located.
- *
+ *
* @return the program in which this Patch is located
*/
public int getProgram()
diff --git a/libjava/classpath/javax/sound/midi/Receiver.java b/libjava/classpath/javax/sound/midi/Receiver.java
index 0e70b28..bc660d0 100644
--- a/libjava/classpath/javax/sound/midi/Receiver.java
+++ b/libjava/classpath/javax/sound/midi/Receiver.java
@@ -41,7 +41,7 @@ package javax.sound.midi;
/**
* This interface describes the methods required by objects receiving MIDI
* messages.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -51,14 +51,14 @@ public interface Receiver
/**
* Send a MIDI message and timestamp. Some receivers don't support
* timestamps, in which case timeStamp should be -1.
- *
+ *
* @param message the MIDI message to send
* @param timeStamp time timestamp for this message in microseconds (or -1)
* @throws IllegalStateException if the receiver is closed
*/
public void send(MidiMessage message, long timeStamp)
throws IllegalStateException;
-
+
/**
* Close this receiver, possibly freeing system resources.
*/
diff --git a/libjava/classpath/javax/sound/midi/Sequence.java b/libjava/classpath/javax/sound/midi/Sequence.java
index 2ea201c..833150a 100644
--- a/libjava/classpath/javax/sound/midi/Sequence.java
+++ b/libjava/classpath/javax/sound/midi/Sequence.java
@@ -42,9 +42,9 @@ import java.util.Iterator;
import java.util.Vector;
/**
- * Objects of this type represent sequences of MIDI messages that can be
+ * Objects of this type represent sequences of MIDI messages that can be
* played back by a Sequencer.
- *
+ *
* @author Anthony Green (green@redhat.com)
* @since 1.3
*
@@ -52,69 +52,69 @@ import java.util.Vector;
public class Sequence
{
/**
- * The timing division type for this sequence (PPQ or SMPTE*)
+ * The timing division type for this sequence (PPQ or SMPTE*)
*/
protected float divisionType;
-
+
/**
- * The timing resolution in ticks/beat or ticks/frame, depending on the
- * division type.
+ * The timing resolution in ticks/beat or ticks/frame, depending on the
+ * division type.
*/
protected int resolution;
-
+
/**
- * The MIDI tracks used by this sequence.
+ * The MIDI tracks used by this sequence.
*/
protected Vector
+ *
* @param minimum the lower bound of the value range.
* @param maximum the upper bound of the value range.
*/
@@ -305,13 +305,13 @@ public class JProgressBar extends JComponent implements SwingConstants,
*
*
*
value: minimum;
- *
- *
+ *
+ *
* @param minimum the lower bound of the value range.
* @param maximum the upper bound of the value range.
- * @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 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}.
- *
- *
+ *
+ *
* @param model the model (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 JRadioButtons
* 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:
*
* The various behavioural aspects of these properties follows:
*
- *
+ *
*
*
* When a non-bound property stored in the slider changes, the slider fires
@@ -100,11 +100,11 @@ import javax.swing.plaf.UIResource;
* {@link PropertyChangeEvent} to its property change listeners.
*
*
- * If any of the model's properties change, it fires a {@link ChangeEvent} to
+ * If any of the model's properties change, it fires a {@link ChangeEvent} to
* its listeners, which include the slider.
*
*
- * If the slider receives a {@link ChangeEvent} from its model, it will
+ * If the slider receives a {@link ChangeEvent} from its model, it will
* propagate the event to its own change listeners, with the event's "source"
* property set to refer to the slider, rather than the model.
*
@@ -140,7 +140,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
implements AccessibleValue
{
private static final long serialVersionUID = -6301740148041106789L;
-
+
/**
* Creates a new 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:
*
*
- *
the minimum value is stored in the slider's model (see
+ *
the minimum value is stored in the slider's model (see
* {@link #getModel()});
- *
in addition to the property change event, the slider also fires a
+ *
in addition to the property change event, the slider also fires a
* {@link ChangeEvent}.
*
- *
+ *
* @param minimum The minimum value of the slider.
- *
+ *
* @see #getMinimum()
*/
public void setMinimum(int minimum)
@@ -619,7 +619,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the slider's maximum value (obtained from the slider's model).
*
* @return The maximum value of the slider.
- *
+ *
* @see #setMaximum(int)
*/
public int getMaximum()
@@ -628,19 +628,19 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
}
/**
- * Sets the maximum value of the slider and fires a
+ * Sets the maximum value of the slider and fires a
* {@link PropertyChangeEvent} (with the property name "maximum") to all
* registered listeners. Note that:
*
*
- *
the maximum value is stored in the slider's model (see
+ *
the maximum value is stored in the slider's model (see
* {@link #getModel()});
- *
in addition to the property change event, the slider also fires a
+ *
in addition to the property change event, the slider also fires a
* {@link ChangeEvent}.
*
*
* @param maximum The maximum value of the slider.
- *
+ *
* @see #getMaximum()
*/
public void setMaximum(int maximum)
@@ -655,7 +655,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible,
* Returns the 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;
/**
- *
+ *
*
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:
*
@@ -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:
*
*
*
@@ -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 ActionEvents. 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
{
final String className = s;
inner = new LazyValue()
- {
- public Object createValue(UIDefaults table)
+ {
+ public Object createValue(UIDefaults table)
{
try
{
@@ -152,11 +152,11 @@ public class UIDefaults extends Hashtable
final String className = c;
final String methodName = m;
inner = new LazyValue()
- {
- public Object createValue(UIDefaults table)
+ {
+ public Object createValue(UIDefaults table)
{
- try
- {
+ try
+ {
return Class
.forName(className)
.getMethod(methodName, new Class[] {})
@@ -169,7 +169,7 @@ public class UIDefaults extends Hashtable
}
};
}
-
+
public ProxyLazyValue(String c, Object[] os)
{
final String className = c;
@@ -178,20 +178,20 @@ public class UIDefaults extends Hashtable
for (int i = 0; i < objs.length; ++i)
{
clss[i] = objs[i].getClass();
- }
+ }
inner = new LazyValue()
- {
- public Object createValue(UIDefaults table)
- {
+ {
+ public Object createValue(UIDefaults table)
+ {
try
{
return Class
.forName(className)
.getConstructor(clss)
.newInstance(objs);
- }
+ }
catch (Exception e)
- {
+ {
return null;
}
}
@@ -205,14 +205,14 @@ public class UIDefaults extends Hashtable
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()
- {
- public Object createValue(UIDefaults table)
- {
- try
+ {
+ public Object createValue(UIDefaults table)
+ {
+ try
{
return Class
.forName(className)
@@ -226,7 +226,7 @@ public class UIDefaults extends Hashtable
}
};
}
-
+
public Object createValue(UIDefaults table)
{
return inner.createValue(table);
@@ -257,7 +257,7 @@ public class UIDefaults extends Hashtable
public UIDefaults(Object[] entries)
{
this();
-
+
for (int i = 0; (2 * i + 1) < entries.length; ++i)
put(entries[2 * i], entries[2 * i + 1]);
}
@@ -293,14 +293,14 @@ public class UIDefaults extends Hashtable
String keyString = (String) key;
ListIterator i = bundles.listIterator(0);
while (i.hasNext())
- {
+ {
String bundle_name = (String) i.next();
ResourceBundle res =
ResourceBundle.getBundle(bundle_name, loc);
if (res != null)
{
- try
- {
+ try
+ {
obj = res.getObject(keyString);
break;
}
@@ -329,7 +329,7 @@ public class UIDefaults extends Hashtable
else if (obj instanceof ActiveValue)
{
return ((ActiveValue) obj).createValue(this);
- }
+ }
return obj;
}
@@ -582,7 +582,7 @@ public class UIDefaults extends Hashtable
*
* @param key the key to the requested entry
*
- * @return The boolean entry for key or false if no
+ * @return The boolean entry for key or false if no
* such entry exists.
*/
public boolean getBoolean(Object key)
@@ -612,7 +612,7 @@ public class UIDefaults extends Hashtable
* @return the insets entry for key or null if no such entry
* exists
*/
- public Insets getInsets(Object key)
+ public Insets getInsets(Object key)
{
Object o = get(key);
return o instanceof Insets ? (Insets) o : null;
@@ -627,7 +627,7 @@ public class UIDefaults extends Hashtable
* @return the boolean entry for key or null if no such entry
* exists
*/
- public Insets getInsets(Object key, Locale locale)
+ public Insets getInsets(Object key, Locale locale)
{
Object o = get(key, locale);
return o instanceof Insets ? (Insets) o : null;
@@ -641,7 +641,7 @@ public class UIDefaults extends Hashtable
* @return the dimension entry for key or null if no such entry
* exists
*/
- public Dimension getDimension(Object key)
+ public Dimension getDimension(Object key)
{
Object o = get(key);
return o instanceof Dimension ? (Dimension) o : null;
@@ -656,7 +656,7 @@ public class UIDefaults extends Hashtable
* @return the boolean entry for key or null if no such entry
* exists
*/
- public Dimension getDimension(Object key, Locale locale)
+ public Dimension getDimension(Object key, Locale locale)
{
Object o = get(key, locale);
return o instanceof Dimension ? (Dimension) o : null;
@@ -677,7 +677,7 @@ public class UIDefaults extends Hashtable
String className = (String) get(id);
if (className == null)
return null;
- try
+ try
{
if (loader == null)
loader = ClassLoader.getSystemClassLoader();
@@ -733,7 +733,7 @@ public class UIDefaults extends Hashtable
Method factory;
- try
+ try
{
factory = cls.getMethod ("createUI", new Class[] { JComponent.class } );
}
@@ -749,14 +749,14 @@ public class UIDefaults extends Hashtable
}
catch (java.lang.reflect.InvocationTargetException ite)
{
- getUIError ("InvocationTargetException ("+ ite.getTargetException()
- +") calling createUI(...) on " + cls.toString ());
- return null;
+ getUIError ("InvocationTargetException ("+ ite.getTargetException()
+ +") calling createUI(...) on " + cls.toString ());
+ return null;
}
catch (Exception e)
{
getUIError ("exception calling createUI(...) on " + cls.toString ());
- return null;
+ return null;
}
}
@@ -800,7 +800,7 @@ public class UIDefaults extends Hashtable
* @param newValue the new value
*/
protected void firePropertyChange(String property,
- Object oldValue, Object newValue)
+ Object oldValue, Object newValue)
{
propertyChangeSupport.firePropertyChange(property, oldValue, newValue);
}
diff --git a/libjava/classpath/javax/swing/UIManager.java b/libjava/classpath/javax/swing/UIManager.java
index 0369b65..05a3fce 100644
--- a/libjava/classpath/javax/swing/UIManager.java
+++ b/libjava/classpath/javax/swing/UIManager.java
@@ -1,4 +1,4 @@
-/* UIManager.java --
+/* UIManager.java --
Copyright (C) 2002, 2003, 2004, 2005, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -61,22 +61,22 @@ import javax.swing.plaf.metal.MetalLookAndFeel;
public class UIManager implements Serializable
{
/**
- * Represents the basic information about a {@link LookAndFeel} (LAF), so
- * that a list of installed LAFs can be presented without actually loading
+ * Represents the basic information about a {@link LookAndFeel} (LAF), so
+ * that a list of installed LAFs can be presented without actually loading
* the LAF class(es).
*/
public static class LookAndFeelInfo
{
String name, clazz;
-
+
/**
* Creates a new instance.
- *
+ *
* @param name the look and feel name.
* @param clazz the look and feel class name.
*/
- public LookAndFeelInfo(String name,
- String clazz)
+ public LookAndFeelInfo(String name,
+ String clazz)
{
this.name = name;
this.clazz = clazz;
@@ -84,17 +84,17 @@ public class UIManager implements Serializable
/**
* Returns the name of the look and feel.
- *
+ *
* @return The name of the look and feel.
*/
public String getName()
{
return name;
}
-
+
/**
* Returns the fully qualified class name for the {@link LookAndFeel}.
- *
+ *
* @return The fully qualified class name for the {@link LookAndFeel}.
*/
public String getClassName()
@@ -151,20 +151,20 @@ public class UIManager implements Serializable
i++;
return val;
}
-
+
}
UIDefaults fallback;
/**
- * Creates a new MultiplexUIDefaults instance with
+ * Creates a new MultiplexUIDefaults instance with
* d as the fallback defaults.
- *
+ *
* @param d the fallback defaults (null not permitted).
*/
MultiplexUIDefaults(UIDefaults d)
{
- if (d == null)
+ if (d == null)
throw new NullPointerException();
fallback = d;
}
@@ -219,10 +219,10 @@ public class UIManager implements Serializable
/** The installed auxiliary look and feels. */
static LookAndFeel[] auxLookAndFeels;
-
+
/** The current look and feel. */
static LookAndFeel currentLookAndFeel;
-
+
static MultiplexUIDefaults currentUIDefaults;
static UIDefaults lookAndFeelDefaults;
@@ -234,7 +234,7 @@ public class UIManager implements Serializable
static
{
String defaultlaf = System.getProperty("swing.defaultlaf");
- try
+ try
{
if (defaultlaf != null)
{
@@ -288,7 +288,7 @@ public class UIManager implements Serializable
*
* @param listener the listener to remove
*/
- public static void removePropertyChangeListener(PropertyChangeListener
+ public static void removePropertyChangeListener(PropertyChangeListener
listener)
{
listeners.removePropertyChangeListener(listener);
@@ -308,11 +308,11 @@ public class UIManager implements Serializable
/**
* Add a {@link LookAndFeel} to the list of auxiliary look and feels.
- *
+ *
* @param laf the auxiliary look and feel (null not permitted).
- *
+ *
* @throws NullPointerException if laf is null.
- *
+ *
* @see #getAuxiliaryLookAndFeels()
*/
public static void addAuxiliaryLookAndFeel(LookAndFeel laf)
@@ -325,18 +325,18 @@ public class UIManager implements Serializable
auxLookAndFeels[0] = laf;
return;
}
-
+
LookAndFeel[] temp = new LookAndFeel[auxLookAndFeels.length + 1];
- System.arraycopy(auxLookAndFeels, 0, temp, 0, auxLookAndFeels.length);
+ System.arraycopy(auxLookAndFeels, 0, temp, 0, auxLookAndFeels.length);
auxLookAndFeels = temp;
auxLookAndFeels[auxLookAndFeels.length - 1] = laf;
}
-
+
/**
* Removes a {@link LookAndFeel} (LAF) from the list of auxiliary LAFs.
- *
+ *
* @param laf the LAF to remove.
- *
+ *
* @return true if the LAF was removed, and false
* otherwise.
*/
@@ -357,32 +357,32 @@ public class UIManager implements Serializable
LookAndFeel[] temp = new LookAndFeel[auxLookAndFeels.length - 1];
if (i == 0)
{
- System.arraycopy(auxLookAndFeels, 1, temp, 0, count - 1);
+ System.arraycopy(auxLookAndFeels, 1, temp, 0, count - 1);
}
else if (i == count - 1)
{
System.arraycopy(auxLookAndFeels, 0, temp, 0, count - 1);
}
- else
+ else
{
System.arraycopy(auxLookAndFeels, 0, temp, 0, i);
- System.arraycopy(auxLookAndFeels, i + 1, temp, i,
+ System.arraycopy(auxLookAndFeels, i + 1, temp, i,
count - i - 1);
}
auxLookAndFeels = temp;
return true;
- }
+ }
}
return false;
}
/**
* Returns an array (possibly null) containing the auxiliary
- * {@link LookAndFeel}s that are in use. These are used by the
+ * {@link LookAndFeel}s that are in use. These are used by the
* {@link javax.swing.plaf.multi.MultiLookAndFeel} class.
- *
+ *
* @return The auxiliary look and feels (possibly null).
- *
+ *
* @see #addAuxiliaryLookAndFeel(LookAndFeel)
*/
public static LookAndFeel[] getAuxiliaryLookAndFeels()
@@ -393,9 +393,9 @@ public class UIManager implements Serializable
/**
* Returns an object from the {@link UIDefaults} table for the current
* {@link LookAndFeel}.
- *
+ *
* @param key the key.
- *
+ *
* @return The object.
*/
public static Object get(Object key)
@@ -406,11 +406,11 @@ public class UIManager implements Serializable
/**
* Returns an object from the {@link UIDefaults} table for the current
* {@link LookAndFeel}.
- *
+ *
* @param key the key.
- *
+ *
* @return The object.
- *
+ *
* @since 1.4
*/
public static Object get(Object key, Locale locale)
@@ -422,70 +422,70 @@ public class UIManager implements Serializable
* Returns a boolean value from the defaults table. If there is no value
* for the specified key, or the value is not an instance of {@link Boolean},
* this method returns false.
- *
+ *
* @param key the key (null not permitted).
*
* @return The boolean value associated with the specified key.
- *
+ *
* @throws NullPointerException if key is null.
- *
+ *
* @since 1.4
*/
public static boolean getBoolean(Object key)
{
Object value = get(key);
- if (value instanceof Boolean)
+ if (value instanceof Boolean)
return ((Boolean) value).booleanValue();
return false;
}
-
+
/**
* Returns a boolean value from the defaults table. If there is no value
* for the specified key, or the value is not an instance of {@link Boolean},
* this method returns false.
- *
+ *
* @param key the key (null not permitted).
* @param locale the locale.
*
* @return The boolean value associated with the specified key.
- *
+ *
* @throws NullPointerException if key is null.
- *
+ *
* @since 1.4
*/
public static boolean getBoolean(Object key, Locale locale)
{
Object value = get(key, locale);
- if (value instanceof Boolean)
+ if (value instanceof Boolean)
return ((Boolean) value).booleanValue();
return false;
}
-
+
/**
- * Returns a border from the defaults table.
- *
+ * Returns a border from the defaults table.
+ *
* @param key the key (null not permitted).
- *
+ *
* @return The border associated with the given key, or null.
- *
+ *
* @throws NullPointerException if key is null.
*/
public static Border getBorder(Object key)
{
Object value = get(key);
- if (value instanceof Border)
+ if (value instanceof Border)
return (Border) value;
return null;
}
-
+
/**
- * Returns a border from the defaults table.
- *
+ * Returns a border from the defaults table.
+ *
* @param key the key (null not permitted).
* @param locale the locale.
- *
+ *
* @return The border associated with the given key, or null.
- *
+ *
* @throws NullPointerException if key is null.
*
* @since 1.4
@@ -493,44 +493,44 @@ public class UIManager implements Serializable
public static Border getBorder(Object key, Locale locale)
{
Object value = get(key, locale);
- if (value instanceof Border)
+ if (value instanceof Border)
return (Border) value;
return null;
}
-
+
/**
- * Returns a drawing color from the defaults table.
- *
+ * Returns a drawing color from the defaults table.
+ *
* @param key the key (null not permitted).
- *
+ *
* @return The color associated with the given key, or null.
- *
+ *
* @throws NullPointerException if key is null.
*/
public static Color getColor(Object key)
{
Object value = get(key);
- if (value instanceof Color)
+ if (value instanceof Color)
return (Color) value;
return null;
}
/**
- * Returns a drawing color from the defaults table.
- *
+ * Returns a drawing color from the defaults table.
+ *
* @param key the key (null not permitted).
* @param locale the locale.
- *
+ *
* @return The color associated with the given key, or null.
- *
+ *
* @throws NullPointerException if key is null.
- *
+ *
* @since 1.4
*/
public static Color getColor(Object key, Locale locale)
{
Object value = get(key, locale);
- if (value instanceof Color)
+ if (value instanceof Color)
return (Color) value;
return null;
}
@@ -538,17 +538,17 @@ public class UIManager implements Serializable
/**
* The fully qualified class name of the cross platform (Metal) look and feel.
* This string can be passed to Class.forName()
- *
+ *
* @return "javax.swing.plaf.metal.MetalLookAndFeel"
*/
public static String getCrossPlatformLookAndFeelClassName()
- {
+ {
return "javax.swing.plaf.metal.MetalLookAndFeel";
}
/**
- * Returns the default values for this look and feel.
- *
+ * Returns the default values for this look and feel.
+ *
* @return The {@link UIDefaults} for the current {@link LookAndFeel}.
*/
public static UIDefaults getDefaults()
@@ -559,37 +559,37 @@ public class UIManager implements Serializable
}
/**
- * Returns a dimension from the defaults table.
- *
+ * Returns a dimension from the defaults table.
+ *
* @param key the key (null not permitted).
- *
+ *
* @return The color associated with the given key, or null.
- *
+ *
* @throws NullPointerException if key is null.
*/
public static Dimension getDimension(Object key)
{
Object value = get(key);
- if (value instanceof Dimension)
+ if (value instanceof Dimension)
return (Dimension) value;
return null;
}
/**
- * Returns a dimension from the defaults table.
- *
+ * Returns a dimension from the defaults table.
+ *
* @param key the key (null not permitted).
* @param locale the locale.
- *
+ *
* @return The color associated with the given key, or null.
- *
+ *
* @throws NullPointerException if key is null.
* @since 1.4
*/
public static Dimension getDimension(Object key, Locale locale)
{
Object value = get(key, locale);
- if (value instanceof Dimension)
+ if (value instanceof Dimension)
return (Dimension) value;
return null;
}
@@ -601,15 +601,15 @@ public class UIManager implements Serializable
* @param key an Object that specifies the font. Typically,
* this is a String such as
* TitledBorder.font.
- *
+ *
* @return The font associated with the given key, or null.
- *
+ *
* @throws NullPointerException if key is null.
*/
public static Font getFont(Object key)
{
Object value = get(key);
- if (value instanceof Font)
+ if (value instanceof Font)
return (Font) value;
return null;
}
@@ -622,65 +622,65 @@ public class UIManager implements Serializable
* this is a String such as
* TitledBorder.font.
* @param locale the locale.
- *
+ *
* @return The font associated with the given key, or null.
- *
+ *
* @throws NullPointerException if key is null.
- *
+ *
* @since 1.4
*/
public static Font getFont(Object key, Locale locale)
{
Object value = get(key, locale);
- if (value instanceof Font)
+ if (value instanceof Font)
return (Font) value;
return null;
}
/**
- * Returns an icon from the defaults table.
- *
+ * Returns an icon from the defaults table.
+ *
* @param key the key (null not permitted).
- *
+ *
* @return The icon associated with the given key, or null.
- *
+ *
* @throws NullPointerException if key is null.
*/
public static Icon getIcon(Object key)
{
Object value = get(key);
- if (value instanceof Icon)
+ if (value instanceof Icon)
return (Icon) value;
return null;
}
-
+
/**
- * Returns an icon from the defaults table.
- *
+ * Returns an icon from the defaults table.
+ *
* @param key the key (null not permitted).
* @param locale the locale.
- *
+ *
* @return The icon associated with the given key, or null.
- *
+ *
* @throws NullPointerException if key is null.
* @since 1.4
*/
public static Icon getIcon(Object key, Locale locale)
{
Object value = get(key, locale);
- if (value instanceof Icon)
+ if (value instanceof Icon)
return (Icon) value;
return null;
}
-
+
/**
* Returns an Insets object from the defaults table.
- *
+ *
* @param key the key (null not permitted).
- *
+ *
* @return The insets associated with the given key, or null.
- *
- * @throws NullPointerException if key is null.
+ *
+ * @throws NullPointerException if key is null.
*/
public static Insets getInsets(Object key)
{
@@ -693,13 +693,13 @@ public class UIManager implements Serializable
/**
* Returns an Insets object from the defaults table.
- *
+ *
* @param key the key (null not permitted).
* @param locale the locale.
- *
+ *
* @return The insets associated with the given key, or null.
- *
- * @throws NullPointerException if key is null.
+ *
+ * @throws NullPointerException if key is null.
* @since 1.4
*/
public static Insets getInsets(Object key, Locale locale)
@@ -714,7 +714,7 @@ public class UIManager implements Serializable
/**
* Returns an array containing information about the {@link LookAndFeel}s
* that are installed.
- *
+ *
* @return A list of the look and feels that are available (installed).
*/
public static LookAndFeelInfo[] getInstalledLookAndFeels()
@@ -726,9 +726,9 @@ public class UIManager implements Serializable
* Returns the integer value of the {@link Integer} associated with the
* given key. If there is no value, or the value is not an instance of
* {@link Integer}, this method returns 0.
- *
+ *
* @param key the key (null not permitted).
- *
+ *
* @return The integer value associated with the given key, or 0.
*/
public static int getInt(Object key)
@@ -743,12 +743,12 @@ public class UIManager implements Serializable
* Returns the integer value of the {@link Integer} associated with the
* given key. If there is no value, or the value is not an instance of
* {@link Integer}, this method returns 0.
- *
+ *
* @param key the key (null not permitted).
* @param locale the locale.
- *
+ *
* @return The integer value associated with the given key, or 0.
- *
+ *
* @since 1.4
*/
public static int getInt(Object key, Locale locale)
@@ -761,9 +761,9 @@ public class UIManager implements Serializable
/**
* Returns the current look and feel (which may be null).
- *
+ *
* @return The current look and feel.
- *
+ *
* @see #setLookAndFeel(LookAndFeel)
*/
public static LookAndFeel getLookAndFeel()
@@ -774,7 +774,7 @@ public class UIManager implements Serializable
/**
* Returns the UIDefaults table of the currently active
* look and feel.
- *
+ *
* @return The {@link UIDefaults} for the current {@link LookAndFeel}.
*/
public static UIDefaults getLookAndFeelDefaults()
@@ -783,11 +783,11 @@ public class UIManager implements Serializable
}
/**
- * Returns the {@link String} associated with the given key. If the value
+ * Returns the {@link String} associated with the given key. If the value
* is not a {@link String}, this method returns null.
- *
+ *
* @param key the key (null not permitted).
- *
+ *
* @return The string associated with the given key, or null.
*/
public static String getString(Object key)
@@ -797,16 +797,16 @@ public class UIManager implements Serializable
return (String) s;
return null;
}
-
+
/**
- * Returns the {@link String} associated with the given key. If the value
+ * Returns the {@link String} associated with the given key. If the value
* is not a {@link String}, this method returns null.
- *
+ *
* @param key the key (null not permitted).
* @param locale the locale.
- *
+ *
* @return The string associated with the given key, or null.
- *
+ *
* @since 1.4
*/
public static String getString(Object key, Locale locale)
@@ -816,14 +816,14 @@ public class UIManager implements Serializable
return (String) s;
return null;
}
-
+
/**
* Returns the name of the {@link LookAndFeel} class that implements the
* native systems look and feel if there is one, otherwise the name
* of the default cross platform LookAndFeel class.
- *
+ *
* @return The fully qualified class name for the system look and feel.
- *
+ *
* @see #getCrossPlatformLookAndFeelClassName()
*/
public static String getSystemLookAndFeelClassName()
@@ -832,9 +832,9 @@ public class UIManager implements Serializable
}
/**
- * Returns UI delegate from the current {@link LookAndFeel} that renders the
+ * Returns UI delegate from the current {@link LookAndFeel} that renders the
* target component.
- *
+ *
* @param target the target component.
*/
public static ComponentUI getUI(JComponent target)
@@ -844,7 +844,7 @@ public class UIManager implements Serializable
/**
* Creates a new look and feel and adds it to the current array.
- *
+ *
* @param name the look and feel name.
* @param className the fully qualified name of the class that implements the
* look and feel.
@@ -868,7 +868,7 @@ public class UIManager implements Serializable
/**
* Stores an object in the defaults table.
- *
+ *
* @param key the key.
* @param value the value.
*/
@@ -884,15 +884,15 @@ public class UIManager implements Serializable
{
installed = infos;
}
-
+
/**
* Sets the current {@link LookAndFeel}.
- *
+ *
* @param newLookAndFeel the new look and feel (null permitted).
- *
- * @throws UnsupportedLookAndFeelException if the look and feel is not
+ *
+ * @throws UnsupportedLookAndFeelException if the look and feel is not
* supported on the current platform.
- *
+ *
* @see LookAndFeel#isSupportedLookAndFeel()
*/
public static void setLookAndFeel(LookAndFeel newLookAndFeel)
@@ -905,7 +905,7 @@ public class UIManager implements Serializable
if (oldLookAndFeel != null)
oldLookAndFeel.uninitialize();
- // Set the current default look and feel using a LookAndFeel object.
+ // Set the current default look and feel using a LookAndFeel object.
currentLookAndFeel = newLookAndFeel;
if (newLookAndFeel != null)
{
@@ -919,7 +919,7 @@ public class UIManager implements Serializable
}
else
{
- currentUIDefaults = null;
+ currentUIDefaults = null;
}
listeners.firePropertyChange("lookAndFeel", oldLookAndFeel, newLookAndFeel);
//revalidate();
@@ -928,12 +928,12 @@ public class UIManager implements Serializable
/**
* Set the current default look and feel using a class name.
- *
+ *
* @param className the look and feel class name.
- *
- * @throws UnsupportedLookAndFeelException if the look and feel is not
+ *
+ * @throws UnsupportedLookAndFeelException if the look and feel is not
* supported on the current platform.
- *
+ *
* @see LookAndFeel#isSupportedLookAndFeel()
*/
public static void setLookAndFeel(String className)
diff --git a/libjava/classpath/javax/swing/UnsupportedLookAndFeelException.java b/libjava/classpath/javax/swing/UnsupportedLookAndFeelException.java
index b65119a..74c6ac8 100644
--- a/libjava/classpath/javax/swing/UnsupportedLookAndFeelException.java
+++ b/libjava/classpath/javax/swing/UnsupportedLookAndFeelException.java
@@ -1,4 +1,4 @@
-/* UnsupportedLookAndFeelException.java --
+/* UnsupportedLookAndFeelException.java --
Copyright (C) 2002, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -40,14 +40,14 @@ package javax.swing;
/**
* Thrown by the {@link UIManager#setLookAndFeel(LookAndFeel)} method when the
* specified look and feel is not supported on the current platform.
- *
+ *
* @see LookAndFeel#isSupportedLookAndFeel()
*/
public class UnsupportedLookAndFeelException extends Exception
{
/**
* Creates a new exception instance with the specified message.
- *
+ *
* @param s the exception message.
*/
public UnsupportedLookAndFeelException(String s)
diff --git a/libjava/classpath/javax/swing/ViewportLayout.java b/libjava/classpath/javax/swing/ViewportLayout.java
index b61834e..02f9626 100644
--- a/libjava/classpath/javax/swing/ViewportLayout.java
+++ b/libjava/classpath/javax/swing/ViewportLayout.java
@@ -46,13 +46,13 @@ import java.awt.Rectangle;
import java.io.Serializable;
/**
- * The default layout for {@link JViewport}. The viewport makes its view the
- * same size as itself, but not smaller than its minimum size.
- *
+ * The default layout for {@link JViewport}. The viewport makes its view the
+ * same size as itself, but not smaller than its minimum size.
+ *
* If the port extends extends into space past the edge of the view,
* this layout manager moves the port up or to the left, in view space, by the
* amount of empty space (keep the lower and right edges lined up).
- *
+ *
* @author Andrew Selkirk
* @author Graydon Hoare
* @author Audrius Meskauskas (audriusa@Bioinformatics.org)
@@ -61,15 +61,15 @@ public class ViewportLayout implements LayoutManager, Serializable
{
private static final long serialVersionUID = -788225906076097229L;
- public ViewportLayout()
+ public ViewportLayout()
{
// Nothing to do here.
}
-
+
/**
* The method is not used with this manager.
*/
- public void addLayoutComponent(String name, Component c)
+ public void addLayoutComponent(String name, Component c)
{
// Nothing to do here.
}
@@ -77,20 +77,20 @@ public class ViewportLayout implements LayoutManager, Serializable
/**
* The method is not used with this manager.
*/
- public void removeLayoutComponent(Component c)
+ public void removeLayoutComponent(Component c)
{
// Nothing to do here.
}
-
+
/**
* Get the preferred layout size. If the view implements
- * {@link Scrollable}, this method returns
+ * {@link Scrollable}, this method returns
* {@link Scrollable#getPreferredScrollableViewportSize}.
* Otherwise, it returns {@link Component#getPreferredSize()}.
- *
+ *
* @return the preferred layout size, as described about.
*/
- public Dimension preferredLayoutSize(Container parent)
+ public Dimension preferredLayoutSize(Container parent)
{
JViewport vp = (JViewport)parent;
Component view = vp.getView();
@@ -107,13 +107,13 @@ public class ViewportLayout implements LayoutManager, Serializable
/**
* Get the minimum layout size. Normally this method returns the value,
* returned by the view method {@link Component#getMinimumSize()}.
- *
- * If the view is not set, the zero size is returned.
+ *
+ * If the view is not set, the zero size is returned.
*
* @param parent the viewport
* @return the minimum layout size.
*/
- public Dimension minimumLayoutSize(Container parent)
+ public Dimension minimumLayoutSize(Container parent)
{
// These values have been determined by the Mauve test for this method.
return new Dimension(4, 4);
@@ -132,7 +132,7 @@ public class ViewportLayout implements LayoutManager, Serializable
*
In {@link JViewport#setViewSize(Dimension)}, the view size is never
* set smaller that its minimum size.
*
- *
+ *
* @see JViewport#getViewSize
* @see JViewport#setViewSize
* @see JViewport#getViewPosition
diff --git a/libjava/classpath/javax/swing/WindowConstants.java b/libjava/classpath/javax/swing/WindowConstants.java
index 598a61e..63ec2cb 100644
--- a/libjava/classpath/javax/swing/WindowConstants.java
+++ b/libjava/classpath/javax/swing/WindowConstants.java
@@ -38,14 +38,14 @@ exception statement from your version. */
package javax.swing;
/**
- * Defines some constants that are used in Swing's top-level containers. See
+ * Defines some constants that are used in Swing's top-level containers. See
* the following methods:
*
- *
+ *
* @author Andrew Selkirk
*/
public interface WindowConstants
@@ -62,16 +62,16 @@ public interface WindowConstants
/**
* Dispose the container when it is closed.
- *
+ *
* @see Window#dispose()
*/
int DISPOSE_ON_CLOSE = 2;
/**
* Exit the application when the container is closed.
- *
+ *
* @see System#exit(int)
- *
+ *
* @since 1.4
*/
int EXIT_ON_CLOSE = 3;
diff --git a/libjava/classpath/javax/swing/border/AbstractBorder.java b/libjava/classpath/javax/swing/border/AbstractBorder.java
index 16bb238..f75bcbb 100644
--- a/libjava/classpath/javax/swing/border/AbstractBorder.java
+++ b/libjava/classpath/javax/swing/border/AbstractBorder.java
@@ -1,4 +1,4 @@
-/* AbstractBorder.java --
+/* AbstractBorder.java --
Copyright (C) 2003, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -87,10 +87,10 @@ public abstract class AbstractBorder implements Border, Serializable
}
/**
- * Returns the insets required for drawing this border around the specified
+ * Returns the insets required for drawing this border around the specified
* component.
*
- * @param c the component that the border applies to (ignored here,
+ * @param c the component that the border applies to (ignored here,
* subclasses may use it).
*
* @return an Insets object whose left, right,
@@ -106,25 +106,25 @@ public abstract class AbstractBorder implements Border, Serializable
}
/**
- * Returns the insets required for drawing this border around the specified
- * component. The default implementation provided here sets the
- * left, right, top and
- * bottom fields of the passed insets parameter to
+ * Returns the insets required for drawing this border around the specified
+ * component. The default implementation provided here sets the
+ * left, right, top and
+ * bottom fields of the passed insets parameter to
* zero.
*
- * @param c the component that the border applies to (ignored here,
+ * @param c the component that the border applies to (ignored here,
* subclasses may use it).
- * @param insets an instance that will be overwritten and returned as the
- * result (null not permitted).
+ * @param insets an instance that will be overwritten and returned as the
+ * result (null not permitted).
*
- * @return The border insets (the same object that was passed as the
+ * @return The border insets (the same object that was passed as the
* insets argument).
*
* @see #getBorderInsets(Component)
- *
+ *
* @throws NullPointerException if insets is null.
*/
- public Insets getBorderInsets(Component c, Insets insets)
+ public Insets getBorderInsets(Component c, Insets insets)
{
insets.left = insets.right = insets.top = insets.bottom = 0;
return insets;
@@ -139,14 +139,14 @@ public abstract class AbstractBorder implements Border, Serializable
*
* @return false.
*/
- public boolean isBorderOpaque()
+ public boolean isBorderOpaque()
{
return false;
}
/**
- * Returns a rectangle that covers the specified area minus the insets
- * required to draw this border. Components that wish to determine an area
+ * Returns a rectangle that covers the specified area minus the insets
+ * required to draw this border. Components that wish to determine an area
* into which they can safely draw without intersecting with a border might
* want to use this helper method.
*
@@ -155,7 +155,7 @@ public abstract class AbstractBorder implements Border, Serializable
* @param y the vertical position of the border.
* @param width the width of the available area for the border.
* @param height the height of the available area for the border.
- *
+ *
* @return The interior rectangle.
*/
public Rectangle getInteriorRectangle(Component c, int x, int y, int width,
@@ -163,12 +163,12 @@ public abstract class AbstractBorder implements Border, Serializable
{
return getInteriorRectangle(c, this, x, y, width, height);
}
-
+
/**
- * Returns a rectangle that covers the specified area minus the insets
+ * Returns a rectangle that covers the specified area minus the insets
* required to draw the specified border (if the border is null,
- * zero insets are assumed). Components that wish to determine an area into
- * which they can safely draw without intersecting with a border might want
+ * zero insets are assumed). Components that wish to determine an area into
+ * which they can safely draw without intersecting with a border might want
* to use this helper method.
*
* @param c the component in the center of this border.
@@ -177,7 +177,7 @@ public abstract class AbstractBorder implements Border, Serializable
* @param y the vertical position of the border.
* @param width the width of the available area for the border.
* @param height the height of the available area for the border.
- *
+ *
* @return The interior rectangle.
*/
public static Rectangle getInteriorRectangle(Component c, Border b, int x,
diff --git a/libjava/classpath/javax/swing/border/BevelBorder.java b/libjava/classpath/javax/swing/border/BevelBorder.java
index 5b4761e..b91961d 100644
--- a/libjava/classpath/javax/swing/border/BevelBorder.java
+++ b/libjava/classpath/javax/swing/border/BevelBorder.java
@@ -1,4 +1,4 @@
-/* BevelBorder.java --
+/* BevelBorder.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -76,12 +76,12 @@ public class BevelBorder extends AbstractBorder
* pressed into the screen.
*/
public static final int LOWERED = 1;
-
+
/**
* The type of this BevelBorder, which is either {@link #RAISED}
* or {@link #LOWERED}.
- */
+ */
protected int bevelType;
@@ -296,7 +296,7 @@ public class BevelBorder extends AbstractBorder
return insets;
}
-
+
/**
* Determines the color that will be used for the outer side of
* highlighted edges when painting the border. If a highlight color
@@ -306,7 +306,7 @@ public class BevelBorder extends AbstractBorder
* @param c the component enclosed by this border.
*
* @return The color.
- *
+ *
* @see #getHighlightInnerColor(java.awt.Component)
* @see java.awt.Color#brighter()
*/
@@ -329,7 +329,7 @@ public class BevelBorder extends AbstractBorder
* @param c the component enclosed by this border.
*
* @return The color.
- *
+ *
* @see java.awt.Component#getBackground()
* @see java.awt.Color#brighter()
*/
@@ -352,7 +352,7 @@ public class BevelBorder extends AbstractBorder
* @param c the component enclosed by this border.
*
* @return The color.
- *
+ *
* @see java.awt.Component#getBackground()
* @see java.awt.Color#darker()
*/
@@ -374,7 +374,7 @@ public class BevelBorder extends AbstractBorder
* @param c the component enclosed by this border.
*
* @return The color.
- *
+ *
* @see #getShadowInnerColor(java.awt.Component)
* @see java.awt.Color#darker()
*/
@@ -392,7 +392,7 @@ public class BevelBorder extends AbstractBorder
* highlighted edges when painting the border, or null
* if that color will be derived from the background of the enclosed
* Component.
- *
+ *
* @return The color (possibly null).
*/
public Color getHighlightOuterColor()
@@ -406,7 +406,7 @@ public class BevelBorder extends AbstractBorder
* highlighted edges when painting the border, or null
* if that color will be derived from the background of the enclosed
* Component.
- *
+ *
* @return The color (possibly null).
*/
public Color getHighlightInnerColor()
@@ -420,7 +420,7 @@ public class BevelBorder extends AbstractBorder
* shadowed edges when painting the border, or null if
* that color will be derived from the background of the enclosed
* Component.
- *
+ *
* @return The color (possibly null).
*/
public Color getShadowInnerColor()
@@ -434,19 +434,19 @@ public class BevelBorder extends AbstractBorder
* shadowed edges when painting the border, or null if
* that color will be derived from the background of the enclosed
* Component.
- *
+ *
* @return The color (possibly null).
*/
public Color getShadowOuterColor()
{
return shadowOuter;
}
-
-
+
+
/**
* Returns the appearance of this border, which is either {@link
* #RAISED} or {@link #LOWERED}.
- *
+ *
* @return The bevel type ({@link #RAISED} or {@link #LOWERED}).
*/
public int getBevelType()
@@ -475,7 +475,7 @@ public class BevelBorder extends AbstractBorder
* because Color.brighten() and Color.darken() always return an
* opaque color.
*/
- return
+ return
((highlightOuter == null) || (highlightOuter.getAlpha() == 255))
&& ((highlightInner == null) || (highlightInner.getAlpha() == 255))
&& ((shadowInner == null) || (shadowInner.getAlpha() == 255))
@@ -523,7 +523,7 @@ public class BevelBorder extends AbstractBorder
/**
* Paints a two-pixel bevel in four colors.
- *
+ *
*
* ++++++++++++
* +..........# + = color a
@@ -582,4 +582,3 @@ public class BevelBorder extends AbstractBorder
}
}
}
-
diff --git a/libjava/classpath/javax/swing/border/Border.java b/libjava/classpath/javax/swing/border/Border.java
index f4af3fb..da25832 100644
--- a/libjava/classpath/javax/swing/border/Border.java
+++ b/libjava/classpath/javax/swing/border/Border.java
@@ -1,4 +1,4 @@
-/* Border.java --
+/* Border.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -79,7 +79,7 @@ public interface Border
*/
void paintBorder(Component c, Graphics g, int x, int y, int width,
int height);
-
+
/**
* Measures the width of this border.
*
@@ -90,7 +90,7 @@ public interface Border
* width of the border at the respective edge.
*/
Insets getBorderInsets(Component c);
-
+
/**
* Determines whether this border fills every pixel in its area
* when painting.
diff --git a/libjava/classpath/javax/swing/border/CompoundBorder.java b/libjava/classpath/javax/swing/border/CompoundBorder.java
index ba2e745..d811150 100644
--- a/libjava/classpath/javax/swing/border/CompoundBorder.java
+++ b/libjava/classpath/javax/swing/border/CompoundBorder.java
@@ -1,4 +1,4 @@
-/* CompoundBorder.java --
+/* CompoundBorder.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -115,7 +115,7 @@ public class CompoundBorder extends AbstractBorder
*/
public boolean isBorderOpaque()
{
- // Although the API specification states that this method
+ // Although the API specification states that this method
// returns true if both the inside and outside borders are non-null
// and opaque, and false otherwise, a mauve test shows that if both
// the inside or outside borders are null, then true is returned.
@@ -137,7 +137,7 @@ public class CompoundBorder extends AbstractBorder
/**
* Paints the compound border by first painting the outside border,
- * then painting the inside border tightly nested into the outside.
+ * then painting the inside border tightly nested into the outside.
*
* @param c the component whose border is to be painted.
* @param g the graphics for painting.
@@ -233,7 +233,7 @@ public class CompoundBorder extends AbstractBorder
* Returns the outside border, which is painted outside both the
* bordered Component and the inside border. It is valid for the
* result to be null.
- *
+ *
* @return The outside border (possibly null).
*/
public Border getOutsideBorder()
@@ -245,7 +245,7 @@ public class CompoundBorder extends AbstractBorder
* Returns the inside border, which is painted between the bordered
* Component and the outside border. It is valid for the result to
* be null.
- *
+ *
* @return The inside border (possibly null).
*/
public Border getInsideBorder()
diff --git a/libjava/classpath/javax/swing/border/EmptyBorder.java b/libjava/classpath/javax/swing/border/EmptyBorder.java
index c8e9c60..da66511 100644
--- a/libjava/classpath/javax/swing/border/EmptyBorder.java
+++ b/libjava/classpath/javax/swing/border/EmptyBorder.java
@@ -1,4 +1,4 @@
-/* EmptyBorder.java --
+/* EmptyBorder.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -202,8 +202,8 @@ public class EmptyBorder extends AbstractBorder
{
return getBorderInsets(null, null);
}
-
-
+
+
/**
* Determines whether this border fills every pixel in its area
* when painting. Since an empty border does not paint any pixels
diff --git a/libjava/classpath/javax/swing/border/EtchedBorder.java b/libjava/classpath/javax/swing/border/EtchedBorder.java
index cd48b18..e9ee9e2 100644
--- a/libjava/classpath/javax/swing/border/EtchedBorder.java
+++ b/libjava/classpath/javax/swing/border/EtchedBorder.java
@@ -1,4 +1,4 @@
-/* EtchedBorder.java --
+/* EtchedBorder.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -63,8 +63,8 @@ public class EtchedBorder extends AbstractBorder
* of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5.
*/
static final long serialVersionUID = 4001244046866360638L;
-
-
+
+
/**
* Indicates that the border appears as coming out of the
* background.
@@ -78,13 +78,13 @@ public class EtchedBorder extends AbstractBorder
*/
public static final int LOWERED = 1;
-
+
/**
* The type of this EtchedBorder, which is either {@link #RAISED}
* or {@link #LOWERED}.
*/
protected int etchType;
-
+
/**
* The highlight color, or null to indicate that the
@@ -139,8 +139,8 @@ public class EtchedBorder extends AbstractBorder
* assign a value here.
*/
}
-
-
+
+
/**
* Constructs a lowered EtchedBorder, explicitly selecting the
* colors that will be used for highlight and shadow.
@@ -157,8 +157,8 @@ public class EtchedBorder extends AbstractBorder
{
this(LOWERED, highlight, shadow);
}
-
-
+
+
/**
* Constructs an EtchedBorder with the specified appearance,
* explicitly selecting the colors that will be used for
@@ -186,8 +186,8 @@ public class EtchedBorder extends AbstractBorder
this.highlight = highlight;
this.shadow = shadow;
}
-
-
+
+
/**
* Paints the border for a given component.
*
@@ -214,8 +214,8 @@ public class EtchedBorder extends AbstractBorder
break;
}
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -277,11 +277,11 @@ public class EtchedBorder extends AbstractBorder
((highlight == null) || (highlight.getAlpha() == 255))
&& ((shadow == null) || (shadow.getAlpha() == 255));
}
-
+
/**
* Returns the appearance of this EtchedBorder, which is either
* {@link #RAISED} or {@link #LOWERED}.
- *
+ *
* @return The type ({@link #RAISED} or {@link #LOWERED}).
*/
public int getEtchType()
@@ -300,7 +300,7 @@ public class EtchedBorder extends AbstractBorder
* @param c the component enclosed by this border.
*
* @return The color.
- *
+ *
* @see java.awt.Component#getBackground()
* @see java.awt.Color#brighter()
*/
@@ -316,7 +316,7 @@ public class EtchedBorder extends AbstractBorder
* Returns the color that will be used for highlighted parts when
* painting the border, or null if that color will be
* derived from the background of the enclosed Component.
- *
+ *
* @return The highlight color (possibly null).
*/
public Color getHighlightColor()
@@ -335,7 +335,7 @@ public class EtchedBorder extends AbstractBorder
* @param c the component enclosed by this border.
*
* @return The shadow color.
- *
+ *
* @see java.awt.Component#getBackground()
* @see java.awt.Color#darker()
*/
@@ -346,13 +346,13 @@ public class EtchedBorder extends AbstractBorder
else
return c.getBackground().darker();
}
-
-
+
+
/**
* Returns the color that will be used for shadowed parts when
* painting the border, or null if that color will be
* derived from the background of the enclosed Component.
- *
+ *
* @return The shadow color (possibly null).
*/
public Color getShadowColor()
diff --git a/libjava/classpath/javax/swing/border/LineBorder.java b/libjava/classpath/javax/swing/border/LineBorder.java
index 31e19fe..e78bbee 100644
--- a/libjava/classpath/javax/swing/border/LineBorder.java
+++ b/libjava/classpath/javax/swing/border/LineBorder.java
@@ -1,4 +1,4 @@
-/* LineBorder.java --
+/* LineBorder.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -121,12 +121,12 @@ public class LineBorder extends AbstractBorder
{
this (color, thickness, /* roundedCorners */ false);
}
-
-
+
+
/**
* Constructs a LineBorder given its color, thickness, and whether
* it has rounded corners.
- *
+ *
*
*
@@ -159,12 +159,12 @@ public class LineBorder extends AbstractBorder
this.thickness = thickness;
this.roundedCorners = roundedCorners;
}
-
-
+
+
/**
* Returns a black, one pixel thick, plain {@link LineBorder}. The method
* may always return the same (singleton) {@link LineBorder} instance.
- *
+ *
* @return The border.
*/
public static Border createBlackLineBorder()
@@ -174,15 +174,15 @@ public class LineBorder extends AbstractBorder
*/
if (blackLineBorder == null)
blackLineBorder = new LineBorder(Color.black);
-
+
return blackLineBorder;
}
-
-
+
+
/**
* Returns a gray, one pixel thick, plain {@link LineBorder}. The method
* may always return the same (singleton) {@link LineBorder} instance.
- *
+ *
* @return The border.
*/
public static Border createGrayLineBorder()
@@ -192,11 +192,11 @@ public class LineBorder extends AbstractBorder
*/
if (grayLineBorder == null)
grayLineBorder = new LineBorder(Color.gray);
-
+
return grayLineBorder;
}
-
-
+
+
/**
* Paints the line border around a given Component.
*
@@ -255,8 +255,8 @@ public class LineBorder extends AbstractBorder
g.setColor(oldColor);
}
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -273,8 +273,8 @@ public class LineBorder extends AbstractBorder
{
return new Insets(thickness, thickness, thickness, thickness);
}
-
-
+
+
/**
* Measures the width of this border, storing the results into a
* pre-existing Insets object.
@@ -295,30 +295,30 @@ public class LineBorder extends AbstractBorder
insets.left = insets.right = insets.top = insets.bottom = thickness;
return insets;
}
-
-
+
+
/**
* Returns the color of the line.
- *
+ *
* @return The line color (never null).
*/
public Color getLineColor()
{
return lineColor;
}
-
-
+
+
/**
* Returns the thickness of the line in pixels.
- *
+ *
* @return The line thickness (in pixels).
*/
public int getThickness()
{
return thickness;
}
-
-
+
+
/**
* Returns whether this LineBorder os drawm with rounded
* or with plain corners.
@@ -330,8 +330,8 @@ public class LineBorder extends AbstractBorder
{
return roundedCorners;
}
-
-
+
+
/**
* Determines whether this border fills every pixel in its area
* when painting.
diff --git a/libjava/classpath/javax/swing/border/MatteBorder.java b/libjava/classpath/javax/swing/border/MatteBorder.java
index 944cd28..c0c2d77 100644
--- a/libjava/classpath/javax/swing/border/MatteBorder.java
+++ b/libjava/classpath/javax/swing/border/MatteBorder.java
@@ -1,4 +1,4 @@
-/* MatteBorder.java --
+/* MatteBorder.java --
Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -61,8 +61,8 @@ public class MatteBorder extends EmptyBorder
* of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5.
*/
static final long serialVersionUID = 4422248989617298224L;
-
-
+
+
/**
* The color that is used for filling the border, or
* null if the border is filled with repetitions of a
@@ -71,8 +71,8 @@ public class MatteBorder extends EmptyBorder
* @see #tileIcon
*/
protected Color color;
-
-
+
+
/**
* The icon is used for filling the border with a tile, or
* null if the border is filled with a solid
@@ -81,8 +81,8 @@ public class MatteBorder extends EmptyBorder
* @see #color
*/
protected Icon tileIcon;
-
-
+
+
/**
* Constructs a MatteBorder given the width on each side
* and a fill color.
@@ -171,8 +171,8 @@ public class MatteBorder extends EmptyBorder
borderInsets.bottom, borderInsets.right,
tileIcon);
}
-
-
+
+
/**
* Constructs a MatteBorder given an icon for tiling the
* border area. The icon width is used for the border insets
@@ -188,8 +188,8 @@ public class MatteBorder extends EmptyBorder
{
this(-1, -1, -1, -1, tileIcon);
}
-
-
+
+
/**
* Paints the border for a given component.
*
@@ -215,8 +215,8 @@ public class MatteBorder extends EmptyBorder
i.right, height - i.bottom,
width - i.right, i.top);
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -236,8 +236,8 @@ public class MatteBorder extends EmptyBorder
*/
return this.getBorderInsets(c, null);
}
-
-
+
+
/**
* Measures the width of this border, storing the results into a
* pre-existing Insets object.
@@ -271,8 +271,8 @@ public class MatteBorder extends EmptyBorder
*/
return super.getBorderInsets(c, insets);
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -290,34 +290,34 @@ public class MatteBorder extends EmptyBorder
*/
return this.getBorderInsets(null, null);
}
-
-
+
+
/**
* Returns the color that is used for filling the border, or
* null if the border is filled with repetitions of a
* tile icon.
- *
+ *
* @return The color (possibly null).
*/
public Color getMatteColor()
{
return color;
}
-
-
+
+
/**
* Returns the icon is used for tiling the border, or
* null if the border is filled with a color instead of
* an icon.
- *
+ *
* @return The icon (possibly null).
*/
public Icon getTileIcon()
{
return tileIcon;
}
-
-
+
+
/**
* Determines whether this border fills every pixel in its area
* when painting.
@@ -330,7 +330,7 @@ public class MatteBorder extends EmptyBorder
{
return (color != null) && (color.getAlpha() == 255);
}
-
+
/**
* Paints a rectangular area of the border. This private helper
@@ -372,7 +372,7 @@ public class MatteBorder extends EmptyBorder
}
return;
}
-
+
// If this border has no icon end painting here.
if (tileIcon == null)
return;
diff --git a/libjava/classpath/javax/swing/border/SoftBevelBorder.java b/libjava/classpath/javax/swing/border/SoftBevelBorder.java
index 028fd00..c0c9ae8 100644
--- a/libjava/classpath/javax/swing/border/SoftBevelBorder.java
+++ b/libjava/classpath/javax/swing/border/SoftBevelBorder.java
@@ -1,4 +1,4 @@
-/* SoftBevelBorder.java --
+/* SoftBevelBorder.java --
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -242,7 +242,7 @@ public class SoftBevelBorder extends BevelBorder
return insets;
}
-
+
/**
* Determines whether this border fills every pixel in its area
* when painting.
@@ -261,7 +261,7 @@ public class SoftBevelBorder extends BevelBorder
/**
* Paints a soft bevel in four colors.
- *
+ *
*
* +++++++++++.
* ++.........# + = color a
diff --git a/libjava/classpath/javax/swing/border/TitledBorder.java b/libjava/classpath/javax/swing/border/TitledBorder.java
index 38ccd72..4d4f3af 100644
--- a/libjava/classpath/javax/swing/border/TitledBorder.java
+++ b/libjava/classpath/javax/swing/border/TitledBorder.java
@@ -1,4 +1,4 @@
-/* TitledBorder.java --
+/* TitledBorder.java --
Copyright (C) 2003, 2004, 2005, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -241,7 +241,7 @@ public class TitledBorder extends AbstractBorder
* on MacOS X 10.1.5.
*/
static final long serialVersionUID = 8012999415147721601L;
-
+
/**
* The title, or null to display no title.
@@ -257,7 +257,7 @@ public class TitledBorder extends AbstractBorder
*/
protected Border border;
-
+
/**
* The vertical position of the title text relative to the border,
* which is one of {@link #ABOVE_TOP}, {@link #TOP}, {@link
@@ -318,7 +318,7 @@ public class TitledBorder extends AbstractBorder
this(border, /* title */ "", LEADING, TOP,
/* titleFont */ null, /* titleColor */ null);
}
-
+
/**
* Constructs a TitledBorder given its border and title text.
@@ -334,7 +334,7 @@ public class TitledBorder extends AbstractBorder
this(border, title, LEADING, TOP,
/* titleFont */ null, /* titleColor */ null);
}
-
+
/**
* Constructs a TitledBorder given its border, title text, horizontal
@@ -350,7 +350,7 @@ public class TitledBorder extends AbstractBorder
* text in relation to the border. The value must be one of
* {@link #LEFT}, {@link #CENTER}, {@link #RIGHT}, {@link #LEADING},
* {@link #TRAILING}, or {@link #DEFAULT_JUSTIFICATION}.
-
+
* @param titlePosition the vertical position of the title text
* in relation to the border. The value must be one of
* {@link #ABOVE_TOP}, {@link #TOP}, {@link #BELOW_TOP},
@@ -366,7 +366,7 @@ public class TitledBorder extends AbstractBorder
this(border, title, titleJustification, titlePosition,
/* titleFont */ null, /* titleColor */ null);
}
-
+
/**
* Constructs a TitledBorder given its border, title text, horizontal
@@ -401,7 +401,7 @@ public class TitledBorder extends AbstractBorder
this(border, title, titleJustification, titlePosition, titleFont,
/* titleColor */ null);
}
-
+
/**
* Constructs a TitledBorder given its border, title text, horizontal
@@ -448,8 +448,8 @@ public class TitledBorder extends AbstractBorder
this.titleFont = titleFont;
this.titleColor = titleColor;
}
-
-
+
+
/**
* Paints the border and the title text.
*
@@ -460,7 +460,7 @@ public class TitledBorder extends AbstractBorder
* @param width the width of the available area for painting the border.
* @param height the height of the available area for painting the border.
*/
- public void paintBorder(Component c, Graphics g,
+ public void paintBorder(Component c, Graphics g,
int x, int y, int width, int height)
{
Rectangle borderRect = new Rectangle(x + EDGE_SPACING, y + EDGE_SPACING,
@@ -666,7 +666,7 @@ public class TitledBorder extends AbstractBorder
borderRect.width,
borderRect.height);
}
-
+
}
else
{
@@ -683,7 +683,7 @@ public class TitledBorder extends AbstractBorder
borderRect.width,
borderRect.height);
}
-
+
}
g.setClip(saved);
}
@@ -710,7 +710,7 @@ public class TitledBorder extends AbstractBorder
{
return getBorderInsets(c, new Insets(0, 0, 0, 0));
}
-
+
/**
* Measures the width of this border, storing the results into a
@@ -795,8 +795,8 @@ public class TitledBorder extends AbstractBorder
}
return insets;
}
-
-
+
+
/**
* Returns false, indicating that there are pixels inside
* the area of this border where the background shines through.
@@ -961,7 +961,7 @@ public class TitledBorder extends AbstractBorder
public void setTitlePosition(int titlePosition)
{
if ((titlePosition < DEFAULT_POSITION) || (titlePosition > BELOW_BOTTOM))
- throw new IllegalArgumentException(titlePosition
+ throw new IllegalArgumentException(titlePosition
+ " is not a valid title position.");
// Swing borders are not JavaBeans, thus no need to fire an event.
@@ -983,7 +983,7 @@ public class TitledBorder extends AbstractBorder
{
if ((titleJustification < DEFAULT_JUSTIFICATION)
|| (titleJustification > TRAILING))
- throw new IllegalArgumentException(titleJustification
+ throw new IllegalArgumentException(titleJustification
+ " is not a valid title justification.");
// Swing borders are not JavaBeans, thus no need to fire an event.
@@ -1027,7 +1027,7 @@ public class TitledBorder extends AbstractBorder
*
* @param c the Component for which this TitledBorder constitutes
* a border.
- *
+ *
* @return The minimum size.
*/
public Dimension getMinimumSize(Component c)
diff --git a/libjava/classpath/javax/swing/colorchooser/AbstractColorChooserPanel.java b/libjava/classpath/javax/swing/colorchooser/AbstractColorChooserPanel.java
index efb5277..a554208 100644
--- a/libjava/classpath/javax/swing/colorchooser/AbstractColorChooserPanel.java
+++ b/libjava/classpath/javax/swing/colorchooser/AbstractColorChooserPanel.java
@@ -77,9 +77,9 @@ public abstract class AbstractColorChooserPanel extends JPanel
/**
* Returns the key code for the mnemonic for this panel. This method returns
* zero to indicate no mnemonic, subclasses can override this.
- *
+ *
* @return 0, to indicate no mnemonic key code.
- *
+ *
* @see #getDisplayedMnemonicIndex()
* @since 1.4
*/
@@ -87,14 +87,14 @@ public abstract class AbstractColorChooserPanel extends JPanel
{
return 0;
}
-
+
/**
- * Returns the index of the character in the display name that is the
+ * Returns the index of the character in the display name that is the
* mnemonic. This method returns -1 to indicate no mnemonic,
* subclasses can override.
- *
+ *
* @return -1, to indicate no mnemonic.
- *
+ *
* @see #getDisplayName()
* @see #getMnemonic()
* @since 1.4
@@ -103,7 +103,7 @@ public abstract class AbstractColorChooserPanel extends JPanel
{
return -1;
}
-
+
/**
* This method updates the chooser panel when the JColorChooser's color has
* changed.
diff --git a/libjava/classpath/javax/swing/colorchooser/ColorChooserComponentFactory.java b/libjava/classpath/javax/swing/colorchooser/ColorChooserComponentFactory.java
index 923ea53..ef8ea21 100644
--- a/libjava/classpath/javax/swing/colorchooser/ColorChooserComponentFactory.java
+++ b/libjava/classpath/javax/swing/colorchooser/ColorChooserComponentFactory.java
@@ -64,7 +64,7 @@ public class ColorChooserComponentFactory
*/
public static AbstractColorChooserPanel[] getDefaultChooserPanels()
{
- AbstractColorChooserPanel[] values =
+ AbstractColorChooserPanel[] values =
{
new DefaultSwatchChooserPanel(),
new DefaultHSBChooserPanel(),
diff --git a/libjava/classpath/javax/swing/colorchooser/ColorSelectionModel.java b/libjava/classpath/javax/swing/colorchooser/ColorSelectionModel.java
index b660505..7831e47 100644
--- a/libjava/classpath/javax/swing/colorchooser/ColorSelectionModel.java
+++ b/libjava/classpath/javax/swing/colorchooser/ColorSelectionModel.java
@@ -47,22 +47,22 @@ import javax.swing.event.ChangeListener;
/**
* A model that is used by the {@link JColorChooser} component to represent the
* selected color.
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
*/
-public interface ColorSelectionModel
+public interface ColorSelectionModel
{
/**
* Returns the selected color.
- *
+ *
* @return The selected color.
*/
Color getSelectedColor();
/**
* Sets the selected color.
- *
+ *
* @param color the selected color.
*/
void setSelectedColor(Color color);
@@ -70,13 +70,13 @@ public interface ColorSelectionModel
/**
* Registers a listener to receive {@link ChangeEvent} notifications
* from this model.
- *
+ *
* @param listener the listener.
*/
void addChangeListener(ChangeListener 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 this action.
*
* @param listener the listener.
diff --git a/libjava/classpath/javax/swing/colorchooser/DefaultColorSelectionModel.java b/libjava/classpath/javax/swing/colorchooser/DefaultColorSelectionModel.java
index aae2bed..07493f6 100644
--- a/libjava/classpath/javax/swing/colorchooser/DefaultColorSelectionModel.java
+++ b/libjava/classpath/javax/swing/colorchooser/DefaultColorSelectionModel.java
@@ -113,8 +113,8 @@ public class DefaultColorSelectionModel implements ColorSelectionModel,
throw new Error("ColorSelectionModel cannot be set to have null color.");
if (color != selectedColor)
{
- this.selectedColor = color;
- fireStateChanged();
+ this.selectedColor = color;
+ fireStateChanged();
}
}
diff --git a/libjava/classpath/javax/swing/colorchooser/DefaultHSBChooserPanel.java b/libjava/classpath/javax/swing/colorchooser/DefaultHSBChooserPanel.java
index 112d021..d035fe19 100644
--- a/libjava/classpath/javax/swing/colorchooser/DefaultHSBChooserPanel.java
+++ b/libjava/classpath/javax/swing/colorchooser/DefaultHSBChooserPanel.java
@@ -206,7 +206,7 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
{
Point p = e.getPoint();
if (p.x < 0 || p.y < 0 || p.y > imgHeight || p.x > imgWidth)
- return;
+ return;
gradientPoint = p;
update(p);
@@ -231,11 +231,11 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
{
handlingMouse = true;
if (hSpinner.isEnabled())
- updateH(p);
+ updateH(p);
else if (sSpinner.isEnabled())
- updateS(p);
+ updateS(p);
else
- updateB(p);
+ updateB(p);
handlingMouse = false;
}
@@ -309,21 +309,21 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
public void stateChanged(ChangeEvent e)
{
if (internalChange)
- return;
+ return;
Integer value = new Integer(slider.getValue());
switch (locked)
{
- case HLOCKED:
- hSpinner.setValue(value);
- break;
- case SLOCKED:
- sSpinner.setValue(value);
- break;
- case BLOCKED:
- bSpinner.setValue(value);
- break;
+ case HLOCKED:
+ hSpinner.setValue(value);
+ break;
+ case SLOCKED:
+ sSpinner.setValue(value);
+ break;
+ case BLOCKED:
+ bSpinner.setValue(value);
+ break;
}
}
}
@@ -344,18 +344,18 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
JSpinner change;
if (e.getSource() == hRadio)
{
- locked = HLOCKED;
- change = hSpinner;
+ locked = HLOCKED;
+ change = hSpinner;
}
else if (e.getSource() == sRadio)
{
- locked = SLOCKED;
- change = sSpinner;
+ locked = SLOCKED;
+ change = sSpinner;
}
else
{
- locked = BLOCKED;
- change = bSpinner;
+ locked = BLOCKED;
+ change = bSpinner;
}
change.setEnabled(((AbstractButton) e.getSource()).isSelected());
@@ -380,7 +380,7 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
public void stateChanged(ChangeEvent e)
{
if (internalChange)
- return;
+ return;
float h = ((Number) hSpinner.getValue()).intValue() / 360f;
float s = ((Number) sSpinner.getValue()).intValue() / 100f;
@@ -393,8 +393,8 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
if (! handlingMouse && slider != null && ! slider.getValueIsAdjusting())
{
- updateImage();
- updateTrack();
+ updateImage();
+ updateTrack();
}
repaint();
}
@@ -435,44 +435,44 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
if (! spinnerTrigger)
{
- hSpinner.setValue(new Integer((int) (hsbVals[0] * 360)));
- sSpinner.setValue(new Integer((int) (hsbVals[1] * 100)));
- bSpinner.setValue(new Integer((int) (hsbVals[2] * 100)));
+ hSpinner.setValue(new Integer((int) (hsbVals[0] * 360)));
+ sSpinner.setValue(new Integer((int) (hsbVals[1] * 100)));
+ bSpinner.setValue(new Integer((int) (hsbVals[2] * 100)));
}
switch (locked)
{
case HLOCKED:
- if (slider != null)
- slider.setValue(((Number) hSpinner.getValue()).intValue());
- if (! handlingMouse)
- {
- gradientPoint.x = (int) ((1
- - ((Number) sSpinner.getValue()).intValue() / 100f) * imgWidth);
- gradientPoint.y = (int) ((1
- - ((Number) bSpinner.getValue()).intValue() / 100f) * imgHeight);
- }
- break;
+ if (slider != null)
+ slider.setValue(((Number) hSpinner.getValue()).intValue());
+ if (! handlingMouse)
+ {
+ gradientPoint.x = (int) ((1
+ - ((Number) sSpinner.getValue()).intValue() / 100f) * imgWidth);
+ gradientPoint.y = (int) ((1
+ - ((Number) bSpinner.getValue()).intValue() / 100f) * imgHeight);
+ }
+ break;
case SLOCKED:
- if (slider != null)
- slider.setValue(((Number) sSpinner.getValue()).intValue());
- if (! handlingMouse)
- {
- gradientPoint.x = (int) (((Number) hSpinner.getValue()).intValue() / 360f * imgWidth);
- gradientPoint.y = (int) ((1
- - ((Number) bSpinner.getValue()).intValue() / 100f) * imgHeight);
- }
- break;
+ if (slider != null)
+ slider.setValue(((Number) sSpinner.getValue()).intValue());
+ if (! handlingMouse)
+ {
+ gradientPoint.x = (int) (((Number) hSpinner.getValue()).intValue() / 360f * imgWidth);
+ gradientPoint.y = (int) ((1
+ - ((Number) bSpinner.getValue()).intValue() / 100f) * imgHeight);
+ }
+ break;
case BLOCKED:
- if (slider != null)
- slider.setValue(((Number) bSpinner.getValue()).intValue());
- if (! handlingMouse)
- {
- gradientPoint.x = (int) (((Number) hSpinner.getValue()).intValue() / 360f * imgWidth);
- gradientPoint.y = (int) ((1
- - ((Number) sSpinner.getValue()).intValue() / 100f) * imgHeight);
- }
- break;
+ if (slider != null)
+ slider.setValue(((Number) bSpinner.getValue()).intValue());
+ if (! handlingMouse)
+ {
+ gradientPoint.x = (int) (((Number) hSpinner.getValue()).intValue() / 360f * imgWidth);
+ gradientPoint.y = (int) ((1
+ - ((Number) sSpinner.getValue()).intValue() / 100f) * imgHeight);
+ }
+ break;
}
internalChange = false;
@@ -498,21 +498,21 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
gradientPanel = new JPanel()
{
- public Dimension getPreferredSize()
- {
- return new Dimension(imgWidth, imgHeight);
- }
-
- public void paint(Graphics g)
- {
- if (gradientImage != null)
- g.drawImage(gradientImage, 0, 0, this);
-
- Color saved = g.getColor();
- g.setColor(Color.WHITE);
- g.drawOval(gradientPoint.x - 3, gradientPoint.y - 3, 6, 6);
- g.setColor(saved);
- }
+ public Dimension getPreferredSize()
+ {
+ return new Dimension(imgWidth, imgHeight);
+ }
+
+ public void paint(Graphics g)
+ {
+ if (gradientImage != null)
+ g.drawImage(gradientImage, 0, 0, this);
+
+ Color saved = g.getColor();
+ g.setColor(Color.WHITE);
+ g.drawOval(gradientPoint.x - 3, gradientPoint.y - 3, 6, 6);
+ g.setColor(saved);
+ }
};
MouseAdapter ml = new MainGradientMouseListener();
@@ -521,16 +521,16 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
trackPanel = new JPanel()
{
- public Dimension getPreferredSize()
- {
- return new Dimension(trackWidth, imgHeight);
- }
-
- public void paint(Graphics g)
- {
- if (trackImage != null)
- g.drawImage(trackImage, 0, 0, this);
- }
+ public Dimension getPreferredSize()
+ {
+ return new Dimension(trackWidth, imgHeight);
+ }
+
+ public void paint(Graphics g)
+ {
+ if (trackImage != null)
+ g.drawImage(trackImage, 0, 0, this);
+ }
};
slider = new JSlider();
@@ -682,9 +682,9 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
for (int j = 0; j < imgHeight; j++)
for (int i = 0; i < imgWidth; i++)
- pix[index++] = Color.HSBtoRGB(hValue, (imgWidth - i * 1f) / imgWidth,
- (imgHeight - j * 1f) / imgHeight)
- | (255 << 24);
+ pix[index++] = Color.HSBtoRGB(hValue, (imgWidth - i * 1f) / imgWidth,
+ (imgHeight - j * 1f) / imgHeight)
+ | (255 << 24);
gradientImage = createImage(new MemoryImageSource(imgWidth, imgHeight,
pix, 0, imgWidth));
@@ -702,9 +702,9 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
int index = 0;
for (int j = 0; j < imgHeight; j++)
for (int i = 0; i < imgWidth; i++)
- pix[index++] = Color.HSBtoRGB(i * 1f / imgWidth,
- (imgHeight - j * 1f) / imgHeight, bValue)
- | (255 << 24);
+ pix[index++] = Color.HSBtoRGB(i * 1f / imgWidth,
+ (imgHeight - j * 1f) / imgHeight, bValue)
+ | (255 << 24);
gradientImage = createImage(new MemoryImageSource(imgWidth, imgHeight,
pix, 0, imgWidth));
@@ -722,9 +722,9 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
int index = 0;
for (int j = 0; j < imgHeight; j++)
for (int i = 0; i < imgWidth; i++)
- pix[index++] = Color.HSBtoRGB(i * 1f / imgWidth, sValue,
- (imgHeight - j * 1f) / imgHeight)
- | (255 << 24);
+ pix[index++] = Color.HSBtoRGB(i * 1f / imgWidth, sValue,
+ (imgHeight - j * 1f) / imgHeight)
+ | (255 << 24);
gradientImage = createImage(new MemoryImageSource(imgWidth, imgHeight,
pix, 0, imgWidth));
}
@@ -739,14 +739,14 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
switch (locked)
{
case HLOCKED:
- updateHLockImage();
- break;
+ updateHLockImage();
+ break;
case SLOCKED:
- updateSLockImage();
- break;
+ updateSLockImage();
+ break;
case BLOCKED:
- updateBLockImage();
- break;
+ updateBLockImage();
+ break;
}
}
@@ -777,18 +777,18 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
slider.setMinimum(0);
if (locked == HLOCKED)
{
- slider.setMaximum(359);
- slider.setValue(((Number) hSpinner.getValue()).intValue());
- slider.setInverted(true);
+ slider.setMaximum(359);
+ slider.setValue(((Number) hSpinner.getValue()).intValue());
+ slider.setInverted(true);
}
else
{
- slider.setMaximum(100);
- slider.setInverted(false);
- if (sRadio.isSelected())
- slider.setValue(((Number) sSpinner.getValue()).intValue());
- else
- slider.setValue(((Number) bSpinner.getValue()).intValue());
+ slider.setMaximum(100);
+ slider.setInverted(false);
+ if (sRadio.isSelected())
+ slider.setValue(((Number) sSpinner.getValue()).intValue());
+ else
+ slider.setValue(((Number) bSpinner.getValue()).intValue());
}
repaint();
}
@@ -803,14 +803,14 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
switch (locked)
{
case HLOCKED:
- updateHTrack();
- break;
+ updateHTrack();
+ break;
case SLOCKED:
- updateSTrack();
- break;
+ updateSTrack();
+ break;
case BLOCKED:
- updateBTrack();
- break;
+ updateBTrack();
+ break;
}
}
@@ -825,8 +825,8 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
for (int j = 0; j < imgHeight; j++)
for (int i = 0; i < trackWidth; i++)
- trackPix[trackIndex++] = Color.HSBtoRGB(j * 1f / imgHeight, 1f, 1f)
- | (255 << 24);
+ trackPix[trackIndex++] = Color.HSBtoRGB(j * 1f / imgHeight, 1f, 1f)
+ | (255 << 24);
trackImage = createImage(new MemoryImageSource(trackWidth, imgHeight,
trackPix, 0, trackWidth));
@@ -846,9 +846,9 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
int trackIndex = 0;
for (int j = 0; j < imgHeight; j++)
for (int i = 0; i < trackWidth; i++)
- trackPix[trackIndex++] = Color.HSBtoRGB(hValue,
- (imgHeight - j * 1f) / imgHeight,
- bValue) | (255 << 24);
+ trackPix[trackIndex++] = Color.HSBtoRGB(hValue,
+ (imgHeight - j * 1f) / imgHeight,
+ bValue) | (255 << 24);
trackImage = createImage(new MemoryImageSource(trackWidth, imgHeight,
trackPix, 0, trackWidth));
@@ -868,9 +868,9 @@ class DefaultHSBChooserPanel extends AbstractColorChooserPanel
int trackIndex = 0;
for (int j = 0; j < imgHeight; j++)
for (int i = 0; i < trackWidth; i++)
- trackPix[trackIndex++] = Color.HSBtoRGB(hValue, sValue,
- (imgHeight - j * 1f) / imgHeight)
- | (255 << 24);
+ trackPix[trackIndex++] = Color.HSBtoRGB(hValue, sValue,
+ (imgHeight - j * 1f) / imgHeight)
+ | (255 << 24);
trackImage = createImage(new MemoryImageSource(trackWidth, imgHeight,
trackPix, 0, trackWidth));
diff --git a/libjava/classpath/javax/swing/colorchooser/DefaultRGBChooserPanel.java b/libjava/classpath/javax/swing/colorchooser/DefaultRGBChooserPanel.java
index 39a1732..24f0a9a 100644
--- a/libjava/classpath/javax/swing/colorchooser/DefaultRGBChooserPanel.java
+++ b/libjava/classpath/javax/swing/colorchooser/DefaultRGBChooserPanel.java
@@ -72,7 +72,7 @@ class DefaultRGBChooserPanel extends AbstractColorChooserPanel
public void stateChanged(ChangeEvent e)
{
if (updateChange)
- return;
+ return;
int color = R.getValue() << 16 | G.getValue() << 8 | B.getValue();
@@ -95,7 +95,7 @@ class DefaultRGBChooserPanel extends AbstractColorChooserPanel
public void stateChanged(ChangeEvent e)
{
if (updateChange)
- return;
+ return;
int red = ((Number) RSpinner.getValue()).intValue();
int green = ((Number) GSpinner.getValue()).intValue();
@@ -198,21 +198,21 @@ class DefaultRGBChooserPanel extends AbstractColorChooserPanel
if (! sliderChange)
{
- if (R != null)
- R.setValue(red);
- if (G != null)
- G.setValue(green);
- if (B != null)
- B.setValue(blue);
+ if (R != null)
+ R.setValue(red);
+ if (G != null)
+ G.setValue(green);
+ if (B != null)
+ B.setValue(blue);
}
if (! spinnerChange)
{
- if (GSpinner != null)
- GSpinner.setValue(new Integer(green));
- if (RSpinner != null)
- RSpinner.setValue(new Integer(red));
- if (BSpinner != null)
- BSpinner.setValue(new Integer(blue));
+ if (GSpinner != null)
+ GSpinner.setValue(new Integer(green));
+ if (RSpinner != null)
+ RSpinner.setValue(new Integer(red));
+ if (BSpinner != null)
+ BSpinner.setValue(new Integer(blue));
}
updateChange = false;
diff --git a/libjava/classpath/javax/swing/colorchooser/DefaultSwatchChooserPanel.java b/libjava/classpath/javax/swing/colorchooser/DefaultSwatchChooserPanel.java
index ff34368..99b7157 100644
--- a/libjava/classpath/javax/swing/colorchooser/DefaultSwatchChooserPanel.java
+++ b/libjava/classpath/javax/swing/colorchooser/DefaultSwatchChooserPanel.java
@@ -213,7 +213,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
/** The color (255, 153, 153). */
public static final Color C255153153 = new Color(255, 153, 153);
- static Color[] colors =
+ static Color[] colors =
{
// Row 1
Color.WHITE, new Color(204, 255, 255), C204255255, C204255255, C204255255,
@@ -224,7 +224,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
C255204204, new Color(255, 255, 204), C204255204,
C204255204, C204255204, C204255204, C204255204,
C204255204, C204255204, C204255204, C204255204,
-
+
// Row 2
C204204204, new Color(153, 255, 255), new Color(153, 204, 255), C153153255,
C153153255, C153153255, C153153255, C153153255,
@@ -237,7 +237,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
new Color(204, 255, 153), C153255153, C153255153,
C153255153, C153255153, C153255153, C153255153,
C153255153, new Color(153, 255, 204),
-
+
// Row 3
C204204204, new Color(102, 255, 255), new Color(102, 204, 255),
new Color(102, 153, 255), C102102255, C102102255,
@@ -256,7 +256,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
C102255102, C102255102, C102255102,
new Color(102, 255, 153),
new Color(102, 255, 204),
-
+
// Row 4
new Color(153, 153, 153), new Color(51, 255, 255), new Color(51, 204, 255),
new Color(51, 153, 255), new Color(51, 102, 255),
@@ -272,7 +272,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
C051255051, C051255051, C051255051,
new Color(51, 255, 102), new Color(51, 255, 153),
new Color(51, 255, 204),
-
+
// Row 5
new Color(153, 153, 153), new Color(0, 255, 255), new Color(0, 204, 255),
new Color(0, 153, 255), new Color(0, 102, 255),
@@ -289,7 +289,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
new Color(51, 255, 0), new Color(0, 255, 0),
new Color(0, 255, 51), new Color(0, 255, 102),
new Color(0, 255, 153), new Color(0, 255, 204),
-
+
// Row 6
new Color(102, 102, 102), C000204204, C000204204, new Color(0, 153, 204),
new Color(0, 102, 204), new Color(0, 51, 204),
@@ -305,7 +305,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
new Color(0, 204, 0), new Color(0, 204, 51),
new Color(0, 204, 102), new Color(0, 204, 153),
new Color(0, 204, 204),
-
+
// Row 7
new Color(102, 102, 102), C000153153, C000153153, C000153153,
new Color(0, 102, 153), new Color(0, 51, 153),
@@ -319,7 +319,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
new Color(102, 153, 0), new Color(51, 153, 0),
new Color(0, 153, 0), new Color(0, 153, 51),
new Color(0, 153, 102), C000153153, C000153153,
-
+
// Row 8
new Color(51, 51, 51), C000102102, C000102102, C000102102, C000102102,
new Color(0, 51, 102), new Color(0, 0, 102),
@@ -332,7 +332,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
new Color(51, 102, 0), new Color(0, 102, 0),
new Color(0, 102, 51), C000102102, C000102102,
C000102102,
-
+
// Row 9.
Color.BLACK, C000051051, C000051051, C000051051, C000051051, C000051051,
new Color(0, 0, 51), C051000051, C051000051,
@@ -369,8 +369,8 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
{
if (x % (cellWidth + gap) > cellWidth
|| y % (cellHeight + gap) > cellHeight)
- // position is located in gap.
- return null;
+ // position is located in gap.
+ return null;
int row = y / (cellHeight + gap);
int col = x / (cellWidth + gap);
@@ -401,14 +401,14 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
for (int i = 0; i < numRows; i++)
{
- for (int j = 0; j < numCols; j++)
- {
- graphics.setColor(colors[index++]);
- graphics.fill3DRect(currX, currY, cellWidth, cellHeight, true);
- currX += gap + cellWidth;
- }
- currX = insets.left;
- currY += gap + cellHeight;
+ for (int j = 0; j < numCols; j++)
+ {
+ graphics.setColor(colors[index++]);
+ graphics.fill3DRect(currX, currY, cellWidth, cellHeight, true);
+ currX += gap + cellWidth;
+ }
+ currX = insets.left;
+ currY += gap + cellHeight;
}
graphics.setColor(saved);
}
@@ -424,7 +424,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
{
Color c = getColorForPosition(e.getX(), e.getY());
if (c == null)
- return null;
+ return null;
return (c.getRed() + "," + c.getGreen() + "," + c.getBlue());
}
}
@@ -467,8 +467,8 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
{
if (x % (cellWidth + gap) > cellWidth
|| y % (cellHeight + gap) > cellHeight)
- // position is located in gap.
- return null;
+ // position is located in gap.
+ return null;
int row = y / (cellHeight + gap);
int col = x / (cellWidth + gap);
@@ -483,7 +483,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
{
colors = new Color[numRows * numCols];
for (int i = 0; i < colors.length; i++)
- colors[i] = defaultColor;
+ colors[i] = defaultColor;
}
/**
@@ -508,7 +508,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
void addColorToQueue(Color c)
{
if (--start == -1)
- start = numRows * numCols - 1;
+ start = numRows * numCols - 1;
colors[start] = c;
}
@@ -527,14 +527,14 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
for (int i = 0; i < numRows; i++)
{
- for (int j = 0; j < numCols; j++)
- {
- g.setColor(colors[getIndexForCell(i, j)]);
- g.fill3DRect(currX, currY, cellWidth, cellHeight, true);
- currX += cellWidth + gap;
- }
- currX = insets.left;
- currY += cellWidth + gap;
+ for (int j = 0; j < numCols; j++)
+ {
+ g.setColor(colors[getIndexForCell(i, j)]);
+ g.fill3DRect(currX, currY, cellWidth, cellHeight, true);
+ currX += cellWidth + gap;
+ }
+ currX = insets.left;
+ currY += cellWidth + gap;
}
}
@@ -549,7 +549,7 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
{
Color c = getColorForPosition(e.getX(), e.getY());
if (c == null)
- return null;
+ return null;
return c.getRed() + "," + c.getGreen() + "," + c.getBlue();
}
}
@@ -609,11 +609,11 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
for (int i = 0; i < comps.length; i++)
{
- pref[i] = comps[i].getPreferredSize();
- if (pref[i] == null)
- return;
- maxHeight = Math.max(maxHeight, pref[i].height);
- totalWidth += pref[i].width;
+ pref[i] = comps[i].getPreferredSize();
+ if (pref[i] == null)
+ return;
+ maxHeight = Math.max(maxHeight, pref[i].height);
+ totalWidth += pref[i].width;
}
ypos = (parent.getSize().height - maxHeight) / 2 + insets.top;
@@ -621,10 +621,10 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
for (int i = 0; i < comps.length; i++)
{
- if (pref[i] == null)
- continue;
- comps[i].setBounds(xpos, ypos, pref[i].width, pref[i].height);
- xpos += pref[i].width;
+ if (pref[i] == null)
+ continue;
+ comps[i].setBounds(xpos, ypos, pref[i].width, pref[i].height);
+ xpos += pref[i].width;
}
}
@@ -667,11 +667,11 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
for (int i = 0; i < comps.length; i++)
{
- pref = comps[i].getPreferredSize();
- if (pref == null)
- continue;
- xmax += pref.width;
- ymax = Math.max(ymax, pref.height);
+ pref = comps[i].getPreferredSize();
+ if (pref == null)
+ continue;
+ xmax += pref.width;
+ ymax = Math.max(ymax, pref.height);
}
Insets insets = parent.getInsets();
@@ -713,11 +713,11 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
for (int i = 0; i < comps.length; i++)
{
- pref = comps[i].getPreferredSize();
- if (pref == null)
- continue;
- comps[i].setBounds(insets.left, currY, pref.width, pref.height);
- currY += pref.height;
+ pref = comps[i].getPreferredSize();
+ if (pref == null)
+ continue;
+ comps[i].setBounds(insets.left, currY, pref.width, pref.height);
+ currY += pref.height;
}
}
@@ -750,12 +750,12 @@ class DefaultSwatchChooserPanel extends AbstractColorChooserPanel
Dimension pref;
for (int i = 0; i < comps.length; i++)
{
- pref = comps[i].getPreferredSize();
- if (pref != null)
- {
- width = Math.max(width, pref.width);
- height += pref.height;
- }
+ pref = comps[i].getPreferredSize();
+ if (pref != null)
+ {
+ width = Math.max(width, pref.width);
+ height += pref.height;
+ }
}
return new Dimension(width + insets.left + insets.right,
diff --git a/libjava/classpath/javax/swing/event/AncestorEvent.java b/libjava/classpath/javax/swing/event/AncestorEvent.java
index d06c6e3..27b469a 100644
--- a/libjava/classpath/javax/swing/event/AncestorEvent.java
+++ b/libjava/classpath/javax/swing/event/AncestorEvent.java
@@ -50,7 +50,7 @@ import javax.swing.JComponent;
public class AncestorEvent extends AWTEvent
{
private static final long serialVersionUID = -8079801679695605002L;
-
+
public static final int ANCESTOR_ADDED = 1;
public static final int ANCESTOR_REMOVED = 2;
public static final int ANCESTOR_MOVED = 3;
@@ -66,7 +66,7 @@ public class AncestorEvent extends AWTEvent
* @param ancestorParent parent ancestor
*/
public AncestorEvent(JComponent source, int id, Container ancestor,
- Container ancestorParent)
+ Container ancestorParent)
{
super(source, id);
this.sourceComponent = source;
diff --git a/libjava/classpath/javax/swing/event/AncestorListener.java b/libjava/classpath/javax/swing/event/AncestorListener.java
index 61d5aed..623956f 100644
--- a/libjava/classpath/javax/swing/event/AncestorListener.java
+++ b/libjava/classpath/javax/swing/event/AncestorListener.java
@@ -47,23 +47,23 @@ import java.util.EventListener;
*/
public interface AncestorListener extends EventListener {
- /**
- * Ancestor Added
- * @param event Ancestor Event
- */
- void ancestorAdded(AncestorEvent event);
+ /**
+ * Ancestor Added
+ * @param event Ancestor Event
+ */
+ void ancestorAdded(AncestorEvent event);
- /**
- * Ancestor Removed
- * @param event Ancestor Event
- */
- void ancestorRemoved(AncestorEvent event);
+ /**
+ * Ancestor Removed
+ * @param event Ancestor Event
+ */
+ void ancestorRemoved(AncestorEvent event);
- /**
- * Ancestor Moved
- * @param event Ancestor Event
- */
- void ancestorMoved(AncestorEvent event);
+ /**
+ * Ancestor Moved
+ * @param event Ancestor Event
+ */
+ void ancestorMoved(AncestorEvent event);
} // AncestorListener
diff --git a/libjava/classpath/javax/swing/event/CaretEvent.java b/libjava/classpath/javax/swing/event/CaretEvent.java
index 7de05a8..ef0436d 100644
--- a/libjava/classpath/javax/swing/event/CaretEvent.java
+++ b/libjava/classpath/javax/swing/event/CaretEvent.java
@@ -43,14 +43,14 @@ import java.util.EventObject;
* CaretEvent
* @author Andrew Selkirk
*/
-public abstract class CaretEvent extends EventObject
+public abstract class CaretEvent extends EventObject
{
/**
* CaretEvent constructor
* @param source Source object
*/
- public CaretEvent(Object source)
+ public CaretEvent(Object source)
{
super(source);
}
@@ -67,4 +67,4 @@ public abstract class CaretEvent extends EventObject
*/
public abstract int getMark();
-}
+}
diff --git a/libjava/classpath/javax/swing/event/CaretListener.java b/libjava/classpath/javax/swing/event/CaretListener.java
index aeee434..ab7305d 100644
--- a/libjava/classpath/javax/swing/event/CaretListener.java
+++ b/libjava/classpath/javax/swing/event/CaretListener.java
@@ -46,11 +46,11 @@ import java.util.EventListener;
*/
public interface CaretListener extends EventListener {
- /**
- * Caret position has been updated
- * @param event Caret Event
- */
- void caretUpdate(CaretEvent event);
+ /**
+ * Caret position has been updated
+ * @param event Caret Event
+ */
+ void caretUpdate(CaretEvent event);
} // CaretListener
diff --git a/libjava/classpath/javax/swing/event/CellEditorListener.java b/libjava/classpath/javax/swing/event/CellEditorListener.java
index d2dd5ba..4252c27 100644
--- a/libjava/classpath/javax/swing/event/CellEditorListener.java
+++ b/libjava/classpath/javax/swing/event/CellEditorListener.java
@@ -46,17 +46,17 @@ import java.util.EventListener;
*/
public interface CellEditorListener extends EventListener {
- /**
- * Editing has been canceled
- * @param event Change Event
- */
- void editingCanceled(ChangeEvent event);
-
- /**
- * Editing has been stopped
- * @param event Change Event
- */
- void editingStopped(ChangeEvent event);
+ /**
+ * Editing has been canceled
+ * @param event Change Event
+ */
+ void editingCanceled(ChangeEvent event);
+
+ /**
+ * Editing has been stopped
+ * @param event Change Event
+ */
+ void editingStopped(ChangeEvent event);
} // CellEditorListener
diff --git a/libjava/classpath/javax/swing/event/ChangeEvent.java b/libjava/classpath/javax/swing/event/ChangeEvent.java
index 8854282..8683412 100644
--- a/libjava/classpath/javax/swing/event/ChangeEvent.java
+++ b/libjava/classpath/javax/swing/event/ChangeEvent.java
@@ -41,24 +41,24 @@ import java.util.EventObject;
/**
* An event used to signal a state change for an object.
- *
+ *
* @see ChangeListener
* @see CellEditorListener
* @see TableColumnModelListener
- *
+ *
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public class ChangeEvent
- extends EventObject
+public class ChangeEvent
+ extends EventObject
{
/**
* Creates a new ChangeEvent instance for the specified source.
- *
+ *
* @param source the source for the event (null not permitted).
*/
- public ChangeEvent(Object source)
+ public ChangeEvent(Object source)
{
super(source);
}
diff --git a/libjava/classpath/javax/swing/event/ChangeListener.java b/libjava/classpath/javax/swing/event/ChangeListener.java
index 7580970..0f9d087 100644
--- a/libjava/classpath/javax/swing/event/ChangeListener.java
+++ b/libjava/classpath/javax/swing/event/ChangeListener.java
@@ -40,22 +40,22 @@ package javax.swing.event;
import java.util.EventListener;
/**
- * A ChangeListener can register with an object to receive
+ * A ChangeListener can register with an object to receive
* notification of state changes (for objects that support this mechanism).
- *
+ *
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public interface ChangeListener
- extends EventListener
+public interface ChangeListener
+ extends EventListener
{
/**
* Called by an object to notify the listener that the object's state has
- * changed. The incoming event identifies the
+ * changed. The incoming event identifies the
* source of the event, allowing the listener to differentiate
* when it is listening for changes in multiple sources.
- *
+ *
* @param event the change event.
*/
void stateChanged(ChangeEvent event);
diff --git a/libjava/classpath/javax/swing/event/DocumentEvent.java b/libjava/classpath/javax/swing/event/DocumentEvent.java
index 8223049..4e12355 100644
--- a/libjava/classpath/javax/swing/event/DocumentEvent.java
+++ b/libjava/classpath/javax/swing/event/DocumentEvent.java
@@ -75,7 +75,7 @@ public interface DocumentEvent
* @return Element[]
*/
Element[] getChildrenAdded();
-
+
}
/**
diff --git a/libjava/classpath/javax/swing/event/DocumentListener.java b/libjava/classpath/javax/swing/event/DocumentListener.java
index df5e784..28a7d9d 100644
--- a/libjava/classpath/javax/swing/event/DocumentListener.java
+++ b/libjava/classpath/javax/swing/event/DocumentListener.java
@@ -46,23 +46,23 @@ import java.util.EventListener;
*/
public interface DocumentListener extends EventListener {
- /**
- * Changed update
- * @param event Document Event
- */
- void changedUpdate(DocumentEvent event);
+ /**
+ * Changed update
+ * @param event Document Event
+ */
+ void changedUpdate(DocumentEvent event);
- /**
- * Insert update
- * @param event Document Event
- */
- void insertUpdate(DocumentEvent event);
+ /**
+ * Insert update
+ * @param event Document Event
+ */
+ void insertUpdate(DocumentEvent event);
- /**
- * Remove update
- * @param event Document Event
- */
- void removeUpdate(DocumentEvent event);
+ /**
+ * Remove update
+ * @param event Document Event
+ */
+ void removeUpdate(DocumentEvent event);
} // DocumentListener
diff --git a/libjava/classpath/javax/swing/event/EventListenerList.java b/libjava/classpath/javax/swing/event/EventListenerList.java
index 8c76f7f..940d157 100644
--- a/libjava/classpath/javax/swing/event/EventListenerList.java
+++ b/libjava/classpath/javax/swing/event/EventListenerList.java
@@ -107,8 +107,8 @@ public class EventListenerList
* have no listeners.
*/
private static final Object[] NO_LISTENERS = new Object[0];
-
-
+
+
/**
* An array with all currently registered listeners. The array has
* twice as many elements as there are listeners. For an even
@@ -118,7 +118,7 @@ public class EventListenerList
*/
protected transient Object[] listenerList = NO_LISTENERS;
-
+
/**
* EventListenerList constructor
*/
@@ -194,7 +194,7 @@ public class EventListenerList
/**
* Returns an array containing a sequence of listenerType/listener pairs, one
* for each listener.
- *
+ *
* @return An array containing the listener types and references.
*/
public Object[] getListenerList()
@@ -240,7 +240,7 @@ public class EventListenerList
for (int i = listenerList.length - 2; i >= 0; i -= 2)
if (listenerList[i] == c)
result[f++] = (EventListener) listenerList[i + 1];
-
+
return (T[]) result;
}
diff --git a/libjava/classpath/javax/swing/event/HyperlinkEvent.java b/libjava/classpath/javax/swing/event/HyperlinkEvent.java
index 4afa009..75092b5 100644
--- a/libjava/classpath/javax/swing/event/HyperlinkEvent.java
+++ b/libjava/classpath/javax/swing/event/HyperlinkEvent.java
@@ -54,12 +54,12 @@ public class HyperlinkEvent extends EventObject
public static final EventType ENTERED = new EventType("ENTERED"); // TODO
public static final EventType EXITED = new EventType("EXITED"); // TODO
public static final EventType ACTIVATED = new EventType("ACTIVATED"); // TODO
-
+
private String type;
/**
* Creates a new Event type.
- *
+ *
* @param type String representing the event type.
*/
private EventType(String type)
@@ -77,7 +77,7 @@ public class HyperlinkEvent extends EventObject
}
private static final long serialVersionUID = -2054640811732867012L;
-
+
private EventType type;
private URL url;
private String description;
@@ -85,7 +85,7 @@ public class HyperlinkEvent extends EventObject
/**
* Creates a new HyperlinkEvent with the given arguments.
- *
+ *
* @param source The object this link is associated to.
* @param type The type of event.
* @param url The URL this link pointing too.
@@ -97,21 +97,21 @@ public class HyperlinkEvent extends EventObject
/**
* Creates a new HyperlinkEvent with the given arguments.
- *
+ *
* @param source The object this link is associated to.
* @param type The type of event.
* @param url The URL this link pointing too.
* @param description The description for this link.
*/
public HyperlinkEvent(Object source, EventType type, URL url,
- String description)
+ String description)
{
this (source, type, url, description, null);
}
-
+
/**
* Creates a new HyperlinkEvent with the given arguments.
- *
+ *
* @param source The object this link is associated to.
* @param type The type of event.
* @param url The URL this link pointing too.
@@ -119,7 +119,7 @@ public class HyperlinkEvent extends EventObject
* @param element The element in the document representing the anchor.
*/
public HyperlinkEvent(Object source, EventType type, URL url,
- String description, Element element)
+ String description, Element element)
{
super(source);
this.type = type;
@@ -135,7 +135,7 @@ public class HyperlinkEvent extends EventObject
{
return element;
}
-
+
/**
* Returns the URL of this event.
*/
diff --git a/libjava/classpath/javax/swing/event/HyperlinkListener.java b/libjava/classpath/javax/swing/event/HyperlinkListener.java
index 5dede99..0e01ba7 100644
--- a/libjava/classpath/javax/swing/event/HyperlinkListener.java
+++ b/libjava/classpath/javax/swing/event/HyperlinkListener.java
@@ -47,11 +47,11 @@ import java.util.EventListener;
*/
public interface HyperlinkListener extends EventListener {
- /**
- * Hyperlink updated
- * @param event Hyperlink Event
- */
- void hyperlinkUpdate(HyperlinkEvent event);
+ /**
+ * Hyperlink updated
+ * @param event Hyperlink Event
+ */
+ void hyperlinkUpdate(HyperlinkEvent event);
} // HyperlinkListener
diff --git a/libjava/classpath/javax/swing/event/InternalFrameAdapter.java b/libjava/classpath/javax/swing/event/InternalFrameAdapter.java
index dfa88c3..da893c7 100644
--- a/libjava/classpath/javax/swing/event/InternalFrameAdapter.java
+++ b/libjava/classpath/javax/swing/event/InternalFrameAdapter.java
@@ -52,7 +52,7 @@ public abstract class InternalFrameAdapter implements InternalFrameListener
{
// Nothing to do here.
}
-
+
/**
* Internal frame activated.
*
diff --git a/libjava/classpath/javax/swing/event/InternalFrameEvent.java b/libjava/classpath/javax/swing/event/InternalFrameEvent.java
index 4e289bf..1d7145d 100644
--- a/libjava/classpath/javax/swing/event/InternalFrameEvent.java
+++ b/libjava/classpath/javax/swing/event/InternalFrameEvent.java
@@ -44,7 +44,7 @@ import javax.swing.JInternalFrame;
/**
* An event that indicates a change to a {@link JInternalFrame} component.
- *
+ *
* @author Andrew Selkirk
*/
public class InternalFrameEvent extends AWTEvent
@@ -98,12 +98,12 @@ public class InternalFrameEvent extends AWTEvent
/**
* Creates a new JInternalFrameEvent instance.
- *
+ *
* @param source the source of this event (null not permitted).
* @param id the event ID of this event (see the constants defined by this
* class).
- *
- * @throws IllegalArgumentException if source is
+ *
+ * @throws IllegalArgumentException if source is
* null.
*/
public InternalFrameEvent(JInternalFrame source, int id)
@@ -114,23 +114,23 @@ public class InternalFrameEvent extends AWTEvent
/**
* Returns the JInternalFrame component that is the source for
* this event.
- *
+ *
* @return The source.
- *
+ *
* @since 1.3
*/
public JInternalFrame getInternalFrame()
{
return (JInternalFrame) source;
}
-
+
/**
- * Returns a string that indicates the event id. This is used by the
+ * Returns a string that indicates the event id. This is used by the
* {@link #toString()} method.
- *
+ *
* @return A string that indicates the event id.
*/
- public String paramString()
+ public String paramString()
{
switch (id) {
case INTERNAL_FRAME_ACTIVATED:
diff --git a/libjava/classpath/javax/swing/event/InternalFrameListener.java b/libjava/classpath/javax/swing/event/InternalFrameListener.java
index d1b2812..36874d2 100644
--- a/libjava/classpath/javax/swing/event/InternalFrameListener.java
+++ b/libjava/classpath/javax/swing/event/InternalFrameListener.java
@@ -46,47 +46,47 @@ import java.util.EventListener;
*/
public interface InternalFrameListener extends EventListener {
- /**
- * Internal frame activated
- * @param event Internal Frame Event
- */
- void internalFrameActivated(InternalFrameEvent event);
-
- /**
- * Internal frame closed
- * @param event Internal Frame Event
- */
- void internalFrameClosed(InternalFrameEvent event);
-
- /**
- * Internal frame closing
- * @param event Internal Frame Event
- */
- void internalFrameClosing(InternalFrameEvent event);
-
- /**
- * Internal frame deactivated
- * @param event Internal Frame Event
- */
- void internalFrameDeactivated(InternalFrameEvent event);
-
- /**
- * Internal frame deiconified
- * @param event Internal Frame Event
- */
- void internalFrameDeiconified(InternalFrameEvent event);
-
- /**
- * Internal frame iconified
- * @param event Internal Frame Event
- */
- void internalFrameIconified(InternalFrameEvent event);
-
- /**
- * Internal frame opened
- * @param event Internal Frame Event
- */
- void internalFrameOpened(InternalFrameEvent event);
+ /**
+ * Internal frame activated
+ * @param event Internal Frame Event
+ */
+ void internalFrameActivated(InternalFrameEvent event);
+
+ /**
+ * Internal frame closed
+ * @param event Internal Frame Event
+ */
+ void internalFrameClosed(InternalFrameEvent event);
+
+ /**
+ * Internal frame closing
+ * @param event Internal Frame Event
+ */
+ void internalFrameClosing(InternalFrameEvent event);
+
+ /**
+ * Internal frame deactivated
+ * @param event Internal Frame Event
+ */
+ void internalFrameDeactivated(InternalFrameEvent event);
+
+ /**
+ * Internal frame deiconified
+ * @param event Internal Frame Event
+ */
+ void internalFrameDeiconified(InternalFrameEvent event);
+
+ /**
+ * Internal frame iconified
+ * @param event Internal Frame Event
+ */
+ void internalFrameIconified(InternalFrameEvent event);
+
+ /**
+ * Internal frame opened
+ * @param event Internal Frame Event
+ */
+ void internalFrameOpened(InternalFrameEvent event);
} // InternalFrameListener
diff --git a/libjava/classpath/javax/swing/event/ListDataEvent.java b/libjava/classpath/javax/swing/event/ListDataEvent.java
index 897fc12..51fa887 100644
--- a/libjava/classpath/javax/swing/event/ListDataEvent.java
+++ b/libjava/classpath/javax/swing/event/ListDataEvent.java
@@ -43,40 +43,40 @@ import java.util.EventObject;
/**
* An event that contains information about a modification to the content of
* a list.
- *
+ *
* @author Andrew Selkirk
* @author Ronald Veldema
*/
public class ListDataEvent extends EventObject
{
private static final long serialVersionUID = 2510353260071004774L;
-
+
/** An event type indicating that the list content has been modified. */
public static final int CONTENTS_CHANGED = 0;
-
+
/** An event type indicating that an interval has been added to the list. */
public static final int INTERVAL_ADDED = 1;
-
- /**
- * An event type indicating that an interval has been removed from the
- * list.
+
+ /**
+ * An event type indicating that an interval has been removed from the
+ * list.
*/
public static final int INTERVAL_REMOVED = 2;
private int type;
private int index0;
private int index1;
-
+
/**
* Creates a ListDataEvent object.
- *
+ *
* @param source the source of the event (null not permitted).
- * @param type the type of the event (should be one of
- * {@link #CONTENTS_CHANGED}, {@link #INTERVAL_ADDED} or
+ * @param type the type of the event (should be one of
+ * {@link #CONTENTS_CHANGED}, {@link #INTERVAL_ADDED} or
* {@link #INTERVAL_REMOVED}, although this is not enforced).
- * @param index0 the index for one end of the modified range of list
+ * @param index0 the index for one end of the modified range of list
* elements.
- * @param index1 the index for the other end of the modified range of list
+ * @param index1 the index for the other end of the modified range of list
* elements.
*/
public ListDataEvent(Object source, int type, int index0, int index1)
@@ -86,10 +86,10 @@ public class ListDataEvent extends EventObject
this.index0 = Math.min(index0, index1);
this.index1 = Math.max(index0, index1);
}
-
+
/**
* Returns the index of the first item in the range of modified list items.
- *
+ *
* @return The index of the first item in the range of modified list items.
*/
public int getIndex0()
@@ -99,7 +99,7 @@ public class ListDataEvent extends EventObject
/**
* Returns the index of the last item in the range of modified list items.
- *
+ *
* @return The index of the last item in the range of modified list items.
*/
public int getIndex1()
@@ -109,24 +109,24 @@ public class ListDataEvent extends EventObject
/**
* Returns a code representing the type of this event, which is usually one
- * of {@link #CONTENTS_CHANGED}, {@link #INTERVAL_ADDED} or
+ * of {@link #CONTENTS_CHANGED}, {@link #INTERVAL_ADDED} or
* {@link #INTERVAL_REMOVED}.
- *
+ *
* @return The event type.
*/
public int getType()
{
return type;
}
-
+
/**
* Returns a string representing the state of this event.
- *
+ *
* @return A string.
*/
public String toString()
{
- return getClass().getName() + "[type=" + type + ",index0=" + index0
+ return getClass().getName() + "[type=" + type + ",index0=" + index0
+ ",index1=" + index1 + "]";
}
}
diff --git a/libjava/classpath/javax/swing/event/ListDataListener.java b/libjava/classpath/javax/swing/event/ListDataListener.java
index f42777d..4bbe1e5 100644
--- a/libjava/classpath/javax/swing/event/ListDataListener.java
+++ b/libjava/classpath/javax/swing/event/ListDataListener.java
@@ -44,11 +44,11 @@ import javax.swing.ListModel;
/**
* A ListDataListener can register with a {@link ListModel} and
* receive notification of updates to the model.
- *
+ *
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public interface ListDataListener extends EventListener
+public interface ListDataListener extends EventListener
{
/**
@@ -56,7 +56,7 @@ public interface ListDataListener extends EventListener
* in some way. This method will be called if the change cannot be
* notified via the {@link #intervalAdded(ListDataEvent)} or the
* {@link #intervalRemoved(ListDataEvent)} methods.
- *
+ *
* @param event the event.
*/
void contentsChanged(ListDataEvent event);
@@ -65,16 +65,16 @@ public interface ListDataListener extends EventListener
* Notifies the listener that one or more items have been added to the
* list. The event argument can supply the indices for the
* range of items added.
- *
+ *
* @param event the event.
*/
void intervalAdded(ListDataEvent event);
/**
* Notifies the listener that one or more items have been removed from
- * the list. The event argument can supply the indices for
+ * the list. The event argument can supply the indices for
* the range of items removed.
- *
+ *
* @param event the event.
*/
void intervalRemoved(ListDataEvent event);
diff --git a/libjava/classpath/javax/swing/event/ListSelectionEvent.java b/libjava/classpath/javax/swing/event/ListSelectionEvent.java
index d79cbfa..97555d1 100644
--- a/libjava/classpath/javax/swing/event/ListSelectionEvent.java
+++ b/libjava/classpath/javax/swing/event/ListSelectionEvent.java
@@ -45,22 +45,22 @@ import javax.swing.ListSelectionModel;
* An event that indicates a change to a list selection, including the source
* of the change (a {@link ListSelectionModel}) and the range of items in the
* list that have potentially changed their selection status.
- *
+ *
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public class ListSelectionEvent extends EventObject
+public class ListSelectionEvent extends EventObject
{
- /**
- * The index of the first list item in the range of items that has
- * potentially had its selection status modified.
+ /**
+ * The index of the first list item in the range of items that has
+ * potentially had its selection status modified.
*/
private int firstIndex = 0;
- /**
- * The index of the last list item in the range of items that has
- * potentially had its selection status modified.
+ /**
+ * The index of the last list item in the range of items that has
+ * potentially had its selection status modified.
*/
private int lastIndex = 0;
@@ -69,52 +69,52 @@ public class ListSelectionEvent extends EventObject
/**
* Creates a new ListSelectionEvent.
- *
+ *
* @param source the event source (null not permitted).
* @param firstIndex the first index.
* @param lastIndex the last index.
- * @param isAdjusting a flag indicating that this event is one in a series
+ * @param isAdjusting a flag indicating that this event is one in a series
* of events updating a selection.
- *
- * @throws IllegalArgumentException if source is
+ *
+ * @throws IllegalArgumentException if source is
* null.
*/
public ListSelectionEvent(Object source, int firstIndex,
- int lastIndex, boolean isAdjusting)
+ int lastIndex, boolean isAdjusting)
{
super(source);
this.firstIndex = firstIndex;
this.lastIndex = lastIndex;
this.isAdjusting = isAdjusting;
}
-
+
/**
* Returns the first index.
- *
+ *
* @return The first index.
*/
- public int getFirstIndex()
+ public int getFirstIndex()
{
return firstIndex;
}
/**
* Returns the last index.
- *
+ *
* @return The last index.
*/
- public int getLastIndex()
+ public int getLastIndex()
{
return lastIndex;
}
/**
- * Returns the flag that indicates that this event is one in a series of
+ * Returns the flag that indicates that this event is one in a series of
* events updating a selection.
- *
+ *
* @return A boolean.
*/
- public boolean getValueIsAdjusting()
+ public boolean getValueIsAdjusting()
{
return isAdjusting;
}
@@ -122,13 +122,13 @@ public class ListSelectionEvent extends EventObject
/**
* Returns a string representation of the event, typically used for debugging
* purposes.
- *
+ *
* @return A string representation of the event.
*/
- public String toString()
+ public String toString()
{
- return this.getClass().toString() + "[ source=" + source.toString()
- + " firstIndex= " + firstIndex + " lastIndex= " + lastIndex
+ return this.getClass().toString() + "[ source=" + source.toString()
+ + " firstIndex= " + firstIndex + " lastIndex= " + lastIndex
+ " isAdjusting= " + isAdjusting + " ]";
}
diff --git a/libjava/classpath/javax/swing/event/ListSelectionListener.java b/libjava/classpath/javax/swing/event/ListSelectionListener.java
index a21dc73..20e40da 100644
--- a/libjava/classpath/javax/swing/event/ListSelectionListener.java
+++ b/libjava/classpath/javax/swing/event/ListSelectionListener.java
@@ -42,20 +42,20 @@ import java.util.EventListener;
import javax.swing.ListSelectionModel;
/**
- * A listener that receives {@link ListSelectionEvent} notifications,
+ * A listener that receives {@link ListSelectionEvent} notifications,
* typically from a {@link ListSelectionModel} when it is modified.
*
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public interface ListSelectionListener extends EventListener
+public interface ListSelectionListener extends EventListener
{
/**
* Receives notification of a {@link ListSelectionEvent}.
- *
+ *
* @param event the event.
*/
void valueChanged(ListSelectionEvent event);
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/swing/event/MenuDragMouseEvent.java b/libjava/classpath/javax/swing/event/MenuDragMouseEvent.java
index 6be11bc..952d99e 100644
--- a/libjava/classpath/javax/swing/event/MenuDragMouseEvent.java
+++ b/libjava/classpath/javax/swing/event/MenuDragMouseEvent.java
@@ -48,14 +48,14 @@ import javax.swing.MenuSelectionManager;
* MenuDragMouseEvent
* @author Andrew Selkirk
*/
-public class MenuDragMouseEvent extends MouseEvent
+public class MenuDragMouseEvent extends MouseEvent
{
/**
* path
*/
private MenuElement[] path = null;
-
+
/**
* manager
*/
@@ -76,29 +76,29 @@ public class MenuDragMouseEvent extends MouseEvent
*/
public MenuDragMouseEvent(Component source, int id, long when, int modifiers,
int x, int y, int clickCount, boolean popupTrigger,
- MenuElement[] path, MenuSelectionManager manager)
+ MenuElement[] path, MenuSelectionManager manager)
{
super(source, id, when, modifiers, x, y, clickCount, popupTrigger);
this.path = path;
this.manager = manager;
- }
+ }
/**
* Get path
* @return path
*/
- public MenuElement[] getPath()
+ public MenuElement[] getPath()
{
return path;
- }
+ }
/**
* Get menu selection manager
* @return manager
*/
- public MenuSelectionManager getMenuSelectionManager()
+ public MenuSelectionManager getMenuSelectionManager()
{
return manager;
}
-}
+}
diff --git a/libjava/classpath/javax/swing/event/MenuDragMouseListener.java b/libjava/classpath/javax/swing/event/MenuDragMouseListener.java
index bfca315..d0cd053 100644
--- a/libjava/classpath/javax/swing/event/MenuDragMouseListener.java
+++ b/libjava/classpath/javax/swing/event/MenuDragMouseListener.java
@@ -46,29 +46,29 @@ import java.util.EventListener;
*/
public interface MenuDragMouseListener extends EventListener {
- /**
- * Menu drag mouse dragged
- * @param event Menu Drag Mouse Event
- */
- void menuDragMouseDragged(MenuDragMouseEvent event);
+ /**
+ * Menu drag mouse dragged
+ * @param event Menu Drag Mouse Event
+ */
+ void menuDragMouseDragged(MenuDragMouseEvent event);
- /**
- * Menu drag mouse entered
- * @param event Menu Drag Mouse Event
- */
- void menuDragMouseEntered(MenuDragMouseEvent event);
+ /**
+ * Menu drag mouse entered
+ * @param event Menu Drag Mouse Event
+ */
+ void menuDragMouseEntered(MenuDragMouseEvent event);
- /**
- * Menu drag mouse exited
- * @param event Menu Drag Mouse Event
- */
- void menuDragMouseExited(MenuDragMouseEvent event);
+ /**
+ * Menu drag mouse exited
+ * @param event Menu Drag Mouse Event
+ */
+ void menuDragMouseExited(MenuDragMouseEvent event);
- /**
- * Menu drag mouse released
- * @param event Menu Drag Mouse Event
- */
- void menuDragMouseReleased(MenuDragMouseEvent event);
+ /**
+ * Menu drag mouse released
+ * @param event Menu Drag Mouse Event
+ */
+ void menuDragMouseReleased(MenuDragMouseEvent event);
} // MenuDragMouseListener
diff --git a/libjava/classpath/javax/swing/event/MenuEvent.java b/libjava/classpath/javax/swing/event/MenuEvent.java
index 8ba3292..6a7e021 100644
--- a/libjava/classpath/javax/swing/event/MenuEvent.java
+++ b/libjava/classpath/javax/swing/event/MenuEvent.java
@@ -44,14 +44,14 @@ import java.util.EventObject;
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public class MenuEvent extends EventObject
+public class MenuEvent extends EventObject
{
/**
* Constructor MenuEvent
* @param source Source object
*/
- public MenuEvent(Object source)
+ public MenuEvent(Object source)
{
super(source);
}
diff --git a/libjava/classpath/javax/swing/event/MenuKeyEvent.java b/libjava/classpath/javax/swing/event/MenuKeyEvent.java
index 3335850..937089e 100644
--- a/libjava/classpath/javax/swing/event/MenuKeyEvent.java
+++ b/libjava/classpath/javax/swing/event/MenuKeyEvent.java
@@ -48,14 +48,14 @@ import javax.swing.MenuSelectionManager;
* MenuKeyEvent
* @author Andrew Selkirk
*/
-public class MenuKeyEvent extends KeyEvent
+public class MenuKeyEvent extends KeyEvent
{
/**
* path
*/
private MenuElement[] path = null;
-
+
/**
* manager
*/
@@ -74,18 +74,18 @@ public class MenuKeyEvent extends KeyEvent
*/
public MenuKeyEvent(Component source, int id, long when, int modifiers,
int keyCode, char keyChar, MenuElement[] path,
- MenuSelectionManager manager)
+ MenuSelectionManager manager)
{
super(source, id, when, modifiers, keyCode, keyChar);
this.path = path;
this.manager = manager;
- }
+ }
/**
* getPath
* @return path
*/
- public MenuElement[] getPath()
+ public MenuElement[] getPath()
{
return path;
}
@@ -94,9 +94,9 @@ public class MenuKeyEvent extends KeyEvent
* getMenuSelectionManager
* @return MenuSelectionManager
*/
- public MenuSelectionManager getMenuSelectionManager()
+ public MenuSelectionManager getMenuSelectionManager()
{
return manager;
}
-}
+}
diff --git a/libjava/classpath/javax/swing/event/MenuKeyListener.java b/libjava/classpath/javax/swing/event/MenuKeyListener.java
index 7a1eb89..36d6ecd 100644
--- a/libjava/classpath/javax/swing/event/MenuKeyListener.java
+++ b/libjava/classpath/javax/swing/event/MenuKeyListener.java
@@ -46,23 +46,23 @@ import java.util.EventListener;
*/
public interface MenuKeyListener extends EventListener {
- /**
- * Menu key pressed
- * @param event Menu Key Event
- */
- void menuKeyPressed(MenuKeyEvent event);
+ /**
+ * Menu key pressed
+ * @param event Menu Key Event
+ */
+ void menuKeyPressed(MenuKeyEvent event);
- /**
- * Menu key released
- * @param event Menu Key Event
- */
- void menuKeyReleased(MenuKeyEvent event);
+ /**
+ * Menu key released
+ * @param event Menu Key Event
+ */
+ void menuKeyReleased(MenuKeyEvent event);
- /**
- * Menu key typed
- * @param event Menu Key Event
- */
- void menuKeyTyped(MenuKeyEvent event);
+ /**
+ * Menu key typed
+ * @param event Menu Key Event
+ */
+ void menuKeyTyped(MenuKeyEvent event);
} // MenuKeyListener
diff --git a/libjava/classpath/javax/swing/event/MenuListener.java b/libjava/classpath/javax/swing/event/MenuListener.java
index dba704a..10a18f2 100644
--- a/libjava/classpath/javax/swing/event/MenuListener.java
+++ b/libjava/classpath/javax/swing/event/MenuListener.java
@@ -46,23 +46,23 @@ import java.util.EventListener;
*/
public interface MenuListener extends EventListener {
- /**
- * Menu canceled
- * @param event Menu Event
- */
- void menuCanceled(MenuEvent event);
+ /**
+ * Menu canceled
+ * @param event Menu Event
+ */
+ void menuCanceled(MenuEvent event);
- /**
- * Menu deselected
- * @param event Menu Event
- */
- void menuDeselected(MenuEvent event);
+ /**
+ * Menu deselected
+ * @param event Menu Event
+ */
+ void menuDeselected(MenuEvent event);
- /**
- * Menu selected
- * @param event Menu Event
- */
- void menuSelected(MenuEvent event);
+ /**
+ * Menu selected
+ * @param event Menu Event
+ */
+ void menuSelected(MenuEvent event);
} // MenuListener
diff --git a/libjava/classpath/javax/swing/event/MouseInputListener.java b/libjava/classpath/javax/swing/event/MouseInputListener.java
index 3d879b9..fc92615 100644
--- a/libjava/classpath/javax/swing/event/MouseInputListener.java
+++ b/libjava/classpath/javax/swing/event/MouseInputListener.java
@@ -46,7 +46,7 @@ import java.awt.event.MouseMotionListener;
* @author Andrew Selkirk
*/
public interface MouseInputListener extends MouseListener,
- MouseMotionListener
+ MouseMotionListener
{
// This interface only pulls together MouseListener and MouseMotionListener
// without adding any methods on its own.
diff --git a/libjava/classpath/javax/swing/event/PopupMenuEvent.java b/libjava/classpath/javax/swing/event/PopupMenuEvent.java
index 0555550..640b900 100644
--- a/libjava/classpath/javax/swing/event/PopupMenuEvent.java
+++ b/libjava/classpath/javax/swing/event/PopupMenuEvent.java
@@ -46,13 +46,13 @@ import java.util.EventObject;
*/
public class PopupMenuEvent extends EventObject {
- /**
- * Constructor PopupMenuEvent
- * @param source Source
- */
- public PopupMenuEvent(Object source) {
- super(source);
- } // PopupMenuEvent()
+ /**
+ * Constructor PopupMenuEvent
+ * @param source Source
+ */
+ public PopupMenuEvent(Object source) {
+ super(source);
+ } // PopupMenuEvent()
} // PopupMenuEvent
diff --git a/libjava/classpath/javax/swing/event/PopupMenuListener.java b/libjava/classpath/javax/swing/event/PopupMenuListener.java
index dc917d2..18d68f4 100644
--- a/libjava/classpath/javax/swing/event/PopupMenuListener.java
+++ b/libjava/classpath/javax/swing/event/PopupMenuListener.java
@@ -46,23 +46,23 @@ import java.util.EventListener;
*/
public interface PopupMenuListener extends EventListener {
- /**
- * Popup Menu Canceled
- * @param event Popup Menu Event
- */
- void popupMenuCanceled(PopupMenuEvent event);
+ /**
+ * Popup Menu Canceled
+ * @param event Popup Menu Event
+ */
+ void popupMenuCanceled(PopupMenuEvent event);
- /**
- * Popup Menu will become invisible
- * @param event Popup Menu Event
- */
- void popupMenuWillBecomeInvisible(PopupMenuEvent event);
+ /**
+ * Popup Menu will become invisible
+ * @param event Popup Menu Event
+ */
+ void popupMenuWillBecomeInvisible(PopupMenuEvent event);
- /**
- * Popup Menu will become visible
- * @param event Popup Menu Event
- */
- void popupMenuWillBecomeVisible(PopupMenuEvent event);
+ /**
+ * Popup Menu will become visible
+ * @param event Popup Menu Event
+ */
+ void popupMenuWillBecomeVisible(PopupMenuEvent event);
} // PopupMenuListener
diff --git a/libjava/classpath/javax/swing/event/SwingPropertyChangeSupport.java b/libjava/classpath/javax/swing/event/SwingPropertyChangeSupport.java
index 7fb8aa6..5228b3d 100644
--- a/libjava/classpath/javax/swing/event/SwingPropertyChangeSupport.java
+++ b/libjava/classpath/javax/swing/event/SwingPropertyChangeSupport.java
@@ -51,19 +51,19 @@ import java.beans.PropertyChangeSupport;
* @author Andrew Selkirk
*/
public final class SwingPropertyChangeSupport
- extends PropertyChangeSupport
+ extends PropertyChangeSupport
{
private static final long serialVersionUID = 7162625831330845068L;
/**
* Creates a new instance.
- *
+ *
* @param source the source (null not permitted).
- *
+ *
* @throws NullPointerException if source is null.
*/
- public SwingPropertyChangeSupport(Object source)
+ public SwingPropertyChangeSupport(Object source)
{
super(source);
}
diff --git a/libjava/classpath/javax/swing/event/TableColumnModelEvent.java b/libjava/classpath/javax/swing/event/TableColumnModelEvent.java
index cff4913..70bd7d05 100644
--- a/libjava/classpath/javax/swing/event/TableColumnModelEvent.java
+++ b/libjava/classpath/javax/swing/event/TableColumnModelEvent.java
@@ -46,7 +46,7 @@ import javax.swing.table.TableColumnModel;
* TableColumnModelEvent
* @author Andrew Selkirk
*/
-public class TableColumnModelEvent extends EventObject
+public class TableColumnModelEvent extends EventObject
{
/**
@@ -65,7 +65,7 @@ public class TableColumnModelEvent extends EventObject
* @param from From index
* @param to To index
*/
- public TableColumnModelEvent(TableColumnModel source, int from, int to)
+ public TableColumnModelEvent(TableColumnModel source, int from, int to)
{
super(source);
fromIndex = from;
@@ -76,18 +76,18 @@ public class TableColumnModelEvent extends EventObject
* getFromIndex.
* @return From index
*/
- public int getFromIndex()
+ public int getFromIndex()
{
return fromIndex;
- }
+ }
/**
- * getToIndex.
+ * getToIndex.
* @return To index
*/
- public int getToIndex()
+ public int getToIndex()
{
return toIndex;
}
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/swing/event/TableColumnModelListener.java b/libjava/classpath/javax/swing/event/TableColumnModelListener.java
index 522e0a8..362a4d9 100644
--- a/libjava/classpath/javax/swing/event/TableColumnModelListener.java
+++ b/libjava/classpath/javax/swing/event/TableColumnModelListener.java
@@ -44,25 +44,25 @@ import javax.swing.table.TableColumnModel;
/**
* A TableColumnModelListener can register with a
* {@link TableColumnModel} to receive notification of changes to the model.
- *
+ *
* @author Andrew Selkirk
*/
-public interface TableColumnModelListener
- extends EventListener
+public interface TableColumnModelListener
+ extends EventListener
{
/**
* Called by the {@link TableColumnModel} to indicate that a column has been
* added to the model.
- *
+ *
* @param event information about the column addition.
*/
void columnAdded(TableColumnModelEvent event);
/**
- * Called by the {@link TableColumnModel} to indicate that the model's
+ * Called by the {@link TableColumnModel} to indicate that the model's
* column margin has changed.
- *
+ *
* @param event the event (identifies the source).
*/
void columnMarginChanged(ChangeEvent event);
@@ -70,7 +70,7 @@ public interface TableColumnModelListener
/**
* Called by the {@link TableColumnModel} to indicate that a column has been
* moved.
- *
+ *
* @param event information about the column move.
*/
void columnMoved(TableColumnModelEvent event);
@@ -78,15 +78,15 @@ public interface TableColumnModelListener
/**
* Called by the {@link TableColumnModel} to indicate that a column has been
* removed from the model.
- *
+ *
* @param event information about the column removal.
*/
void columnRemoved(TableColumnModelEvent event);
/**
- * Called by the {@link TableColumnModel} to indicate that the column
+ * Called by the {@link TableColumnModel} to indicate that the column
* selection state has changed.
- *
+ *
* @param event information about the column selection state.
*/
void columnSelectionChanged(ListSelectionEvent event);
diff --git a/libjava/classpath/javax/swing/event/TableModelEvent.java b/libjava/classpath/javax/swing/event/TableModelEvent.java
index e15174c..b75a78a 100644
--- a/libjava/classpath/javax/swing/event/TableModelEvent.java
+++ b/libjava/classpath/javax/swing/event/TableModelEvent.java
@@ -44,58 +44,58 @@ import javax.swing.table.TableModel;
/**
* An event that describes changes to a {@link TableModel}.
- *
+ *
* @see javax.swing.event.TableModelListener
- *
+ *
* @author Andrew Selkirk
*/
public class TableModelEvent extends EventObject
{
private static final long serialVersionUID = -7849342674552212824L;
-
+
/** A column index representing all columns. */
public static final int ALL_COLUMNS = -1;
-
- /**
- * An event type indicating that one or more rows have been deleted from the
- * model.
+
+ /**
+ * An event type indicating that one or more rows have been deleted from the
+ * model.
*/
public static final int DELETE = -1;
-
+
/** A row index representing the header row. */
public static final int HEADER_ROW = -1;
-
- /**
- * An event type indicating that one or more rows have been inserted into the
- * model.
+
+ /**
+ * An event type indicating that one or more rows have been inserted into the
+ * model.
*/
public static final int INSERT = 1;
-
+
/** An event type indicating that data has been updated in the model. */
public static final int UPDATE = 0;
/** The column in the table model that the event relates to. */
protected int column = 0;
-
+
/** The first row in the table model that the event relates to. */
protected int firstRow = 0;
-
+
/** The last row in the table model that the event relates to. */
protected int lastRow = 0;
-
- /**
- * The event type (one of {@link #UPDATE}, {@link #INSERT}, {@link #DELETE}).
+
+ /**
+ * The event type (one of {@link #UPDATE}, {@link #INSERT}, {@link #DELETE}).
*/
protected int type = 0;
/**
- * Creates a new TableModelEvent indicating an {@link #UPDATE}
+ * Creates a new TableModelEvent indicating an {@link #UPDATE}
* to the data in all columns and rows.
- *
+ *
* @param source the source object (null not permitted).
- *
- * @throws IllegalArgumentException if source is
- * null.
+ *
+ * @throws IllegalArgumentException if source is
+ * null.
*/
public TableModelEvent(TableModel source)
{
@@ -105,11 +105,11 @@ public class TableModelEvent extends EventObject
/**
* Creates a new TableModelEvent indicating an {@link #UPDATE}
* to the data in a single row across all columns.
- *
+ *
* @param source the source object (null not permitted).
* @param row the updated row.
- *
- * @throws IllegalArgumentException if source is
+ *
+ * @throws IllegalArgumentException if source is
* null.
*/
public TableModelEvent(TableModel source, int row)
@@ -120,12 +120,12 @@ public class TableModelEvent extends EventObject
/**
* Creates a new TableModelEvent indicating an {@link #UPDATE}
* to the data in the specified rows across all columns.
- *
+ *
* @param source the source object (null not permitted).
* @param firstRow the first row of update.
* @param lastRow the last row of update.
- *
- * @throws IllegalArgumentException if source is
+ *
+ * @throws IllegalArgumentException if source is
* null.
*/
public TableModelEvent(TableModel source, int firstRow, int lastRow)
@@ -135,18 +135,18 @@ public class TableModelEvent extends EventObject
/**
* Creates a new TableModelEvent indicating an {@link #UPDATE}
- * to the data in the specified rows and column. Use {@link #ALL_COLUMNS}
+ * to the data in the specified rows and column. Use {@link #ALL_COLUMNS}
* for the column argument to indicate all columns.
- *
+ *
* @param source the source object (null not permitted).
* @param firstRow the first row of update.
* @param lastRow the last row of update.
* @param column the affected column.
- *
- * @throws IllegalArgumentException if source is
+ *
+ * @throws IllegalArgumentException if source is
* null.
*/
- public TableModelEvent(TableModel source, int firstRow, int lastRow,
+ public TableModelEvent(TableModel source, int firstRow, int lastRow,
int column)
{
this(source, firstRow, lastRow, column, UPDATE);
@@ -157,17 +157,17 @@ public class TableModelEvent extends EventObject
* the specified type on the data in the specified rows and
* column. The event type is usually one of {@link #UPDATE}, {@link #INSERT},
* and {@link #DELETE}.
- *
+ *
* @param source the source object (null not permitted).
* @param firstRow the first row of update.
* @param lastRow the last row of update.
* @param column the affected column.
* @param type the type of change.
- *
- * @throws IllegalArgumentException if source is
+ *
+ * @throws IllegalArgumentException if source is
* null.
*/
- public TableModelEvent(TableModel source, int firstRow, int lastRow,
+ public TableModelEvent(TableModel source, int firstRow, int lastRow,
int column, int type)
{
super(source);
@@ -179,7 +179,7 @@ public class TableModelEvent extends EventObject
/**
* Returns the affected column of this event.
- *
+ *
* @return The column index.
*/
public int getColumn()
@@ -189,7 +189,7 @@ public class TableModelEvent extends EventObject
/**
* Returns the first affected row of this event.
- *
+ *
* @return The row index.
*/
public int getFirstRow()
@@ -199,7 +199,7 @@ public class TableModelEvent extends EventObject
/**
* Returns the last affected row of this event.
- *
+ *
* @return The row index.
*/
public int getLastRow()
@@ -208,9 +208,9 @@ public class TableModelEvent extends EventObject
}
/**
- * Returns the type of change indicated by this event (usually one of
+ * Returns the type of change indicated by this event (usually one of
* {@link #UPDATE}, {@link #INSERT}, {@link #DELETE}).
- *
+ *
* @return The type.
*/
public int getType()
diff --git a/libjava/classpath/javax/swing/event/TableModelListener.java b/libjava/classpath/javax/swing/event/TableModelListener.java
index 21e5ea0..612712f 100644
--- a/libjava/classpath/javax/swing/event/TableModelListener.java
+++ b/libjava/classpath/javax/swing/event/TableModelListener.java
@@ -40,21 +40,21 @@ package javax.swing.event;
import java.util.EventListener;
/**
- * A TableModelListener can register with a
+ * A TableModelListener can register with a
* {@link javax.swing.table.TableModel} and receive notification of updates to
* the model.
- *
+ *
* @author Andrew Selkirk
*/
-public interface TableModelListener extends EventListener
+public interface TableModelListener extends EventListener
{
/**
- * Called to notify the listener that the
+ * Called to notify the listener that the
* {@link javax.swing.table.TableModel} has been updated.
- *
+ *
* @param event contains details of the update.
*/
void tableChanged(TableModelEvent event);
-}
+}
diff --git a/libjava/classpath/javax/swing/event/TreeExpansionEvent.java b/libjava/classpath/javax/swing/event/TreeExpansionEvent.java
index 5820b33..99e1666 100644
--- a/libjava/classpath/javax/swing/event/TreeExpansionEvent.java
+++ b/libjava/classpath/javax/swing/event/TreeExpansionEvent.java
@@ -46,7 +46,7 @@ import javax.swing.tree.TreePath;
* TreeExpansionEvent
* @author Andrew Selkirk
*/
-public class TreeExpansionEvent extends EventObject
+public class TreeExpansionEvent extends EventObject
{
/**
@@ -59,7 +59,7 @@ public class TreeExpansionEvent extends EventObject
* @param source Source object
* @param path Path
*/
- public TreeExpansionEvent(Object source, TreePath path)
+ public TreeExpansionEvent(Object source, TreePath path)
{
super(source);
this.path = path;
@@ -69,9 +69,9 @@ public class TreeExpansionEvent extends EventObject
* getPath
* @return Tree path
*/
- public TreePath getPath()
+ public TreePath getPath()
{
return path;
- }
+ }
-}
+}
diff --git a/libjava/classpath/javax/swing/event/TreeExpansionListener.java b/libjava/classpath/javax/swing/event/TreeExpansionListener.java
index 45a5ef9..3461f2c 100644
--- a/libjava/classpath/javax/swing/event/TreeExpansionListener.java
+++ b/libjava/classpath/javax/swing/event/TreeExpansionListener.java
@@ -43,7 +43,7 @@ import java.util.EventListener;
* TreeExpansionListener public interface
* @author Andrew Selkirk
*/
-public interface TreeExpansionListener extends EventListener
+public interface TreeExpansionListener extends EventListener
{
/**
diff --git a/libjava/classpath/javax/swing/event/TreeModelEvent.java b/libjava/classpath/javax/swing/event/TreeModelEvent.java
index 2d562a5..490126f 100644
--- a/libjava/classpath/javax/swing/event/TreeModelEvent.java
+++ b/libjava/classpath/javax/swing/event/TreeModelEvent.java
@@ -46,7 +46,7 @@ import javax.swing.tree.TreePath;
* TreeModelEvent
* @author Andrew Selkirk
*/
-public class TreeModelEvent extends EventObject
+public class TreeModelEvent extends EventObject
{
/**
@@ -63,17 +63,17 @@ public class TreeModelEvent extends EventObject
* path
*/
protected TreePath path = null;
-
+
/**
* Constructor TreeModelEvent
* @param source Source object
* @param path
*/
- public TreeModelEvent(Object source, Object[] path)
+ public TreeModelEvent(Object source, Object[] path)
{
super(source);
this.path = new TreePath(path);
- }
+ }
/**
* Constructor TreeModelEvent
@@ -83,24 +83,24 @@ public class TreeModelEvent extends EventObject
* @param children Children
*/
public TreeModelEvent(Object source, Object[] path,
- int[] childIndices, Object[] children)
+ int[] childIndices, Object[] children)
{
super(source);
this.path = new TreePath(path);
this.childIndices = childIndices;
this.children = children;
- }
+ }
/**
* Constructor TreeModelEvent
* @param source Source object
* @param path Path
*/
- public TreeModelEvent(Object source, TreePath path)
+ public TreeModelEvent(Object source, TreePath path)
{
super(source);
this.path = path;
- }
+ }
/**
* Constructor TreeModelEvent
@@ -110,59 +110,59 @@ public class TreeModelEvent extends EventObject
* @param children Children
*/
public TreeModelEvent(Object source, TreePath path,
- int[] childIndices, Object[] children)
+ int[] childIndices, Object[] children)
{
super(source);
this.path = path;
this.childIndices = childIndices;
this.children = children;
- }
+ }
/**
* getChildIndices
* @return child indices
*/
- public int[] getChildIndices()
+ public int[] getChildIndices()
{
return childIndices;
- }
+ }
/**
* getChildren
* @return children
*/
- public Object[] getChildren()
+ public Object[] getChildren()
{
return children;
- }
+ }
/**
* getPath
* @return path
*/
- public Object[] getPath()
+ public Object[] getPath()
{
return path.getPath();
- }
+ }
/**
* getTreePath
* @return TreePath
*/
- public TreePath getTreePath()
+ public TreePath getTreePath()
{
return path;
- }
+ }
- /**
+ /**
* String representation
* @return String representation
*/
- public String toString()
+ public String toString()
{
- return getClass() + " [Source: " + getSource() + ", TreePath: "
- + getTreePath() + ", Child Indicies: " + getChildIndices()
+ return getClass() + " [Source: " + getSource() + ", TreePath: "
+ + getTreePath() + ", Child Indicies: " + getChildIndices()
+ ", Children: " + getChildren() + ", Path: " + getPath() +"]";
- }
+ }
-}
+}
diff --git a/libjava/classpath/javax/swing/event/TreeModelListener.java b/libjava/classpath/javax/swing/event/TreeModelListener.java
index 57b5c51..7804105 100644
--- a/libjava/classpath/javax/swing/event/TreeModelListener.java
+++ b/libjava/classpath/javax/swing/event/TreeModelListener.java
@@ -46,29 +46,29 @@ import java.util.EventListener;
*/
public interface TreeModelListener extends EventListener {
- /**
- * Tree nodes changed
- * @param event Tree Model Event
- */
- void treeNodesChanged(TreeModelEvent event);
+ /**
+ * Tree nodes changed
+ * @param event Tree Model Event
+ */
+ void treeNodesChanged(TreeModelEvent event);
- /**
- * Tree nodes inserted
- * @param event Tree Model Event
- */
- void treeNodesInserted(TreeModelEvent event);
+ /**
+ * Tree nodes inserted
+ * @param event Tree Model Event
+ */
+ void treeNodesInserted(TreeModelEvent event);
- /**
- * Tree nodes removed
- * @param event Tree Model Event
- */
- void treeNodesRemoved(TreeModelEvent event);
+ /**
+ * Tree nodes removed
+ * @param event Tree Model Event
+ */
+ void treeNodesRemoved(TreeModelEvent event);
- /**
- * Tree structured changed
- * @param event Tree Model Event
- */
- void treeStructureChanged(TreeModelEvent event);
+ /**
+ * Tree structured changed
+ * @param event Tree Model Event
+ */
+ void treeStructureChanged(TreeModelEvent event);
} // TreeModelListener
diff --git a/libjava/classpath/javax/swing/event/TreeSelectionEvent.java b/libjava/classpath/javax/swing/event/TreeSelectionEvent.java
index 532a1db..830170d 100644
--- a/libjava/classpath/javax/swing/event/TreeSelectionEvent.java
+++ b/libjava/classpath/javax/swing/event/TreeSelectionEvent.java
@@ -44,14 +44,14 @@ import javax.swing.tree.TreePath;
import javax.swing.tree.TreeSelectionModel;
/**
- * An event that carries information about a change to a
+ * An event that carries information about a change to a
* {@link TreeSelectionModel}.
- *
+ *
* @see TreeSelectionListener
- *
+ *
* @author Andrew Selkirk
*/
-public class TreeSelectionEvent extends EventObject
+public class TreeSelectionEvent extends EventObject
{
/**
@@ -77,112 +77,112 @@ public class TreeSelectionEvent extends EventObject
/**
* Creates a new TreeSelectionEvent.
- *
- * @param source the source (usually a {@link TreeSelectionModel},
+ *
+ * @param source the source (usually a {@link TreeSelectionModel},
* null not permitted).
- * @param paths an array of the paths that have been added to or removed
+ * @param paths an array of the paths that have been added to or removed
* from the selection.
* @param areNew a flag for each path where true indicates the
- * corresponding path has been added to the selection and
+ * corresponding path has been added to the selection and
* false indicates the path has been removed.
* @param oldLeadSelectionPath the old lead selection path (null
* permitted).
* @param newLeadSelectionPath the new lead selection path (null
* permitted).
*
- * @throws IllegalArgumentException if source is
+ * @throws IllegalArgumentException if source is
* null.
*/
public TreeSelectionEvent(Object source, TreePath[] paths,
- boolean[] areNew, TreePath oldLeadSelectionPath,
- TreePath newLeadSelectionPath)
+ boolean[] areNew, TreePath oldLeadSelectionPath,
+ TreePath newLeadSelectionPath)
{
super(source);
- this.paths = paths;
- this.areNew = areNew;
- this.oldLeadSelectionPath = oldLeadSelectionPath;
- this.newLeadSelectionPath = newLeadSelectionPath;
+ this.paths = paths;
+ this.areNew = areNew;
+ this.oldLeadSelectionPath = oldLeadSelectionPath;
+ this.newLeadSelectionPath = newLeadSelectionPath;
}
/**
* Creates a new TreeSelectionEvent.
- *
+ *
* @param source the event source (usually a {@link TreeSelectionModel},
* null not permitted).
* @param path the path.
- * @param isNew true indicates that path has been
- * added to the selection, and false indicates that it has
+ * @param isNew true indicates that path has been
+ * added to the selection, and false indicates that it has
* been removed.
* @param oldLeadSelectionPath the old lead selection path (null
* permitted).
* @param newLeadSelectionPath the new lead selection path (null
* permitted).
- *
- * @throws IllegalArgumentException if source is
+ *
+ * @throws IllegalArgumentException if source is
* null.
*/
public TreeSelectionEvent(Object source, TreePath path,
- boolean isNew, TreePath oldLeadSelectionPath,
- TreePath newLeadSelectionPath)
+ boolean isNew, TreePath oldLeadSelectionPath,
+ TreePath newLeadSelectionPath)
{
super(source);
this.paths = new TreePath[]{path};
this.areNew = new boolean[]{isNew};
- this.oldLeadSelectionPath = oldLeadSelectionPath;
- this.newLeadSelectionPath = newLeadSelectionPath;
+ this.oldLeadSelectionPath = oldLeadSelectionPath;
+ this.newLeadSelectionPath = newLeadSelectionPath;
}
/**
* Returns the first path element.
- *
+ *
* @return The first path element.
- *
+ *
* @see #getPaths()
*/
public TreePath getPath()
{
return paths[0];
- }
+ }
/**
* Returns an array of the paths that changed in the selection.
- *
+ *
* @return The paths that changed in the selection.
- *
+ *
* @see #isAddedPath(TreePath)
*/
public TreePath[] getPaths()
{
return (TreePath[]) paths.clone();
- }
+ }
/**
* Returns true if the path returned by {@link #getPath()} has
* been added to the selection, and false if it has been
* removed.
- *
+ *
* @return A boolean.
- *
+ *
* @see #isAddedPath(int)
*/
public boolean isAddedPath()
{
return areNew[0];
- }
+ }
/**
- * Returns true if path has been added to the
+ * Returns true if path has been added to the
* selection, and false if the path has been removed from the
* selection.
- *
+ *
* @param path the path to check.
- *
+ *
* @return A flag indicating whether the path has been added to, or removed
* from, the selection.
- *
+ *
* @throw IllegalArgumentException if path is not one of the
* paths in {@link #getPaths()}.
- *
+ *
* @see #isAddedPath(int)
*/
public boolean isAddedPath(TreePath path)
@@ -192,20 +192,20 @@ public class TreeSelectionEvent extends EventObject
return areNew[i];
throw new IllegalArgumentException("Unknown 'path' argument.");
- }
+ }
/**
- * Returns true if the path at the specified index has been
- * added to the selection, and false if the path has been
+ * Returns true if the path at the specified index has been
+ * added to the selection, and false if the path has been
* removed from the selection.
- *
+ *
* @param index the path index.
- *
+ *
* @return A flag indicating whether the path has been added to, or removed
* from, the selection.
- *
+ *
* @since 1.3
- *
+ *
* @see #isAddedPath(TreePath)
*/
public boolean isAddedPath(int index)
@@ -215,21 +215,21 @@ public class TreeSelectionEvent extends EventObject
/**
* Returns the old lead selection path.
- *
+ *
* @return The old lead selection path (possibly null).
- *
+ *
* @see #getNewLeadSelectionPath()
*/
public TreePath getOldLeadSelectionPath()
{
return oldLeadSelectionPath;
- }
+ }
/**
* Returns the new lead selection path.
- *
+ *
* @return The new lead selection path (possibly null).
- *
+ *
* @see #getOldLeadSelectionPath()
*/
public TreePath getNewLeadSelectionPath()
@@ -240,18 +240,18 @@ public class TreeSelectionEvent extends EventObject
/**
* Creates a shallow copy of this TreeSelectionEvent, replacing
* the source with source.
- *
+ *
* @param source the new event source (null not permitted).
- *
+ *
* @return A cloned event with another event source.
- *
- * @throws IllegalArgumentException if source is
+ *
+ * @throws IllegalArgumentException if source is
* null.
*/
public Object cloneWithSource(Object source)
{
return new TreeSelectionEvent (source, paths, areNew, oldLeadSelectionPath,
newLeadSelectionPath);
- }
+ }
-}
+}
diff --git a/libjava/classpath/javax/swing/event/TreeSelectionListener.java b/libjava/classpath/javax/swing/event/TreeSelectionListener.java
index 2171e39..8f8711d 100644
--- a/libjava/classpath/javax/swing/event/TreeSelectionListener.java
+++ b/libjava/classpath/javax/swing/event/TreeSelectionListener.java
@@ -44,17 +44,17 @@ import javax.swing.tree.TreeSelectionModel;
/**
* A listener that receives {@link TreeSelectionEvent} notifications from a
* source (such as a {@link TreeSelectionModel}).
- *
+ *
* @author Andrew Selkirk
*/
-public interface TreeSelectionListener extends EventListener
+public interface TreeSelectionListener extends EventListener
{
/**
* Receives notification of a change to a tree selection model.
- *
+ *
* @param event information about the event.
*/
void valueChanged(TreeSelectionEvent event);
-}
+}
diff --git a/libjava/classpath/javax/swing/event/TreeWillExpandListener.java b/libjava/classpath/javax/swing/event/TreeWillExpandListener.java
index 89d3764..7bdcbe4 100644
--- a/libjava/classpath/javax/swing/event/TreeWillExpandListener.java
+++ b/libjava/classpath/javax/swing/event/TreeWillExpandListener.java
@@ -49,7 +49,7 @@ public interface TreeWillExpandListener extends EventListener
{
/**
* Invoked whenever a node in the tree is about to be collapsed.
- *
+ *
* @param event The tree expansion Event
*/
void treeWillCollapse(TreeExpansionEvent event)
@@ -57,9 +57,9 @@ public interface TreeWillExpandListener extends EventListener
/**
* Invoked whenever a node in the tree is about to be expanded.
- *
+ *
* @param event The tree expansion Event
*/
void treeWillExpand(TreeExpansionEvent event)
throws ExpandVetoException;
-}
+}
diff --git a/libjava/classpath/javax/swing/event/UndoableEditEvent.java b/libjava/classpath/javax/swing/event/UndoableEditEvent.java
index b59cead..b889bb6 100644
--- a/libjava/classpath/javax/swing/event/UndoableEditEvent.java
+++ b/libjava/classpath/javax/swing/event/UndoableEditEvent.java
@@ -47,7 +47,7 @@ import javax.swing.undo.UndoableEdit;
* @author Andrew Selkirk
* @author Ronald Veldema
*/
-public class UndoableEditEvent extends EventObject
+public class UndoableEditEvent extends EventObject
{
private static final long serialVersionUID = 4418044561759134484L;
@@ -62,19 +62,19 @@ public class UndoableEditEvent extends EventObject
* @param source TODO
* @param edit TODO
*/
- public UndoableEditEvent(Object source, UndoableEdit edit)
+ public UndoableEditEvent(Object source, UndoableEdit edit)
{
super(source);
this.edit = edit;
- }
+ }
/**
* getEdit
* @return UndoableEdit
*/
- public UndoableEdit getEdit()
+ public UndoableEdit getEdit()
{
return edit;
}
-}
+}
diff --git a/libjava/classpath/javax/swing/filechooser/FileFilter.java b/libjava/classpath/javax/swing/filechooser/FileFilter.java
index de11525..68bcb65 100644
--- a/libjava/classpath/javax/swing/filechooser/FileFilter.java
+++ b/libjava/classpath/javax/swing/filechooser/FileFilter.java
@@ -45,12 +45,12 @@ import javax.swing.JFileChooser;
/**
* The base class for filters that control the visibility of files in the
* {@link JFileChooser} component.
- *
+ *
* @see JFileChooser#addChoosableFileFilter(FileFilter)
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
*/
-public abstract class FileFilter
+public abstract class FileFilter
{
/**
@@ -64,20 +64,20 @@ public abstract class FileFilter
/**
* Returns true if the specified file matches the filter, and
* false otherwise.
- *
+ *
* @param file the file.
- *
+ *
* @return A boolean.
*/
public abstract boolean accept(File file);
/**
- * Returns a description of the files that will be selected by the filter
- * (for example, "Java source files"). This description will usually be
+ * Returns a description of the files that will be selected by the filter
+ * (for example, "Java source files"). This description will usually be
* displayed on the {@link JFileChooser} component, often in a combo box that
* is used to select the appropriate filter (in cases where more than one
* filter is available).
- *
+ *
* @return A description of the filter.
*/
public abstract String getDescription();
diff --git a/libjava/classpath/javax/swing/filechooser/FileSystemView.java b/libjava/classpath/javax/swing/filechooser/FileSystemView.java
index 41d865a..5c3c0b8 100644
--- a/libjava/classpath/javax/swing/filechooser/FileSystemView.java
+++ b/libjava/classpath/javax/swing/filechooser/FileSystemView.java
@@ -46,14 +46,14 @@ import javax.swing.JFileChooser;
/**
- * The base class providing a view of the file system for use by the
+ * The base class providing a view of the file system for use by the
* {@link JFileChooser} component.
*/
public abstract class FileSystemView
{
/** The instance returned by {@link #getFileSystemView()}. */
private static FileSystemView defaultFileSystemView;
-
+
/**
* Creates a new file object with the given name in the specified directory.
*
@@ -101,12 +101,12 @@ public abstract class FileSystemView
* Creates a new folder with a unique name in the specified directory and
* returns a {@link File} object representing the new directory.
*
- * @param containingDir the directory to contain the new folder
+ * @param containingDir the directory to contain the new folder
* (null not permitted).
*
* @return A {@link File} object representing the new directory.
*
- * @throws IOException if an exception occurs while creating the new
+ * @throws IOException if an exception occurs while creating the new
* directory.
*/
public abstract File createNewFolder(File containingDir)
@@ -137,8 +137,8 @@ public abstract class FileSystemView
}
/**
- * Returns an array containing the files in the given directory. The
- * useFileHiding controls whether or not hidden files are
+ * Returns an array containing the files in the given directory. The
+ * useFileHiding controls whether or not hidden files are
* included in the result.
*
* @param dir the directory (if null
@@ -158,7 +158,7 @@ public abstract class FileSystemView
ArrayList trim = new ArrayList();
for (int i = 0; i < files.length; i++)
if (! files[i].isHidden())
- trim.add(files[i]);
+ trim.add(files[i]);
File[] value = (File[]) trim.toArray(new File[trim.size()]);
return value;
}
@@ -220,12 +220,12 @@ public abstract class FileSystemView
}
/**
- * Returns the name of a file as it would be displayed by the underlying
+ * Returns the name of a file as it would be displayed by the underlying
* system.
*
* @param f the file.
*
- * @return the name of a file as it would be displayed by the underlying
+ * @return the name of a file as it would be displayed by the underlying
* system
*
* @specnote The specification suggests that the information here is
@@ -242,8 +242,8 @@ public abstract class FileSystemView
}
/**
- * Returns the icon that would be displayed for the given file by the
- * underlying system. This implementation returns null,
+ * Returns the icon that would be displayed for the given file by the
+ * underlying system. This implementation returns null,
* subclasses must override.
*
* @param f the file.
@@ -256,8 +256,8 @@ public abstract class FileSystemView
}
/**
- * Returns the type description of a file that would be displayed by the
- * underlying system. This implementation returns null,
+ * Returns the type description of a file that would be displayed by the
+ * underlying system. This implementation returns null,
* subclasses must override.
*
* @param f the file.
@@ -282,7 +282,7 @@ public abstract class FileSystemView
}
/**
- * Returns true if the given directory represents a disk
+ * Returns true if the given directory represents a disk
* drive, and false otherwise. This default implementation
* always returns false.
*
@@ -326,12 +326,12 @@ public abstract class FileSystemView
String filename = dir.getAbsolutePath();
for (int i = 0; i < roots.length; i++)
if (roots[i].getAbsolutePath().equals(filename))
- return true;
+ return true;
return false;
}
/**
- * Returns true if the given directory represents a floppy
+ * Returns true if the given directory represents a floppy
* drive, and false otherwise. This default implementation
* always returns false.
*
@@ -345,12 +345,12 @@ public abstract class FileSystemView
}
/**
- * Returns true if the given file is hidden, and
+ * Returns true if the given file is hidden, and
* false otherwise.
*
* @param f the file.
*
- * @return true if the given file is hidden, and
+ * @return true if the given file is hidden, and
* false otherwise.
*/
public boolean isHiddenFile(File f)
@@ -359,13 +359,13 @@ public abstract class FileSystemView
}
/**
- * Returns true if folder is the parent of
+ * Returns true if folder is the parent of
* file, and false otherwise.
*
* @param folder the folder (null not permitted).
* @param file the file (null not permitted).
*
- * @return true if folder is the parent of
+ * @return true if folder is the parent of
* file, and false otherwise.
*/
public boolean isParent(File folder, File file)
@@ -390,13 +390,13 @@ public abstract class FileSystemView
}
/**
- * Returns true if the file is traversable, and
+ * Returns true if the file is traversable, and
* false otherwise. Here, all directories are considered
- * traversable, and files are considered non-traversable.
+ * traversable, and files are considered non-traversable.
*
* @param f the file or directory (null not permitted).
*
- * @return true if the file is traversable, and
+ * @return true if the file is traversable, and
* false otherwise.
*/
public Boolean isTraversable(File f)
diff --git a/libjava/classpath/javax/swing/filechooser/FileView.java b/libjava/classpath/javax/swing/filechooser/FileView.java
index 8c2be32..cfa3999 100644
--- a/libjava/classpath/javax/swing/filechooser/FileView.java
+++ b/libjava/classpath/javax/swing/filechooser/FileView.java
@@ -43,86 +43,86 @@ import java.io.File;
import javax.swing.Icon;
/**
- * An abstract class that provides presentation information about files and
+ * An abstract class that provides presentation information about files and
* directories. .
- *
+ *
* @author Andrew Selkirk
*/
-public abstract class FileView
+public abstract class FileView
{
/**
* Creates a new FileView instance.
*/
- public FileView()
+ public FileView()
{
// Nothing to do here.
- }
+ }
/**
* Returns the name for the specified file. This method always returns
* null and should be overridden by subclasses.
- *
+ *
* @param file the file.
- *
+ *
* @return Always null.
*/
- public String getName(File file)
+ public String getName(File file)
{
return null;
- }
+ }
/**
* Returns a description for the specified file. This method always returns
* null and should be overridden by subclasses.
- *
+ *
* @param file the file.
- *
+ *
* @return Always null.
*/
- public String getDescription(File file)
+ public String getDescription(File file)
{
return null;
- }
+ }
/**
- * Returns a description for the type of the specified file. This method
+ * Returns a description for the type of the specified file. This method
* always returns null and should be overridden by subclasses.
- *
+ *
* @param file the file.
- *
+ *
* @return Always null.
*/
- public String getTypeDescription(File file)
+ public String getTypeDescription(File file)
{
return null;
- }
+ }
/**
- * Returns an {@link Icon} to represent the specified file. This method
+ * Returns an {@link Icon} to represent the specified file. This method
* always returns null and should be overridden by subclasses.
- *
+ *
* @param file the file.
- *
+ *
* @return Always null.
*/
- public Icon getIcon(File file)
+ public Icon getIcon(File file)
{
return null;
- }
+ }
/**
* Returns {@link Boolean#TRUE} if the given directory is traversable, and
- * {@link Boolean#FALSE} if it is not. This method always returns
+ * {@link Boolean#FALSE} if it is not. This method always returns
* null and should be overridden by subclasses.
- *
+ *
* @param directory the directory.
- *
+ *
* @return Always null.
*/
- public Boolean isTraversable(File directory)
+ public Boolean isTraversable(File directory)
{
return null;
- }
+ }
}
diff --git a/libjava/classpath/javax/swing/filechooser/UnixFileSystemView.java b/libjava/classpath/javax/swing/filechooser/UnixFileSystemView.java
index f8d71e1..1341768 100644
--- a/libjava/classpath/javax/swing/filechooser/UnixFileSystemView.java
+++ b/libjava/classpath/javax/swing/filechooser/UnixFileSystemView.java
@@ -48,7 +48,7 @@ import javax.swing.Icon;
/**
* A concrete implementation of {@link FileSystemView} that is appropriate for
* Unix-like systems.
- *
+ *
* @see FileSystemView#getFileSystemView()
*/
class UnixFileSystemView extends FileSystemView
@@ -58,18 +58,18 @@ class UnixFileSystemView extends FileSystemView
/**
* Creates a new folder with a unique name in the specified directory and
- * returns a {@link File} object representing the new directory. The name
- * of the new folder is NewFolder or, if a directory or file
- * with that name already exists, NewFolder.n where
- * n is the lowest integer greater than zero that results in
+ * returns a {@link File} object representing the new directory. The name
+ * of the new folder is NewFolder or, if a directory or file
+ * with that name already exists, NewFolder.n where
+ * n is the lowest integer greater than zero that results in
* a unique directory name.
*
- * @param containingDir the directory to contain the new folder
+ * @param containingDir the directory to contain the new folder
* (null not permitted).
*
* @return A {@link File} object representing the new directory.
*
- * @throws IOException if an exception occurs while creating the new
+ * @throws IOException if an exception occurs while creating the new
* directory.
*/
public File createNewFolder(File containingDir) throws IOException
@@ -80,22 +80,22 @@ class UnixFileSystemView extends FileSystemView
+ NEW_FOLDER_NAME;
while (f == null)
{
- String full = filename;
- if (count > 0)
- full += "." + (count++);
- f = new File(full);
- if (f.isDirectory() || f.isFile())
- {
- count++;
- f = null;
- }
+ String full = filename;
+ if (count > 0)
+ full += "." + (count++);
+ f = new File(full);
+ if (f.isDirectory() || f.isFile())
+ {
+ count++;
+ f = null;
+ }
}
f.mkdir();
return f;
}
/**
- * Returns an array containing the file system root.
+ * Returns an array containing the file system root.
*
* @return An array containing the file system root.
*/
@@ -105,12 +105,12 @@ class UnixFileSystemView extends FileSystemView
}
/**
- * Returns the name of a file as it would be displayed by the underlying
+ * Returns the name of a file as it would be displayed by the underlying
* system.
*
* @param f the file.
*
- * @return the name of a file as it would be displayed by the underlying
+ * @return the name of a file as it would be displayed by the underlying
* system
*/
public String getSystemDisplayName(File f)
@@ -137,7 +137,7 @@ class UnixFileSystemView extends FileSystemView
}
/**
- * Returns the icon that would be displayed for the given file by the
+ * Returns the icon that would be displayed for the given file by the
* underlying system. This method is NOT YET IMPLEMENTED.
*
* @param f the file.
@@ -152,7 +152,7 @@ class UnixFileSystemView extends FileSystemView
}
/**
- * Returns the description of a file that would be displayed by the
+ * Returns the description of a file that would be displayed by the
* underlying system. This method is NOT YET IMPLEMENTED.
*
* @param f the file.
diff --git a/libjava/classpath/javax/swing/plaf/BorderUIResource.java b/libjava/classpath/javax/swing/plaf/BorderUIResource.java
index 317cb09..1742494 100644
--- a/libjava/classpath/javax/swing/plaf/BorderUIResource.java
+++ b/libjava/classpath/javax/swing/plaf/BorderUIResource.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
@@ -96,8 +96,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
* called.
*/
private static Border loweredBevelBorderUIResource;
-
-
+
+
/**
* A shared instance of a {@link BevelBorderUIResource} whose
* bevelType is {@link
@@ -106,8 +106,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
* called.
*/
private static Border raisedBevelBorderUIResource;
-
-
+
+
/**
* A shared instance of a {@link LineBorderUIResource} for
* a one-pixel thick black line, or null if
@@ -132,7 +132,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
etchedBorderUIResource = new EtchedBorderUIResource();
return etchedBorderUIResource;
}
-
+
/**
* Returns a shared instance of {@link BevelBorderUIResource} whose
@@ -170,8 +170,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
BevelBorder.RAISED);
return raisedBevelBorderUIResource;
}
-
-
+
+
/**
* Returns a shared instance of {@link LineBorderUIResource} for
* a black, one-pixel width border.
@@ -193,23 +193,23 @@ public class BorderUIResource implements Border, UIResource, Serializable
* The wrapped border.
*/
private Border delegate;
-
-
+
+
/**
* Constructs a BorderUIResource for wrapping
* a Border object.
- *
+ *
* @param delegate the border to be wrapped.
*/
public BorderUIResource(Border delegate)
{
if (delegate == null)
throw new IllegalArgumentException();
-
+
this.delegate = delegate;
}
-
+
/**
* Paints the border around an enclosed component by calling
* the paintBorder method of the wrapped delegate.
@@ -226,8 +226,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
delegate.paintBorder(c, g, x, y, width, height);
}
-
-
+
+
/**
* Measures the width of this border by calling the
* getBorderInsets method of the wrapped
@@ -240,11 +240,11 @@ public class BorderUIResource implements Border, UIResource, Serializable
* width of the border at the respective edge.
*/
public Insets getBorderInsets(Component c)
- {
+ {
return delegate.getBorderInsets(c);
}
-
-
+
+
/**
* Determines whether this border fills every pixel in its area
* when painting by calling the isBorderOpaque
@@ -255,7 +255,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
* can shine through the border.
*/
public boolean isBorderOpaque()
- {
+ {
return delegate.isBorderOpaque();
}
@@ -272,12 +272,12 @@ public class BorderUIResource implements Border, UIResource, Serializable
* @author Brian Jones (cbj@gnu.org)
* @author Sascha Brawer (brawer@dandelis.ch)
*/
- public static class BevelBorderUIResource
+ public static class BevelBorderUIResource
extends BevelBorder
implements UIResource, Serializable
{
private static final long serialVersionUID = -1275542891108351642L;
-
+
/**
* Constructs a BevelBorderUIResource whose colors will be derived
* from the background of the enclosed component. The background
@@ -296,12 +296,12 @@ public class BorderUIResource implements Border, UIResource, Serializable
* @throws IllegalArgumentException if bevelType has
* an unsupported value.
*/
- public BevelBorderUIResource(int bevelType)
- {
+ public BevelBorderUIResource(int bevelType)
+ {
super(bevelType);
}
-
-
+
+
/**
* Constructs a BevelBorderUIResource given its appearance type
* and two colors for its highlight and shadow.
@@ -334,9 +334,9 @@ public class BorderUIResource implements Border, UIResource, Serializable
* @throws NullPointerException if highlight or
* shadow is null.
*/
- public BevelBorderUIResource(int bevelType,
- Color highlight,
- Color shadow)
+ public BevelBorderUIResource(int bevelType,
+ Color highlight,
+ Color shadow)
{
super(bevelType, highlight, shadow);
}
@@ -382,15 +382,15 @@ public class BorderUIResource implements Border, UIResource, Serializable
Color highlightOuter,
Color highlightInner,
Color shadowOuter,
- Color shadowInner)
+ Color shadowInner)
{
super(bevelType,
highlightOuter, highlightInner,
shadowOuter, shadowInner);
}
}
-
-
+
+
/**
* A {@link javax.swing.border.CompoundBorder} that also implements the
* {@link UIResource} marker interface. This is useful for
@@ -408,7 +408,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
implements UIResource, Serializable
{
private static final long serialVersionUID = 7550017084975167341L;
-
+
/**
* Constructs a CompoundBorderUIResource with the specified inside
* and outside borders.
@@ -429,8 +429,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
super(outsideBorder, insideBorder);
}
}
-
-
+
+
/**
* An {@link javax.swing.border.EmptyBorder} that also implements the
* {@link UIResource} marker interface. This is useful for
@@ -447,12 +447,12 @@ public class BorderUIResource implements Border, UIResource, Serializable
* @author Brian Jones (cbj@gnu.org)
* @author Sascha Brawer (brawer@dandelis.ch)
*/
- public static class EmptyBorderUIResource
+ public static class EmptyBorderUIResource
extends EmptyBorder
implements UIResource, Serializable
{
private static final long serialVersionUID = -4914187529340071708L;
-
+
/**
* Constructs an empty border given the number of pixels required
* on each side.
@@ -473,8 +473,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(top, left, bottom, right);
}
-
-
+
+
/**
* Constructs an empty border given the number of pixels required
* on each side, passed in an Insets object.
@@ -486,8 +486,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
super(insets);
}
}
-
-
+
+
/**
* An {@link javax.swing.border.EtchedBorder} that also implements the
* {@link UIResource} marker interface. This is useful for
@@ -509,7 +509,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
implements UIResource, Serializable
{
private static final long serialVersionUID = -8186391754165296656L;
-
+
/**
* Constructs an EtchedBorderUIResource that appears lowered into
* the surface. The colors will be derived from the background
@@ -519,8 +519,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super();
}
-
-
+
+
/**
* Constructs an EtchedBorderUIResource with the specified
* appearance. The colors will be derived from the background
@@ -537,12 +537,12 @@ public class BorderUIResource implements Border, UIResource, Serializable
* @throws IllegalArgumentException if etchType has
* an unsupported value.
*/
- public EtchedBorderUIResource(int etchType)
+ public EtchedBorderUIResource(int etchType)
{
super(etchType);
}
-
-
+
+
/**
* Constructs a lowered EtchedBorderUIResource, explicitly
* selecting the colors that will be used for highlight and
@@ -560,8 +560,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(highlight, shadow);
}
-
-
+
+
/**
* Constructs an EtchedBorderUIResource with the specified
* appearance, explicitly selecting the colors that will be used
@@ -590,8 +590,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
super(etchType, highlight, shadow);
}
}
-
-
+
+
/**
* A {@link javax.swing.border.LineBorder} that also implements the
* {@link UIResource} marker interface. This is useful for
@@ -612,7 +612,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
implements UIResource, Serializable
{
private static final long serialVersionUID = -6171232338180172310L;
-
+
/**
* Constructs a LineBorderUIResource given its color. The border
* will be one pixel thick and have plain corners.
@@ -621,10 +621,10 @@ public class BorderUIResource implements Border, UIResource, Serializable
*/
public LineBorderUIResource(Color color)
{
- super(color);
+ super(color);
}
-
-
+
+
/**
* Constructs a LineBorder given its color and thickness. The
* border will have plain corners.
@@ -636,13 +636,13 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(color, thickness);
}
-
-
+
+
/* Note: Since JDK1.3, javax.swing.border.LineBorder also has a
* constructor which accepts a value for the roundedCorners
* property. However, as of JDK1.4.1, the LineBorderUIResource
* subclass does not have a corresponding constructor.
- *
+ *
* A request for enhancing the Swing API has been filed with Sun:
* http://developer.java.sun.com/developer/bugParade/bugs/4879999.html
*/
@@ -669,7 +669,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
implements UIResource, Serializable
{
private static final long serialVersionUID = -8107923147541851122L;
-
+
/**
* Constructs a MatteBorderUIResource given the width on each side
* and a fill color.
@@ -690,8 +690,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(top, left, bottom, right, color);
}
-
-
+
+
/**
* Constructs a MatteBorderUIResource given the width on each side
* and an icon for tiling the border area.
@@ -712,8 +712,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(top, left, bottom, right, tileIcon);
}
-
-
+
+
/**
* Constructs a MatteBorderUIResource given an icon for tiling the
* border area. The icon width is used for the border insets at
@@ -724,15 +724,15 @@ public class BorderUIResource implements Border, UIResource, Serializable
* height="150" alt="[A picture of a MatteBorder made by this
* constructor]" />
*
- * @param tileIcon an icon for tiling the border area.
+ * @param tileIcon an icon for tiling the border area.
*/
public MatteBorderUIResource(Icon tileIcon)
{
super(tileIcon);
}
}
-
-
+
+
/**
* A {@link javax.swing.border.TitledBorder} that also implements the
* {@link UIResource} marker interface. This is useful for
@@ -750,7 +750,7 @@ public class BorderUIResource implements Border, UIResource, Serializable
implements UIResource, Serializable
{
private static final long serialVersionUID = 7667113547406407427L;
-
+
/**
* Constructs a TitledBorderUIResource given the text of its title.
*
@@ -761,8 +761,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(title);
}
-
-
+
+
/**
* Constructs an initially untitled TitledBorderUIResource
* given another border.
@@ -775,8 +775,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
{
super(border);
}
-
-
+
+
/**
* Constructs a TitledBorder given its border and title text.
*
@@ -878,8 +878,8 @@ public class BorderUIResource implements Border, UIResource, Serializable
super(border, title, titleJustification, titlePosition,
titleFont);
}
-
-
+
+
/**
* Constructs a TitledBorder given its border, title text,
* horizontal alignment, vertical position, font, and color.
@@ -928,4 +928,3 @@ public class BorderUIResource implements Border, UIResource, Serializable
}
}
}
-
diff --git a/libjava/classpath/javax/swing/plaf/ColorChooserUI.java b/libjava/classpath/javax/swing/plaf/ColorChooserUI.java
index 1609141..e9cb32c 100644
--- a/libjava/classpath/javax/swing/plaf/ColorChooserUI.java
+++ b/libjava/classpath/javax/swing/plaf/ColorChooserUI.java
@@ -56,4 +56,3 @@ public abstract class ColorChooserUI extends ComponentUI
/* The constructor does not do anything. */
}
}
-
diff --git a/libjava/classpath/javax/swing/plaf/ColorUIResource.java b/libjava/classpath/javax/swing/plaf/ColorUIResource.java
index 36e10f2..3c9db2e 100644
--- a/libjava/classpath/javax/swing/plaf/ColorUIResource.java
+++ b/libjava/classpath/javax/swing/plaf/ColorUIResource.java
@@ -62,7 +62,7 @@ public class ColorUIResource extends Color implements UIResource
* @param g the green intensity, which must be in the range [0 .. 255].
* @param b the blue intensity, which must be in the range [0 .. 255].
*
- * @throws IllegalArgumentException if any of the values is outside the
+ * @throws IllegalArgumentException if any of the values is outside the
* specified range.
*/
public ColorUIResource(int r, int g, int b)
@@ -95,7 +95,7 @@ public class ColorUIResource extends Color implements UIResource
* @param g the green intensity, which must be in the range [0.0 .. 1.0].
* @param b the blue intensity, which must be in the range [0.0 .. 1.0].
*
- * @throws IllegalArgumentException if any of the values is outside the
+ * @throws IllegalArgumentException if any of the values is outside the
* specified range.
*/
public ColorUIResource(float r, float g, float b)
diff --git a/libjava/classpath/javax/swing/plaf/ComboBoxUI.java b/libjava/classpath/javax/swing/plaf/ComboBoxUI.java
index 58f6e81..0a06d26 100644
--- a/libjava/classpath/javax/swing/plaf/ComboBoxUI.java
+++ b/libjava/classpath/javax/swing/plaf/ComboBoxUI.java
@@ -55,7 +55,7 @@ public abstract class ComboBoxUI extends ComponentUI
{
// Nothing to do here.
}
-
+
/**
* Sets the visibility of the popup button.
*
@@ -77,7 +77,7 @@ public abstract class ComboBoxUI extends ComponentUI
* visible, false otherwise.
*/
public abstract boolean isPopupVisible(JComboBox c);
-
+
/**
* Determines whether the combo box can receive input focus.
*
@@ -88,5 +88,5 @@ public abstract class ComboBoxUI extends ComponentUI
* input focus, false otherwise.
*/
public abstract boolean isFocusTraversable(JComboBox c);
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/ComponentInputMapUIResource.java b/libjava/classpath/javax/swing/plaf/ComponentInputMapUIResource.java
index cfc43e4..4553562 100644
--- a/libjava/classpath/javax/swing/plaf/ComponentInputMapUIResource.java
+++ b/libjava/classpath/javax/swing/plaf/ComponentInputMapUIResource.java
@@ -66,4 +66,3 @@ public class ComponentInputMapUIResource extends ComponentInputMap
super(component);
}
}
-
diff --git a/libjava/classpath/javax/swing/plaf/ComponentUI.java b/libjava/classpath/javax/swing/plaf/ComponentUI.java
index be7b68a..35f2de3 100644
--- a/libjava/classpath/javax/swing/plaf/ComponentUI.java
+++ b/libjava/classpath/javax/swing/plaf/ComponentUI.java
@@ -80,7 +80,7 @@ import javax.swing.JComponent;
*
* @author Sascha Brawer (brawer@dandelis.ch)
*/
-public abstract class ComponentUI
+public abstract class ComponentUI
{
/**
* Constructs a new UI delegate.
@@ -89,8 +89,8 @@ public abstract class ComponentUI
{
// Nothing to do here.
}
-
-
+
+
/**
* Sets up the specified component so it conforms the the design
* guidelines of the implemented look and feel. When the look and
@@ -145,8 +145,8 @@ public abstract class ComponentUI
{
// The default implementation does not change any properties.
}
-
-
+
+
/**
* Paints the component according to the design guidelines
* of the look and feel. Most subclasses will want to override
@@ -162,8 +162,8 @@ public abstract class ComponentUI
// Nothing is done here. This method is meant to be overridden by
// subclasses.
}
-
-
+
+
/**
* Fills the specified component with its background color
* (unless the opaque property is false)
@@ -192,7 +192,7 @@ public abstract class ComponentUI
}
paint(g, c);
}
-
+
/**
* Determines the preferred size of a component. The default
* implementation returns null, which means that
@@ -209,8 +209,8 @@ public abstract class ComponentUI
{
return null;
}
-
-
+
+
/**
* Determines the minimum size of a component. The default
* implementation calls {@link #getPreferredSize}, but subclasses
@@ -265,7 +265,7 @@ public abstract class ComponentUI
* inside its parent.
*/
public boolean contains(JComponent c, int x, int y)
- {
+ {
/* JComponent.contains calls the ui delegate for hit
* testing. Therefore, endless mutual recursion would result if we
* called c.contains(x, y) here.
@@ -282,8 +282,8 @@ public abstract class ComponentUI
return (x >= 0) && (x < c.getWidth())
&& (y >= 0) && (y < c.getHeight());
}
-
-
+
+
/**
* Creates a delegate object for the specified component. Users
* should use the createUI method of a suitable
@@ -298,7 +298,7 @@ public abstract class ComponentUI
"javax.swing.plaf.ComponentUI does not implement createUI; call "
+ "createUI on a subclass.");
}
-
+
/**
* Counts the number of accessible children in the component. The
diff --git a/libjava/classpath/javax/swing/plaf/FileChooserUI.java b/libjava/classpath/javax/swing/plaf/FileChooserUI.java
index e9be8f2..fafd21d2 100644
--- a/libjava/classpath/javax/swing/plaf/FileChooserUI.java
+++ b/libjava/classpath/javax/swing/plaf/FileChooserUI.java
@@ -63,7 +63,7 @@ public abstract class FileChooserUI extends ComponentUI
// Nothing to do here.
}
-
+
/**
* Returns a FileFilter that accepts every file. While
* the filtering itself is not specific to any look and feel, the
diff --git a/libjava/classpath/javax/swing/plaf/IconUIResource.java b/libjava/classpath/javax/swing/plaf/IconUIResource.java
index 8ac9e08..48503f8 100644
--- a/libjava/classpath/javax/swing/plaf/IconUIResource.java
+++ b/libjava/classpath/javax/swing/plaf/IconUIResource.java
@@ -63,7 +63,7 @@ public class IconUIResource implements Icon, UIResource, Serializable
/**
- * The icon that is wrapped by this IconUIResource (never
+ * The icon that is wrapped by this IconUIResource (never
* null).
*/
private Icon delegate;
diff --git a/libjava/classpath/javax/swing/plaf/SplitPaneUI.java b/libjava/classpath/javax/swing/plaf/SplitPaneUI.java
index 59ededf..faf17cb 100644
--- a/libjava/classpath/javax/swing/plaf/SplitPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/SplitPaneUI.java
@@ -93,8 +93,8 @@ public abstract class SplitPaneUI extends ComponentUI
* @return the current location of the divider.
*/
public abstract int getDividerLocation(JSplitPane pane);
-
-
+
+
/**
* Determines the minimum location of the divider.
*
diff --git a/libjava/classpath/javax/swing/plaf/TabbedPaneUI.java b/libjava/classpath/javax/swing/plaf/TabbedPaneUI.java
index 01a7720..59136e0 100644
--- a/libjava/classpath/javax/swing/plaf/TabbedPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/TabbedPaneUI.java
@@ -60,8 +60,8 @@ public abstract class TabbedPaneUI extends ComponentUI
{
// Nothing to do here.
}
-
-
+
+
/**
* Determines which tab lies at a given position.
*
@@ -79,7 +79,7 @@ public abstract class TabbedPaneUI extends ComponentUI
*/
public abstract int tabForCoordinate(JTabbedPane pane,
int x, int y);
-
+
/**
* Calculates the bounding box of a tab.
@@ -108,4 +108,3 @@ public abstract class TabbedPaneUI extends ComponentUI
*/
public abstract int getTabRunCount(JTabbedPane pane);
}
-
diff --git a/libjava/classpath/javax/swing/plaf/TextUI.java b/libjava/classpath/javax/swing/plaf/TextUI.java
index 9f2737c..424cee9 100644
--- a/libjava/classpath/javax/swing/plaf/TextUI.java
+++ b/libjava/classpath/javax/swing/plaf/TextUI.java
@@ -61,7 +61,7 @@ public abstract class TextUI extends ComponentUI
{
/**
* Constructs a new TextUI.
- */
+ */
public TextUI()
{
// Nothing to do here.
@@ -155,7 +155,7 @@ public abstract class TextUI extends ComponentUI
*/
public abstract int viewToModel(JTextComponent tc, Point loc,
Position.Bias[] outBias);
-
+
/**
@@ -235,7 +235,7 @@ public abstract class TextUI extends ComponentUI
Position.Bias startBias,
Position.Bias endBias);
-
+
/**
* Retrieves the EditorKit managing policies and
* persistent state.
@@ -246,8 +246,8 @@ public abstract class TextUI extends ComponentUI
* @return the EditorKit used by tc.
*/
public abstract EditorKit getEditorKit(JTextComponent tc);
-
-
+
+
/**
* Retrieves the root of the view tree that visually presents
* the text.
diff --git a/libjava/classpath/javax/swing/plaf/UIResource.java b/libjava/classpath/javax/swing/plaf/UIResource.java
index fe398fe..511aaa7 100644
--- a/libjava/classpath/javax/swing/plaf/UIResource.java
+++ b/libjava/classpath/javax/swing/plaf/UIResource.java
@@ -1,4 +1,4 @@
-/* UIResource.java
+/* UIResource.java
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -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
@@ -44,14 +44,14 @@ package javax.swing.plaf;
* renderer with ComponentUI.uninstallUI() the renderer
* property is set to null.
*
- * A comparison against null can be used with all properties except for
- * the java.awt.Component properties font, foreground, and
+ * A comparison against null can be used with all properties except for
+ * the java.awt.Component properties font, foreground, and
* background. The container can provide the value of the properties if
* they are initialized or set to null.
- *
+ *
* @author Brian Jones
*
- * @see ComponentUI
+ * @see ComponentUI
*/
public interface UIResource
{
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicArrowButton.java b/libjava/classpath/javax/swing/plaf/basic/BasicArrowButton.java
index 781269b..1d6e887 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicArrowButton.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicArrowButton.java
@@ -51,15 +51,15 @@ import javax.swing.SwingConstants;
* A button that displays an arrow (triangle) that points {@link #NORTH},
* {@link #SOUTH}, {@link #EAST} or {@link #WEST}. This button is used by
* the {@link BasicComboBoxUI} class.
- *
+ *
* @see BasicComboBoxUI#createArrowButton
*/
public class BasicArrowButton extends JButton implements SwingConstants
{
- /**
- * The direction that the arrow points.
- *
+ /**
+ * The direction that the arrow points.
+ *
* @see #getDirection()
*/
protected int direction;
@@ -89,7 +89,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
* in the specified direction. If the direction is not one of
* the specified constants, no arrow is drawn.
*
- * @param direction The direction the arrow points in (one of:
+ * @param direction The direction the arrow points in (one of:
* {@link #NORTH}, {@link #SOUTH}, {@link #EAST} and {@link #WEST}).
*/
public BasicArrowButton(int direction)
@@ -103,7 +103,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
* Creates a new BasicArrowButton object with the given colors and
* direction.
*
- * @param direction The direction to point in (one of:
+ * @param direction The direction to point in (one of:
* {@link #NORTH}, {@link #SOUTH}, {@link #EAST} and {@link #WEST}).
* @param background The background color.
* @param shadow The shadow color.
@@ -133,7 +133,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
}
/**
- * Returns the direction of the arrow (one of: {@link #NORTH},
+ * Returns the direction of the arrow (one of: {@link #NORTH},
* {@link #SOUTH}, {@link #EAST} and {@link #WEST}).
*
* @return The direction of the arrow.
@@ -146,7 +146,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
/**
* Sets the direction of the arrow.
*
- * @param dir The new direction of the arrow (one of: {@link #NORTH},
+ * @param dir The new direction of the arrow (one of: {@link #NORTH},
* {@link #SOUTH}, {@link #EAST} and {@link #WEST}).
*/
public void setDirection(int dir)
@@ -163,23 +163,23 @@ public class BasicArrowButton extends JButton implements SwingConstants
public void paint(Graphics g)
{
super.paint(g);
-
+
int height = getHeight();
int size = height / 4;
-
+
int x = (getWidth() - size) / 2;
int y = (height - size) / 2;
-
+
ButtonModel m = getModel();
if (m.isArmed())
{
x++;
y++;
}
-
+
paintTriangle(g, x, y, size, direction, isEnabled());
}
-
+
/**
* Returns the preferred size of the arrow button.
*
@@ -220,17 +220,17 @@ public class BasicArrowButton extends JButton implements SwingConstants
}
/**
- * Paints a triangle with the given size, location and direction. It is
+ * Paints a triangle with the given size, location and direction. It is
* difficult to explain the rationale behind the positioning of the triangle
- * relative to the given (x, y) position - by trial and error we seem to
- * match the behaviour of the reference implementation (which is missing a
+ * relative to the given (x, y) position - by trial and error we seem to
+ * match the behaviour of the reference implementation (which is missing a
* specification for this method).
*
* @param g the graphics device.
* @param x the x-coordinate for the triangle's location.
* @param y the y-coordinate for the triangle's location.
* @param size the arrow size (depth).
- * @param direction the direction of the arrow (one of: {@link #NORTH},
+ * @param direction the direction of the arrow (one of: {@link #NORTH},
* {@link #SOUTH}, {@link #EAST} and {@link #WEST}).
* @param isEnabled if true the arrow is drawn in the enabled
* state, otherwise it is drawn in the disabled state.
@@ -258,11 +258,11 @@ public class BasicArrowButton extends JButton implements SwingConstants
}
g.setColor(savedColor);
}
-
+
/**
- * Paints an upward-pointing triangle. This method is called by the
+ * Paints an upward-pointing triangle. This method is called by the
* {@link #paintTriangle(Graphics, int, int, int, int, boolean)} method.
- *
+ *
* @param g the graphics device.
* @param x the x-coordinate for the anchor point.
* @param y the y-coordinate for the anchor point.
@@ -270,7 +270,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
* @param isEnabled if true the arrow is drawn in the enabled
* state, otherwise it is drawn in the disabled state.
*/
- private void paintTriangleNorth(Graphics g, int x, int y, int size,
+ private void paintTriangleNorth(Graphics g, int x, int y, int size,
boolean isEnabled)
{
int tipX = x + (size - 2) / 2;
@@ -297,11 +297,11 @@ public class BasicArrowButton extends JButton implements SwingConstants
g.drawLine(baseX1 + 1, baseY + 1, baseX2 + 1, baseY + 1);
}
}
-
+
/**
- * Paints an downward-pointing triangle. This method is called by the
+ * Paints an downward-pointing triangle. This method is called by the
* {@link #paintTriangle(Graphics, int, int, int, int, boolean)} method.
- *
+ *
* @param g the graphics device.
* @param x the x-coordinate for the anchor point.
* @param y the y-coordinate for the anchor point.
@@ -309,7 +309,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
* @param isEnabled if true the arrow is drawn in the enabled
* state, otherwise it is drawn in the disabled state.
*/
- private void paintTriangleSouth(Graphics g, int x, int y, int size,
+ private void paintTriangleSouth(Graphics g, int x, int y, int size,
boolean isEnabled)
{
int tipX = x + (size - 2) / 2;
@@ -337,11 +337,11 @@ public class BasicArrowButton extends JButton implements SwingConstants
g.drawLine(tipX + 1, tipY + 1, baseX2 + 1, baseY + 1);
}
}
-
+
/**
- * Paints a right-pointing triangle. This method is called by the
+ * Paints a right-pointing triangle. This method is called by the
* {@link #paintTriangle(Graphics, int, int, int, int, boolean)} method.
- *
+ *
* @param g the graphics device.
* @param x the x-coordinate for the anchor point.
* @param y the y-coordinate for the anchor point.
@@ -349,7 +349,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
* @param isEnabled if true the arrow is drawn in the enabled
* state, otherwise it is drawn in the disabled state.
*/
- private void paintTriangleEast(Graphics g, int x, int y, int size,
+ private void paintTriangleEast(Graphics g, int x, int y, int size,
boolean isEnabled)
{
int tipX = x + (size - 1);
@@ -357,7 +357,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
int baseX = x;
int baseY1 = tipY - (size - 1);
int baseY2 = tipY + (size - 1);
-
+
Polygon triangle = new Polygon();
triangle.addPoint(tipX, tipY);
triangle.addPoint(baseX, baseY1);
@@ -378,11 +378,11 @@ public class BasicArrowButton extends JButton implements SwingConstants
g.drawLine(baseX + 1, baseY2 + 1, tipX + 1, tipY + 1);
}
}
-
+
/**
- * Paints a left-pointing triangle. This method is called by the
+ * Paints a left-pointing triangle. This method is called by the
* {@link #paintTriangle(Graphics, int, int, int, int, boolean)} method.
- *
+ *
* @param g the graphics device.
* @param x the x-coordinate for the anchor point.
* @param y the y-coordinate for the anchor point.
@@ -390,7 +390,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
* @param isEnabled if true the arrow is drawn in the enabled
* state, otherwise it is drawn in the disabled state.
*/
- private void paintTriangleWest(Graphics g, int x, int y, int size,
+ private void paintTriangleWest(Graphics g, int x, int y, int size,
boolean isEnabled)
{
int tipX = x;
@@ -398,7 +398,7 @@ public class BasicArrowButton extends JButton implements SwingConstants
int baseX = x + (size - 1);
int baseY1 = tipY - (size - 1);
int baseY2 = tipY + (size - 1);
-
+
Polygon triangle = new Polygon();
triangle.addPoint(tipX, tipY);
triangle.addPoint(baseX, baseY1);
@@ -418,5 +418,5 @@ public class BasicArrowButton extends JButton implements SwingConstants
g.drawLine(baseX + 1, baseY1 + 1, baseX + 1, baseY2 + 1);
}
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicBorders.java b/libjava/classpath/javax/swing/plaf/basic/BasicBorders.java
index 5e2cf2e..83afc33 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicBorders.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicBorders.java
@@ -252,7 +252,7 @@ public class BasicBorders
* UIDefaults of the currently active look and feel
* using the keys “SplitPane.darkShadow” and
* “SplitPane.highlight”.
- *
+ *
*
*
@@ -284,7 +284,7 @@ public class BasicBorders
* other two edges is the background color of the divider.
*
*
*
* @return an instance of SplitPaneDividerBorder, which is
@@ -332,7 +332,7 @@ public class BasicBorders
UIManager.getColor("TextField.light"),
UIManager.getColor("TextField.highlight"));
}
-
+
/**
* Returns a two-pixel thick, green
@@ -407,8 +407,8 @@ public class BasicBorders
return sharedMarginBorder;
}
-
-
+
+
/**
* A border whose appearance depends on the state of
* the enclosed button.
@@ -429,36 +429,36 @@ public class BasicBorders
* of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5.
*/
static final long serialVersionUID = -157053874580739687L;
-
-
+
+
/**
* The color for drawing the shaded parts of the border.
* @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel
*/
protected Color shadow;
-
-
+
+
/**
* The color for drawing the dark shaded parts of the border.
* @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel
*/
protected Color darkShadow;
-
-
+
+
/**
* The color for drawing the highlighted parts of the border.
* @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel
*/
protected Color highlight;
-
-
+
+
/**
* The color for drawing the bright highlighted parts of the border.
* @see javax.swing.plaf.basic.BasicGraphicsUtils#drawBezel
*/
protected Color lightHighlight;
-
-
+
+
/**
* Constructs a new border for drawing a button in the Basic
* look and feel.
@@ -485,7 +485,7 @@ public class BasicBorders
? lightHighlight
: Color.white;
}
-
+
/**
* Paints the ButtonBorder around a given component.
@@ -503,10 +503,10 @@ public class BasicBorders
int x, int y, int width, int height)
{
ButtonModel bmodel = null;
-
+
if (c instanceof AbstractButton)
bmodel = ((AbstractButton) c).getModel();
-
+
BasicGraphicsUtils.drawBezel(
g, x, y, width, height,
/* pressed */ (bmodel != null)
@@ -516,8 +516,8 @@ public class BasicBorders
&& ((JButton) c).isDefaultButton(),
shadow, darkShadow, highlight, lightHighlight);
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -534,7 +534,7 @@ public class BasicBorders
* bottom fields indicate the width of the
* border at the respective edge.
*
- * @see #getBorderInsets(java.awt.Component, java.awt.Insets)
+ * @see #getBorderInsets(java.awt.Component, java.awt.Insets)
*/
public Insets getBorderInsets(Component c)
{
@@ -545,7 +545,7 @@ public class BasicBorders
return getBorderInsets(c, null);
}
-
+
/**
* Measures the width of this border, storing the results into a
* pre-existing Insets object.
@@ -583,8 +583,8 @@ public class BasicBorders
return insets;
}
}
-
-
+
+
/**
* A border that makes its enclosed component appear as lowered
* into the surface. Typically used for text fields.
@@ -668,7 +668,7 @@ public class BasicBorders
? lightHighlight : Color.white;
}
-
+
/**
* Paints the FieldBorder around a given component.
*
@@ -688,8 +688,8 @@ public class BasicBorders
shadow, darkShadow,
highlight, lightHighlight);
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -749,8 +749,8 @@ public class BasicBorders
return insets;
}
}
-
-
+
+
/**
* An invisible, but spacing border whose margin is determined
* by calling the getMargin() method of the enclosed
@@ -772,8 +772,8 @@ public class BasicBorders
* of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5.
*/
static final long serialVersionUID = -3035848353448896090L;
-
-
+
+
/**
* Constructs a new MarginBorder.
*/
@@ -781,7 +781,7 @@ public class BasicBorders
{
// Nothing to do here.
}
-
+
/**
* Measures the width of this border.
*
@@ -797,8 +797,8 @@ public class BasicBorders
{
return getBorderInsets(c, new Insets(0, 0, 0, 0));
}
-
-
+
+
/**
* Determines the insets of this border by calling the
* getMargin() method of the enclosed component. The
@@ -839,7 +839,7 @@ public class BasicBorders
margin = ((JToolBar) c).getMargin();
else if (c instanceof JTextComponent)
margin = ((JTextComponent) c).getMargin();
-
+
if (margin == null)
insets.top = insets.left = insets.bottom = insets.right = 0;
else
@@ -853,7 +853,7 @@ public class BasicBorders
return insets;
}
}
-
+
/**
* A border for drawing a separator line below JMenuBar.
@@ -872,8 +872,8 @@ public class BasicBorders
* of Apple/Sun JDK 1.3.1 on MacOS X 10.1.5.
*/
static final long serialVersionUID = -6909056571935227506L;
-
-
+
+
/**
* The shadow color, which is used for the upper line of the
* two-pixel thick bottom edge.
@@ -949,7 +949,7 @@ public class BasicBorders
g.setColor(highlight);
g.drawLine(x + 1, y + 1, x + width - 3, y + 1);
- g.drawLine(x + width - 1, y, x + width - 1, y + 1);
+ g.drawLine(x + width - 1, y, x + width - 1, y + 1);
}
finally
{
@@ -1098,7 +1098,7 @@ public class BasicBorders
{
lowered = button.isSelected()
|| (/* mouse inside */ bmodel.isArmed() && bmodel.isPressed());
- focused = button.hasFocus() && button.isFocusPainted();
+ focused = button.hasFocus() && button.isFocusPainted();
}
if (lowered)
@@ -1112,8 +1112,8 @@ public class BasicBorders
shadow, darkShadow,
highlight, lightHighlight);
}
-
-
+
+
/**
* Measures the width of this border.
*
@@ -1124,7 +1124,7 @@ public class BasicBorders
* bottom fields indicate the width of the
* border at the respective edge.
*
- * @see #getBorderInsets(java.awt.Component, java.awt.Insets)
+ * @see #getBorderInsets(java.awt.Component, java.awt.Insets)
*/
public Insets getBorderInsets(Component c)
{
@@ -1135,7 +1135,7 @@ public class BasicBorders
return getBorderInsets(c, null);
}
-
+
/**
* Measures the width of this border, storing the results into a
* pre-existing Insets object.
@@ -1439,7 +1439,7 @@ public class BasicBorders
y += rect.y - 1;
int right = x + rect.width + 1;
int bottom = y + rect.height + 1;
-
+
Color oldColor = g.getColor();
try
{
@@ -1466,7 +1466,7 @@ public class BasicBorders
}
}
-
+
/**
* Measures the width of this border.
*
@@ -1616,7 +1616,7 @@ public class BasicBorders
return true;
}
-
+
/**
* Determines the JSplitPane whose divider is being painted.
*
@@ -1661,7 +1661,7 @@ public class BasicBorders
*/
static final long serialVersionUID = -3528666548001058394L;
-
+
/**
* Constructs a new border for drawing a JToggleButton in
* the Basic look and feel.
@@ -1708,7 +1708,7 @@ public class BasicBorders
* is selected or not.
*/
BasicGraphicsUtils.drawBezel(g, x, y, width, height,
- /* pressed */ false,
+ /* pressed */ false,
/* default */ false,
shadow, darkShadow,
highlight, lightHighlight);
@@ -1725,7 +1725,7 @@ public class BasicBorders
* bottom fields indicate the width of the
* border at the respective edge.
*
- * @see #getBorderInsets(java.awt.Component, java.awt.Insets)
+ * @see #getBorderInsets(java.awt.Component, java.awt.Insets)
*/
public Insets getBorderInsets(Component c)
{
@@ -1736,7 +1736,7 @@ public class BasicBorders
return getBorderInsets(c, null);
}
-
+
/**
* Measures the width of this border, storing the results into a
* pre-existing Insets object.
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicButtonListener.java b/libjava/classpath/javax/swing/plaf/basic/BasicButtonListener.java
index c99de2c..22033b6 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicButtonListener.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicButtonListener.java
@@ -131,7 +131,7 @@ public class BasicButtonListener
{
// Do nothing here.
}
-
+
public void propertyChange(PropertyChangeEvent e)
{
// Store the TextLayout for this in a client property for speed-up
@@ -166,31 +166,31 @@ public class BasicButtonListener
*
* @param b the button to check
*/
- protected void checkOpacity(AbstractButton b)
- {
+ protected void checkOpacity(AbstractButton b)
+ {
b.setOpaque(b.isContentAreaFilled());
}
-
- public void focusGained(FocusEvent e)
- {
+
+ public void focusGained(FocusEvent e)
+ {
if (e.getSource() instanceof AbstractButton)
{
AbstractButton button = (AbstractButton) e.getSource();
if (button.isFocusPainted())
- button.repaint();
+ button.repaint();
}
}
-
+
public void focusLost(FocusEvent e)
{
if (e.getSource() instanceof AbstractButton)
{
AbstractButton button = (AbstractButton) e.getSource();
if (button.isFocusPainted())
- button.repaint();
+ button.repaint();
}
}
-
+
public void installKeyboardActions(JComponent c)
{
ButtonUI ui = ((AbstractButton) c).getUI();
@@ -198,7 +198,7 @@ public class BasicButtonListener
{
// Install InputMap.
BasicButtonUI basicUI = (BasicButtonUI) ui;
- String prefix = basicUI.getPropertyPrefix();
+ String prefix = basicUI.getPropertyPrefix();
InputMap focusInputMap =
(InputMap) UIManager.get(prefix + "focusInputMap");
SwingUtilities.replaceUIInputMap(c, JComponent.WHEN_FOCUSED,
@@ -212,11 +212,11 @@ public class BasicButtonListener
}
SwingUtilities.replaceUIActionMap(c, am);
}
-
- c.getActionMap().put("pressed",
- new AbstractAction()
+
+ c.getActionMap().put("pressed",
+ new AbstractAction()
{
- public void actionPerformed(ActionEvent e)
+ public void actionPerformed(ActionEvent e)
{
AbstractButton button = (AbstractButton) e.getSource();
ButtonModel model = button.getModel();
@@ -225,11 +225,11 @@ public class BasicButtonListener
model.setPressed(true);
}
});
-
- c.getActionMap().put("released",
- new AbstractAction()
+
+ c.getActionMap().put("released",
+ new AbstractAction()
{
- public void actionPerformed(ActionEvent e)
+ public void actionPerformed(ActionEvent e)
{
AbstractButton button = (AbstractButton) e.getSource();
ButtonModel model = button.getModel();
@@ -237,7 +237,7 @@ public class BasicButtonListener
model.setPressed(false);
model.setArmed(false);
}
- });
+ });
}
/**
@@ -259,23 +259,23 @@ public class BasicButtonListener
SwingUtilities.replaceUIActionMap(c, null);
SwingUtilities.replaceUIInputMap(c, JComponent.WHEN_FOCUSED, null);
}
-
+
public void stateChanged(ChangeEvent e)
{
// Need to repaint when the button state changes.
((AbstractButton) e.getSource()).repaint();
}
-
+
public void mouseMoved(MouseEvent e)
{
// Nothing to do here.
}
-
+
public void mouseDragged(MouseEvent e)
{
// Nothing to do here.
}
-
+
public void mouseClicked(MouseEvent e)
{
// Nothing to do here.
@@ -305,7 +305,7 @@ public class BasicButtonListener
}
/**
- * Accept a mouse release event and set the button's
+ * Accept a mouse release event and set the button's
* "pressed" property to true, if the model
* is armed. If the model is not armed, ignore the event.
*
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicButtonUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicButtonUI.java
index 9f685bb..1697c24 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicButtonUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicButtonUI.java
@@ -120,7 +120,7 @@ public class BasicButtonUI extends ButtonUI
*
* @return A new UI capable of drawing the component
*/
- public static ComponentUI createUI(final JComponent c)
+ public static ComponentUI createUI(final JComponent c)
{
if (sharedUI == null)
sharedUI = new BasicButtonUI();
@@ -129,9 +129,9 @@ public class BasicButtonUI extends ButtonUI
/**
* Returns the default gap between the button's text and icon (in pixels).
- *
+ *
* @param b the button (ignored).
- *
+ *
* @return The gap.
*/
public int getDefaultTextIconGap(AbstractButton b)
@@ -141,19 +141,19 @@ public class BasicButtonUI extends ButtonUI
/**
* Sets the text shift offset to zero.
- *
+ *
* @see #setTextShiftOffset()
*/
protected void clearTextShiftOffset()
{
textShiftOffset = 0;
}
-
+
/**
* Returns the text shift offset.
- *
+ *
* @return The text shift offset.
- *
+ *
* @see #clearTextShiftOffset()
* @see #setTextShiftOffset()
*/
@@ -164,7 +164,7 @@ public class BasicButtonUI extends ButtonUI
/**
* Sets the text shift offset to the value in {@link #defaultTextShiftOffset}.
- *
+ *
* @see #clearTextShiftOffset()
*/
protected void setTextShiftOffset()
@@ -185,7 +185,7 @@ public class BasicButtonUI extends ButtonUI
/**
* Installs the default settings.
- *
+ *
* @param b the button (null not permitted).
*/
protected void installDefaults(AbstractButton b)
@@ -218,7 +218,7 @@ public class BasicButtonUI extends ButtonUI
/**
* Removes the defaults added by {@link #installDefaults(AbstractButton)}.
- *
+ *
* @param b the button (null not permitted).
*/
protected void uninstallDefaults(AbstractButton b)
@@ -229,11 +229,11 @@ public class BasicButtonUI extends ButtonUI
/**
* Creates and returns a new instance of {@link BasicButtonListener}. This
- * method provides a hook to make it easy for subclasses to install a
+ * method provides a hook to make it easy for subclasses to install a
* different listener.
- *
+ *
* @param b the button.
- *
+ *
* @return A new listener.
*/
protected BasicButtonListener createButtonListener(AbstractButton b)
@@ -249,7 +249,7 @@ public class BasicButtonUI extends ButtonUI
/**
* Installs listeners for the button.
- *
+ *
* @param b the button (null not permitted).
*/
protected void installListeners(AbstractButton b)
@@ -259,7 +259,7 @@ public class BasicButtonUI extends ButtonUI
{
b.addChangeListener(listener);
b.addPropertyChangeListener(listener);
- b.addFocusListener(listener);
+ b.addFocusListener(listener);
b.addMouseListener(listener);
b.addMouseMotionListener(listener);
}
@@ -271,7 +271,7 @@ public class BasicButtonUI extends ButtonUI
/**
* Uninstalls listeners for the button.
- *
+ *
* @param b the button (null not permitted).
*/
protected void uninstallListeners(AbstractButton b)
@@ -281,7 +281,7 @@ public class BasicButtonUI extends ButtonUI
{
b.removeChangeListener(listener);
b.removePropertyChangeListener(listener);
- b.removeFocusListener(listener);
+ b.removeFocusListener(listener);
b.removeMouseListener(listener);
b.removeMouseMotionListener(listener);
}
@@ -304,12 +304,12 @@ public class BasicButtonUI extends ButtonUI
/**
* Install the BasicButtonUI as the UI for a particular component.
* This means registering all the UI's listeners with the component,
- * and setting any properties of the button which are particular to
+ * and setting any properties of the button which are particular to
* this look and feel.
*
* @param c The component to install the UI into
*/
- public void installUI(final JComponent c)
+ public void installUI(final JComponent c)
{
super.installUI(c);
if (c instanceof AbstractButton)
@@ -395,7 +395,7 @@ public class BasicButtonUI extends ButtonUI
*
* @return The preferred dimensions of the component
*/
- public Dimension getPreferredSize(JComponent c)
+ public Dimension getPreferredSize(JComponent c)
{
AbstractButton b = (AbstractButton) c;
Dimension d = BasicGraphicsUtils.getPreferredButtonSize(b,
@@ -417,7 +417,7 @@ public class BasicButtonUI extends ButtonUI
i = b.getRolloverSelectedIcon();
else if (b.getRolloverIcon() != null)
i = b.getRolloverIcon();
- }
+ }
else if (b.isSelected() && b.isEnabled())
{
@@ -434,7 +434,7 @@ public class BasicButtonUI extends ButtonUI
}
/**
- * Paint the component, which is an {@link AbstractButton}, according to
+ * Paint the component, which is an {@link AbstractButton}, according to
* its current state.
*
* @param g The graphics context to paint with
@@ -462,13 +462,13 @@ public class BasicButtonUI extends ButtonUI
g.setFont(f);
Icon icon = b.getIcon();
String text = b.getText();
- text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),
+ text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),
text, icon,
- b.getVerticalAlignment(),
+ b.getVerticalAlignment(),
b.getHorizontalAlignment(),
- b.getVerticalTextPosition(),
+ b.getVerticalTextPosition(),
b.getHorizontalTextPosition(),
- viewR, iconR, textR,
+ viewR, iconR, textR,
text == null ? 0
: b.getIconTextGap());
@@ -541,7 +541,7 @@ public class BasicButtonUI extends ButtonUI
/**
* Paints the background area of an {@link AbstractButton} in the pressed
- * state. This means filling the supplied area with a darker than normal
+ * state. This means filling the supplied area with a darker than normal
* background.
*
* @param g The graphics context to paint with
@@ -557,7 +557,7 @@ public class BasicButtonUI extends ButtonUI
g.fillRect(area.x, area.y, area.width, area.height);
}
}
-
+
/**
* Paints the "text" property of an {@link AbstractButton}.
*
@@ -567,8 +567,8 @@ public class BasicButtonUI extends ButtonUI
* @param text The text to paint
*/
protected void paintText(Graphics g, JComponent c, Rectangle textRect,
- String text)
- {
+ String text)
+ {
AbstractButton b = (AbstractButton) c;
Font f = b.getFont();
g.setFont(f);
@@ -602,10 +602,10 @@ public class BasicButtonUI extends ButtonUI
* @since 1.4
*/
protected void paintText(Graphics g, AbstractButton b, Rectangle textRect,
- String text)
+ String text)
{
paintText(g, (JComponent) b, textRect, text);
- }
+ }
/**
* A helper method that finds the BasicButtonListener for the specified
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java
index e45970e..79ce7b8 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java
@@ -52,7 +52,7 @@ import javax.swing.plaf.ComponentUI;
*/
public class BasicCheckBoxMenuItemUI extends BasicMenuItemUI
{
-
+
/**
* Creates a new BasicCheckBoxMenuItemUI object.
*/
@@ -60,7 +60,7 @@ public class BasicCheckBoxMenuItemUI extends BasicMenuItemUI
{
super();
}
-
+
/**
* Factory method to create a BasicCheckBoxMenuItemUI for the given {@link
* JComponent}, which should be a JCheckBoxMenuItem
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicCheckBoxUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicCheckBoxUI.java
index 43001b8..0a4da00 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicCheckBoxUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicCheckBoxUI.java
@@ -47,14 +47,14 @@ import javax.swing.plaf.ComponentUI;
* A UI delegate for the {@link JCheckBox} component.
*/
public class BasicCheckBoxUI extends BasicRadioButtonUI
-{
-
+{
+
/**
- * Returns a UI delegate (that is, an instance of this class) for the
+ * Returns a UI delegate (that is, an instance of this class) for the
* specified component.
- *
+ *
* @param c the component (this should be a {@link JCheckBox}).
- *
+ *
* @return A new instance of BasicCheckBoxUI.
*/
public static ComponentUI createUI(JComponent c)
@@ -63,7 +63,7 @@ public class BasicCheckBoxUI extends BasicRadioButtonUI
}
/**
- * Returns the prefix for entries in the {@link UIManager} defaults table
+ * Returns the prefix for entries in the {@link UIManager} defaults table
* ("CheckBox." in this case).
*
* @return "CheckBox."
@@ -73,7 +73,3 @@ public class BasicCheckBoxUI extends BasicRadioButtonUI
return "CheckBox.";
}
}
-
-
-
-
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicColorChooserUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicColorChooserUI.java
index f37cbd7..10b5643 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicColorChooserUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicColorChooserUI.java
@@ -74,12 +74,12 @@ public class BasicColorChooserUI extends ColorChooserUI
public void propertyChange(PropertyChangeEvent e)
{
if (e.getPropertyName() == JColorChooser.CHOOSER_PANELS_PROPERTY)
- makeTabs(chooser.getChooserPanels());
+ makeTabs(chooser.getChooserPanels());
else if (e.getPropertyName() == JColorChooser.PREVIEW_PANEL_PROPERTY)
- updatePreviewPanel(chooser.getPreviewPanel());
+ updatePreviewPanel(chooser.getPreviewPanel());
else if (e.getPropertyName() == JColorChooser.SELECTION_MODEL_PROPERTY)
- ((AbstractColorChooserPanel) pane.getSelectedComponent())
- .updateChooser();
+ ((AbstractColorChooserPanel) pane.getSelectedComponent())
+ .updateChooser();
chooser.repaint();
}
@@ -100,10 +100,10 @@ public class BasicColorChooserUI extends ColorChooserUI
{
if (pane != null)
{
- AbstractColorChooserPanel panel = (AbstractColorChooserPanel) pane
- .getSelectedComponent();
- if (panel != null)
- panel.updateChooser();
+ AbstractColorChooserPanel panel = (AbstractColorChooserPanel) pane
+ .getSelectedComponent();
+ if (panel != null)
+ panel.updateChooser();
}
chooser.repaint();
}
@@ -190,30 +190,30 @@ public class BasicColorChooserUI extends ColorChooserUI
{
if (c instanceof JColorChooser)
{
- chooser = (JColorChooser) c;
- chooser.setLayout(new BorderLayout());
+ chooser = (JColorChooser) c;
+ chooser.setLayout(new BorderLayout());
- // Do this first, so we avoid doing work for property change events.
- defaultChoosers = createDefaultChoosers();
- chooser.setChooserPanels(defaultChoosers);
- pane = new JTabbedPane();
+ // Do this first, so we avoid doing work for property change events.
+ defaultChoosers = createDefaultChoosers();
+ chooser.setChooserPanels(defaultChoosers);
+ pane = new JTabbedPane();
- pane.addChangeListener(new ChangeListener()
- {
- public void stateChanged(ChangeEvent e)
- {
- pane.repaint();
- }
- });
+ pane.addChangeListener(new ChangeListener()
+ {
+ public void stateChanged(ChangeEvent e)
+ {
+ pane.repaint();
+ }
+ });
- makeTabs(defaultChoosers);
+ makeTabs(defaultChoosers);
- chooser.add(pane, BorderLayout.NORTH);
+ chooser.add(pane, BorderLayout.NORTH);
- installPreviewPanel();
+ installPreviewPanel();
- installDefaults();
- installListeners();
+ installDefaults();
+ installListeners();
}
}
@@ -274,9 +274,9 @@ public class BasicColorChooserUI extends ColorChooserUI
{
if (prevContainer == null)
{
- prevContainer = new JPanel();
- prevContainer.setLayout(new BorderLayout());
- chooser.add(prevContainer, BorderLayout.CENTER);
+ prevContainer = new JPanel();
+ prevContainer.setLayout(new BorderLayout());
+ chooser.add(prevContainer, BorderLayout.CENTER);
}
prevContainer.removeAll();
prevContainer.add(preview, BorderLayout.CENTER);
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicComboBoxEditor.java b/libjava/classpath/javax/swing/plaf/basic/BasicComboBoxEditor.java
index d879261..b04f3fa 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicComboBoxEditor.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicComboBoxEditor.java
@@ -69,7 +69,7 @@ public class BasicComboBoxEditor extends Object implements ComboBoxEditor,
}
/**
- * Returns the component that will be used by the combo box to display and
+ * Returns the component that will be used by the combo box to display and
* edit the currently selected item in the combo box.
*
* @return The editor component, which is a {@link JTextField} in this case.
@@ -138,7 +138,7 @@ public class BasicComboBoxEditor extends Object implements ComboBoxEditor,
}
/**
- * Adds an {@link ActionListener} to the editor component. If the user will
+ * Adds an {@link ActionListener} to the editor component. If the user will
* edit currently selected item in the textfield and pressEnter, then action
* will be performed. The actionPerformed of this ActionListener should
* change the selected item of the comboBox to the newly editted selected
@@ -163,7 +163,7 @@ public class BasicComboBoxEditor extends Object implements ComboBoxEditor,
}
/**
- * A subclass of {@link BasicComboBoxEditor} that implements the
+ * A subclass of {@link BasicComboBoxEditor} that implements the
* {@link UIResource} interface.
*/
public static class UIResource extends BasicComboBoxEditor
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicComboBoxRenderer.java b/libjava/classpath/javax/swing/plaf/basic/BasicComboBoxRenderer.java
index 3c8d1e8..761d7d1 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicComboBoxRenderer.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicComboBoxRenderer.java
@@ -51,12 +51,12 @@ import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
/**
- * A renderer for a {@link JComboBox}.
+ * A renderer for a {@link JComboBox}.
*
* @author Olga Rodimina
*/
-public class BasicComboBoxRenderer
- extends JLabel
+public class BasicComboBoxRenderer
+ extends JLabel
implements ListCellRenderer, Serializable
{
/**
@@ -75,7 +75,7 @@ public class BasicComboBoxRenderer
/**
* Returns preferredSize of the renderer
- *
+ *
* @return preferredSize of the renderer
*/
public Dimension getPreferredSize()
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicComboBoxUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicComboBoxUI.java
index ff636d6..07d4f42 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicComboBoxUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicComboBoxUI.java
@@ -100,9 +100,9 @@ public class BasicComboBoxUI extends ComboBoxUI
protected JComboBox comboBox;
/**
- * The component that is responsible for displaying/editing the selected
- * item of the combo box.
- *
+ * The component that is responsible for displaying/editing the selected
+ * item of the combo box.
+ *
* @see BasicComboBoxEditor#getEditorComponent()
*/
protected Component editor;
@@ -144,11 +144,11 @@ public class BasicComboBoxUI extends ComboBoxUI
* Popup list containing the combo box's menu items.
*/
protected ComboPopup popup;
-
+
protected KeyListener popupKeyListener;
-
+
protected MouseListener popupMouseListener;
-
+
protected MouseMotionListener popupMouseMotionListener;
/**
@@ -187,7 +187,7 @@ public class BasicComboBoxUI extends ComboBoxUI
}
/**
- * A factory method to create a UI delegate for the given
+ * A factory method to create a UI delegate for the given
* {@link JComponent}, which should be a {@link JComboBox}.
*
* @param c The {@link JComponent} a UI is being created for.
@@ -203,7 +203,7 @@ public class BasicComboBoxUI extends ComboBoxUI
* Installs the UI for the given {@link JComponent}.
*
* @param c the JComponent to install a UI for.
- *
+ *
* @see #uninstallUI(JComponent)
*/
public void installUI(JComponent c)
@@ -230,7 +230,7 @@ public class BasicComboBoxUI extends ComboBoxUI
{
currentEditor = createEditor();
comboBox.setEditor(currentEditor);
- }
+ }
installComponents();
installListeners();
@@ -246,7 +246,7 @@ public class BasicComboBoxUI extends ComboBoxUI
* Uninstalls the UI for the given {@link JComponent}.
*
* @param c The JComponent that is having this UI removed.
- *
+ *
* @see #installUI(JComponent)
*/
public void uninstallUI(JComponent c)
@@ -262,9 +262,9 @@ public class BasicComboBoxUI extends ComboBoxUI
}
/**
- * Installs the defaults that are defined in the {@link BasicLookAndFeel}
+ * Installs the defaults that are defined in the {@link BasicLookAndFeel}
* for this {@link JComboBox}.
- *
+ *
* @see #uninstallDefaults()
*/
protected void installDefaults()
@@ -276,7 +276,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Creates and installs the listeners for this UI.
- *
+ *
* @see #uninstallListeners()
*/
protected void installListeners()
@@ -312,7 +312,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Uninstalls the defaults and sets any objects created during
* install to null.
- *
+ *
* @see #installDefaults()
*/
protected void uninstallDefaults()
@@ -322,7 +322,7 @@ public class BasicComboBoxUI extends ComboBoxUI
if (comboBox.getForeground() instanceof UIResource)
comboBox.setForeground(null);
-
+
if (comboBox.getBackground() instanceof UIResource)
comboBox.setBackground(null);
@@ -331,7 +331,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Detaches all the listeners we attached in {@link #installListeners}.
- *
+ *
* @see #installListeners()
*/
protected void uninstallListeners()
@@ -429,7 +429,7 @@ public class BasicComboBoxUI extends ComboBoxUI
}
/**
- * Creates and returns a layout manager for the combo box. Subclasses can
+ * Creates and returns a layout manager for the combo box. Subclasses can
* override this method to provide a different layout.
*
* @return a layout manager for the combo box.
@@ -452,7 +452,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Creates the component that will be responsible for displaying/editing
- * the selected item in the combo box. This editor is used only when combo
+ * the selected item in the combo box. This editor is used only when combo
* box is editable.
*
* @return A new component that will be responsible for displaying/editing
@@ -484,7 +484,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Uninstalls components from this {@link JComboBox}.
- *
+ *
* @see #installComponents()
*/
protected void uninstallComponents()
@@ -546,7 +546,7 @@ public class BasicComboBoxUI extends ComboBoxUI
}
/**
- * Unconfigures the editor for this combo box.
+ * Unconfigures the editor for this combo box.
*/
protected void unconfigureEditor()
{
@@ -558,7 +558,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Configures the arrow button.
- *
+ *
* @see #configureArrowButton()
*/
public void configureArrowButton()
@@ -569,7 +569,7 @@ public class BasicComboBoxUI extends ComboBoxUI
arrowButton.setFocusable(false);
arrowButton.addMouseListener(popup.getMouseListener());
arrowButton.addMouseMotionListener(popup.getMouseMotionListener());
-
+
// Mark the button as not closing the popup, we handle this ourselves.
arrowButton.putClientProperty(BasicLookAndFeel.DONT_CANCEL_POPUP,
Boolean.TRUE);
@@ -578,7 +578,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Unconfigures the arrow button.
- *
+ *
* @see #configureArrowButton()
*
* @specnote The specification says this method is implementation specific
@@ -613,7 +613,7 @@ public class BasicComboBoxUI extends ComboBoxUI
*
* @param c The JComboBox to check
*
- * @return true if popup part of the JComboBox is visible and
+ * @return true if popup part of the JComboBox is visible and
* false otherwise.
*/
public boolean isPopupVisible(JComboBox c)
@@ -917,12 +917,12 @@ public class BasicComboBoxUI extends ComboBoxUI
= new DefaultListCellRenderer();
/**
- * Returns the default size for the display area of a combo box that does
+ * Returns the default size for the display area of a combo box that does
* not contain any elements. This method returns the width and height of
- * a single space in the current font, plus a margin of 1 pixel.
+ * a single space in the current font, plus a margin of 1 pixel.
*
* @return The default display size.
- *
+ *
* @see #getDisplaySize()
*/
protected Dimension getDefaultSize()
@@ -937,7 +937,7 @@ public class BasicComboBoxUI extends ComboBoxUI
}
/**
- * Returns the size of the display area for the combo box. This size will be
+ * Returns the size of the display area for the combo box. This size will be
* the size of the combo box, not including the arrowButton.
*
* @return The size of the display area for the combo box.
@@ -950,11 +950,11 @@ public class BasicComboBoxUI extends ComboBoxUI
{
renderer = DEFAULT_RENDERER;
}
-
+
Object prototype = comboBox.getPrototypeDisplayValue();
if (prototype != null)
{
- Component comp = renderer.getListCellRendererComponent(listBox,
+ Component comp = renderer.getListCellRendererComponent(listBox,
prototype, -1, false, false);
currentValuePane.add(comp);
comp.setFont(comboBox.getFont());
@@ -971,7 +971,7 @@ public class BasicComboBoxUI extends ComboBoxUI
{
for (int i = 0; i < size; ++i)
{
- Component comp = renderer.getListCellRendererComponent(listBox,
+ Component comp = renderer.getListCellRendererComponent(listBox,
model.getElementAt(i), -1, false, false);
currentValuePane.add(comp);
comp.setFont(comboBox.getFont());
@@ -1009,7 +1009,7 @@ public class BasicComboBoxUI extends ComboBoxUI
(InputMap) UIManager.get("ComboBox.ancestorInputMap"));
// Install any action maps here.
}
-
+
/**
* Uninstalls the keyboard actions for the {@link JComboBox} there were
* installed by in {@link #installListeners}.
@@ -1024,7 +1024,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* A {@link LayoutManager} used to position the sub-components of the
* {@link JComboBox}.
- *
+ *
* @see BasicComboBoxUI#createLayoutManager()
*/
public class ComboBoxLayoutManager implements LayoutManager
@@ -1040,7 +1040,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Adds a component to the layout. This method does nothing, since the
* layout manager doesn't need to track the components.
- *
+ *
* @param name the name to associate the component with (ignored).
* @param comp the component (ignored).
*/
@@ -1052,7 +1052,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Removes a component from the layout. This method does nothing, since
* the layout manager doesn't need to track the components.
- *
+ *
* @param comp the component.
*/
public void removeLayoutComponent(Component comp)
@@ -1063,7 +1063,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Returns preferred layout size of the JComboBox.
*
- * @param parent the Container for which the preferred size should be
+ * @param parent the Container for which the preferred size should be
* calculated.
*
* @return The preferred size for the given container
@@ -1075,9 +1075,9 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Returns the minimum layout size.
- *
+ *
* @param parent the container.
- *
+ *
* @return The minimum size.
*/
public Dimension minimumLayoutSize(Container parent)
@@ -1095,7 +1095,7 @@ public class BasicComboBoxUI extends ComboBoxUI
*/
public void layoutContainer(Container parent)
{
- // Position editor component to the left of arrow button if combo box is
+ // Position editor component to the left of arrow button if combo box is
// editable
Insets i = getInsets();
int arrowSize = comboBox.getHeight() - (i.top + i.bottom);
@@ -1152,7 +1152,7 @@ public class BasicComboBoxUI extends ComboBoxUI
}
/**
- * Handles {@link ItemEvent}s fired by the {@link JComboBox} when its
+ * Handles {@link ItemEvent}s fired by the {@link JComboBox} when its
* selected item changes.
*/
public class ItemHandler extends Object implements ItemListener
@@ -1297,7 +1297,7 @@ public class BasicComboBoxUI extends ComboBoxUI
}
}
}
-
+
}
/**
@@ -1328,7 +1328,7 @@ public class BasicComboBoxUI extends ComboBoxUI
/**
* Invoked whenever bound property of JComboBox changes.
- *
+ *
* @param e the event.
*/
public void propertyChange(PropertyChangeEvent e)
@@ -1404,7 +1404,7 @@ public class BasicComboBoxUI extends ComboBoxUI
isMinimumSizeDirty = true;
comboBox.revalidate();
}
- // FIXME: Need to handle changes in other bound properties.
+ // FIXME: Need to handle changes in other bound properties.
}
}
}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicComboPopup.java b/libjava/classpath/javax/swing/plaf/basic/BasicComboPopup.java
index 11f832a..3e54ca7 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicComboPopup.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicComboPopup.java
@@ -483,7 +483,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup
*/
protected void installListListeners()
{
- // mouse listener listening to mouse events occuring in the
+ // mouse listener listening to mouse events occuring in the
// combo box's list of items.
listMouseListener = createListMouseListener();
list.addMouseListener(listMouseListener);
@@ -613,7 +613,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup
*/
protected void autoScrollUp()
{
- // scroll up the scroll bar to make the item above visible
+ // scroll up the scroll bar to make the item above visible
JScrollBar scrollbar = scroller.getVerticalScrollBar();
int scrollToNext = list.getScrollableUnitIncrement(super.getBounds(),
SwingConstants.VERTICAL,
@@ -621,8 +621,8 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup
scrollbar.setValue(scrollbar.getValue() - scrollToNext);
- // If we haven't reached the begging of the combo box's list of items,
- // then highlight next element above currently highlighted element
+ // If we haven't reached the begging of the combo box's list of items,
+ // then highlight next element above currently highlighted element
if (list.getSelectedIndex() != 0)
list.setSelectedIndex(list.getSelectedIndex() - 1);
}
@@ -633,7 +633,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup
*/
protected void autoScrollDown()
{
- // scroll scrollbar down to make next item visible
+ // scroll scrollbar down to make next item visible
JScrollBar scrollbar = scroller.getVerticalScrollBar();
int scrollToNext = list.getScrollableUnitIncrement(super.getBounds(),
SwingConstants.VERTICAL,
@@ -713,12 +713,12 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup
for (int i = 0; i < maxRowCount; i++)
{
- Component comp = rend.getListCellRendererComponent(list,
- comboBox.getModel()
- .getElementAt(i),
- -1, false, false);
- Dimension dim = comp.getPreferredSize();
- totalHeight += dim.height;
+ Component comp = rend.getListCellRendererComponent(list,
+ comboBox.getModel()
+ .getElementAt(i),
+ -1, false, false);
+ Dimension dim = comp.getPreferredSize();
+ totalHeight += dim.height;
}
return totalHeight == 0 ? 100 : totalHeight;
@@ -995,9 +995,9 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup
{
if (e.getPropertyName().equals("renderer"))
{
- list.setCellRenderer(comboBox.getRenderer());
- if (isVisible())
- hide();
+ list.setCellRenderer(comboBox.getRenderer());
+ if (isVisible())
+ hide();
}
if (e.getPropertyName().equals("model"))
{
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicDesktopIconUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicDesktopIconUI.java
index 3f87302..e522938 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicDesktopIconUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicDesktopIconUI.java
@@ -118,7 +118,7 @@ public class BasicDesktopIconUI extends DesktopIconUI
yOffset = e.getY();
pane = frame.getDesktopPane();
if (pane != null)
- pane.getDesktopManager().beginDraggingFrame(desktopIcon);
+ pane.getDesktopManager().beginDraggingFrame(desktopIcon);
}
/**
@@ -129,7 +129,7 @@ public class BasicDesktopIconUI extends DesktopIconUI
public void mouseReleased(MouseEvent e)
{
if (pane != null)
- pane.getDesktopManager().endDraggingFrame(desktopIcon);
+ pane.getDesktopManager().endDraggingFrame(desktopIcon);
xOffset = 0;
yOffset = 0;
}
@@ -147,9 +147,9 @@ public class BasicDesktopIconUI extends DesktopIconUI
int newHeight)
{
if (pane != null)
- pane.getDesktopManager().dragFrame(f, newX, newY);
+ pane.getDesktopManager().dragFrame(f, newX, newY);
else
- desktopIcon.setBounds(newX, newY, newWidth, newHeight);
+ desktopIcon.setBounds(newX, newY, newWidth, newHeight);
}
}
@@ -308,7 +308,7 @@ public class BasicDesktopIconUI extends DesktopIconUI
/** The PropertyChangeListener listening to the JDesktopIcon. */
private transient PropertyChangeListener propertyHandler;
-
+
/** The default icon used when no frame icon is given by the JInternalFrame. */
static Icon defaultIcon = new InternalFrameDefaultMenuIcon();
@@ -389,15 +389,15 @@ public class BasicDesktopIconUI extends DesktopIconUI
{
if (c instanceof JDesktopIcon)
{
- desktopIcon = (JDesktopIcon) c;
- desktopIcon.setLayout(new BorderLayout());
- frame = desktopIcon.getInternalFrame();
+ desktopIcon = (JDesktopIcon) c;
+ desktopIcon.setLayout(new BorderLayout());
+ frame = desktopIcon.getInternalFrame();
- installDefaults();
- installComponents();
- installListeners();
+ installDefaults();
+ installComponents();
+ installListeners();
- desktopIcon.setOpaque(true);
+ desktopIcon.setOpaque(true);
}
}
@@ -409,11 +409,11 @@ public class BasicDesktopIconUI extends DesktopIconUI
public void uninstallUI(JComponent c)
{
desktopIcon.setOpaque(false);
-
+
uninstallListeners();
uninstallComponents();
uninstallDefaults();
-
+
frame = null;
desktopIcon.setLayout(null);
desktopIcon = null;
@@ -444,7 +444,7 @@ public class BasicDesktopIconUI extends DesktopIconUI
protected void uninstallComponents()
{
desktopIcon.remove(button);
-
+
button = null;
}
@@ -460,29 +460,29 @@ public class BasicDesktopIconUI extends DesktopIconUI
propertyHandler = new PropertyChangeListener()
{
- public void propertyChange(PropertyChangeEvent e)
- {
- if (e.getPropertyName().equals(JInternalFrame.TITLE_PROPERTY))
- button.setText(desktopIcon.getInternalFrame().getTitle());
- else if (e.getPropertyName().equals(JInternalFrame.FRAME_ICON_PROPERTY))
- {
- Icon use = desktopIcon.getInternalFrame().getFrameIcon();
- if (use == null)
- use = defaultIcon;
- button.setIcon(use);
- }
- desktopIcon.revalidate();
- desktopIcon.repaint();
- }
+ public void propertyChange(PropertyChangeEvent e)
+ {
+ if (e.getPropertyName().equals(JInternalFrame.TITLE_PROPERTY))
+ button.setText(desktopIcon.getInternalFrame().getTitle());
+ else if (e.getPropertyName().equals(JInternalFrame.FRAME_ICON_PROPERTY))
+ {
+ Icon use = desktopIcon.getInternalFrame().getFrameIcon();
+ if (use == null)
+ use = defaultIcon;
+ button.setIcon(use);
+ }
+ desktopIcon.revalidate();
+ desktopIcon.repaint();
+ }
};
frame.addPropertyChangeListener(propertyHandler);
button.addActionListener(new ActionListener()
{
- public void actionPerformed(ActionEvent e)
- {
+ public void actionPerformed(ActionEvent e)
+ {
deiconize();
- }
+ }
});
}
@@ -492,10 +492,10 @@ public class BasicDesktopIconUI extends DesktopIconUI
protected void uninstallListeners()
{
// button is nulled so no need to remove it.
-
+
frame.removePropertyChangeListener(propertyHandler);
propertyHandler = null;
-
+
desktopIcon.removeMouseMotionListener(mouseHandler);
desktopIcon.removeMouseListener(mouseHandler);
}
@@ -506,7 +506,7 @@ public class BasicDesktopIconUI extends DesktopIconUI
protected void installDefaults()
{
// FIXME: Move border to defaults.
- desktopIcon.setBorder(new DesktopIconBorder());
+ desktopIcon.setBorder(new DesktopIconBorder());
}
/**
@@ -578,7 +578,7 @@ public class BasicDesktopIconUI extends DesktopIconUI
/**
* This method deiconizes the JInternalFrame associated with the JDesktopIcon.
*/
- public void deiconize()
+ public void deiconize()
{
try
{
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicDesktopPaneUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicDesktopPaneUI.java
index 4116858..cbc3f9f 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicDesktopPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicDesktopPaneUI.java
@@ -94,7 +94,7 @@ public class BasicDesktopPaneUI extends DesktopPaneUI
public boolean isEnabled()
{
if (desktop.getSelectedFrame() != null)
- return desktop.getSelectedFrame().isClosable();
+ return desktop.getSelectedFrame().isClosable();
return false;
}
}
@@ -133,7 +133,7 @@ public class BasicDesktopPaneUI extends DesktopPaneUI
public boolean isEnabled()
{
if (desktop.getSelectedFrame() != null)
- return desktop.getSelectedFrame().isMaximizable();
+ return desktop.getSelectedFrame().isMaximizable();
return false;
}
}
@@ -172,7 +172,7 @@ public class BasicDesktopPaneUI extends DesktopPaneUI
public boolean isEnabled()
{
if (desktop.getSelectedFrame() != null)
- return desktop.getSelectedFrame().isIconifiable();
+ return desktop.getSelectedFrame().isIconifiable();
return false;
}
}
@@ -191,23 +191,23 @@ public class BasicDesktopPaneUI extends DesktopPaneUI
*/
public void actionPerformed(ActionEvent e)
{
- // This is supposed to set the next selected frame.
+ // This is supposed to set the next selected frame.
JInternalFrame[] frames = desktop.getAllFrames();
if (frames.length == 0)
- return;
+ return;
JInternalFrame sFrame = frames[0];
if (desktop.getSelectedFrame() != null)
- sFrame = desktop.getSelectedFrame();
+ sFrame = desktop.getSelectedFrame();
int i = 0;
for (; i < frames.length; i++)
- if (frames[i] == sFrame)
- break;
+ if (frames[i] == sFrame)
+ break;
- // FIXME: Navigate actions go reverse too.
+ // FIXME: Navigate actions go reverse too.
if (i == frames.length)
- i = 0;
+ i = 0;
desktop.setSelectedFrame(frames[i]);
}
@@ -399,11 +399,11 @@ public class BasicDesktopPaneUI extends DesktopPaneUI
{
if (c instanceof JDesktopPane)
{
- desktop = (JDesktopPane) c;
+ desktop = (JDesktopPane) c;
- installDefaults();
- installDesktopManager();
- installKeyboardActions();
+ installDefaults();
+ installDesktopManager();
+ installKeyboardActions();
}
}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicDirectoryModel.java b/libjava/classpath/javax/swing/plaf/basic/BasicDirectoryModel.java
index b1fb727..62657ad 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicDirectoryModel.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicDirectoryModel.java
@@ -54,7 +54,7 @@ import javax.swing.filechooser.FileSystemView;
/**
* Implements an AbstractListModel for directories where the source
- * of the files is a JFileChooser object.
+ * of the files is a JFileChooser object.
*
* This class is used for sorting and ordering the file list in
* a JFileChooser L&F object.
@@ -188,7 +188,7 @@ public class BasicDirectoryModel extends AbstractListModel
if (filechooser.accept(files[i]))
accepted.add(files[i]);
}
-
+
// Occasional check if we have been interrupted.
if (isInterrupted())
return;
@@ -286,7 +286,7 @@ public class BasicDirectoryModel extends AbstractListModel
List added = newCache.subList(start, end);
UpdateSwingRequest r = new UpdateSwingRequest(added, start,
- null, 0);
+ null, 0);
invokeLater(r);
newCache = null;
}
@@ -332,10 +332,10 @@ public class BasicDirectoryModel extends AbstractListModel
{
public int compare(Object o1, Object o2)
{
- if (lt((File) o1, (File) o2))
- return -1;
- else
- return 1;
+ if (lt((File) o1, (File) o2))
+ return -1;
+ else
+ return 1;
}
};
@@ -366,7 +366,7 @@ public class BasicDirectoryModel extends AbstractListModel
}
/**
- * Fires a content change event.
+ * Fires a content change event.
*/
public void fireContentsChanged()
{
@@ -397,7 +397,7 @@ public class BasicDirectoryModel extends AbstractListModel
}
/**
- * Returns the (java.io.File) object at
+ * Returns the (java.io.File) object at
* an index in the list.
*
* @param index The list index
@@ -441,7 +441,7 @@ public class BasicDirectoryModel extends AbstractListModel
}
/**
- * Returns the size of the list, which only includes directories
+ * Returns the size of the list, which only includes directories
* if the JFileChooser is set to DIRECTORIES_ONLY.
*
* Otherwise, both directories and files are included in the count.
@@ -537,12 +537,12 @@ public class BasicDirectoryModel extends AbstractListModel
|| property.equals(JFileChooser.FILE_VIEW_CHANGED_PROPERTY)
)
{
- validateFileCache();
+ validateFileCache();
}
}
/**
- * Renames a file - However, does not re-sort the list
+ * Renames a file - However, does not re-sort the list
* or replace the old file with the new one in the list.
*
* @param oldFile The old file
@@ -584,4 +584,3 @@ public class BasicDirectoryModel extends AbstractListModel
}
}
}
-
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicEditorPaneUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicEditorPaneUI.java
index d514a87..6ddd251 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicEditorPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicEditorPaneUI.java
@@ -1,4 +1,4 @@
-/* BasicEditorPaneUI.java --
+/* BasicEditorPaneUI.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicFileChooserUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicFileChooserUI.java
index 4b6e2f7..347686d 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicFileChooserUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicFileChooserUI.java
@@ -72,7 +72,7 @@ import javax.swing.plaf.metal.MetalIconFactory;
/**
- * A UI delegate for the {@link JFileChooser} component under the
+ * A UI delegate for the {@link JFileChooser} component under the
* {@link BasicLookAndFeel}.
*/
public class BasicFileChooserUI extends FileChooserUI
@@ -89,7 +89,7 @@ public class BasicFileChooserUI extends FileChooserUI
{
// Nothing to do here.
}
-
+
/**
* Returns true always, as all files are accepted by this
* filter.
@@ -116,7 +116,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Handles a user action to approve the dialog selection.
- *
+ *
* @see BasicFileChooserUI#getApproveSelectionAction()
*/
protected class ApproveSelectionAction extends AbstractAction
@@ -131,7 +131,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Sets the current selection and closes the dialog.
- *
+ *
* @param e the action event.
*/
public void actionPerformed(ActionEvent e)
@@ -159,8 +159,8 @@ public class BasicFileChooserUI extends FileChooserUI
else
{
File f = new File(filechooser.getCurrentDirectory(), getFileName());
- if ( selectedDir != null )
- f = selectedDir;
+ if ( selectedDir != null )
+ f = selectedDir;
if (filechooser.isTraversable(f))
{
filechooser.setCurrentDirectory(f);
@@ -212,7 +212,7 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * Retrieves the icon associated with the specified file/directory, if
+ * Retrieves the icon associated with the specified file/directory, if
* there is one.
*
* @param f the file/directory.
@@ -225,8 +225,8 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * Returns a description of the given file/directory. In this
- * implementation, the description is the same as the name returned by
+ * Returns a description of the given file/directory. In this
+ * implementation, the description is the same as the name returned by
* {@link #getName(File)}.
*
* @param f the file/directory.
@@ -249,11 +249,11 @@ public class BasicFileChooserUI extends FileChooserUI
{
Icon val = getCachedIcon(f);
if (val != null)
- return val;
+ return val;
if (filechooser.isTraversable(f))
- val = directoryIcon;
+ val = directoryIcon;
else
- val = fileIcon;
+ val = fileIcon;
cacheIcon(f, val);
return val;
}
@@ -287,9 +287,9 @@ public class BasicFileChooserUI extends FileChooserUI
public String getTypeDescription(File f)
{
if (filechooser.isTraversable(f))
- return dirDescText;
+ return dirDescText;
else
- return fileDescText;
+ return fileDescText;
}
/**
@@ -308,7 +308,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Handles an action to cancel the file chooser.
- *
+ *
* @see BasicFileChooserUI#getCancelSelectionAction()
*/
protected class CancelSelectionAction extends AbstractAction
@@ -338,7 +338,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* An action to handle changes to the parent directory (for example, via
* a click on the "up folder" button).
- *
+ *
* @see BasicFileChooserUI#getChangeToParentDirectoryAction()
*/
protected class ChangeToParentDirectoryAction extends AbstractAction
@@ -366,7 +366,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* A mouse listener that handles double-click events.
- *
+ *
* @see BasicFileChooserUI#createDoubleClickListener(JFileChooser, JList)
*/
protected class DoubleClickListener extends MouseAdapter
@@ -392,7 +392,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Handles a mouse click event.
- *
+ *
* @param e the event.
*/
public void mouseClicked(MouseEvent e)
@@ -422,7 +422,7 @@ public class BasicFileChooserUI extends FileChooserUI
String path = p.toString();
File f = fsv.createFileObject(path);
filechooser.setSelectedFile(f);
-
+
if (filechooser.isMultiSelectionEnabled())
{
int[] inds = list.getSelectedIndices();
@@ -431,7 +431,7 @@ public class BasicFileChooserUI extends FileChooserUI
allFiles[i] = (File) list.getModel().getElementAt(inds[i]);
filechooser.setSelectedFiles(allFiles);
}
-
+
if (filechooser.isTraversable(f))
{
setDirectorySelected(true);
@@ -444,18 +444,18 @@ public class BasicFileChooserUI extends FileChooserUI
}
lastSelected = path;
parentPath = f.getParent();
-
+
if (f.isFile())
setFileName(f.getName());
- else if (filechooser.getFileSelectionMode() !=
- JFileChooser.FILES_ONLY)
+ else if (filechooser.getFileSelectionMode() !=
+ JFileChooser.FILES_ONLY)
setFileName(path);
}
}
/**
* Handles a mouse entered event (NOT IMPLEMENTED).
- *
+ *
* @param e the mouse event.
*/
public void mouseEntered(MouseEvent e)
@@ -465,9 +465,9 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * An action that changes the file chooser to display the user's home
- * directory.
- *
+ * An action that changes the file chooser to display the user's home
+ * directory.
+ *
* @see BasicFileChooserUI#getGoHomeAction()
*/
protected class GoHomeAction extends AbstractAction
@@ -497,7 +497,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* An action that handles the creation of a new folder/directory.
- *
+ *
* @see BasicFileChooserUI#getNewFolderAction()
*/
protected class NewFolderAction extends AbstractAction
@@ -519,12 +519,12 @@ public class BasicFileChooserUI extends FileChooserUI
{
try
{
- filechooser.getFileSystemView().createNewFolder(filechooser
- .getCurrentDirectory());
+ filechooser.getFileSystemView().createNewFolder(filechooser
+ .getCurrentDirectory());
}
catch (IOException ioe)
{
- return;
+ return;
}
filechooser.rescanCurrentDirectory();
filechooser.repaint();
@@ -533,7 +533,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* A listener for selection events in the file list.
- *
+ *
* @see BasicFileChooserUI#createListSelectionListener(JFileChooser)
*/
protected class SelectionListener implements ListSelectionListener
@@ -556,24 +556,24 @@ public class BasicFileChooserUI extends FileChooserUI
JList list = (JList) e.getSource();
Object f = list.getSelectedValue();
if (f == null)
- return;
+ return;
File file = filechooser.getFileSystemView().createFileObject(f.toString());
if (! filechooser.isTraversable(file))
- {
- selectedDir = null;
- filechooser.setSelectedFile(file);
- }
+ {
+ selectedDir = null;
+ filechooser.setSelectedFile(file);
+ }
else
- {
- selectedDir = file;
- filechooser.setSelectedFile(null);
- }
+ {
+ selectedDir = file;
+ filechooser.setSelectedFile(null);
+ }
}
}
/**
* DOCUMENT ME!
- *
+ *
* @see BasicFileChooserUI#getUpdateAction()
*/
protected class UpdateAction extends AbstractAction
@@ -722,46 +722,46 @@ public class BasicFileChooserUI extends FileChooserUI
// FIXME: describe what is contained in the bottom panel
/** The bottom panel. */
JPanel bottomPanel;
-
+
/** The close panel. */
JPanel closePanel;
/** Text box that displays file name */
JTextField entry;
-
+
/** Current parent path */
String parentPath;
-
+
/**
* The action for the 'approve' button.
* @see #getApproveSelectionAction()
*/
private ApproveSelectionAction approveSelectionAction;
-
+
/**
* The action for the 'cancel' button.
* @see #getCancelSelectionAction()
*/
private CancelSelectionAction cancelSelectionAction;
-
+
/**
* The action for the 'go home' control button.
* @see #getGoHomeAction()
*/
private GoHomeAction goHomeAction;
-
+
/**
* The action for the 'up folder' control button.
* @see #getChangeToParentDirectoryAction()
*/
private ChangeToParentDirectoryAction changeToParentDirectoryAction;
-
+
/**
* The action for the 'new folder' control button.
* @see #getNewFolderAction()
*/
private NewFolderAction newFolderAction;
-
+
/**
* The action for ???. // FIXME: what is this?
* @see #getUpdateAction()
@@ -774,7 +774,7 @@ public class BasicFileChooserUI extends FileChooserUI
* the directory on "Open" when in that mode.
*/
private File selectedDir;
-
+
// -- end private --
/**
@@ -810,7 +810,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Installs the UI for the specified component.
- *
+ *
* @param c the component (should be a {@link JFileChooser}).
*/
public void installUI(JComponent c)
@@ -825,7 +825,7 @@ public class BasicFileChooserUI extends FileChooserUI
installDefaults(fc);
installComponents(fc);
installListeners(fc);
-
+
File path = filechooser.getCurrentDirectory();
if (path != null)
parentPath = path.getParent();
@@ -834,7 +834,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Uninstalls this UI from the given component.
- *
+ *
* @param c the component (should be a {@link JFileChooser}).
*/
public void uninstallUI(JComponent c)
@@ -868,7 +868,7 @@ public class BasicFileChooserUI extends FileChooserUI
if (parentFiles.size() == 0)
return;
- }
+ }
/**
* Creates and install the subcomponents for the file chooser.
@@ -996,9 +996,9 @@ public class BasicFileChooserUI extends FileChooserUI
directoryOpenButtonText = "Open";
directoryOpenButtonToolTipText = "Open selected directory";
- directoryOpenButtonMnemonic
+ directoryOpenButtonMnemonic
= new Integer((String) UIManager.get("FileChooser.directoryOpenButtonMnemonic")).intValue();
-
+
helpButtonText = "Help";
helpButtonToolTipText = "FileChooser help";
helpButtonMnemonic = new Integer((String) UIManager.get("FileChooser.helpButtonMnemonic")).intValue();
@@ -1010,7 +1010,7 @@ public class BasicFileChooserUI extends FileChooserUI
saveButtonText = "Save";
saveButtonToolTipText = "Save selected file";
saveButtonMnemonic = new Integer((String) UIManager.get("FileChooser.saveButtonMnemonic")).intValue();
-
+
updateButtonText = "Update";
updateButtonToolTipText = "Update directory listing";
updateButtonMnemonic = new Integer((String) UIManager.get("FileChooser.updateButtonMnemonic")).intValue();
@@ -1041,7 +1041,7 @@ public class BasicFileChooserUI extends FileChooserUI
saveButtonText = null;
saveButtonToolTipText = null;
-
+
updateButtonText = null;
updateButtonToolTipText = null;
}
@@ -1067,9 +1067,9 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Creates a listener to handle changes to the properties of the given
* file chooser component.
- *
+ *
* @param fc the file chooser component.
- *
+ *
* @return A new listener.
*/
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
@@ -1080,7 +1080,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Returns the current file name.
- *
+ *
* @return The current file name.
*/
public String getFileName()
@@ -1092,7 +1092,7 @@ public class BasicFileChooserUI extends FileChooserUI
* Returns the current directory name.
*
* @return The directory name.
- *
+ *
* @see #setDirectoryName(String)
*/
public String getDirectoryName()
@@ -1105,12 +1105,12 @@ public class BasicFileChooserUI extends FileChooserUI
* Sets the file name.
*
* @param filename the file name.
- *
+ *
* @see #getFileName()
*/
public void setFileName(String filename)
{
- // FIXME: it might be the case that this method provides an access
+ // FIXME: it might be the case that this method provides an access
// point for the JTextField (or whatever) a subclass is using...
//this.filename = filename;
}
@@ -1119,7 +1119,7 @@ public class BasicFileChooserUI extends FileChooserUI
* Sets the directory name (NOT IMPLEMENTED).
*
* @param dirname the directory name.
- *
+ *
* @see #getDirectoryName()
*/
public void setDirectoryName(String dirname)
@@ -1149,7 +1149,7 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * Returns the {@link JFileChooser} component that this UI delegate
+ * Returns the {@link JFileChooser} component that this UI delegate
* represents.
*
* @return The component represented by this UI delegate.
@@ -1184,7 +1184,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Returns the tool tip text for the approve (open/save) button. This first
* checks the file chooser to see if a value has been explicitly set - if
- * not, a default value appropriate for the type of file chooser is
+ * not, a default value appropriate for the type of file chooser is
* returned.
*
* @param fc the file chooser.
@@ -1236,7 +1236,7 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * Returns true if a directory is selected, and
+ * Returns true if a directory is selected, and
* false otherwise.
*
* @return A boolean.
@@ -1295,7 +1295,7 @@ public class BasicFileChooserUI extends FileChooserUI
* @param fc the file chooser component.
*
* @return The file view.
- *
+ *
* @see JFileChooser#getFileView()
*/
public FileView getFileView(JFileChooser fc)
@@ -1309,7 +1309,7 @@ public class BasicFileChooserUI extends FileChooserUI
* @param fc the file chooser (null not permitted).
*
* @return The dialog title.
- *
+ *
* @see JFileChooser#getDialogTitle()
*/
public String getDialogTitle(JFileChooser fc)
@@ -1326,7 +1326,7 @@ public class BasicFileChooserUI extends FileChooserUI
* @param fc the file chooser (null not permitted).
*
* @return The approve button mnemonic.
- *
+ *
* @see JFileChooser#getApproveButtonMnemonic()
*/
public int getApproveButtonMnemonic(JFileChooser fc)
@@ -1345,7 +1345,7 @@ public class BasicFileChooserUI extends FileChooserUI
* @param fc the file chooser (null not permitted).
*
* @return The approve button text.
- *
+ *
* @see JFileChooser#getApproveButtonText()
*/
public String getApproveButtonText(JFileChooser fc)
@@ -1362,7 +1362,7 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * Creates and returns a new action that will be used with the "new folder"
+ * Creates and returns a new action that will be used with the "new folder"
* button.
*
* @return A new instance of {@link NewFolderAction}.
@@ -1375,7 +1375,7 @@ public class BasicFileChooserUI extends FileChooserUI
}
/**
- * Creates and returns a new action that will be used with the "home folder"
+ * Creates and returns a new action that will be used with the "home folder"
* button.
*
* @return A new instance of {@link GoHomeAction}.
@@ -1426,7 +1426,7 @@ public class BasicFileChooserUI extends FileChooserUI
/**
* Returns the update action (an instance of {@link UpdateAction}).
*
- * @return An action.
+ * @return An action.
*/
public Action getUpdateAction()
{
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
index 9c7f1c4..5559214 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
@@ -66,4 +66,4 @@ public class BasicFormattedTextFieldUI extends BasicTextFieldUI
{
return "FormattedTextField";
}
-}
\ No newline at end of file
+}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicGraphicsUtils.java b/libjava/classpath/javax/swing/plaf/basic/BasicGraphicsUtils.java
index e73c39b..f270d33 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicGraphicsUtils.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicGraphicsUtils.java
@@ -142,7 +142,7 @@ public class BasicGraphicsUtils
g.setColor(darkShadow);
g.drawLine(x + 1, y + 1, x2 - 2, y + 1); // top, inner
g.drawLine(x + 1, y + 2, x + 1, y2 - 2); // left, inner
-
+
g.setColor(highlight);
g.drawLine(x + 1, y2 - 1, x2 - 1, y2 - 1); // bottom, inner
g.drawLine(x2 - 1, y + 1, x2 - 1, y2 - 2); // right, inner
@@ -156,8 +156,8 @@ public class BasicGraphicsUtils
g.setColor(oldColor);
}
}
-
-
+
+
/**
* Determines the width of the border that gets painted by
* {@link #drawEtchedRect}.
@@ -229,7 +229,7 @@ public class BasicGraphicsUtils
{
return new Insets(2, 2, 2, 2);
}
-
+
/**
* Draws a border that is suitable for buttons of the Basic look and
@@ -310,8 +310,8 @@ public class BasicGraphicsUtils
g.setColor(oldColor);
}
}
-
-
+
+
/**
* Draws a rectangle that appears lowered into the surface, given
* four colors that are used for drawing.
@@ -363,8 +363,8 @@ public class BasicGraphicsUtils
darkShadow, shadow,
highlight, lightHighlight);
}
-
-
+
+
/**
* Draws a String at the given location, underlining the first
* occurence of a specified character. The algorithm for determining
@@ -390,7 +390,7 @@ public class BasicGraphicsUtils
* the GNU Classpath implementation does not underline
* anything if underlinedChar is outside
* the range of char.
- *
+ *
* @param x the x coordinate of the text, as it would be passed to
* {@link java.awt.Graphics#drawString(java.lang.String,
* int, int)}.
@@ -436,7 +436,7 @@ public class BasicGraphicsUtils
* text. If underlinedIndex falls
* outside the range [0, text.length() - 1], the
* text will be drawn without underlining anything.
- *
+ *
* @param x the x coordinate of the text, as it would be passed to
* {@link java.awt.Graphics#drawString(java.lang.String,
* int, int)}.
@@ -518,7 +518,7 @@ public class BasicGraphicsUtils
underline.width = underlineX1 - underlineX2;
}
-
+
underline.height = lineMetrics.getUnderlineThickness();
underline.y = lineMetrics.getUnderlineOffset();
if (underline.y == 0)
@@ -597,7 +597,7 @@ public class BasicGraphicsUtils
* text. If underlinedIndex falls
* outside the range [0, text.length() - 1], the
* text will be drawn without underlining anything.
- *
+ *
* @param x the x coordinate of the text, as it would be passed to
* {@link java.awt.Graphics#drawString(java.lang.String,
* int, int)}.
@@ -683,7 +683,7 @@ public class BasicGraphicsUtils
underline.width = underlineX1 - underlineX2;
}
-
+
underline.height = lineMetrics.getUnderlineThickness();
underline.y = lineMetrics.getUnderlineOffset();
if (underline.y == 0)
@@ -761,8 +761,8 @@ public class BasicGraphicsUtils
* and height fields indicate the preferred
* extent in pixels.
*
- * @see javax.swing.SwingUtilities#layoutCompoundLabel(JComponent,
- * FontMetrics, String, Icon, int, int, int, int, Rectangle, Rectangle,
+ * @see javax.swing.SwingUtilities#layoutCompoundLabel(JComponent,
+ * FontMetrics, String, Icon, int, int, int, int, Rectangle, Rectangle,
* Rectangle, int)
*/
public static Dimension getPreferredButtonSize(AbstractButton b,
@@ -795,7 +795,7 @@ public class BasicGraphicsUtils
b.getFontMetrics(b.getFont()), // see comment above
b.getText(),
b.getIcon(),
- b.getVerticalAlignment(),
+ b.getVerticalAlignment(),
b.getHorizontalAlignment(),
b.getVerticalTextPosition(),
b.getHorizontalTextPosition(),
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicHTML.java b/libjava/classpath/javax/swing/plaf/basic/BasicHTML.java
index 6e26d53..a7ce8b1 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicHTML.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicHTML.java
@@ -145,7 +145,7 @@ public class BasicHTML
{
if (view != null)
view.setParent(null);
-
+
if (v != null)
v.setParent(this);
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicIconFactory.java b/libjava/classpath/javax/swing/plaf/basic/BasicIconFactory.java
index cad0d0e..1b5afa7 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicIconFactory.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicIconFactory.java
@@ -53,16 +53,16 @@ public class BasicIconFactory implements Serializable
{
static final long serialVersionUID = 5605588811185324383L;
- private static class DummyIcon
+ private static class DummyIcon
implements Icon
- {
- public int getIconHeight()
- {
- return 10;
+ {
+ public int getIconHeight()
+ {
+ return 10;
}
- public int getIconWidth()
- {
- return 10;
+ public int getIconWidth()
+ {
+ return 10;
}
public void paintIcon(Component c, Graphics g, int x, int y)
{
@@ -118,7 +118,7 @@ public class BasicIconFactory implements Serializable
}
/**
- * The icon used for {@link JCheckBoxMenuItem}s in the
+ * The icon used for {@link JCheckBoxMenuItem}s in the
* {@link BasicLookAndFeel}. This icon has a size of 9x9 pixels.
*/
static class CheckBoxMenuItemIcon
@@ -155,14 +155,14 @@ public class BasicIconFactory implements Serializable
public void paintIcon(Component c, Graphics g, int x, int y)
{
JCheckBoxMenuItem item = (JCheckBoxMenuItem) c;
- if (item.isSelected())
+ if (item.isSelected())
{
// paint the check...
g.setColor(Color.black);
g.drawLine(x + 1, y + 3, x + 1, y + 4);
g.drawLine(x + 2, y + 4, x + 2, y + 5);
for (int i = 0; i < 5; i++)
- g.drawLine(x + 3 + i, y + 5 - i, x + 3 + i, y + 6 - i);
+ g.drawLine(x + 3 + i, y + 5 - i, x + 3 + i, y + 6 - i);
}
}
}
@@ -212,7 +212,7 @@ public class BasicIconFactory implements Serializable
}
/** The cached CheckBoxIcon instance. */
private static CheckBoxIcon checkBoxIcon;
-
+
/** The cached RadioButtonIcon instance. */
private static RadioButtonIcon radioButtonIcon;
@@ -246,34 +246,34 @@ public class BasicIconFactory implements Serializable
{
return new DummyIcon();
}
-
+
/**
* Returns a new instance of a 4 x 8 icon showing a small black triangle that
- * points to the right. This is displayed in menu items that have a
+ * points to the right. This is displayed in menu items that have a
* sub menu.
- *
+ *
* @return The icon.
*/
public static Icon getMenuArrowIcon()
{
return new Icon()
{
- public int getIconHeight()
- {
- return 8;
- }
- public int getIconWidth()
- {
- return 4;
- }
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
- Color saved = g.getColor();
- g.setColor(Color.BLACK);
+ public int getIconHeight()
+ {
+ return 8;
+ }
+ public int getIconWidth()
+ {
+ return 4;
+ }
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
+ Color saved = g.getColor();
+ g.setColor(Color.BLACK);
for (int i = 0; i < 4; i++)
g.drawLine(x + i, y + i, x + i, y + 7 - i);
- g.setColor(saved);
- }
+ g.setColor(saved);
+ }
};
}
@@ -308,19 +308,19 @@ public class BasicIconFactory implements Serializable
/**
* Creates and returns an icon used when rendering {@link JCheckBoxMenuItem}
* components.
- *
+ *
* @return An icon.
*/
public static Icon getCheckBoxMenuItemIcon()
{
return new CheckBoxMenuItemIcon();
}
-
+
public static Icon getRadioButtonMenuItemIcon()
{
return getRadioButtonIcon();
}
-
+
public static Icon createEmptyFrameIcon()
{
return new DummyIcon();
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java b/libjava/classpath/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
index ea8b460..4846605 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
@@ -89,7 +89,7 @@ public class BasicInternalFrameTitlePane extends JComponent
{
super("Close");
}
-
+
/**
* This method is called when something closes the JInternalFrame.
*
@@ -371,7 +371,7 @@ public class BasicInternalFrameTitlePane extends JComponent
{
Icon frameIcon = frame.getFrameIcon();
if (frameIcon == null)
- frameIcon = BasicDesktopIconUI.defaultIcon;
+ frameIcon = BasicDesktopIconUI.defaultIcon;
frameIcon.paintIcon(this, g, 0, 0);
}
@@ -453,8 +453,8 @@ public class BasicInternalFrameTitlePane extends JComponent
}
if (title != null)
- title.setBounds(insets.left + menupref.width, insets.top,
- loc - menupref.width - insets.left, height);
+ title.setBounds(insets.left + menupref.width, insets.top,
+ loc - menupref.width - insets.left, height);
}
/**
@@ -581,7 +581,7 @@ public class BasicInternalFrameTitlePane extends JComponent
/** The icon displayed in the close button. */
protected Icon closeIcon;
-
+
/** The JInternalFrame that this TitlePane is used in. */
protected JInternalFrame frame;
@@ -620,7 +620,7 @@ public class BasicInternalFrameTitlePane extends JComponent
* This is package-private to avoid an accessor method.
*/
transient JLabel title;
-
+
static
{
// not constants in JDK
@@ -739,7 +739,7 @@ public class BasicInternalFrameTitlePane extends JComponent
selectedTitleColor = UIManager.getColor("InternalFrame.activeTitleBackground");
notSelectedTextColor = UIManager.getColor("InternalFrame.inactiveTitleForeground");
notSelectedTitleColor = UIManager.getColor("InternalFrame.inactiveTitleBackground");
-
+
closeIcon = UIManager.getIcon("InternalFrame.closeIcon");
iconIcon = UIManager.getIcon("InternalFrame.iconifyIcon");
maxIcon = UIManager.getIcon("InternalFrame.maximizeIcon");
@@ -755,7 +755,7 @@ public class BasicInternalFrameTitlePane extends JComponent
selectedTitleColor = null;
notSelectedTextColor = null;
notSelectedTitleColor = null;
-
+
closeIcon = null;
iconIcon = null;
maxIcon = null;
@@ -894,17 +894,17 @@ public class BasicInternalFrameTitlePane extends JComponent
paintTitleBackground(g);
if (frame.getTitle() != null && title != null)
{
- Color saved = g.getColor();
+ Color saved = g.getColor();
Font f = title.getFont();
g.setFont(f);
FontMetrics fm = g.getFontMetrics(f);
- if (frame.isSelected())
- g.setColor(selectedTextColor);
- else
- g.setColor(notSelectedTextColor);
- title.setText(getTitle(frame.getTitle(), fm, title.getBounds().width));
- SwingUtilities.paintComponent(g, title, null, title.getBounds());
- g.setColor(saved);
+ if (frame.isSelected())
+ g.setColor(selectedTextColor);
+ else
+ g.setColor(notSelectedTextColor);
+ title.setText(getTitle(frame.getTitle(), fm, title.getBounds().width));
+ SwingUtilities.paintComponent(g, title, null, title.getBounds());
+ g.setColor(saved);
}
}
@@ -964,7 +964,7 @@ public class BasicInternalFrameTitlePane extends JComponent
{
// FIXME: Implement postClosingEvent when I figure out what
// it's supposed to do.
- // It says that this fires an WINDOW_CLOSING like event.
+ // It says that this fires an WINDOW_CLOSING like event.
// So the closest thing is some kind of InternalFrameEvent.
// But none is fired.
// Can't see it called or anything.
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java
index 87c5268..da37e2b 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java
@@ -170,10 +170,10 @@ public class BasicInternalFrameUI extends InternalFrameUI
implements SwingConstants
{
/**
- * The current shape of the cursor.
+ * The current shape of the cursor.
*/
transient int showingCursor;
-
+
/** FIXME: Use for something. */
protected final int RESIZE_NONE = 0;
@@ -188,7 +188,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/** Cache rectangle that can be reused. */
private transient Rectangle cacheRect = new Rectangle();
-
+
/**
* This method is called when the mouse is clicked.
*
@@ -209,7 +209,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
{
// We do nothing if the attempt has been vetoed.
}
-
+
// There is nothing to do when the mouse is clicked
// on the border.
}
@@ -288,7 +288,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse exits the JInternalFrame.
- *
+ *
* @param e The MouseEvent.
*/
public void mouseExited(MouseEvent e)
@@ -302,7 +302,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is moved inside the JInternalFrame.
- *
+ *
* @param e The MouseEvent.
*/
public void mouseMoved(MouseEvent e)
@@ -318,10 +318,10 @@ public class BasicInternalFrameUI extends InternalFrameUI
setCursor(e);
}
}
-
+
/**
* Set the mouse cursor, how applicable.
- *
+ *
* @param e the current mouse event.
*/
void setCursor(MouseEvent e)
@@ -337,7 +337,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is pressed.
- *
+ *
* @param e The MouseEvent.
*/
public void mousePressed(MouseEvent e)
@@ -381,7 +381,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
dm.endDraggingFrame(frame);
frame.putClientProperty("bufferedDragging", null);
}
-
+
setCursor(e);
}
@@ -398,7 +398,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
{
Rectangle b = frame.getBounds();
int corner = InternalFrameBorder.cornerSize;
-
+
if (x < corner && y < corner)
return Cursor.NW_RESIZE_CURSOR;
else if (x > b.width - corner && y < corner)
@@ -429,7 +429,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
{
/**
* This method is called when the JDesktopPane is hidden.
- *
+ *
* @param e
* The ComponentEvent fired.
*/
@@ -440,7 +440,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the JDesktopPane is moved.
- *
+ *
* @param e
* The ComponentEvent fired.
*/
@@ -451,7 +451,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the JDesktopPane is resized.
- *
+ *
* @param e
* The ComponentEvent fired.
*/
@@ -469,7 +469,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the JDesktopPane is shown.
- *
+ *
* @param e
* The ComponentEvent fired.
*/
@@ -487,7 +487,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the given Component is added to the
* JInternalFrame.
- *
+ *
* @param name
* The name of the Component.
* @param c
@@ -501,7 +501,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is used to set the bounds of the children of the
* JInternalFrame.
- *
+ *
* @param c
* The Container to lay out.
*/
@@ -562,7 +562,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method returns the minimum layout size.
- *
+ *
* @param c
* The Container to find a minimum layout size for.
* @return The minimum dimensions for the JInternalFrame.
@@ -574,7 +574,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* Th8is method returns the preferred layout size.
- *
+ *
* @param c
* The Container to find a preferred layout size for.
* @return The preferred dimensions for the JInternalFrame.
@@ -586,7 +586,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* DOCUMENT ME!
- *
+ *
* @param c
* DOCUMENT ME!
* @param min
@@ -694,7 +694,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse enters the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -705,7 +705,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is clicked on the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -716,7 +716,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is dragged in the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -727,7 +727,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse exits the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -738,7 +738,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is moved in the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -749,7 +749,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is pressed in the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -764,7 +764,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when the mouse is released in the glass pane.
- *
+ *
* @param e
* The MouseEvent.
*/
@@ -776,7 +776,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This is a helper method that dispatches the GlassPane MouseEvents to the
* proper component.
- *
+ *
* @param e the mouse event to be dispatched
*/
private void handleEvent(MouseEvent e)
@@ -885,7 +885,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method is called when one of the JInternalFrame's properties change.
- *
+ *
* @param evt
* The PropertyChangeEvent.
*/
@@ -971,8 +971,8 @@ public class BasicInternalFrameUI extends InternalFrameUI
class InternalFrameBorder extends AbstractBorder implements
UIResource
{
- /**
- * The width of the border.
+ /**
+ * The width of the border.
*/
static final int bSize = 5;
@@ -983,7 +983,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method returns whether the border is opaque.
- *
+ *
* @return Whether the border is opaque.
*/
public boolean isBorderOpaque()
@@ -993,7 +993,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method returns the insets of the border.
- *
+ *
* @param c
* The Component to find border insets for.
* @return The border insets.
@@ -1005,7 +1005,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
/**
* This method paints the border.
- *
+ *
* @param c
* The Component that owns the border.
* @param g
@@ -1051,9 +1051,9 @@ public class BasicInternalFrameUI extends InternalFrameUI
g.fill3DRect(0, cornerSize, bSize, b.height - 2 * cornerSize, false);
g.fill3DRect(cornerSize, 0, b.width - 2 * cornerSize, bSize, false);
- g.fill3DRect(cornerSize, b.height - bSize, b.width - 2 * cornerSize,
+ g.fill3DRect(cornerSize, b.height - bSize, b.width - 2 * cornerSize,
bSize, false);
- g.fill3DRect(b.width - bSize, cornerSize, bSize,
+ g.fill3DRect(b.width - bSize, cornerSize, bSize,
b.height - 2 * cornerSize, false);
g.translate(-x, -y);
@@ -1595,7 +1595,7 @@ public class BasicInternalFrameUI extends InternalFrameUI
replacePane(northPane, c);
northPane = c;
// the following is needed to make internal frames draggable when using
- // the JGoodies PlasticLookAndFeel, because it overrides the
+ // the JGoodies PlasticLookAndFeel, because it overrides the
// createNorthPane() method and doesn't assign anything to the titlePane
// field. It is possible there is another way to make this work, but
// I didn't find it...
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicLabelUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicLabelUI.java
index 045740d..9469b56 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicLabelUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicLabelUI.java
@@ -114,7 +114,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
/**
* Returns the preferred size of this component as calculated by the
- * {@link #layoutCL(JLabel, FontMetrics, String, Icon, Rectangle, Rectangle,
+ * {@link #layoutCL(JLabel, FontMetrics, String, Icon, Rectangle, Rectangle,
* Rectangle)} method.
*
* @param c This {@link JComponent} to get a preferred size for.
@@ -188,7 +188,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
/**
* The method that paints the label according to its current state.
- *
+ *
* @param g The {@link Graphics} object to paint with.
* @param c The {@link JComponent} to paint.
*/
@@ -217,7 +217,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
text = layoutCL(b, fm, text, icon, vr, ir, tr);
if (icon != null)
- icon.paintIcon(b, g, ir.x, ir.y);
+ icon.paintIcon(b, g, ir.x, ir.y);
if (text != null && ! text.equals(""))
{
@@ -239,7 +239,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
/**
* This method is simply calls SwingUtilities's layoutCompoundLabel.
- *
+ *
* @param label The label to lay out.
* @param fontMetrics The FontMetrics for the font used.
* @param text The text to paint.
@@ -247,7 +247,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
* @param viewR The entire viewable rectangle.
* @param iconR The icon bounds rectangle.
* @param textR The text bounds rectangle.
- *
+ *
* @return A possibly clipped version of the text.
*/
protected String layoutCL(JLabel label, FontMetrics fontMetrics, String text,
@@ -421,11 +421,11 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
{
// add a keystroke for the given mnemonic mapping to 'press';
InputMap keyMap = new InputMap();
- keyMap.put(KeyStroke.getKeyStroke(mnemonic, KeyEvent.VK_ALT),
+ keyMap.put(KeyStroke.getKeyStroke(mnemonic, KeyEvent.VK_ALT),
"press");
- SwingUtilities.replaceUIInputMap(l,
+ SwingUtilities.replaceUIInputMap(l,
JComponent.WHEN_IN_FOCUSED_WINDOW, keyMap);
-
+
// add an action to focus the component when 'press' happens
ActionMap map = new ActionMap();
map.put("press", new AbstractAction() {
@@ -439,7 +439,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
});
SwingUtilities.replaceUIActionMap(l, map);
}
- }
+ }
}
/**
@@ -450,7 +450,7 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
protected void uninstallKeyboardActions(JLabel l)
{
SwingUtilities.replaceUIActionMap(l, null);
- SwingUtilities.replaceUIInputMap(l, JComponent.WHEN_IN_FOCUSED_WINDOW,
+ SwingUtilities.replaceUIInputMap(l, JComponent.WHEN_IN_FOCUSED_WINDOW,
null);
}
@@ -500,9 +500,9 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
int newMnemonic = ((Integer) e.getNewValue()).intValue();
InputMap keyMap = label.getInputMap(
JComponent.WHEN_IN_FOCUSED_WINDOW);
- keyMap.put(KeyStroke.getKeyStroke(oldMnemonic,
+ keyMap.put(KeyStroke.getKeyStroke(oldMnemonic,
KeyEvent.ALT_DOWN_MASK), null);
- keyMap.put(KeyStroke.getKeyStroke(newMnemonic,
+ keyMap.put(KeyStroke.getKeyStroke(newMnemonic,
KeyEvent.ALT_DOWN_MASK), "press");
}
}
@@ -512,8 +512,8 @@ public class BasicLabelUI extends LabelUI implements PropertyChangeListener
InputMap keyMap = label.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
int mnemonic = label.getDisplayedMnemonic();
if (mnemonic > 0)
- keyMap.put(KeyStroke.getKeyStroke(mnemonic, KeyEvent.ALT_DOWN_MASK),
- "press");
+ keyMap.put(KeyStroke.getKeyStroke(mnemonic, KeyEvent.ALT_DOWN_MASK),
+ "press");
}
}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicListUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicListUI.java
index befc227..0e33957 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicListUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicListUI.java
@@ -78,7 +78,7 @@ import javax.swing.plaf.ListUI;
import javax.swing.plaf.UIResource;
/**
- * The Basic Look and Feel UI delegate for the
+ * The Basic Look and Feel UI delegate for the
* JList.
*/
public class BasicListUI extends ListUI
@@ -111,7 +111,7 @@ public class BasicListUI extends ListUI
}
/**
- * Helper method to repaint the focused cell's
+ * Helper method to repaint the focused cell's
* lost or acquired focus state.
*/
protected void repaintCellFocus()
@@ -170,7 +170,7 @@ public class BasicListUI extends ListUI
public class ListSelectionHandler implements ListSelectionListener
{
/**
- * Called when the list selection changes.
+ * Called when the list selection changes.
*
* @param e The event representing the change
*/
@@ -197,7 +197,7 @@ public class BasicListUI extends ListUI
ActionListener target;
String bindingCommandName;
- public ActionListenerProxy(ActionListener li,
+ public ActionListenerProxy(ActionListener li,
String cmd)
{
target = li;
@@ -237,13 +237,13 @@ public class BasicListUI extends ListUI
{
int lead = list.getLeadSelectionIndex();
int max = list.getModel().getSize() - 1;
- DefaultListSelectionModel selModel
+ DefaultListSelectionModel selModel
= (DefaultListSelectionModel) list.getSelectionModel();
String command = e.getActionCommand();
// Do nothing if list is empty
if (max == -1)
return;
-
+
if (command.equals("selectNextRow"))
{
selectNextIndex();
@@ -265,7 +265,7 @@ public class BasicListUI extends ListUI
}
else if (command.equals("selectLastRow"))
{
- list.setSelectedIndex(list.getModel().getSize() - 1);
+ list.setSelectedIndex(list.getModel().getSize() - 1);
}
else if (command.equals("selectLastRowChangeLead"))
{
@@ -276,7 +276,7 @@ public class BasicListUI extends ListUI
int target;
if (lead == list.getLastVisibleIndex())
{
- target = Math.min(max, lead + (list.getLastVisibleIndex()
+ target = Math.min(max, lead + (list.getLastVisibleIndex()
- list.getFirstVisibleIndex() + 1));
}
else
@@ -288,7 +288,7 @@ public class BasicListUI extends ListUI
int target;
if (lead == list.getLastVisibleIndex())
{
- target = Math.min(max, lead + (list.getLastVisibleIndex()
+ target = Math.min(max, lead + (list.getLastVisibleIndex()
- list.getFirstVisibleIndex() + 1));
}
else
@@ -300,7 +300,7 @@ public class BasicListUI extends ListUI
int target;
if (lead == list.getFirstVisibleIndex())
{
- target = Math.max(0, lead - (list.getLastVisibleIndex()
+ target = Math.max(0, lead - (list.getLastVisibleIndex()
- list.getFirstVisibleIndex() + 1));
}
else
@@ -312,7 +312,7 @@ public class BasicListUI extends ListUI
int target;
if (lead == list.getFirstVisibleIndex())
{
- target = Math.max(0, lead - (list.getLastVisibleIndex()
+ target = Math.max(0, lead - (list.getLastVisibleIndex()
- list.getFirstVisibleIndex() + 1));
}
else
@@ -344,12 +344,12 @@ public class BasicListUI extends ListUI
int target;
if (lead == list.getFirstVisibleIndex())
{
- target = Math.max(0, lead - (list.getLastVisibleIndex()
+ target = Math.max(0, lead - (list.getLastVisibleIndex()
- list.getFirstVisibleIndex() + 1));
}
else
target = list.getFirstVisibleIndex();
- list.setSelectedIndex(target);
+ list.setSelectedIndex(target);
}
else if (command.equals("selectLastRowExtendSelection"))
{
@@ -360,7 +360,7 @@ public class BasicListUI extends ListUI
int target;
if (lead == list.getLastVisibleIndex())
{
- target = Math.min(max, lead + (list.getLastVisibleIndex()
+ target = Math.min(max, lead + (list.getLastVisibleIndex()
- list.getFirstVisibleIndex() + 1));
}
else
@@ -384,7 +384,7 @@ public class BasicListUI extends ListUI
{
selModel.moveLeadSelectionIndex(Math.max(0, lead - 1));
}
- }
+ }
else if (command.equals("addToSelection"))
{
list.addSelectionInterval(lead, lead);
@@ -402,20 +402,20 @@ public class BasicListUI extends ListUI
list.removeSelectionInterval(lead, lead);
selModel.setAnchorSelectionIndex(lead);
}
- else
+ else
{
- // DEBUG: uncomment the following line to print out
+ // DEBUG: uncomment the following line to print out
// key bindings that aren't implemented yet
-
+
// System.out.println ("not implemented: "+e.getActionCommand());
}
-
+
list.ensureIndexIsVisible(list.getLeadSelectionIndex());
}
}
/**
- * A helper class which listens for {@link MouseEvent}s
+ * A helper class which listens for {@link MouseEvent}s
* from the {@link JList}.
*/
public class MouseInputHandler implements MouseInputListener
@@ -436,20 +436,20 @@ public class BasicListUI extends ListUI
{
if (list.getSelectionMode() == ListSelectionModel.SINGLE_SELECTION)
list.setSelectedIndex(index);
- else if (list.getSelectionMode() ==
+ else if (list.getSelectionMode() ==
ListSelectionModel.SINGLE_INTERVAL_SELECTION)
// COMPAT: the IBM VM is compatible with the following line of code.
- // However, compliance with Sun's VM would correspond to replacing
- // getAnchorSelectionIndex() with getLeadSelectionIndex().This is
- // both unnatural and contradictory to the way they handle other
+ // However, compliance with Sun's VM would correspond to replacing
+ // getAnchorSelectionIndex() with getLeadSelectionIndex().This is
+ // both unnatural and contradictory to the way they handle other
// similar UI interactions.
list.setSelectionInterval(list.getAnchorSelectionIndex(), index);
else
// COMPAT: both Sun and IBM are compatible instead with:
// list.setSelectionInterval
// (list.getLeadSelectionIndex(),index);
- // Note that for IBM this is contradictory to what they did in
- // the above situation for SINGLE_INTERVAL_SELECTION.
+ // Note that for IBM this is contradictory to what they did in
+ // the above situation for SINGLE_INTERVAL_SELECTION.
// The most natural thing to do is the following:
if (list.isSelectedIndex(list.getAnchorSelectionIndex()))
list.getSelectionModel().setLeadSelectionIndex(index);
@@ -467,7 +467,7 @@ public class BasicListUI extends ListUI
}
else
list.setSelectedIndex(index);
-
+
list.ensureIndexIsVisible(list.getLeadSelectionIndex());
}
@@ -530,7 +530,7 @@ public class BasicListUI extends ListUI
return;
if (!event.isShiftDown() && !event.isControlDown())
list.setSelectedIndex(index);
-
+
list.ensureIndexIsVisible(list.getLeadSelectionIndex());
}
@@ -664,7 +664,7 @@ public class BasicListUI extends ListUI
/** The width of a single cell in the list. */
protected int cellWidth;
- /**
+ /**
* An array of varying heights of cells in the list, in cases where each
* cell might have a different height. This field is used when the
* fixedCellHeight property of the list is not set. Otherwise
@@ -692,7 +692,7 @@ public class BasicListUI extends ListUI
* The {@link CellRendererPane} that is used for painting.
*/
protected CellRendererPane rendererPane;
-
+
/** The action bound to KeyStrokes. */
ListAction action;
@@ -729,7 +729,7 @@ public class BasicListUI extends ListUI
* @param index1 The first row to include in the bounds
* @param index2 The last row to incude in the bounds
*
- * @return A rectangle encompassing the range of rows between
+ * @return A rectangle encompassing the range of rows between
* index1 and index2 inclusive, or null
* such a rectangle couldn't be calculated for the given indexes.
*/
@@ -953,7 +953,7 @@ public class BasicListUI extends ListUI
}
/**
- * Resets to null those defaults which were installed in
+ * Resets to null those defaults which were installed in
* {@link #installDefaults}
*/
protected void uninstallDefaults()
@@ -1002,7 +1002,7 @@ public class BasicListUI extends ListUI
list.removeMouseMotionListener(mouseInputListener);
list.removePropertyChangeListener(propertyChangeListener);
}
-
+
/**
* Installs keyboard actions for this UI in the {@link JList}.
*/
@@ -1125,7 +1125,7 @@ public class BasicListUI extends ListUI
* Gets the size this list would prefer to assume. This is calculated by
* calling {@link #getCellBounds} over the entire list.
*
- * @param c Ignored; uses the saved {@link JList} reference
+ * @param c Ignored; uses the saved {@link JList} reference
*
* @return DOCUMENT ME!
*/
@@ -1150,7 +1150,7 @@ public class BasicListUI extends ListUI
{
// We cast to double here to force double divisions.
double modelSize = size;
- int neededColumns = (int) Math.ceil(modelSize / visibleRows);
+ int neededColumns = (int) Math.ceil(modelSize / visibleRows);
int adjustedRows = (int) Math.ceil(modelSize / neededColumns);
h = maxCellHeight * adjustedRows;
w = cellWidth * neededColumns;
@@ -1220,7 +1220,7 @@ public class BasicListUI extends ListUI
* cell in the list.
*
* @param g The graphics context to paint with
- * @param c Ignored; uses the saved {@link JList} reference
+ * @param c Ignored; uses the saved {@link JList} reference
*/
public void paint(Graphics g, JComponent c)
{
@@ -1238,7 +1238,7 @@ public class BasicListUI extends ListUI
int startIndex = locationToIndex(list, new Point(clip.x, clip.y));
int endIndex = locationToIndex(list, new Point(clip.x + clip.width,
clip.y + clip.height));
-
+
for (int row = startIndex; row <= endIndex; ++row)
{
Rectangle bounds = getCellBounds(list, row, row);
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java b/libjava/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java
index 1543094..9a1f544 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java
@@ -96,7 +96,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
* are targetted at a menu/submenu/menubar or not. If not,
* the MenuSelectionManager is messaged to close the currently opened menus,
* if any.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
private class PopupHelper implements AWTEventListener
@@ -227,9 +227,9 @@ public abstract class BasicLookAndFeel extends LookAndFeel
}
/**
- * Creates and returns a new instance of the default resources for this look
+ * Creates and returns a new instance of the default resources for this look
* and feel.
- *
+ *
* @return The UI defaults.
*/
public UIDefaults getDefaults()
@@ -247,9 +247,9 @@ public abstract class BasicLookAndFeel extends LookAndFeel
}
/**
- * Populates the defaults table with mappings between class IDs
+ * Populates the defaults table with mappings between class IDs
* and fully qualified class names for the UI delegates.
- *
+ *
* @param defaults the defaults table (null not permitted).
*/
protected void initClassDefaults(UIDefaults defaults)
@@ -314,7 +314,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
* {@link #loadSystemColors(UIDefaults, String[], boolean)}. If the
* look and feel is a native look and feel, these defaults may be overridden
* by the corresponding SystemColor constants.
- *
+ *
* @param defaults the defaults table (null not permitted).
*/
protected void initSystemColorDefaults(UIDefaults defaults)
@@ -365,7 +365,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
* false
* @param useNative when true, installs the values of the
* SystemColor constants, when false, install the values
- * from systemColors
+ * from systemColors
*/
protected void loadSystemColors(UIDefaults defaults, String[] systemColors,
boolean useNative)
@@ -479,19 +479,19 @@ public abstract class BasicLookAndFeel extends LookAndFeel
protected void initComponentDefaults(UIDefaults defaults)
{
Object[] uiDefaults;
-
+
Color highLight = new Color(249, 247, 246);
Color light = new Color(239, 235, 231);
Color shadow = new Color(139, 136, 134);
Color darkShadow = new Color(16, 16, 16);
-
+
uiDefaults = new Object[] {
"AbstractUndoableEdit.undoText", "Undo",
"AbstractUndoableEdit.redoText", "Redo",
"Button.background", new ColorUIResource(Color.LIGHT_GRAY),
"Button.border",
- new UIDefaults.LazyValue()
+ new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults table)
{
@@ -528,7 +528,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
return BasicIconFactory.getCheckBoxIcon();
}
},
- "CheckBox.checkIcon",
+ "CheckBox.checkIcon",
new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults def)
@@ -549,7 +549,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"CheckBoxMenuItem.background", new ColorUIResource(light),
"CheckBoxMenuItem.border", new BasicBorders.MarginBorder(),
"CheckBoxMenuItem.borderPainted", Boolean.FALSE,
- "CheckBoxMenuItem.checkIcon",
+ "CheckBoxMenuItem.checkIcon",
new UIDefaults.LazyValue()
{
public Object createValue(UIDefaults def)
@@ -637,7 +637,7 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"EditorPane.font", new FontUIResource("Serif", Font.PLAIN, 12),
"EditorPane.foreground", new ColorUIResource(Color.black),
"EditorPane.inactiveForeground", new ColorUIResource(Color.gray),
- "EditorPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
+ "EditorPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
KeyStroke.getKeyStroke("shift UP"), "selection-up",
KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
@@ -782,21 +782,21 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"InternalFrame.border",
new UIDefaults.LazyValue()
{
- public Object createValue(UIDefaults table)
- {
- Color lineColor = new Color(238, 238, 238);
- Border inner = BorderFactory.createLineBorder(lineColor, 1);
- Color shadowInner = new Color(184, 207, 229);
- Color shadowOuter = new Color(122, 138, 153);
- Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED,
- Color.WHITE,
- Color.WHITE,
- shadowOuter,
- shadowInner);
- Border border = new BorderUIResource.CompoundBorderUIResource(outer,
- inner);
- return border;
- }
+ public Object createValue(UIDefaults table)
+ {
+ Color lineColor = new Color(238, 238, 238);
+ Border inner = BorderFactory.createLineBorder(lineColor, 1);
+ Color shadowInner = new Color(184, 207, 229);
+ Color shadowOuter = new Color(122, 138, 153);
+ Border outer = BorderFactory.createBevelBorder(BevelBorder.RAISED,
+ Color.WHITE,
+ Color.WHITE,
+ shadowOuter,
+ shadowInner);
+ Border border = new BorderUIResource.CompoundBorderUIResource(outer,
+ inner);
+ return border;
+ }
},
"InternalFrame.borderColor", new ColorUIResource(light),
"InternalFrame.borderDarkShadow", new ColorUIResource(Color.BLACK),
@@ -1459,60 +1459,60 @@ public abstract class BasicLookAndFeel extends LookAndFeel
"TextPane.foreground", new ColorUIResource(Color.black),
"TextPane.inactiveForeground", new ColorUIResource(Color.gray),
"TextPane.focusInputMap", new UIDefaults.LazyInputMap(new Object[] {
- KeyStroke.getKeyStroke("shift UP"), "selection-up",
- KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
- KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
- KeyStroke.getKeyStroke("shift KP_UP"), "selection-up",
- KeyStroke.getKeyStroke("DOWN"), "caret-down",
- KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action",
- KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
- KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
- KeyStroke.getKeyStroke("END"), "caret-end-line",
- KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up",
- KeyStroke.getKeyStroke("KP_UP"), "caret-up",
- KeyStroke.getKeyStroke("DELETE"), "delete-next",
- KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin",
- KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
- KeyStroke.getKeyStroke("ctrl END"), "caret-end",
- KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
- KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
- KeyStroke.getKeyStroke("LEFT"), "caret-backward",
- KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
- KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
- KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action",
- KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
- KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
- KeyStroke.getKeyStroke("ENTER"), "insert-break",
- KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
- KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
- KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left",
- KeyStroke.getKeyStroke("shift DOWN"), "selection-down",
- KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down",
- KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
- KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
- KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
- KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right",
- KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
- KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
- KeyStroke.getKeyStroke("shift END"), "selection-end-line",
- KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
- KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
- KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
- KeyStroke.getKeyStroke("KP_DOWN"), "caret-down",
- KeyStroke.getKeyStroke("ctrl A"), "select-all",
- KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
- KeyStroke.getKeyStroke("shift ctrl END"), "selection-end",
- KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
- KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
- KeyStroke.getKeyStroke("ctrl T"), "next-link-action",
- KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down",
- KeyStroke.getKeyStroke("TAB"), "insert-tab",
- KeyStroke.getKeyStroke("UP"), "caret-up",
- KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin",
- KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down",
- KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
- KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
- KeyStroke.getKeyStroke("PAGE_UP"), "page-up",
+ KeyStroke.getKeyStroke("shift UP"), "selection-up",
+ KeyStroke.getKeyStroke("ctrl RIGHT"), "caret-next-word",
+ KeyStroke.getKeyStroke("shift ctrl LEFT"), "selection-previous-word",
+ KeyStroke.getKeyStroke("shift KP_UP"), "selection-up",
+ KeyStroke.getKeyStroke("DOWN"), "caret-down",
+ KeyStroke.getKeyStroke("shift ctrl T"), "previous-link-action",
+ KeyStroke.getKeyStroke("ctrl LEFT"), "caret-previous-word",
+ KeyStroke.getKeyStroke("CUT"), "cut-to-clipboard",
+ KeyStroke.getKeyStroke("END"), "caret-end-line",
+ KeyStroke.getKeyStroke("shift PAGE_UP"), "selection-page-up",
+ KeyStroke.getKeyStroke("KP_UP"), "caret-up",
+ KeyStroke.getKeyStroke("DELETE"), "delete-next",
+ KeyStroke.getKeyStroke("ctrl HOME"), "caret-begin",
+ KeyStroke.getKeyStroke("shift LEFT"), "selection-backward",
+ KeyStroke.getKeyStroke("ctrl END"), "caret-end",
+ KeyStroke.getKeyStroke("BACK_SPACE"), "delete-previous",
+ KeyStroke.getKeyStroke("shift ctrl RIGHT"), "selection-next-word",
+ KeyStroke.getKeyStroke("LEFT"), "caret-backward",
+ KeyStroke.getKeyStroke("KP_LEFT"), "caret-backward",
+ KeyStroke.getKeyStroke("shift KP_RIGHT"), "selection-forward",
+ KeyStroke.getKeyStroke("ctrl SPACE"), "activate-link-action",
+ KeyStroke.getKeyStroke("ctrl H"), "delete-previous",
+ KeyStroke.getKeyStroke("ctrl BACK_SLASH"), "unselect",
+ KeyStroke.getKeyStroke("ENTER"), "insert-break",
+ KeyStroke.getKeyStroke("shift HOME"), "selection-begin-line",
+ KeyStroke.getKeyStroke("RIGHT"), "caret-forward",
+ KeyStroke.getKeyStroke("shift ctrl PAGE_UP"), "selection-page-left",
+ KeyStroke.getKeyStroke("shift DOWN"), "selection-down",
+ KeyStroke.getKeyStroke("PAGE_DOWN"), "page-down",
+ KeyStroke.getKeyStroke("shift KP_LEFT"), "selection-backward",
+ KeyStroke.getKeyStroke("shift ctrl O"), "toggle-componentOrientation",
+ KeyStroke.getKeyStroke("ctrl X"), "cut-to-clipboard",
+ KeyStroke.getKeyStroke("shift ctrl PAGE_DOWN"), "selection-page-right",
+ KeyStroke.getKeyStroke("ctrl C"), "copy-to-clipboard",
+ KeyStroke.getKeyStroke("ctrl KP_RIGHT"), "caret-next-word",
+ KeyStroke.getKeyStroke("shift END"), "selection-end-line",
+ KeyStroke.getKeyStroke("ctrl KP_LEFT"), "caret-previous-word",
+ KeyStroke.getKeyStroke("HOME"), "caret-begin-line",
+ KeyStroke.getKeyStroke("ctrl V"), "paste-from-clipboard",
+ KeyStroke.getKeyStroke("KP_DOWN"), "caret-down",
+ KeyStroke.getKeyStroke("ctrl A"), "select-all",
+ KeyStroke.getKeyStroke("shift RIGHT"), "selection-forward",
+ KeyStroke.getKeyStroke("shift ctrl END"), "selection-end",
+ KeyStroke.getKeyStroke("COPY"), "copy-to-clipboard",
+ KeyStroke.getKeyStroke("shift ctrl KP_LEFT"), "selection-previous-word",
+ KeyStroke.getKeyStroke("ctrl T"), "next-link-action",
+ KeyStroke.getKeyStroke("shift KP_DOWN"), "selection-down",
+ KeyStroke.getKeyStroke("TAB"), "insert-tab",
+ KeyStroke.getKeyStroke("UP"), "caret-up",
+ KeyStroke.getKeyStroke("shift ctrl HOME"), "selection-begin",
+ KeyStroke.getKeyStroke("shift PAGE_DOWN"), "selection-page-down",
+ KeyStroke.getKeyStroke("KP_RIGHT"), "caret-forward",
+ KeyStroke.getKeyStroke("shift ctrl KP_RIGHT"), "selection-next-word",
+ KeyStroke.getKeyStroke("PAGE_UP"), "page-up",
KeyStroke.getKeyStroke("PASTE"), "paste-from-clipboard"
}),
"TextPane.margin", new InsetsUIResource(3, 3, 3, 3),
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicMenuBarUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicMenuBarUI.java
index cd25a3b..b9e2912 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicMenuBarUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicMenuBarUI.java
@@ -109,20 +109,20 @@ public class BasicMenuBarUI extends MenuBarUI
defaultManager.setSelectedPath(me);
}
}
-
+
}
protected ChangeListener changeListener;
/*ContainerListener that listens to the ContainerEvents fired from menu bar*/
protected ContainerListener containerListener;
-
+
/*Property change listeners that listener to PropertyChangeEvent from menu bar*/
private PropertyChangeListener propertyChangeListener;
/* menu bar for which this UI delegate is for*/
protected JMenuBar menuBar;
-
+
/* MouseListener that listens to the mouseEvents fired from menu bar*/
private MouseInputListener mouseListener;
@@ -398,7 +398,7 @@ public class BasicMenuBarUI extends MenuBarUI
menuBar.repaint();
}
}
-
+
private class MouseInputHandler implements MouseInputListener
{
/**
@@ -409,7 +409,7 @@ public class BasicMenuBarUI extends MenuBarUI
public void mouseClicked(MouseEvent e)
{
MenuElement[] me = menuBar.getSubElements();
-
+
for (int i = 0; i < me.length; i++)
{
JMenu menu = menuBar.getMenu(i);
@@ -417,7 +417,7 @@ public class BasicMenuBarUI extends MenuBarUI
menu.setSelected(false);
}
}
-
+
/**
* Handles mouse pressed event
*
@@ -427,7 +427,7 @@ public class BasicMenuBarUI extends MenuBarUI
{
// TODO: What should be done here, if anything?
}
-
+
/**
* Handles mouse released event
*
@@ -437,7 +437,7 @@ public class BasicMenuBarUI extends MenuBarUI
{
// TODO: What should be done here, if anything?
}
-
+
/**
* Handles mouse exited event
*
@@ -447,7 +447,7 @@ public class BasicMenuBarUI extends MenuBarUI
{
// TODO: What should be done here, if anything?
}
-
+
/**
* Handles mouse dragged event
*
@@ -457,7 +457,7 @@ public class BasicMenuBarUI extends MenuBarUI
{
// TODO: What should be done here, if anything?
}
-
+
/**
* Handles mouse moved event
*
@@ -467,7 +467,7 @@ public class BasicMenuBarUI extends MenuBarUI
{
// TODO: What should be done here, if anything?
}
-
+
/**
* Handles mouse entered event
*
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicMenuItemUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicMenuItemUI.java
index 5fafb41..40b5393 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicMenuItemUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicMenuItemUI.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
@@ -128,7 +128,7 @@ public class BasicMenuItemUI extends MenuItemUI
* Number of spaces between icon and text.
*/
protected int defaultTextIconGap = 4;
-
+
/**
* Color of the text when menu item is disabled
*/
@@ -222,14 +222,14 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* A class to handle PropertChangeEvents for the JMenuItem
- * @author Anthony Balkissoon abalkiss at redhat dot com.
+ * @author Anthony Balkissoon abalkiss at redhat dot com.
*/
class PropertyChangeHandler implements PropertyChangeListener
{
/**
* This method is called when a property of the menuItem is changed.
* Currently it is only used to update the accelerator key bindings.
- *
+ *
* @param e
* the PropertyChangeEvent
*/
@@ -238,7 +238,7 @@ public class BasicMenuItemUI extends MenuItemUI
String property = e.getPropertyName();
if (property.equals("accelerator"))
{
- InputMap map = SwingUtilities.getUIInputMap(menuItem,
+ InputMap map = SwingUtilities.getUIInputMap(menuItem,
JComponent.WHEN_IN_FOCUSED_WINDOW);
if (map != null)
map.remove((KeyStroke) e.getOldValue());
@@ -266,7 +266,7 @@ public class BasicMenuItemUI extends MenuItemUI
}
}
}
-
+
/**
* A class to handle accelerator keys. This is the Action we will
* perform when the accelerator key for this JMenuItem is pressed.
@@ -282,9 +282,9 @@ public class BasicMenuItemUI extends MenuItemUI
public void actionPerformed(ActionEvent event)
{
doClick(MenuSelectionManager.defaultManager());
- }
+ }
}
-
+
/**
* Creates a new BasicMenuItemUI object.
*/
@@ -308,7 +308,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Create MenuDragMouseListener to listen for mouse dragged events.
- *
+ *
* @param c
* menu item to listen to
* @return The MenuDragMouseListener
@@ -321,7 +321,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Creates MenuKeyListener to listen to key events occuring when menu item is
* visible on the screen.
- *
+ *
* @param c
* menu item to listen to
* @return The MenuKeyListener
@@ -333,7 +333,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Handles mouse input events occuring for this menu item
- *
+ *
* @param c
* menu item to listen to
* @return The MouseInputListener
@@ -346,7 +346,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Factory method to create a BasicMenuItemUI for the given {@link
* JComponent}, which should be a {@link JMenuItem}.
- *
+ *
* @param c
* The {@link JComponent} a UI is being created for.
* @return A BasicMenuItemUI for the {@link JComponent}.
@@ -358,7 +358,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Programatically clicks menu item.
- *
+ *
* @param msm
* MenuSelectionManager for the menu hierarchy
*/
@@ -370,7 +370,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Returns maximum size for the specified menu item
- *
+ *
* @param c
* component for which to get maximum size
* @return Maximum size for the specified menu item.
@@ -382,7 +382,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Returns minimum size for the specified menu item
- *
+ *
* @param c
* component for which to get minimum size
* @return Minimum size for the specified menu item.
@@ -394,7 +394,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Returns path to this menu item.
- *
+ *
* @return $MenuElement[]$ Returns array of menu elements that constitute a
* path to this menu item.
*/
@@ -420,7 +420,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Returns preferred size for the given menu item.
- *
+ *
* @param c
* menu item for which to get preferred size
* @param checkIcon
@@ -504,20 +504,20 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Returns preferred size of the given component
- *
+ *
* @param c
* component for which to return preferred size
* @return $Dimension$ preferred size for the given component
*/
public Dimension getPreferredSize(JComponent c)
{
- return getPreferredMenuItemSize(c, checkIcon, arrowIcon,
+ return getPreferredMenuItemSize(c, checkIcon, arrowIcon,
defaultTextIconGap);
}
/**
* Returns the prefix for entries in the {@link UIDefaults} table.
- *
+ *
* @return "MenuItem"
*/
protected String getPropertyPrefix()
@@ -527,7 +527,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method installs the components for this {@link JMenuItem}.
- *
+ *
* @param menuItem
* The {@link JMenuItem} to install components for.
*/
@@ -548,15 +548,15 @@ public class BasicMenuItemUI extends MenuItemUI
prefix + ".foreground", prefix + ".font");
menuItem.setMargin(UIManager.getInsets(prefix + ".margin"));
acceleratorFont = UIManager.getFont(prefix + ".acceleratorFont");
- acceleratorForeground = UIManager.getColor(prefix
+ acceleratorForeground = UIManager.getColor(prefix
+ ".acceleratorForeground");
- acceleratorSelectionForeground = UIManager.getColor(prefix
+ acceleratorSelectionForeground = UIManager.getColor(prefix
+ ".acceleratorSelectionForeground");
selectionBackground = UIManager.getColor(prefix + ".selectionBackground");
selectionForeground = UIManager.getColor(prefix + ".selectionForeground");
acceleratorDelimiter = UIManager.getString(prefix + ".acceleratorDelimiter");
checkIcon = UIManager.getIcon(prefix + ".checkIcon");
-
+
menuItem.setHorizontalTextPosition(SwingConstants.TRAILING);
menuItem.setHorizontalAlignment(SwingConstants.LEADING);
}
@@ -566,16 +566,16 @@ public class BasicMenuItemUI extends MenuItemUI
*/
protected void installKeyboardActions()
{
- InputMap focusedWindowMap = SwingUtilities.getUIInputMap(menuItem,
+ InputMap focusedWindowMap = SwingUtilities.getUIInputMap(menuItem,
JComponent.WHEN_IN_FOCUSED_WINDOW);
if (focusedWindowMap == null)
focusedWindowMap = new ComponentInputMapUIResource(menuItem);
KeyStroke accelerator = menuItem.getAccelerator();
if (accelerator != null)
focusedWindowMap.put(accelerator, "doClick");
- SwingUtilities.replaceUIInputMap(menuItem,
+ SwingUtilities.replaceUIInputMap(menuItem,
JComponent.WHEN_IN_FOCUSED_WINDOW, focusedWindowMap);
-
+
ActionMap UIActionMap = SwingUtilities.getUIActionMap(menuItem);
if (UIActionMap == null)
UIActionMap = new ActionMapUIResource();
@@ -605,7 +605,7 @@ public class BasicMenuItemUI extends MenuItemUI
* Installs and initializes all fields for this UI delegate. Any properties of
* the UI that need to be initialized and/or set to defaults will be done now.
* It will also install any listeners necessary.
- *
+ *
* @param c
* The {@link JComponent} that is having this UI installed.
*/
@@ -621,7 +621,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Paints given menu item using specified graphics context
- *
+ *
* @param g
* The graphics context used to paint this menu item
* @param c
@@ -635,7 +635,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Paints background of the menu item
- *
+ *
* @param g
* The graphics context used to paint this menu item
* @param menuItem
@@ -664,7 +664,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Paints specified menu item
- *
+ *
* @param g
* The graphics context used to paint this menu item
* @param c
@@ -808,7 +808,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Paints label for the given menu item
- *
+ *
* @param g
* The graphics context used to paint this menu item
* @param menuItem
@@ -864,7 +864,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method uninstalls the components for this {@link JMenuItem}.
- *
+ *
* @param menuItem
* The {@link JMenuItem} to uninstall components for.
*/
@@ -901,7 +901,7 @@ public class BasicMenuItemUI extends MenuItemUI
* Uninstalls any keyboard actions.
*/
protected void uninstallKeyboardActions()
- {
+ {
SwingUtilities.replaceUIInputMap(menuItem,
JComponent.WHEN_IN_FOCUSED_WINDOW, null);
}
@@ -922,7 +922,7 @@ public class BasicMenuItemUI extends MenuItemUI
* Performs the opposite of installUI. Any properties or resources that need
* to be cleaned up will be done now. It will also uninstall any listeners it
* has. In addition, any properties of this UI will be nulled.
- *
+ *
* @param c
* The {@link JComponent} that is having this UI uninstalled.
*/
@@ -937,7 +937,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method calls paint.
- *
+ *
* @param g
* The graphics context used to paint this menu item
* @param c
@@ -966,7 +966,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is called when mouse is clicked on the menu item. It forwards
* this event to MenuSelectionManager.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -979,7 +979,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is called when mouse is dragged inside the menu item. It
* forwards this event to MenuSelectionManager.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -994,7 +994,7 @@ public class BasicMenuItemUI extends MenuItemUI
* item is considered to be selected and selection path in
* MenuSelectionManager is set. This event is also forwarded to
* MenuSelection Manager for further processing.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -1012,7 +1012,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is called when mouse exits menu item. The event is forwarded
* to MenuSelectionManager for processing.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -1025,7 +1025,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is called when mouse is inside the menu item. This event is
* forwarder to MenuSelectionManager for further processing.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -1038,7 +1038,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is called when mouse is pressed. This event is forwarded to
* MenuSelectionManager for further processing.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -1052,7 +1052,7 @@ public class BasicMenuItemUI extends MenuItemUI
* This method is called when mouse is released. If the mouse is released
* inside this menuItem, then this menu item is considered to be chosen and
* the menu hierarchy should be closed.
- *
+ *
* @param e
* A {@link MouseEvent}.
*/
@@ -1078,7 +1078,7 @@ public class BasicMenuItemUI extends MenuItemUI
{
/**
* Tbis method is invoked when mouse is dragged over the menu item.
- *
+ *
* @param e
* The MenuDragMouseEvent
*/
@@ -1091,7 +1091,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Tbis method is invoked when mouse enters the menu item while it is being
* dragged.
- *
+ *
* @param e
* The MenuDragMouseEvent
*/
@@ -1104,7 +1104,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Tbis method is invoked when mouse exits the menu item while it is being
* dragged
- *
+ *
* @param e the MenuDragMouseEvent
*/
public void menuDragMouseExited(MenuDragMouseEvent e)
@@ -1115,7 +1115,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* Tbis method is invoked when mouse was dragged and released inside the
* menu item.
- *
+ *
* @param e
* The MenuDragMouseEvent
*/
@@ -1140,7 +1140,7 @@ public class BasicMenuItemUI extends MenuItemUI
{
/**
* This method is invoked when key has been pressed
- *
+ *
* @param e
* A {@link MenuKeyEvent}.
*/
@@ -1151,7 +1151,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is invoked when key has been pressed
- *
+ *
* @param e
* A {@link MenuKeyEvent}.
*/
@@ -1163,7 +1163,7 @@ public class BasicMenuItemUI extends MenuItemUI
/**
* This method is invoked when key has been typed It handles the mnemonic
* key for the menu item.
- *
+ *
* @param e
* A {@link MenuKeyEvent}.
*/
@@ -1172,7 +1172,7 @@ public class BasicMenuItemUI extends MenuItemUI
// TODO: What should be done here, if anything?
}
}
-
+
/**
* Helper class that listens for item changes to the properties of the {@link
* JMenuItem}.
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicMenuUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicMenuUI.java
index 355e043..4897ee4 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicMenuUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicMenuUI.java
@@ -98,7 +98,7 @@ public class BasicMenuUI extends BasicMenuItemUI
defaultManager.setSelectedPath(newPath);
}
}
-
+
}
protected ChangeListener changeListener;
@@ -233,7 +233,7 @@ public class BasicMenuUI extends BasicMenuItemUI
*/
protected void installDefaults()
{
-
+
LookAndFeel.installBorder(menuItem, "Menu.border");
LookAndFeel.installColorsAndFont(menuItem, "Menu.background",
"Menu.foreground", "Menu.font");
@@ -502,9 +502,9 @@ public class BasicMenuUI extends BasicMenuItemUI
{
JMenu menu = (JMenu) menuItem;
if (menu.isTopLevelMenu())
- ((JMenuBar) menu.getParent()).setSelected(menu);
+ ((JMenuBar) menu.getParent()).setSelected(menu);
else
- ((JPopupMenu) menu.getParent()).setSelected(menu);
+ ((JPopupMenu) menu.getParent()).setSelected(menu);
}
}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java
index e238085..a03d224 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java
@@ -100,7 +100,7 @@ public class BasicOptionPaneUI extends OptionPaneUI
JOptionPane op = (JOptionPane) event.getSource();
op.setValue(new Integer(JOptionPane.CLOSED_OPTION));
}
-
+
}
/**
@@ -136,18 +136,18 @@ public class BasicOptionPaneUI extends OptionPaneUI
Object value = new Integer(JOptionPane.CLOSED_OPTION);
Object[] options = optionPane.getOptions();
if (options != null)
- value = new Integer(buttonIndex);
+ value = new Integer(buttonIndex);
else
{
- String text = ((JButton) e.getSource()).getText();
- if (text.equals(OK_STRING))
- value = new Integer(JOptionPane.OK_OPTION);
- if (text.equals(CANCEL_STRING))
- value = new Integer(JOptionPane.CANCEL_OPTION);
- if (text.equals(YES_STRING))
- value = new Integer(JOptionPane.YES_OPTION);
- if (text.equals(NO_STRING))
- value = new Integer(JOptionPane.NO_OPTION);
+ String text = ((JButton) e.getSource()).getText();
+ if (text.equals(OK_STRING))
+ value = new Integer(JOptionPane.OK_OPTION);
+ if (text.equals(CANCEL_STRING))
+ value = new Integer(JOptionPane.CANCEL_OPTION);
+ if (text.equals(YES_STRING))
+ value = new Integer(JOptionPane.YES_OPTION);
+ if (text.equals(NO_STRING))
+ value = new Integer(JOptionPane.NO_OPTION);
}
optionPane.setValue(value);
resetInputValue();
@@ -155,7 +155,7 @@ public class BasicOptionPaneUI extends OptionPaneUI
Window owner = SwingUtilities.windowForComponent(optionPane);
if (owner instanceof JDialog)
- ((JDialog) owner).dispose();
+ ((JDialog) owner).dispose();
//else we probably have some kind of internal frame.
JInternalFrame inf = (JInternalFrame) SwingUtilities.getAncestorOfClass(
@@ -265,21 +265,21 @@ public class BasicOptionPaneUI extends OptionPaneUI
Component[] buttonList = container.getComponents();
int x = container.getInsets().left;
if (getCentersChildren())
- x += (int) ((double) (container.getSize().width) / 2
- - (double) (buttonRowLength(container)) / 2);
+ x += (int) ((double) (container.getSize().width) / 2
+ - (double) (buttonRowLength(container)) / 2);
for (int i = 0; i < buttonList.length; i++)
{
- Dimension dims = buttonList[i].getPreferredSize();
- if (syncAllWidths)
- {
- buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height);
- x += widthOfWidestButton + getPadding();
- }
- else
- {
- buttonList[i].setBounds(x, 0, dims.width, dims.height);
- x += dims.width + getPadding();
- }
+ Dimension dims = buttonList[i].getPreferredSize();
+ if (syncAllWidths)
+ {
+ buttonList[i].setBounds(x, 0, widthOfWidestButton, dims.height);
+ x += widthOfWidestButton + getPadding();
+ }
+ else
+ {
+ buttonList[i].setBounds(x, 0, dims.width, dims.height);
+ x += dims.width + getPadding();
+ }
}
}
@@ -301,10 +301,10 @@ public class BasicOptionPaneUI extends OptionPaneUI
for (int i = 0; i < buttonList.length; i++)
{
- Dimension dims = buttonList[i].getPreferredSize();
- buttonLength += dims.width + getPadding();
- widest = Math.max(widest, dims.width);
- tallest = Math.max(tallest, dims.height);
+ Dimension dims = buttonList[i].getPreferredSize();
+ buttonLength += dims.width + getPadding();
+ widest = Math.max(widest, dims.width);
+ tallest = Math.max(tallest, dims.height);
}
widthOfWidestButton = widest;
@@ -312,10 +312,10 @@ public class BasicOptionPaneUI extends OptionPaneUI
int width;
if (getSyncAllWidths())
- width = widest * buttonList.length
- + getPadding() * (buttonList.length - 1);
+ width = widest * buttonList.length
+ + getPadding() * (buttonList.length - 1);
else
- width = buttonLength;
+ width = buttonLength;
Insets insets = c.getInsets();
width += insets.left + insets.right;
@@ -438,10 +438,10 @@ public class BasicOptionPaneUI extends OptionPaneUI
/** Whether the JOptionPane contains custom components. */
protected boolean hasCustomComponents;
- // The initialFocusComponent seems to always be set to a button (even if
- // I try to set initialSelectionValue). This is different from what the
- // javadocs state (which should switch this reference to the input component
- // if one is present since that is what's going to get focus).
+ // The initialFocusComponent seems to always be set to a button (even if
+ // I try to set initialSelectionValue). This is different from what the
+ // javadocs state (which should switch this reference to the input component
+ // if one is present since that is what's going to get focus).
/**
* The button that will receive focus based on initialValue when no input
@@ -531,20 +531,20 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
public void paintIcon(Component c, Graphics g, int x, int y)
{
- Polygon oct = new Polygon(new int[] { 0, 0, 9, 27, 36, 36, 27, 9 },
- new int[] { 9, 27, 36, 36, 27, 9, 0, 0 }, 8);
- g.translate(x, y);
+ Polygon oct = new Polygon(new int[] { 0, 0, 9, 27, 36, 36, 27, 9 },
+ new int[] { 9, 27, 36, 36, 27, 9, 0, 0 }, 8);
+ g.translate(x, y);
- Color saved = g.getColor();
- g.setColor(Color.RED);
+ Color saved = g.getColor();
+ g.setColor(Color.RED);
- g.fillPolygon(oct);
+ g.fillPolygon(oct);
- g.setColor(Color.BLACK);
- g.drawRect(13, 16, 10, 4);
+ g.setColor(Color.BLACK);
+ g.drawRect(13, 16, 10, 4);
- g.setColor(saved);
- g.translate(-x, -y);
+ g.setColor(saved);
+ g.translate(-x, -y);
}
};
@@ -553,24 +553,24 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
public void paintIcon(Component c, Graphics g, int x, int y)
{
- g.translate(x, y);
- Color saved = g.getColor();
+ g.translate(x, y);
+ Color saved = g.getColor();
- // Should be purple.
- g.setColor(Color.RED);
+ // Should be purple.
+ g.setColor(Color.RED);
- g.fillOval(0, 0, ICON_SIZE, ICON_SIZE);
+ g.fillOval(0, 0, ICON_SIZE, ICON_SIZE);
- g.setColor(Color.BLACK);
- g.drawOval(16, 6, 4, 4);
+ g.setColor(Color.BLACK);
+ g.drawOval(16, 6, 4, 4);
- Polygon bottomI = new Polygon(new int[] { 15, 15, 13, 13, 23, 23, 21, 21 },
- new int[] { 12, 28, 28, 30, 30, 28, 28, 12 },
- 8);
- g.drawPolygon(bottomI);
+ Polygon bottomI = new Polygon(new int[] { 15, 15, 13, 13, 23, 23, 21, 21 },
+ new int[] { 12, 28, 28, 30, 30, 28, 28, 12 },
+ 8);
+ g.drawPolygon(bottomI);
- g.setColor(saved);
- g.translate(-x, -y);
+ g.setColor(saved);
+ g.translate(-x, -y);
}
};
@@ -579,23 +579,23 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
public void paintIcon(Component c, Graphics g, int x, int y)
{
- g.translate(x, y);
- Color saved = g.getColor();
- g.setColor(Color.YELLOW);
+ g.translate(x, y);
+ Color saved = g.getColor();
+ g.setColor(Color.YELLOW);
- Polygon triangle = new Polygon(new int[] { 0, 18, 36 },
- new int[] { 36, 0, 36 }, 3);
- g.fillPolygon(triangle);
+ Polygon triangle = new Polygon(new int[] { 0, 18, 36 },
+ new int[] { 36, 0, 36 }, 3);
+ g.fillPolygon(triangle);
- g.setColor(Color.BLACK);
+ g.setColor(Color.BLACK);
- Polygon excl = new Polygon(new int[] { 15, 16, 20, 21 },
- new int[] { 8, 26, 26, 8 }, 4);
- g.drawPolygon(excl);
- g.drawOval(16, 30, 4, 4);
+ Polygon excl = new Polygon(new int[] { 15, 16, 20, 21 },
+ new int[] { 8, 26, 26, 8 }, 4);
+ g.drawPolygon(excl);
+ g.drawOval(16, 30, 4, 4);
- g.setColor(saved);
- g.translate(-x, -y);
+ g.setColor(saved);
+ g.translate(-x, -y);
}
};
@@ -604,32 +604,32 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
public void paintIcon(Component c, Graphics g, int x, int y)
{
- g.translate(x, y);
- Color saved = g.getColor();
- g.setColor(Color.GREEN);
+ g.translate(x, y);
+ Color saved = g.getColor();
+ g.setColor(Color.GREEN);
- g.fillRect(0, 0, ICON_SIZE, ICON_SIZE);
+ g.fillRect(0, 0, ICON_SIZE, ICON_SIZE);
- g.setColor(Color.BLACK);
+ g.setColor(Color.BLACK);
- g.drawOval(11, 2, 16, 16);
- g.drawOval(14, 5, 10, 10);
+ g.drawOval(11, 2, 16, 16);
+ g.drawOval(14, 5, 10, 10);
- g.setColor(Color.GREEN);
- g.fillRect(0, 10, ICON_SIZE, ICON_SIZE - 10);
+ g.setColor(Color.GREEN);
+ g.fillRect(0, 10, ICON_SIZE, ICON_SIZE - 10);
- g.setColor(Color.BLACK);
+ g.setColor(Color.BLACK);
- g.drawLine(11, 10, 14, 10);
+ g.drawLine(11, 10, 14, 10);
- g.drawLine(24, 10, 17, 22);
- g.drawLine(27, 10, 20, 22);
- g.drawLine(17, 22, 20, 22);
+ g.drawLine(24, 10, 17, 22);
+ g.drawLine(27, 10, 20, 22);
+ g.drawLine(17, 22, 20, 22);
- g.drawOval(17, 25, 3, 3);
+ g.drawOval(17, 25, 3, 3);
- g.setColor(saved);
- g.translate(-x, -y);
+ g.setColor(saved);
+ g.translate(-x, -y);
}
};
@@ -659,25 +659,25 @@ public class BasicOptionPaneUI extends OptionPaneUI
return;
for (int i = 0; i < buttons.length; i++)
{
- if (buttons[i] != null)
- {
- Component toAdd;
- if (buttons[i] instanceof Component)
- toAdd = (Component) buttons[i];
- else
- {
- if (buttons[i] instanceof Icon)
- toAdd = new JButton((Icon) buttons[i]);
- else
- toAdd = new JButton(buttons[i].toString());
- hasCustomComponents = true;
- }
- if (toAdd instanceof JButton)
- ((JButton) toAdd).addActionListener(createButtonActionListener(i));
- if (i == initialIndex)
- initialFocusComponent = toAdd;
- container.add(toAdd);
- }
+ if (buttons[i] != null)
+ {
+ Component toAdd;
+ if (buttons[i] instanceof Component)
+ toAdd = (Component) buttons[i];
+ else
+ {
+ if (buttons[i] instanceof Icon)
+ toAdd = new JButton((Icon) buttons[i]);
+ else
+ toAdd = new JButton(buttons[i].toString());
+ hasCustomComponents = true;
+ }
+ if (toAdd instanceof JButton)
+ ((JButton) toAdd).addActionListener(createButtonActionListener(i));
+ if (i == initialIndex)
+ initialFocusComponent = toAdd;
+ container.add(toAdd);
+ }
}
selectInitialValue(optionPane);
}
@@ -693,9 +693,9 @@ public class BasicOptionPaneUI extends OptionPaneUI
Icon icon = getIcon();
if (icon != null)
{
- iconLabel = new JLabel(icon);
+ iconLabel = new JLabel(icon);
configureLabel(iconLabel);
- top.add(iconLabel, BorderLayout.WEST);
+ top.add(iconLabel, BorderLayout.WEST);
}
}
@@ -743,38 +743,38 @@ public class BasicOptionPaneUI extends OptionPaneUI
hasCustomComponents = internallyCreated;
if (msg instanceof Object[])
{
- Object[] arr = (Object[]) msg;
- for (int i = 0; i < arr.length; i++)
- addMessageComponents(container, cons, arr[i], maxll,
- internallyCreated);
- return;
+ Object[] arr = (Object[]) msg;
+ for (int i = 0; i < arr.length; i++)
+ addMessageComponents(container, cons, arr[i], maxll,
+ internallyCreated);
+ return;
}
else if (msg instanceof Component)
{
- container.add((Component) msg, cons);
- cons.gridy++;
+ container.add((Component) msg, cons);
+ cons.gridy++;
}
else if (msg instanceof Icon)
{
JLabel label = new JLabel((Icon) msg);
configureLabel(label);
- container.add(label, cons);
- cons.gridy++;
+ container.add(label, cons);
+ cons.gridy++;
}
else
{
- // Undocumented behaviour.
- // if msg.toString().length greater than maxll
- // it will create a box and burst the string.
- // otherwise, it will just create a label and re-call
- // this method with the label o.O
- if (msg.toString().length() > maxll || msg.toString().contains("\n"))
- {
- Box tmp = new Box(BoxLayout.Y_AXIS);
- burstStringInto(tmp, msg.toString(), maxll);
- addMessageComponents(container, cons, tmp, maxll, true);
- }
- else
+ // Undocumented behaviour.
+ // if msg.toString().length greater than maxll
+ // it will create a box and burst the string.
+ // otherwise, it will just create a label and re-call
+ // this method with the label o.O
+ if (msg.toString().length() > maxll || msg.toString().contains("\n"))
+ {
+ Box tmp = new Box(BoxLayout.Y_AXIS);
+ burstStringInto(tmp, msg.toString(), maxll);
+ addMessageComponents(container, cons, tmp, maxll, true);
+ }
+ else
{
JLabel label = new JLabel(msg.toString());
configureLabel(label);
@@ -817,7 +817,7 @@ public class BasicOptionPaneUI extends OptionPaneUI
if (remainder.length() == 0)
return;
- // Recursively call ourselves to burst the remainder of the string,
+ // Recursively call ourselves to burst the remainder of the string,
if (remainder.length() > maxll || remainder.contains("\n"))
burstStringInto(c, remainder, maxll);
else
@@ -901,27 +901,27 @@ public class BasicOptionPaneUI extends OptionPaneUI
rightSide.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
rightSide.setLayout(new GridBagLayout());
GridBagConstraints con = createConstraints();
-
+
addMessageComponents(rightSide, con, getMessage(),
getMaxCharactersPerLineCount(), false);
if (optionPane.getWantsInput())
{
- Object[] selection = optionPane.getSelectionValues();
+ Object[] selection = optionPane.getSelectionValues();
- if (selection == null)
+ if (selection == null)
inputComponent = new JTextField(15);
- else if (selection.length < 20)
+ else if (selection.length < 20)
inputComponent = new JComboBox(selection);
- else
- inputComponent = new JList(selection);
- if (inputComponent != null)
- {
- addMessageComponents(rightSide, con, inputComponent,
+ else
+ inputComponent = new JList(selection);
+ if (inputComponent != null)
+ {
+ addMessageComponents(rightSide, con, inputComponent,
getMaxCharactersPerLineCount(), false);
- resetSelectedValue();
- selectInitialValue(optionPane);
- }
+ resetSelectedValue();
+ selectInitialValue(optionPane);
+ }
}
messageArea.add(rightSide, BorderLayout.CENTER);
@@ -979,11 +979,11 @@ public class BasicOptionPaneUI extends OptionPaneUI
switch (optionPane.getOptionType())
{
case JOptionPane.YES_NO_OPTION:
- return new Object[] { YES_STRING, NO_STRING };
+ return new Object[] { YES_STRING, NO_STRING };
case JOptionPane.YES_NO_CANCEL_OPTION:
- return new Object[] { YES_STRING, NO_STRING, CANCEL_STRING };
+ return new Object[] { YES_STRING, NO_STRING, CANCEL_STRING };
case JOptionPane.OK_CANCEL_OPTION:
- return new Object[] { OK_STRING, CANCEL_STRING };
+ return new Object[] { OK_STRING, CANCEL_STRING };
case JOptionPane.DEFAULT_OPTION:
return (optionPane.getWantsInput()) ?
new Object[] { OK_STRING, CANCEL_STRING } :
@@ -1022,17 +1022,17 @@ public class BasicOptionPaneUI extends OptionPaneUI
switch (messageType)
{
case JOptionPane.ERROR_MESSAGE:
- tmp = errorIcon;
- break;
+ tmp = errorIcon;
+ break;
case JOptionPane.INFORMATION_MESSAGE:
- tmp = infoIcon;
- break;
+ tmp = infoIcon;
+ break;
case JOptionPane.WARNING_MESSAGE:
- tmp = warningIcon;
- break;
+ tmp = warningIcon;
+ break;
case JOptionPane.QUESTION_MESSAGE:
- tmp = questionIcon;
- break;
+ tmp = questionIcon;
+ break;
}
return tmp;
// FIXME: Don't cast till the default icons are in.
@@ -1055,8 +1055,8 @@ public class BasicOptionPaneUI extends OptionPaneUI
for (int i = 0; i < buttons.length; i++)
{
- if (select == buttons[i])
- return i;
+ if (select == buttons[i])
+ return i;
}
return 0;
}
@@ -1251,12 +1251,12 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
if (c instanceof JOptionPane)
{
- optionPane = (JOptionPane) c;
+ optionPane = (JOptionPane) c;
- installDefaults();
- installComponents();
- installListeners();
- installKeyboardActions();
+ installDefaults();
+ installComponents();
+ installListeners();
+ installKeyboardActions();
}
}
@@ -1268,16 +1268,16 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
if (optionPane.getWantsInput() && inputComponent != null)
{
- Object output = null;
- if (inputComponent instanceof JTextField)
- output = ((JTextField) inputComponent).getText();
- else if (inputComponent instanceof JComboBox)
- output = ((JComboBox) inputComponent).getSelectedItem();
- else if (inputComponent instanceof JList)
- output = ((JList) inputComponent).getSelectedValue();
-
- if (output != null)
- optionPane.setInputValue(output);
+ Object output = null;
+ if (inputComponent instanceof JTextField)
+ output = ((JTextField) inputComponent).getText();
+ else if (inputComponent instanceof JComboBox)
+ output = ((JComboBox) inputComponent).getSelectedItem();
+ else if (inputComponent instanceof JList)
+ output = ((JList) inputComponent).getSelectedValue();
+
+ if (output != null)
+ optionPane.setInputValue(output);
}
}
@@ -1291,8 +1291,8 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
if (inputComponent != null)
{
- inputComponent.requestFocus();
- return;
+ inputComponent.requestFocus();
+ return;
}
if (initialFocusComponent != null)
initialFocusComponent.requestFocus();
@@ -1307,17 +1307,17 @@ public class BasicOptionPaneUI extends OptionPaneUI
{
if (inputComponent != null)
{
- Object init = optionPane.getInitialSelectionValue();
- if (init == null)
- return;
- if (inputComponent instanceof JTextField)
- ((JTextField) inputComponent).setText((String) init);
- else if (inputComponent instanceof JComboBox)
- ((JComboBox) inputComponent).setSelectedItem(init);
- else if (inputComponent instanceof JList)
- {
- // ((JList) inputComponent).setSelectedValue(init, true);
- }
+ Object init = optionPane.getInitialSelectionValue();
+ if (init == null)
+ return;
+ if (inputComponent instanceof JTextField)
+ ((JTextField) inputComponent).setText((String) init);
+ else if (inputComponent instanceof JComboBox)
+ ((JComboBox) inputComponent).setSelectedItem(init);
+ else if (inputComponent instanceof JList)
+ {
+ // ((JList) inputComponent).setSelectedValue(init, true);
+ }
}
}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicPanelUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicPanelUI.java
index 458f102..959462a 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicPanelUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicPanelUI.java
@@ -54,13 +54,13 @@ public class BasicPanelUI extends PanelUI
* stateless).
*/
static BasicPanelUI sharedUI;
-
+
/**
* Returns a UI delegate for the specified component.
- *
+ *
* @param panel the panel.
*/
- public static ComponentUI createUI(JComponent panel)
+ public static ComponentUI createUI(JComponent panel)
{
if (sharedUI == null)
sharedUI = new BasicPanelUI();
@@ -69,7 +69,7 @@ public class BasicPanelUI extends PanelUI
/**
* Installs this UI delegate in the specified component.
- *
+ *
* @param c the component (should be a {@link JPanel}, null not
* permitted).
*/
@@ -85,19 +85,19 @@ public class BasicPanelUI extends PanelUI
/**
* Installs the defaults for this UI delegate in the specified panel.
- *
+ *
* @param p the panel (null not permitted).
*/
protected void installDefaults(JPanel p)
{
LookAndFeel.installColorsAndFont(p, "Panel.background", "Panel.foreground",
"Panel.font");
-
+
// A test against the reference implementation shows that this method will
// install a border if one is defined in the UIDefaults table (even though
// the BasicLookAndFeel doesn't actually define a "Panel.border"). This
- // test was written after discovering that a null argument to
- // uninstallDefaults throws a NullPointerException in
+ // test was written after discovering that a null argument to
+ // uninstallDefaults throws a NullPointerException in
// LookAndFeel.uninstallBorder()...
LookAndFeel.installBorder(p, "Panel.border");
}
@@ -123,10 +123,10 @@ public class BasicPanelUI extends PanelUI
// (1) doesn't actually remove the installed colors and font installed
// by installDefaults(), it isn't necessary;
// (2) throws a NullPointerException in LookAndFeel.uninstallBorder() if
- // p is null. Strangely, no border is installed by the
+ // p is null. Strangely, no border is installed by the
// BasicLookAndFeel - perhaps this is needed by another LAF?
-
+
LookAndFeel.uninstallBorder(p);
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicPasswordFieldUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicPasswordFieldUI.java
index 76dcfc4..cc83917 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicPasswordFieldUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicPasswordFieldUI.java
@@ -56,7 +56,7 @@ public class BasicPasswordFieldUI extends BasicTextFieldUI
{
return new PasswordView(elem);
}
-
+
public static ComponentUI createUI(JComponent c)
{
return new BasicPasswordFieldUI();
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicPopupMenuUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicPopupMenuUI.java
index 8c0fe67..6cd433b 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicPopupMenuUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicPopupMenuUI.java
@@ -255,7 +255,7 @@ public class BasicPopupMenuUI extends PopupMenuUI
/**
* Finds the next child element that is enabled and visible.
- *
+ *
* @param children the children to search through
* @param start the start index
* @param end the end index
@@ -282,7 +282,7 @@ public class BasicPopupMenuUI extends PopupMenuUI
/**
* Finds the previous child element that is enabled and visible.
- *
+ *
* @param children the children to search through
* @param start the start index
* @param end the end index
@@ -349,7 +349,7 @@ public class BasicPopupMenuUI extends PopupMenuUI
else
{
int popupIndex = len-1;
- if (len > 2
+ if (len > 2
&& (path[popupIndex] instanceof JPopupMenu
|| path[--popupIndex] instanceof JPopupMenu)
&& ! ((JMenu) path[popupIndex - 1]).isTopLevelMenu())
@@ -773,7 +773,7 @@ public class BasicPopupMenuUI extends PopupMenuUI
am.put(action.getValue(Action.NAME), action);
action = new NavigateAction("cancel");
am.put(action.getValue(Action.NAME), action);
-
+
return am;
}
@@ -916,7 +916,7 @@ public class BasicPopupMenuUI extends PopupMenuUI
*/
public void popupMenuWillBecomeInvisible(PopupMenuEvent event)
{
- // remove listener that listens to component events fired
+ // remove listener that listens to component events fired
// by the top - level window that this popup belongs to.
Component invoker = popupMenu.getInvoker();
Component rootContainer = SwingUtilities.getRoot(invoker);
@@ -931,30 +931,30 @@ public class BasicPopupMenuUI extends PopupMenuUI
*/
public void popupMenuWillBecomeVisible(PopupMenuEvent event)
{
- // Adds topWindowListener to top-level window to listener to
+ // Adds topWindowListener to top-level window to listener to
// ComponentEvents fired by it. We need to cancel this popup menu
// if topWindow to which this popup belongs was resized or moved.
- Component invoker = popupMenu.getInvoker();
+ Component invoker = popupMenu.getInvoker();
Component rootContainer = SwingUtilities.getRoot(invoker);
if (rootContainer != null)
rootContainer.addComponentListener(topWindowListener);
// if this popup menu is a free floating popup menu,
// then by default its first element should be always selected when
- // this popup menu becomes visible.
+ // this popup menu becomes visible.
MenuSelectionManager manager = MenuSelectionManager.defaultManager();
if (manager.getSelectedPath().length == 0)
{
- // Set selected path to point to the first item in the popup menu
- MenuElement[] path = new MenuElement[2];
- path[0] = popupMenu;
- Component[] comps = popupMenu.getComponents();
- if (comps.length != 0 && comps[0] instanceof MenuElement)
- {
- path[1] = (MenuElement) comps[0];
- manager.setSelectedPath(path);
- }
+ // Set selected path to point to the first item in the popup menu
+ MenuElement[] path = new MenuElement[2];
+ path[0] = popupMenu;
+ Component[] comps = popupMenu.getComponents();
+ if (comps.length != 0 && comps[0] instanceof MenuElement)
+ {
+ path[1] = (MenuElement) comps[0];
+ manager.setSelectedPath(path);
+ }
}
}
}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicProgressBarUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicProgressBarUI.java
index 12bbe01..bff6385 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicProgressBarUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicProgressBarUI.java
@@ -71,13 +71,13 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ProgressBarUI;
/**
- * The Basic Look and Feel UI delegate for the
+ * The Basic Look and Feel UI delegate for the
* JProgressBar.
*/
public class BasicProgressBarUI extends ProgressBarUI
{
/**
- * A helper class that listens for ChangeEvents
+ * A helper class that listens for ChangeEvents
* from the progressBar's model.
*
* @specnote Apparently this class was intended to be protected,
@@ -99,13 +99,13 @@ public class BasicProgressBarUI extends ProgressBarUI
}
/**
- * This helper class is used to listen for
+ * This helper class is used to listen for
* PropertyChangeEvents from the progressBar.
*/
private class PropertyChangeHandler implements PropertyChangeListener
{
/**
- * Called every time the properties of the
+ * Called every time the properties of the
* progressBar change.
*
* @param e The PropertyChangeEvent given by the progressBar.
@@ -163,11 +163,11 @@ public class BasicProgressBarUI extends ProgressBarUI
{
// Nothing to do here.
}
-
+
}
/**
- * This helper class is used to listen for
+ * This helper class is used to listen for
* the animationTimer's intervals. On every interval,
* the bouncing box should move.
*/
@@ -215,7 +215,7 @@ public class BasicProgressBarUI extends ProgressBarUI
* Holds the value of the bouncing box that is returned by {@link #getBox}.
*
* @since 1.5
- */
+ */
protected Rectangle boxRect;
/** The timer used to move the bouncing box. */
@@ -230,7 +230,7 @@ public class BasicProgressBarUI extends ProgressBarUI
// | frame0 | frame1 | frame2 | frame 3 | frame 4 |
// | | frame7 | frame6 | frame 5 | |
// +-----------------------------------------------+
-
+
/** The current animation index. */
private transient int animationIndex;
@@ -260,7 +260,7 @@ public class BasicProgressBarUI extends ProgressBarUI
/**
* The size of the box returned by {@link #getBox} against the orientation
* direction of the progress bar. This is package private to avoid accessor
- * method.
+ * method.
*/
transient int boxIndependent = - 1;
@@ -346,7 +346,7 @@ public class BasicProgressBarUI extends ProgressBarUI
/**
* This method returns the size and position of the bouncing box
- * for the current animation index. It stores the values in the
+ * for the current animation index. It stores the values in the
* given rectangle and returns it. It returns null if no box should
* be drawn.
*
@@ -487,7 +487,7 @@ public class BasicProgressBarUI extends ProgressBarUI
* rectangle (the bounds without the insets) if the
* progressBar is horizontal.
*
- * @return The preferred size of the progressBar minus
+ * @return The preferred size of the progressBar minus
* insets if it's horizontal.
*/
protected Dimension getPreferredInnerHorizontal()
@@ -512,7 +512,7 @@ public class BasicProgressBarUI extends ProgressBarUI
/**
* This method returns the preferred size of the inner
- * rectangle (the bounds without insets) if the
+ * rectangle (the bounds without insets) if the
* progressBar is vertical.
*
* @return The preferred size of the progressBar minus
@@ -539,7 +539,7 @@ public class BasicProgressBarUI extends ProgressBarUI
}
/**
- * This method returns the preferred size of the
+ * This method returns the preferred size of the
* given JComponent. If it returns null, then it
* is up to the LayoutManager to give it a size.
*
@@ -585,7 +585,7 @@ public class BasicProgressBarUI extends ProgressBarUI
/**
* This method returns the point (the top left of the bounding box)
- * where the text should be painted.
+ * where the text should be painted.
*
* @param g The Graphics object to measure FontMetrics with.
* @param progressString The string to paint.
@@ -602,7 +602,7 @@ public class BasicProgressBarUI extends ProgressBarUI
Rectangle tr = new Rectangle();
Rectangle vr = new Rectangle();
Rectangle ir = new Rectangle();
-
+
if (progressBar.getOrientation() == JProgressBar.HORIZONTAL)
vr.setBounds(x, y, width, height);
else
@@ -616,7 +616,7 @@ public class BasicProgressBarUI extends ProgressBarUI
SwingConstants.CENTER,
SwingConstants.CENTER,
SwingConstants.CENTER, vr, ir, tr, 0);
-
+
if (progressBar.getOrientation() == JProgressBar.HORIZONTAL)
return new Point(tr.x, tr.y);
else
@@ -651,7 +651,7 @@ public class BasicProgressBarUI extends ProgressBarUI
}
/**
- * This method is called if the painting to be done is
+ * This method is called if the painting to be done is
* for a determinate progressBar.
*
* @param g The Graphics object to paint with.
@@ -672,17 +672,17 @@ public class BasicProgressBarUI extends ProgressBarUI
int amountFull = getAmountFull(insets, or.width, or.height);
- if (progressBar.getOrientation() == JProgressBar.HORIZONTAL)
- {
- g.setColor(c.getForeground());
- g.fillRect(vr.x, vr.y, amountFull, vr.height);
- }
- else
- {
- g.setColor(c.getForeground());
- g.fillRect(vr.x, vr.y + vr.height - amountFull, vr.width,
+ if (progressBar.getOrientation() == JProgressBar.HORIZONTAL)
+ {
+ g.setColor(c.getForeground());
+ g.fillRect(vr.x, vr.y, amountFull, vr.height);
+ }
+ else
+ {
+ g.setColor(c.getForeground());
+ g.fillRect(vr.x, vr.y + vr.height - amountFull, vr.width,
amountFull);
- }
+ }
if (progressBar.isStringPainted() && !progressBar.getString().equals(""))
paintString(g, 0, 0, or.width, or.height, amountFull, insets);
@@ -739,13 +739,13 @@ public class BasicProgressBarUI extends ProgressBarUI
String str = progressBar.getString();
int full = getAmountFull(b, width, height);
Point placement = getStringPlacement(g, progressBar.getString(),
- x + b.left, y + b.top,
+ x + b.left, y + b.top,
width - b.left - b.right,
height - b.top - b.bottom);
Color savedColor = g.getColor();
Shape savedClip = g.getClip();
FontMetrics fm = g.getFontMetrics(progressBar.getFont());
-
+
if (progressBar.getOrientation() == JProgressBar.VERTICAL)
{
AffineTransform rotate = AffineTransform.getRotateInstance(Math.PI / 2);
@@ -756,7 +756,7 @@ public class BasicProgressBarUI extends ProgressBarUI
{
placement.y += fm.getAscent();
}
-
+
g.setColor(getSelectionForeground());
g.setClip(0, 0, full + b.left, height);
g.drawString(str, placement.x, placement.y);
@@ -770,7 +770,7 @@ public class BasicProgressBarUI extends ProgressBarUI
/**
* This method sets the current animation index. If the index is greater than
* the number of frames, it resets to 0.
- *
+ *
* @param newValue The new animation index.
*/
protected void setAnimationIndex(int newValue)
@@ -849,10 +849,10 @@ public class BasicProgressBarUI extends ProgressBarUI
if (cycleTime % repaintInterval != 0
&& (cycleTime / repaintInterval) % 2 != 0)
{
- int div = (cycleTime / repaintInterval) + 2;
- div /= 2;
- div *= 2;
- cycleTime = div * repaintInterval;
+ int div = (cycleTime / repaintInterval) + 2;
+ div /= 2;
+ div *= 2;
+ cycleTime = div * repaintInterval;
}
setAnimationIndex(0);
numFrames = cycleTime / repaintInterval;
@@ -874,7 +874,7 @@ public class BasicProgressBarUI extends ProgressBarUI
}
/**
- * This method registers listeners to all the
+ * This method registers listeners to all the
* components that this UI delegate needs to listen to.
*/
protected void installListeners()
@@ -895,7 +895,7 @@ public class BasicProgressBarUI extends ProgressBarUI
}
/**
- * This method unregisters listeners to all the
+ * This method unregisters listeners to all the
* components that were listened to.
*/
protected void uninstallListeners()
@@ -930,13 +930,13 @@ public class BasicProgressBarUI extends ProgressBarUI
super.installUI(c);
if (c instanceof JProgressBar)
{
- progressBar = (JProgressBar) c;
+ progressBar = (JProgressBar) c;
- animationTimer = new Timer(200, null);
- animationTimer.setRepeats(true);
+ animationTimer = new Timer(200, null);
+ animationTimer.setRepeats(true);
- installDefaults();
- installListeners();
+ installDefaults();
+ installListeners();
}
if (progressBar.isIndeterminate())
startAnimationTimer();
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java
index 3cea0d9..ff374d1 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java
@@ -72,7 +72,7 @@ public class BasicRadioButtonUI extends BasicToggleButtonUI
*
* @return a new instance of BasicRadioButtonUI
*/
- public static ComponentUI createUI(final JComponent c)
+ public static ComponentUI createUI(final JComponent c)
{
return new BasicRadioButtonUI();
}
@@ -158,7 +158,7 @@ public class BasicRadioButtonUI extends BasicToggleButtonUI
Icon currentIcon = getCurrentIcon(b);
// Do the layout.
- String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),
+ String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),
b.getText(), currentIcon == null ? getDefaultIcon() : currentIcon,
b.getVerticalAlignment(), b.getHorizontalAlignment(),
b.getVerticalTextPosition(), b.getHorizontalTextPosition(),
@@ -184,13 +184,13 @@ public class BasicRadioButtonUI extends BasicToggleButtonUI
paintFocus(g, textR, size);
}
}
-
- /**
- * Determines the icon to be displayed for the specified radio button.
- *
- * @param b the radio button
- *
- * @return the icon
+
+ /**
+ * Determines the icon to be displayed for the specified radio button.
+ *
+ * @param b the radio button
+ *
+ * @return the icon
*/
private Icon getCurrentIcon(AbstractButton b)
{
@@ -246,14 +246,14 @@ public class BasicRadioButtonUI extends BasicToggleButtonUI
// one will be used for layout calculations and painting instead.
// The other icon properties are ignored.
AbstractButton b = (AbstractButton) c;
-
+
Insets insets = b.getInsets();
String text = b.getText();
Icon i = b.getIcon();
if (i == null)
- i = getDefaultIcon();
-
+ i = getDefaultIcon();
+
textR.x = 0;
textR.y = 0;
textR.width = 0;
@@ -269,7 +269,7 @@ public class BasicRadioButtonUI extends BasicToggleButtonUI
SwingUtilities.layoutCompoundLabel(b, // for the component orientation
b.getFontMetrics(b.getFont()),
- text, i, b.getVerticalAlignment(),
+ text, i, b.getVerticalAlignment(),
b.getHorizontalAlignment(),
b.getVerticalTextPosition(),
b.getHorizontalTextPosition(),
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicRootPaneUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicRootPaneUI.java
index e20bc2b..26c7a53 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicRootPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicRootPaneUI.java
@@ -130,7 +130,7 @@ public class BasicRootPaneUI extends RootPaneUI
}
}
- public static ComponentUI createUI(JComponent x)
+ public static ComponentUI createUI(JComponent x)
{
return new BasicRootPaneUI();
}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicScrollBarUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicScrollBarUI.java
index 400ede0..9f24f8a 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicScrollBarUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicScrollBarUI.java
@@ -85,7 +85,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
*/
protected class ArrowButtonListener extends MouseAdapter
{
-
+
/**
* Move the thumb in the direction specified by the button's arrow. If
* this button is held down, then it should keep moving the thumb.
@@ -285,13 +285,13 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
currentMouseY = e.getY();
if (scrollbar.getValueIsAdjusting())
{
- int value;
- if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL)
- value = valueForXPosition(currentMouseX) - offset;
- else
- value = valueForYPosition(currentMouseY) - offset;
+ int value;
+ if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL)
+ value = valueForXPosition(currentMouseX) - offset;
+ else
+ value = valueForYPosition(currentMouseY) - offset;
- scrollbar.setValue(value);
+ scrollbar.setValue(value);
}
}
@@ -321,38 +321,38 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
int value;
if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL)
- value = valueForXPosition(currentMouseX);
+ value = valueForXPosition(currentMouseX);
else
- value = valueForYPosition(currentMouseY);
+ value = valueForYPosition(currentMouseY);
if (! thumbRect.contains(e.getPoint()))
{
- scrollTimer.stop();
- scrollListener.setScrollByBlock(true);
- if (value > scrollbar.getValue())
- {
- trackHighlight = INCREASE_HIGHLIGHT;
- scrollListener.setDirection(POSITIVE_SCROLL);
- }
- else
- {
- trackHighlight = DECREASE_HIGHLIGHT;
- scrollListener.setDirection(NEGATIVE_SCROLL);
- }
+ scrollTimer.stop();
+ scrollListener.setScrollByBlock(true);
+ if (value > scrollbar.getValue())
+ {
+ trackHighlight = INCREASE_HIGHLIGHT;
+ scrollListener.setDirection(POSITIVE_SCROLL);
+ }
+ else
+ {
+ trackHighlight = DECREASE_HIGHLIGHT;
+ scrollListener.setDirection(NEGATIVE_SCROLL);
+ }
scrollTimer.setDelay(100);
- scrollTimer.start();
+ scrollTimer.start();
}
else
{
- // We'd like to keep track of where the cursor
- // is inside the thumb.
- // This works because the scrollbar's value represents
- // "lower" edge of the thumb. The value at which
- // the cursor is at must be greater or equal
- // to that value.
+ // We'd like to keep track of where the cursor
+ // is inside the thumb.
+ // This works because the scrollbar's value represents
+ // "lower" edge of the thumb. The value at which
+ // the cursor is at must be greater or equal
+ // to that value.
scrollListener.setScrollByBlock(false);
- scrollbar.setValueIsAdjusting(true);
+ scrollbar.setValueIsAdjusting(true);
offset = value - scrollbar.getValue();
}
scrollbar.repaint();
@@ -394,17 +394,17 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
{
int value;
if (scrollbar.getOrientation() == HORIZONTAL)
- value = valueForXPosition(currentMouseX);
+ value = valueForXPosition(currentMouseX);
else
- value = valueForYPosition(currentMouseY);
+ value = valueForYPosition(currentMouseY);
if (thumbRect.contains(currentMouseX, currentMouseY))
return false;
-
+
if (direction == POSITIVE_SCROLL)
- return value > scrollbar.getValue();
+ return value > scrollbar.getValue();
else
- return value < scrollbar.getValue();
+ return value < scrollbar.getValue();
}
}
@@ -488,7 +488,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
/** The scrollbar this UI is acting for. */
protected JScrollBar scrollbar;
-
+
/** True if the mouse is over the thumb. */
boolean thumbRollover;
@@ -767,7 +767,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
}
/**
- * Installs the input map from the look and feel defaults, and a
+ * Installs the input map from the look and feel defaults, and a
* corresponding action map. Note the the keyboard bindings will only
* work when the {@link JScrollBar} component has the focus, which is rare.
*/
@@ -775,7 +775,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
{
InputMap keyMap = getInputMap(
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
- SwingUtilities.replaceUIInputMap(scrollbar,
+ SwingUtilities.replaceUIInputMap(scrollbar,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, keyMap);
ActionMap map = getActionMap();
SwingUtilities.replaceUIActionMap(scrollbar, map);
@@ -788,25 +788,25 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
protected void uninstallKeyboardActions()
{
SwingUtilities.replaceUIActionMap(scrollbar, null);
- SwingUtilities.replaceUIInputMap(scrollbar,
+ SwingUtilities.replaceUIInputMap(scrollbar,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null);
}
- InputMap getInputMap(int condition)
+ InputMap getInputMap(int condition)
{
if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
return (InputMap) UIManager.get("ScrollBar.focusInputMap");
return null;
}
-
+
/**
- * Returns the action map for the {@link JScrollBar}. All scroll bars
- * share a single action map which is created the first time this method is
+ * Returns the action map for the {@link JScrollBar}. All scroll bars
+ * share a single action map which is created the first time this method is
* called, then stored in the UIDefaults table for subsequent access.
- *
+ *
* @return The shared action map.
*/
- ActionMap getActionMap()
+ ActionMap getActionMap()
{
ActionMap map = (ActionMap) UIManager.get("ScrollBar.actionMap");
@@ -821,23 +821,23 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
/**
* Creates the action map shared by all {@link JSlider} instances.
- * This method is called once by {@link #getActionMap()} when it
- * finds no action map in the UIDefaults table...after the map is
- * created, it gets added to the defaults table so that subsequent
- * calls to {@link #getActionMap()} will return the same shared
+ * This method is called once by {@link #getActionMap()} when it
+ * finds no action map in the UIDefaults table...after the map is
+ * created, it gets added to the defaults table so that subsequent
+ * calls to {@link #getActionMap()} will return the same shared
* instance.
- *
+ *
* @return The action map.
*/
ActionMap createActionMap()
{
ActionMap map = new ActionMapUIResource();
- map.put("positiveUnitIncrement",
+ map.put("positiveUnitIncrement",
new AbstractAction("positiveUnitIncrement") {
public void actionPerformed(ActionEvent event)
{
JScrollBar sb = (JScrollBar) event.getSource();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getUnitIncrement(1);
sb.setValue(sb.getValue() + delta);
@@ -845,12 +845,12 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
}
}
);
- map.put("positiveBlockIncrement",
+ map.put("positiveBlockIncrement",
new AbstractAction("positiveBlockIncrement") {
public void actionPerformed(ActionEvent event)
{
JScrollBar sb = (JScrollBar) event.getSource();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getBlockIncrement(1);
sb.setValue(sb.getValue() + delta);
@@ -858,12 +858,12 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
}
}
);
- map.put("negativeUnitIncrement",
+ map.put("negativeUnitIncrement",
new AbstractAction("negativeUnitIncrement") {
public void actionPerformed(ActionEvent event)
{
JScrollBar sb = (JScrollBar) event.getSource();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getUnitIncrement(-1);
sb.setValue(sb.getValue() + delta);
@@ -871,12 +871,12 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
}
}
);
- map.put("negativeBlockIncrement",
+ map.put("negativeBlockIncrement",
new AbstractAction("negativeBlockIncrement") {
public void actionPerformed(ActionEvent event)
{
JScrollBar sb = (JScrollBar) event.getSource();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getBlockIncrement(-1);
sb.setValue(sb.getValue() + delta);
@@ -884,24 +884,24 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
}
}
);
- map.put("minScroll",
+ map.put("minScroll",
new AbstractAction("minScroll") {
public void actionPerformed(ActionEvent event)
{
JScrollBar sb = (JScrollBar) event.getSource();
- if (sb.isVisible())
+ if (sb.isVisible())
{
sb.setValue(sb.getMinimum());
}
}
}
);
- map.put("maxScroll",
+ map.put("maxScroll",
new AbstractAction("maxScroll") {
public void actionPerformed(ActionEvent event)
{
JScrollBar sb = (JScrollBar) event.getSource();
- if (sb.isVisible())
+ if (sb.isVisible())
{
sb.setValue(sb.getMaximum());
}
@@ -910,7 +910,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
);
return map;
}
-
+
/**
* This method installs any listeners for the scrollbar. This method also
* installs listeners for things such as the JButtons and the timer.
@@ -973,10 +973,10 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
{
if (scrollbarContainer instanceof JScrollBar)
{
- if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL)
- layoutHScrollbar((JScrollBar) scrollbarContainer);
- else
- layoutVScrollbar((JScrollBar) scrollbarContainer);
+ if (scrollbar.getOrientation() == SwingConstants.HORIZONTAL)
+ layoutHScrollbar((JScrollBar) scrollbarContainer);
+ else
+ layoutVScrollbar((JScrollBar) scrollbarContainer);
}
}
@@ -992,7 +992,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
Dimension incrDims = incrButton.getPreferredSize();
Dimension decrDims = decrButton.getPreferredSize();
-
+
// calculate and update the track bounds
SwingUtilities.calculateInnerArea(scrollbar, trackRect);
trackRect.width -= incrDims.getWidth();
@@ -1000,7 +1000,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
trackRect.x += decrDims.getWidth();
updateThumbRect();
-
+
decrButton.setBounds(vr.x, vr.y, decrDims.width, trackRect.height);
incrButton.setBounds(trackRect.x + trackRect.width, vr.y, incrDims.width,
trackRect.height);
@@ -1018,13 +1018,13 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
Dimension incrDims = incrButton.getPreferredSize();
Dimension decrDims = decrButton.getPreferredSize();
-
+
// Update rectangles
SwingUtilities.calculateInnerArea(scrollbar, trackRect);
trackRect.height -= incrDims.getHeight();
trackRect.height -= decrDims.getHeight();
trackRect.y += decrDims.getHeight();
-
+
updateThumbRect();
decrButton.setBounds(vr.x, vr.y, trackRect.width, decrDims.height);
@@ -1076,14 +1076,14 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
thumbRect.height = Math.max(extent * trackRect.height / (max - min),
getMinimumThumbSize().height);
int availableHeight = trackRect.height - thumbRect.height;
- thumbRect.y = trackRect.y
+ thumbRect.y = trackRect.y
+ (value - min) * availableHeight / (max - min - extent);
thumbRect.width = trackRect.width;
}
}
}
-
+
/**
* This method returns the minimum size required for the layout.
*
@@ -1367,7 +1367,7 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
decrButton.removeMouseListener(buttonListener);
if (incrButton != null)
incrButton.removeMouseListener(buttonListener);
-
+
propertyChangeListener = null;
modelListener = null;
buttonListener = null;
@@ -1469,39 +1469,39 @@ public class BasicScrollBarUI extends ScrollBarUI implements LayoutManager,
value = min;
return value;
}
-
+
/**
* Returns true if the mouse is over the thumb.
- *
+ *
* @return true if the mouse is over the thumb.
- *
+ *
* @since 1.5
*/
public boolean isThumbRollover()
{
- return thumbRollover;
+ return thumbRollover;
}
-
+
/**
* Set thumbRollover to active. This indicates
* whether or not the mouse is over the thumb.
- *
+ *
* @param active - true if the mouse is over the thumb.
- *
+ *
* @since 1.5
*/
protected void setThumbRollover(boolean active)
{
thumbRollover = active;
}
-
+
/**
- * Indicates whether the user can position the thumb with
+ * Indicates whether the user can position the thumb with
* a mouse click (i.e. middle button).
- *
+ *
* @return true if the user can position the thumb with a mouse
* click.
- *
+ *
* @since 1.5
*/
public boolean getSupportsAbsolutePositioning()
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicScrollPaneUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicScrollPaneUI.java
index a719428..7123948 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicScrollPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicScrollPaneUI.java
@@ -127,7 +127,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
viewPosition.y = vsb.getValue();
vp.setViewPosition(viewPosition);
}
-
+
}
/**
@@ -144,7 +144,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
* changes. When the extents size has changed, this method calls
* {@link BasicScrollPaneUI#syncScrollPaneWithViewport()} to adjust the
* scrollbars extents as well.
- *
+ *
* @param event the change event
*/
public void stateChanged(ChangeEvent event)
@@ -221,7 +221,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
/**
* Scroll with the mouse wheel.
- *
+ *
* @author Audrius Meskauskas (audriusa@Bioinformatics.org)
*/
public void mouseWheelMoved(MouseWheelEvent e)
@@ -245,11 +245,11 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
}
-
+
/**
* Adds/removes the mouse wheel listener when the component is added/removed
* to/from the scroll pane view port.
- *
+ *
* @author Audrius Meskauskas (audriusa@bioinformatics.org)
*/
class ViewportContainerListener implements ContainerListener
@@ -261,7 +261,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
{
e.getChild().addMouseWheelListener(mouseWheelListener);
}
-
+
/**
* Remove the mouse wheel listener.
*/
@@ -270,18 +270,18 @@ public class BasicScrollPaneUI extends ScrollPaneUI
e.getChild().removeMouseWheelListener(mouseWheelListener);
}
}
-
+
/**
* The number of pixels by that we should scroll the content that does
* not implement Scrollable.
*/
static int SCROLL_NON_SCROLLABLES = 10;
-
+
/**
* The number of rows to scroll per mouse wheel click. From impression,
* Sun seems using the value 3.
*/
- static int ROWS_PER_WHEEL_CLICK = 3;
+ static int ROWS_PER_WHEEL_CLICK = 3;
/** The Scrollpane for which the UI is provided by this class. */
protected JScrollPane scrollpane;
@@ -310,14 +310,14 @@ public class BasicScrollPaneUI extends ScrollPaneUI
* The mousewheel listener for the scrollpane.
*/
MouseWheelListener mouseWheelListener;
-
+
/**
* The listener to add and remove the mouse wheel listener to/from
* the component container.
*/
ContainerListener containerListener;
- public static ComponentUI createUI(final JComponent c)
+ public static ComponentUI createUI(final JComponent c)
{
return new BasicScrollPaneUI();
}
@@ -348,8 +348,8 @@ public class BasicScrollPaneUI extends ScrollPaneUI
if (vpBorder != null && vpBorder instanceof UIResource)
p.setViewportBorder(null);
}
-
- public void installUI(final JComponent c)
+
+ public void installUI(final JComponent c)
{
super.installUI(c);
installDefaults((JScrollPane) c);
@@ -371,31 +371,31 @@ public class BasicScrollPaneUI extends ScrollPaneUI
if (hsbChangeListener == null)
hsbChangeListener = createHSBChangeListener();
sp.getHorizontalScrollBar().getModel().addChangeListener(hsbChangeListener);
-
+
if (vsbChangeListener == null)
vsbChangeListener = createVSBChangeListener();
sp.getVerticalScrollBar().getModel().addChangeListener(vsbChangeListener);
if (viewportChangeListener == null)
viewportChangeListener = createViewportChangeListener();
-
+
if (mouseWheelListener == null)
mouseWheelListener = createMouseWheelListener();
-
+
if (containerListener == null)
containerListener = new ViewportContainerListener();
-
+
JViewport v = sp.getViewport();
v.addChangeListener(viewportChangeListener);
v.addContainerListener(containerListener);
-
+
// Add mouse wheel listeners to the componets that are probably already
// in the view port.
for (int i = 0; i < v.getComponentCount(); i++)
v.getComponent(i).addMouseWheelListener(mouseWheelListener);
}
- InputMap getInputMap(int condition)
+ InputMap getInputMap(int condition)
{
if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
return (InputMap) UIManager.get("ScrollPane.ancestorInputMap");
@@ -403,13 +403,13 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
/**
- * Returns the action map for the {@link JScrollPane}. All scroll panes
- * share a single action map which is created the first time this method is
+ * Returns the action map for the {@link JScrollPane}. All scroll panes
+ * share a single action map which is created the first time this method is
* called, then stored in the UIDefaults table for subsequent access.
- *
+ *
* @return The shared action map.
*/
- ActionMap getActionMap()
+ ActionMap getActionMap()
{
ActionMap map = (ActionMap) UIManager.get("ScrollPane.actionMap");
@@ -424,24 +424,24 @@ public class BasicScrollPaneUI extends ScrollPaneUI
/**
* Creates the action map shared by all {@link JSlider} instances.
- * This method is called once by {@link #getActionMap()} when it
- * finds no action map in the UIDefaults table...after the map is
- * created, it gets added to the defaults table so that subsequent
- * calls to {@link #getActionMap()} will return the same shared
+ * This method is called once by {@link #getActionMap()} when it
+ * finds no action map in the UIDefaults table...after the map is
+ * created, it gets added to the defaults table so that subsequent
+ * calls to {@link #getActionMap()} will return the same shared
* instance.
- *
+ *
* @return The action map.
*/
ActionMap createActionMap()
{
ActionMap map = new ActionMapUIResource();
- map.put("scrollLeft",
+ map.put("scrollLeft",
new AbstractAction("scrollLeft") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getHorizontalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getBlockIncrement(-1);
sb.setValue(sb.getValue() + delta);
@@ -449,31 +449,31 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("scrollEnd",
+ map.put("scrollEnd",
new AbstractAction("scrollEnd") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb1 = sp.getHorizontalScrollBar();
- if (sb1.isVisible())
+ if (sb1.isVisible())
{
sb1.setValue(sb1.getMaximum());
}
JScrollBar sb2 = sp.getVerticalScrollBar();
- if (sb2.isVisible())
+ if (sb2.isVisible())
{
sb2.setValue(sb2.getMaximum());
}
}
}
);
- map.put("unitScrollUp",
+ map.put("unitScrollUp",
new AbstractAction("unitScrollUp") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getVerticalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getUnitIncrement(-1);
sb.setValue(sb.getValue() + delta);
@@ -481,13 +481,13 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("unitScrollLeft",
+ map.put("unitScrollLeft",
new AbstractAction("unitScrollLeft") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getHorizontalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getUnitIncrement(-1);
sb.setValue(sb.getValue() + delta);
@@ -495,13 +495,13 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("scrollUp",
+ map.put("scrollUp",
new AbstractAction("scrollUp") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getVerticalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getBlockIncrement(-1);
sb.setValue(sb.getValue() + delta);
@@ -509,13 +509,13 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("scrollRight",
+ map.put("scrollRight",
new AbstractAction("scrollRight") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getHorizontalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getBlockIncrement(1);
sb.setValue(sb.getValue() + delta);
@@ -523,31 +523,31 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("scrollHome",
+ map.put("scrollHome",
new AbstractAction("scrollHome") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb1 = sp.getHorizontalScrollBar();
- if (sb1.isVisible())
+ if (sb1.isVisible())
{
sb1.setValue(sb1.getMinimum());
}
JScrollBar sb2 = sp.getVerticalScrollBar();
- if (sb2.isVisible())
+ if (sb2.isVisible())
{
sb2.setValue(sb2.getMinimum());
}
}
}
);
- map.put("scrollDown",
+ map.put("scrollDown",
new AbstractAction("scrollDown") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getVerticalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getBlockIncrement(1);
sb.setValue(sb.getValue() + delta);
@@ -555,13 +555,13 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("unitScrollDown",
+ map.put("unitScrollDown",
new AbstractAction("unitScrollDown") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getVerticalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getUnitIncrement(1);
sb.setValue(sb.getValue() + delta);
@@ -569,13 +569,13 @@ public class BasicScrollPaneUI extends ScrollPaneUI
}
}
);
- map.put("unitScrollRight",
+ map.put("unitScrollRight",
new AbstractAction("unitScrollRight") {
public void actionPerformed(ActionEvent event)
{
JScrollPane sp = (JScrollPane) event.getSource();
JScrollBar sb = sp.getHorizontalScrollBar();
- if (sb.isVisible())
+ if (sb.isVisible())
{
int delta = sb.getUnitIncrement(1);
sb.setValue(sb.getValue() + delta);
@@ -585,7 +585,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
);
return map;
}
-
+
/**
* Installs additional keyboard actions on the scrollpane. This is a hook
* method provided to subclasses in order to install their own keyboard
@@ -597,7 +597,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
{
InputMap keyMap = getInputMap(
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
- SwingUtilities.replaceUIInputMap(sp,
+ SwingUtilities.replaceUIInputMap(sp,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, keyMap);
ActionMap map = getActionMap();
SwingUtilities.replaceUIActionMap(sp, map);
@@ -613,10 +613,10 @@ public class BasicScrollPaneUI extends ScrollPaneUI
protected void uninstallKeyboardActions(JScrollPane sp)
{
SwingUtilities.replaceUIActionMap(sp, null);
- SwingUtilities.replaceUIInputMap(sp,
+ SwingUtilities.replaceUIInputMap(sp,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null);
}
-
+
/**
* Creates and returns the change listener for the horizontal scrollbar.
*
@@ -661,7 +661,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
* Creates and returns the mouse wheel listener for the scrollpane.
*
* @return the mouse wheel listener for the scrollpane
- *
+ *
* @since 1.4
*/
protected MouseWheelListener createMouseWheelListener()
@@ -669,7 +669,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
return new MouseWheelHandler();
}
- public void uninstallUI(final JComponent c)
+ public void uninstallUI(final JComponent c)
{
uninstallDefaults((JScrollPane) c);
uninstallListeners(c);
@@ -680,7 +680,7 @@ public class BasicScrollPaneUI extends ScrollPaneUI
* Uninstalls all the listeners that have been installed in
* {@link #installListeners(JScrollPane)}.
*
- * @param c the scrollpane from which to uninstall the listeners
+ * @param c the scrollpane from which to uninstall the listeners
*/
protected void uninstallListeners(JComponent c)
{
@@ -690,17 +690,17 @@ public class BasicScrollPaneUI extends ScrollPaneUI
.removeChangeListener(hsbChangeListener);
sp.getVerticalScrollBar().getModel()
.removeChangeListener(vsbChangeListener);
-
+
JViewport v = sp.getViewport();
v.removeChangeListener(viewportChangeListener);
v.removeContainerListener(containerListener);
-
+
for (int i = 0; i < v.getComponentCount(); i++)
v.getComponent(i).removeMouseWheelListener(mouseWheelListener);
}
- public Dimension getMinimumSize(JComponent c)
+ public Dimension getMinimumSize(JComponent c)
{
JScrollPane p = (JScrollPane) c;
ScrollPaneLayout sl = (ScrollPaneLayout) p.getLayout();
@@ -821,15 +821,3 @@ public class BasicScrollPaneUI extends ScrollPaneUI
syncScrollPaneWithViewport();
}
}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicSeparatorUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicSeparatorUI.java
index 97caa3a..2c80822 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicSeparatorUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicSeparatorUI.java
@@ -86,10 +86,10 @@ public class BasicSeparatorUI extends SeparatorUI
if (c instanceof JSeparator)
{
- JSeparator s = (JSeparator) c;
+ JSeparator s = (JSeparator) c;
- installDefaults(s);
- installListeners(s);
+ installDefaults(s);
+ installListeners(s);
}
}
@@ -104,10 +104,10 @@ public class BasicSeparatorUI extends SeparatorUI
{
if (c instanceof JSeparator)
{
- JSeparator s = (JSeparator) c;
+ JSeparator s = (JSeparator) c;
- uninstallListeners(s);
- uninstallDefaults(s);
+ uninstallListeners(s);
+ uninstallDefaults(s);
}
}
@@ -138,7 +138,7 @@ public class BasicSeparatorUI extends SeparatorUI
/**
* This method installs any listeners that need
- * to be attached to the JSeparator or any of its
+ * to be attached to the JSeparator or any of its
* components.
*
* @param s The JSeparator that is being installed.
@@ -156,15 +156,15 @@ public class BasicSeparatorUI extends SeparatorUI
*/
protected void uninstallListeners(JSeparator s)
{
- // Separators don't receive events.
+ // Separators don't receive events.
}
/**
- * The separator is made of two lines. The top line will be
- * the shadow color (or left line if it's vertical). The bottom
- * or right line will be the highlight color. The two lines will
- * be centered inside the bounds box. If the separator is horizontal,
- * then it will be vertically centered, or if it's vertical, it will
+ * The separator is made of two lines. The top line will be
+ * the shadow color (or left line if it's vertical). The bottom
+ * or right line will be the highlight color. The two lines will
+ * be centered inside the bounds box. If the separator is horizontal,
+ * then it will be vertically centered, or if it's vertical, it will
* be horizontally centered.
*
* @param g The Graphics object to paint with
@@ -175,15 +175,15 @@ public class BasicSeparatorUI extends SeparatorUI
Rectangle r = new Rectangle();
SwingUtilities.calculateInnerArea(c, r);
Color saved = g.getColor();
-
+
JSeparator s;
if (c instanceof JSeparator)
s = (JSeparator) c;
else
return;
-
+
if (s.getOrientation() == JSeparator.HORIZONTAL)
- {
+ {
int midAB = r.height / 2;
g.setColor(shadow);
g.drawLine(r.x, r.y + midAB - 1, r.x + r.width, r.y + midAB - 1);
@@ -204,7 +204,7 @@ public class BasicSeparatorUI extends SeparatorUI
}
/**
- * This method returns the preferred size of the
+ * This method returns the preferred size of the
* JComponent.
*
* @param c The JComponent to measure.
@@ -216,8 +216,8 @@ public class BasicSeparatorUI extends SeparatorUI
Dimension pref = new Dimension(2, 0);
if (c instanceof JSeparator)
{
- JSeparator s = (JSeparator) c;
- if (s.getOrientation() == JSeparator.HORIZONTAL)
+ JSeparator s = (JSeparator) c;
+ if (s.getOrientation() == JSeparator.HORIZONTAL)
pref = new Dimension(0, 2);
}
return pref;
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicSliderUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicSliderUI.java
index 474a422..b9d5643 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicSliderUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicSliderUI.java
@@ -81,12 +81,12 @@ import javax.swing.plaf.SliderUI;
* BasicSliderUI.java This is the UI delegate in the Basic look and feel that
* paints JSliders.
*
- *
+ *
*
* The UI delegate keeps track of 6 rectangles that place the various parts of
* the JSlider inside the component.
*
* The space between the contentRect and the focusRect are the FocusInsets.
*
- *
+ *
*
* The space between the focusRect and the component bounds is the insetCache
* which are the component's insets.
*
- *
+ *
*
* The top of the thumb is the top of the contentRect. The trackRect has to be
* as tall as the thumb.
*
- *
+ *
*
* The trackRect and tickRect do not start from the left edge of the
* focusRect. They are trackBuffer away from each side of the focusRect. This
* is so that the thumb has room to move.
*
- *
+ *
*
* The labelRect does start right against the contentRect's left and right
* edges and it gets all remaining space.
@@ -420,8 +420,8 @@ public class BasicSliderUI extends SliderUI
if (slider.getSnapToTicks())
value = findClosestTick(value);
- // If the thumb is hit, then we don't need to set the timers to
- // move it.
+ // If the thumb is hit, then we don't need to set the timers to
+ // move it.
if (! thumbRect.contains(e.getPoint()))
{
// The mouse has hit some other part of the slider.
@@ -605,16 +605,16 @@ public class BasicSliderUI extends SliderUI
/**
* Returns true if the user is dragging the slider.
- *
+ *
* @return true if the slider is being dragged.
- *
+ *
* @since 1.5
*/
protected boolean isDragging()
{
return dragging;
}
-
+
/**
* Gets the shadow color to be used for this slider. The shadow color is the
* color used for drawing the top and left edges of the track.
@@ -1099,15 +1099,15 @@ public class BasicSliderUI extends SliderUI
}
/**
- * Updates the contentRect field to an area inside the
- * focusRect. This method does not need to be called if the
+ * Updates the contentRect field to an area inside the
+ * focusRect. This method does not need to be called if the
* orientation changes.
*/
protected void calculateContentRect()
{
contentRect.x = focusRect.x + focusInsets.left;
contentRect.y = focusRect.y + focusInsets.top;
-
+
contentRect.width = focusRect.width - focusInsets.left - focusInsets.right;
contentRect.height = focusRect.height - focusInsets.top
- focusInsets.bottom;
@@ -1134,9 +1134,9 @@ public class BasicSliderUI extends SliderUI
}
/**
- * Calculates the gap size between the edge of the contentRect
+ * Calculates the gap size between the edge of the contentRect
* and the edge of the trackRect, storing the result in the
- * trackBuffer field. Sufficient space needs to be reserved
+ * trackBuffer field. Sufficient space needs to be reserved
* for the slider thumb and/or the labels at each end of the slider track.
*/
protected void calculateTrackBuffer()
@@ -1145,11 +1145,11 @@ public class BasicSliderUI extends SliderUI
{
int w = Math.max(getWidthOfLowValueLabel(), getWidthOfHighValueLabel());
trackBuffer = Math.max(thumbRect.width / 2, w / 2);
-
+
}
else
{
- int h = Math.max(getHeightOfLowValueLabel(),
+ int h = Math.max(getHeightOfLowValueLabel(),
getHeightOfHighValueLabel());
trackBuffer = Math.max(thumbRect.height / 2, h / 2);
}
@@ -1157,10 +1157,10 @@ public class BasicSliderUI extends SliderUI
/**
* Returns the size of the slider's thumb. The size is hard coded to
- * 11 x 20 for horizontal sliders, and 20 x 11 for
- * vertical sliders. Note that a new instance of {@link Dimension} is
- * returned for every call to this method (this seems wasteful, but
- * {@link Dimension} instances are not immutable, so this is probably
+ * 11 x 20 for horizontal sliders, and 20 x 11 for
+ * vertical sliders. Note that a new instance of {@link Dimension} is
+ * returned for every call to this method (this seems wasteful, but
+ * {@link Dimension} instances are not immutable, so this is probably
* unavoidable).
*
* @return The size of the slider's thumb.
@@ -1232,7 +1232,7 @@ public class BasicSliderUI extends SliderUI
tickRect.y = trackRect.y + trackRect.height;
tickRect.width = trackRect.width;
tickRect.height = getTickLength();
-
+
// this makes our Mauve tests pass...can't explain it!
if (!slider.getPaintTicks())
{
@@ -1257,7 +1257,7 @@ public class BasicSliderUI extends SliderUI
}
/**
- * Calculates the labelRect field, taking into account the
+ * Calculates the labelRect field, taking into account the
* orientation of the slider.
*/
protected void calculateLabelRect()
@@ -1353,7 +1353,7 @@ public class BasicSliderUI extends SliderUI
* there are no labels.
*
* @return The width of the label whose key has the highest value.
- *
+ *
* @see #getHighestValueLabel()
*/
protected int getWidthOfHighValueLabel()
@@ -1370,7 +1370,7 @@ public class BasicSliderUI extends SliderUI
* there are no labels.
*
* @return The width of the label whose key has the lowest value.
- *
+ *
* @see #getLowestValueLabel()
*/
protected int getWidthOfLowValueLabel()
@@ -1455,7 +1455,7 @@ public class BasicSliderUI extends SliderUI
/**
* Returns the label whose key has the highest value.
*
- * @return The label whose key has the highest value or null if
+ * @return The label whose key has the highest value or null if
* no label table exists.
*/
protected Component getHighestValueLabel()
@@ -1527,7 +1527,7 @@ public class BasicSliderUI extends SliderUI
protected void recalculateIfOrientationChanged()
{
// Examining a test program shows that either Sun calls private
- // methods that we don't know about, or these don't do anything.
+ // methods that we don't know about, or these don't do anything.
calculateThumbSize();
calculateTrackBuffer();
calculateTrackRect();
@@ -1549,7 +1549,7 @@ public class BasicSliderUI extends SliderUI
Color saved_color = g.getColor();
g.setColor(getFocusColor());
-
+
g.drawRect(focusRect.x, focusRect.y, focusRect.width, focusRect.height);
g.setColor(saved_color);
@@ -1564,16 +1564,16 @@ public class BasicSliderUI extends SliderUI
* with the highlight color.
*
* The b-a-d path needs to be drawn with the shadow color and the b-c-d path
* needs to be drawn with the highlight color.
@@ -1676,7 +1676,7 @@ public class BasicSliderUI extends SliderUI
}
}
- /* Minor ticks start at 1/4 of the height (or width) of the tickRect and
+ /* Minor ticks start at 1/4 of the height (or width) of the tickRect and
extend to 1/2 of the tickRect.
Major ticks start at 1/4 of the height and extend to 3/4.
@@ -1849,7 +1849,7 @@ public class BasicSliderUI extends SliderUI
* \ / | /
* d e-----d
*
- *
+ *
*
* In the case of vertical thumbs, we highlight the path b-a-e-d and shadow
* the path b-c-d. In the case of horizontal thumbs, we highlight the path
@@ -1958,10 +1958,10 @@ public class BasicSliderUI extends SliderUI
/**
* Moves the thumb one block in the direction specified (a block is 1/10th
- * of the slider range). If the slider snaps to ticks, this method is
+ * of the slider range). If the slider snaps to ticks, this method is
* responsible for snapping it to a tick after the thumb has been moved.
*
- * @param direction the direction (positive values increment the thumb
+ * @param direction the direction (positive values increment the thumb
* position by one block, zero/negative values decrement the thumb position
* by one block).
*/
@@ -1981,11 +1981,11 @@ public class BasicSliderUI extends SliderUI
}
/**
- * Moves the thumb one unit in the specified direction. If the slider snaps
- * to ticks, this method is responsible for snapping it to a tick after the
+ * Moves the thumb one unit in the specified direction. If the slider snaps
+ * to ticks, this method is responsible for snapping it to a tick after the
* thumb has been moved.
*
- * @param direction the direction (positive values increment the thumb
+ * @param direction the direction (positive values increment the thumb
* position by one, zero/negative values decrement the thumb position by
* one).
*/
@@ -2021,7 +2021,7 @@ public class BasicSliderUI extends SliderUI
}
/**
- * Returns the x-coordinate (relative to the component) for the given slider
+ * Returns the x-coordinate (relative to the component) for the given slider
* value. This method assumes that the trackRect field is
* set up.
*
@@ -2049,8 +2049,8 @@ public class BasicSliderUI extends SliderUI
}
/**
- * Returns the y-coordinate (relative to the component) for the given slider
- * value. This method assumes that the trackRect field is
+ * Returns the y-coordinate (relative to the component) for the given slider
+ * value. This method assumes that the trackRect field is
* set up.
*
* @param value the slider value.
@@ -2093,8 +2093,8 @@ public class BasicSliderUI extends SliderUI
int value;
- // If the length is 0, you shouldn't be able to even see where the slider
- // is. This really shouldn't ever happen, but just in case, we'll return
+ // If the length is 0, you shouldn't be able to even see where the slider
+ // is. This really shouldn't ever happen, but just in case, we'll return
// the middle.
if (len == 0)
return (max - min) / 2;
@@ -2129,8 +2129,8 @@ public class BasicSliderUI extends SliderUI
int value;
- // If the length is 0, you shouldn't be able to even see where the slider
- // is. This really shouldn't ever happen, but just in case, we'll return
+ // If the length is 0, you shouldn't be able to even see where the slider
+ // is. This really shouldn't ever happen, but just in case, we'll return
// the middle.
if (len == 0)
return (max - min) / 2;
@@ -2164,14 +2164,14 @@ public class BasicSliderUI extends SliderUI
int minorSpace = slider.getMinorTickSpacing();
// The default value to return is value + minor or
- // value + major.
+ // value + major.
// Initializing at min - value leaves us with a default
// return value of min, which always has tick marks
// (if ticks are painted).
int minor = min - value;
int major = min - value;
- // If there are no major tick marks or minor tick marks
+ // If there are no major tick marks or minor tick marks
// e.g. snap is set to true but no ticks are set, then
// we can just return the value.
if (majorSpace <= 0 && minorSpace <= 0)
@@ -2208,8 +2208,8 @@ public class BasicSliderUI extends SliderUI
else
return value + minor;
}
-
- InputMap getInputMap(int condition)
+
+ InputMap getInputMap(int condition)
{
if (condition == JComponent.WHEN_FOCUSED)
return (InputMap) UIManager.get("Slider.focusInputMap");
@@ -2218,12 +2218,12 @@ public class BasicSliderUI extends SliderUI
/**
* Returns the action map for the {@link JSlider}. All sliders share
- * a single action map which is created the first time this method is
+ * a single action map which is created the first time this method is
* called, then stored in the UIDefaults table for subsequent access.
- *
+ *
* @return The shared action map.
*/
- ActionMap getActionMap()
+ ActionMap getActionMap()
{
ActionMap map = (ActionMap) UIManager.get("Slider.actionMap");
@@ -2238,18 +2238,18 @@ public class BasicSliderUI extends SliderUI
/**
* Creates the action map shared by all {@link JSlider} instances.
- * This method is called once by {@link #getActionMap()} when it
- * finds no action map in the UIDefaults table...after the map is
- * created, it gets added to the defaults table so that subsequent
- * calls to {@link #getActionMap()} will return the same shared
+ * This method is called once by {@link #getActionMap()} when it
+ * finds no action map in the UIDefaults table...after the map is
+ * created, it gets added to the defaults table so that subsequent
+ * calls to {@link #getActionMap()} will return the same shared
* instance.
- *
+ *
* @return The action map.
*/
ActionMap createActionMap()
{
ActionMap map = new ActionMapUIResource();
- map.put("positiveUnitIncrement",
+ map.put("positiveUnitIncrement",
new AbstractAction("positiveUnitIncrement") {
public void actionPerformed(ActionEvent event)
{
@@ -2262,7 +2262,7 @@ public class BasicSliderUI extends SliderUI
}
}
);
- map.put("negativeUnitIncrement",
+ map.put("negativeUnitIncrement",
new AbstractAction("negativeUnitIncrement") {
public void actionPerformed(ActionEvent event)
{
@@ -2275,7 +2275,7 @@ public class BasicSliderUI extends SliderUI
}
}
);
- map.put("positiveBlockIncrement",
+ map.put("positiveBlockIncrement",
new AbstractAction("positiveBlockIncrement") {
public void actionPerformed(ActionEvent event)
{
@@ -2288,7 +2288,7 @@ public class BasicSliderUI extends SliderUI
}
}
);
- map.put("negativeBlockIncrement",
+ map.put("negativeBlockIncrement",
new AbstractAction("negativeBlockIncrement") {
public void actionPerformed(ActionEvent event)
{
@@ -2301,7 +2301,7 @@ public class BasicSliderUI extends SliderUI
}
}
);
- map.put("minScroll",
+ map.put("minScroll",
new AbstractAction("minScroll") {
public void actionPerformed(ActionEvent event)
{
@@ -2309,11 +2309,11 @@ public class BasicSliderUI extends SliderUI
if (slider.getInverted())
slider.setValue(slider.getMaximum());
else
- slider.setValue(slider.getMinimum());
+ slider.setValue(slider.getMinimum());
}
}
);
- map.put("maxScroll",
+ map.put("maxScroll",
new AbstractAction("maxScroll") {
public void actionPerformed(ActionEvent event)
{
@@ -2321,7 +2321,7 @@ public class BasicSliderUI extends SliderUI
if (slider.getInverted())
slider.setValue(slider.getMinimum());
else
- slider.setValue(slider.getMaximum());
+ slider.setValue(slider.getMaximum());
}
}
);
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicSpinnerUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicSpinnerUI.java
index 254a9a4..00c8537 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicSpinnerUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicSpinnerUI.java
@@ -173,7 +173,7 @@ public class BasicSpinnerUI extends SpinnerUI
if (e instanceof JSpinner.DefaultEditor)
{
JSpinner.DefaultEditor de = (JSpinner.DefaultEditor) e;
- de.getTextField().setBorder(null);
+ de.getTextField().setBorder(null);
}
spinner.setLayout(createLayout());
spinner.setOpaque(true);
@@ -199,36 +199,36 @@ public class BasicSpinnerUI extends SpinnerUI
{
c.addMouseListener(new MouseAdapter()
{
- public void mousePressed(MouseEvent evt)
- {
- if (! spinner.isEnabled())
- return;
- increment();
- timer.setInitialDelay(500);
- timer.start();
- }
-
- public void mouseReleased(MouseEvent evt)
- {
- timer.stop();
- }
-
- void increment()
- {
- Object next = BasicSpinnerUI.this.spinner.getNextValue();
- if (next != null)
- BasicSpinnerUI.this.spinner.getModel().setValue(next);
- }
-
- volatile boolean mouseDown;
- Timer timer = new Timer(50,
- new ActionListener()
- {
- public void actionPerformed(ActionEvent event)
- {
- increment();
- }
- });
+ public void mousePressed(MouseEvent evt)
+ {
+ if (! spinner.isEnabled())
+ return;
+ increment();
+ timer.setInitialDelay(500);
+ timer.start();
+ }
+
+ public void mouseReleased(MouseEvent evt)
+ {
+ timer.stop();
+ }
+
+ void increment()
+ {
+ Object next = BasicSpinnerUI.this.spinner.getNextValue();
+ if (next != null)
+ BasicSpinnerUI.this.spinner.getModel().setValue(next);
+ }
+
+ volatile boolean mouseDown;
+ Timer timer = new Timer(50,
+ new ActionListener()
+ {
+ public void actionPerformed(ActionEvent event)
+ {
+ increment();
+ }
+ });
});
}
@@ -239,36 +239,36 @@ public class BasicSpinnerUI extends SpinnerUI
{
c.addMouseListener(new MouseAdapter()
{
- public void mousePressed(MouseEvent evt)
- {
- if (! spinner.isEnabled())
- return;
- decrement();
- timer.setInitialDelay(500);
- timer.start();
- }
-
- public void mouseReleased(MouseEvent evt)
- {
- timer.stop();
- }
-
- void decrement()
- {
- Object prev = BasicSpinnerUI.this.spinner.getPreviousValue();
- if (prev != null)
- BasicSpinnerUI.this.spinner.getModel().setValue(prev);
- }
-
- volatile boolean mouseDown;
- Timer timer = new Timer(50,
- new ActionListener()
- {
- public void actionPerformed(ActionEvent event)
- {
- decrement();
- }
- });
+ public void mousePressed(MouseEvent evt)
+ {
+ if (! spinner.isEnabled())
+ return;
+ decrement();
+ timer.setInitialDelay(500);
+ timer.start();
+ }
+
+ public void mouseReleased(MouseEvent evt)
+ {
+ timer.stop();
+ }
+
+ void decrement()
+ {
+ Object prev = BasicSpinnerUI.this.spinner.getPreviousValue();
+ if (prev != null)
+ BasicSpinnerUI.this.spinner.getModel().setValue(prev);
+ }
+
+ volatile boolean mouseDown;
+ Timer timer = new Timer(50,
+ new ActionListener()
+ {
+ public void actionPerformed(ActionEvent event)
+ {
+ decrement();
+ }
+ });
});
}
@@ -384,7 +384,7 @@ public class BasicSpinnerUI extends SpinnerUI
Dimension e = prefSize(editor);
Dimension n = prefSize(next);
Dimension p = prefSize(previous);
- Dimension s = parent.getSize();
+ Dimension s = parent.getSize();
int x = l2r ? i.left : i.right;
int y = i.top;
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicSplitPaneDivider.java b/libjava/classpath/javax/swing/plaf/basic/BasicSplitPaneDivider.java
index 95468ca..53f7db6 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicSplitPaneDivider.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicSplitPaneDivider.java
@@ -61,7 +61,7 @@ import javax.swing.border.Border;
/**
* The divider that separates the two parts of a JSplitPane in the Basic look
* and feel.
- *
+ *
*
* The reason for also handling MouseEvents from the containing
* JSplitPane is that users should be able to start a drag
@@ -398,11 +398,11 @@ public class BasicSplitPaneDivider extends Container
/* Remove the connection to the existing JSplitPane. */
if (splitPane != null)
{
- splitPane.removePropertyChangeListener(this);
- removeMouseListener(mouseHandler);
- removeMouseMotionListener(mouseHandler);
- splitPane = null;
- hiddenDivider = null;
+ splitPane.removePropertyChangeListener(this);
+ removeMouseListener(mouseHandler);
+ removeMouseMotionListener(mouseHandler);
+ splitPane = null;
+ hiddenDivider = null;
}
/* Establish the connection to the new JSplitPane. */
@@ -411,11 +411,11 @@ public class BasicSplitPaneDivider extends Container
splitPane = newUI.getSplitPane();
if (splitPane != null)
{
- splitPane.addPropertyChangeListener(this);
- addMouseListener(mouseHandler);
- addMouseMotionListener(mouseHandler);
- hiddenDivider = splitPaneUI.getNonContinuousLayoutDivider();
- orientation = splitPane.getOrientation();
+ splitPane.addPropertyChangeListener(this);
+ addMouseListener(mouseHandler);
+ addMouseMotionListener(mouseHandler);
+ hiddenDivider = splitPaneUI.getNonContinuousLayoutDivider();
+ orientation = splitPane.getOrientation();
if (splitPane.isOneTouchExpandable())
oneTouchExpandableChanged();
}
@@ -465,9 +465,9 @@ public class BasicSplitPaneDivider extends Container
{
if (border != this.border)
{
- Border oldValue = this.border;
- this.border = border;
- firePropertyChange("border", oldValue, border);
+ Border oldValue = this.border;
+ this.border = border;
+ firePropertyChange("border", oldValue, border);
}
}
@@ -539,7 +539,7 @@ public class BasicSplitPaneDivider extends Container
oneTouchExpandableChanged();
else if (e.getPropertyName().equals(JSplitPane.ORIENTATION_PROPERTY))
{
- orientation = splitPane.getOrientation();
+ orientation = splitPane.getOrientation();
invalidate();
if (splitPane != null)
splitPane.revalidate();
@@ -560,8 +560,8 @@ public class BasicSplitPaneDivider extends Container
super.paint(g);
if (border != null)
{
- dividerSize = getSize();
- border.paintBorder(this, g, 0, 0, dividerSize.width, dividerSize.height);
+ dividerSize = getSize();
+ border.paintBorder(this, g, 0, 0, dividerSize.width, dividerSize.height);
}
}
@@ -573,20 +573,20 @@ public class BasicSplitPaneDivider extends Container
{
if (splitPane.isOneTouchExpandable())
{
- leftButton = createLeftOneTouchButton();
- if (leftButton != null)
- leftButton.addActionListener(new OneTouchAction());
+ leftButton = createLeftOneTouchButton();
+ if (leftButton != null)
+ leftButton.addActionListener(new OneTouchAction());
- rightButton = createRightOneTouchButton();
- if (rightButton != null)
- rightButton.addActionListener(new OneTouchAction());
+ rightButton = createRightOneTouchButton();
+ if (rightButton != null)
+ rightButton.addActionListener(new OneTouchAction());
- // Only add them when both are non-null.
- if (leftButton != null && rightButton != null)
+ // Only add them when both are non-null.
+ if (leftButton != null && rightButton != null)
{
add(leftButton);
add(rightButton);
- }
+ }
}
invalidate();
if (splitPane != null)
@@ -678,28 +678,28 @@ public class BasicSplitPaneDivider extends Container
switch (locationIndex)
{
case 1:
- splitPane.setDividerLocation(splitPane.getLastDividerLocation());
- break;
+ splitPane.setDividerLocation(splitPane.getLastDividerLocation());
+ break;
case 0:
- int top = (orientation == JSplitPane.HORIZONTAL_SPLIT) ? insets.left
- : insets.top;
- splitPane.setDividerLocation(top);
- break;
+ int top = (orientation == JSplitPane.HORIZONTAL_SPLIT) ? insets.left
+ : insets.top;
+ splitPane.setDividerLocation(top);
+ break;
case 2:
- int bottom;
- if (orientation == JSplitPane.HORIZONTAL_SPLIT)
- bottom = splitPane.getBounds().width - insets.right - dividerSize;
- else
- bottom = splitPane.getBounds().height - insets.bottom - dividerSize;
- splitPane.setDividerLocation(bottom);
- break;
+ int bottom;
+ if (orientation == JSplitPane.HORIZONTAL_SPLIT)
+ bottom = splitPane.getBounds().width - insets.right - dividerSize;
+ else
+ bottom = splitPane.getBounds().height - insets.bottom - dividerSize;
+ splitPane.setDividerLocation(bottom);
+ break;
}
}
/**
* The listener for handling mouse events from both the divider and the
* containing JSplitPane.
- *
+ *
*
* The reason for also handling MouseEvents from the containing
* JSplitPane is that users should be able to start a drag
@@ -724,9 +724,9 @@ public class BasicSplitPaneDivider extends Container
isDragging = true;
currentDividerLocation = 1;
if (orientation == JSplitPane.HORIZONTAL_SPLIT)
- dragger = new DragController(e);
+ dragger = new DragController(e);
else
- dragger = new VerticalDragController(e);
+ dragger = new VerticalDragController(e);
prepareForDragging();
}
@@ -836,7 +836,7 @@ public class BasicSplitPaneDivider extends Container
protected void continueDrag(int newX, int newY)
{
if (isValid())
- dragDividerTo(adjust(newX, newY));
+ dragDividerTo(adjust(newX, newY));
}
/**
@@ -848,7 +848,7 @@ public class BasicSplitPaneDivider extends Container
protected void continueDrag(MouseEvent e)
{
if (isValid())
- dragDividerTo(positionForMouseEvent(e));
+ dragDividerTo(positionForMouseEvent(e));
}
/**
@@ -1000,7 +1000,7 @@ public class BasicSplitPaneDivider extends Container
x = insets.left;
y = 0;
}
-
+
leftButton.setBounds(x, y + ONE_TOUCH_OFFSET, size,
size * 2);
rightButton.setBounds(x, y + ONE_TOUCH_OFFSET
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicSplitPaneUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicSplitPaneUI.java
index b7cc425..ca96075 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicSplitPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicSplitPaneUI.java
@@ -89,7 +89,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
// 3 components at a time.
// LEFT/TOP = 0
// RIGHT/BOTTOM = 1
- // DIVIDER = 2
+ // DIVIDER = 2
/**
* This array contains the components in the JSplitPane. The left/top
@@ -338,7 +338,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
// Layout divider.
loc += sizes[0];
setComponentToSize(components[2], sizes[2], loc, insets, dims);
- // Layout component#2.
+ // Layout component#2.
loc += sizes[2];
setComponentToSize(components[1], sizes[1], loc, insets, dims);
}
@@ -483,7 +483,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
*/
protected void setComponentToSize(Component c, int size, int location,
Insets insets, Dimension containerSize)
- {
+ {
if (insets != null)
{
if (axis == SwingConstants.HORIZONTAL)
@@ -752,7 +752,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
tmpSizes[0] += newSpace / 2;
tmpSizes[1] += newSpace / 2;
-
+
layoutManager.setSizes(tmpSizes);
}
else if (e.getPropertyName().equals(JSplitPane.ORIENTATION_PROPERTY))
@@ -986,12 +986,12 @@ public class BasicSplitPaneUI extends SplitPaneUI
/**
* Returns the input map for the specified condition.
- *
+ *
* @param condition the condition.
- *
+ *
* @return The input map.
*/
- InputMap getInputMap(int condition)
+ InputMap getInputMap(int condition)
{
if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
return (InputMap) UIManager.get("SplitPane.ancestorInputMap");
@@ -1000,12 +1000,12 @@ public class BasicSplitPaneUI extends SplitPaneUI
/**
* Returns the action map for the {@link JSplitPane}. All sliders share
- * a single action map which is created the first time this method is
+ * a single action map which is created the first time this method is
* called, then stored in the UIDefaults table for subsequent access.
- *
+ *
* @return The shared action map.
*/
- ActionMap getActionMap()
+ ActionMap getActionMap()
{
ActionMap map = (ActionMap) UIManager.get("SplitPane.actionMap");
@@ -1020,18 +1020,18 @@ public class BasicSplitPaneUI extends SplitPaneUI
/**
* Creates the action map shared by all {@link JSlider} instances.
- * This method is called once by {@link #getActionMap()} when it
- * finds no action map in the UIDefaults table...after the map is
- * created, it gets added to the defaults table so that subsequent
- * calls to {@link #getActionMap()} will return the same shared
+ * This method is called once by {@link #getActionMap()} when it
+ * finds no action map in the UIDefaults table...after the map is
+ * created, it gets added to the defaults table so that subsequent
+ * calls to {@link #getActionMap()} will return the same shared
* instance.
- *
+ *
* @return The action map.
*/
ActionMap createActionMap()
{
ActionMap map = new ActionMapUIResource();
- map.put("toggleFocus",
+ map.put("toggleFocus",
new AbstractAction("toggleFocus") {
public void actionPerformed(ActionEvent event)
{
@@ -1039,7 +1039,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
}
}
);
- map.put("startResize",
+ map.put("startResize",
new AbstractAction("startResize") {
public void actionPerformed(ActionEvent event)
{
@@ -1047,7 +1047,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
}
}
);
- map.put("selectMax",
+ map.put("selectMax",
new AbstractAction("selectMax") {
public void actionPerformed(ActionEvent event)
{
@@ -1055,7 +1055,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
}
}
);
- map.put("selectMin",
+ map.put("selectMin",
new AbstractAction("selectMin") {
public void actionPerformed(ActionEvent event)
{
@@ -1063,7 +1063,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
}
}
);
- map.put("negativeIncrement",
+ map.put("negativeIncrement",
new AbstractAction("negativeIncrement") {
public void actionPerformed(ActionEvent event)
{
@@ -1074,7 +1074,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
}
}
);
- map.put("positiveIncrement",
+ map.put("positiveIncrement",
new AbstractAction("positiveIncrement") {
public void actionPerformed(ActionEvent event)
{
@@ -1092,7 +1092,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
// FIXME: implement this
}
}
- );
+ );
map.put("focusOutForward",
new AbstractAction("focusOutForward") {
public void actionPerformed(ActionEvent event)
@@ -1100,7 +1100,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
// FIXME: implement this
}
}
- );
+ );
return map;
}
@@ -1112,7 +1112,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
{
InputMap keyMap = getInputMap(
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
- SwingUtilities.replaceUIInputMap(splitPane,
+ SwingUtilities.replaceUIInputMap(splitPane,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, keyMap);
ActionMap map = getActionMap();
SwingUtilities.replaceUIActionMap(splitPane, map);
@@ -1124,7 +1124,7 @@ public class BasicSplitPaneUI extends SplitPaneUI
protected void uninstallKeyboardActions()
{
SwingUtilities.replaceUIActionMap(splitPane, null);
- SwingUtilities.replaceUIInputMap(splitPane,
+ SwingUtilities.replaceUIInputMap(splitPane,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null);
}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java
index fe36021..c42f9ca 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java
@@ -82,7 +82,7 @@ import javax.swing.text.View;
/**
* This is the Basic Look and Feel's UI delegate for JTabbedPane.
- *
+ *
* @author Lillian Angel (langel@redhat.com)
* @author Kim Ho (kho@redhat.com)
* @author Roman Kennke (kennke@aicas.com)
@@ -90,11 +90,11 @@ import javax.swing.text.View;
*/
public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
-
+
static class NavigateAction extends AbstractAction
{
int direction;
-
+
NavigateAction(String name, int dir)
{
super(name);
@@ -108,9 +108,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
ui.navigateSelectedTab(direction);
}
-
+
}
-
+
static class NavigatePageDownAction extends AbstractAction
{
@@ -123,17 +123,17 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
JTabbedPane tp = (JTabbedPane) event.getSource();
BasicTabbedPaneUI ui = (BasicTabbedPaneUI) tp.getUI();
-
+
int i = tp.getSelectedIndex();
-
+
if (i < 0)
i = 0;
-
+
ui.selectNextTabInRun(i);
}
-
+
}
-
+
static class NavigatePageUpAction extends AbstractAction
{
@@ -146,17 +146,17 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
JTabbedPane tp = (JTabbedPane) event.getSource();
BasicTabbedPaneUI ui = (BasicTabbedPaneUI) tp.getUI();
-
+
int i = tp.getSelectedIndex();
-
+
if (i < 0)
i = 0;
-
+
ui.selectPreviousTabInRun(i);
- }
+ }
}
-
+
static class RequestFocusAction extends AbstractAction
{
@@ -169,7 +169,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
((JTabbedPane) event.getSource()).requestFocus();
}
-
+
}
static class RequestFocusForVisibleComponentAction extends AbstractAction
@@ -183,18 +183,18 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
public void actionPerformed(ActionEvent event)
{
JTabbedPane tp = (JTabbedPane) event.getSource();
-
+
// FIXME: This should select a suitable component within
// the tab content. However I dont know whether we have
// to search for this component or wether the called is
// supposed to do that.
tp.getSelectedComponent().requestFocus();
}
-
+
}
/**
- * A helper class that handles focus.
+ * A helper class that handles focus.
*
The purpose of this class is to implement a more flexible focus
* handling for the tabbed pane, which is used to determine whether the
* focus indicator should be painted or not. When in scrolling layout
@@ -262,7 +262,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
e.setSource(s);
}
}
-
+
/**
* This method is called when the mouse is pressed. The index cannot
* change to a tab that is not enabled.
@@ -281,9 +281,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
redispatchEvent(e);
e.setSource(s);
}
-
+
int placement = tabPane.getTabPlacement();
-
+
if (s == incrButton)
{
if(!incrButton.isEnabled())
@@ -294,7 +294,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
switch (placement)
{
case JTabbedPane.TOP:
- case JTabbedPane.BOTTOM:
+ case JTabbedPane.BOTTOM:
currentScrollOffset = getTabAreaInsets(placement).left;
for (int i = 0; i < currentScrollLocation; i++)
currentScrollOffset += rects[i].width;
@@ -305,30 +305,30 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
currentScrollOffset += rects[i].height;
break;
}
-
+
updateViewPosition();
updateButtons();
-
+
tabPane.repaint();
}
else if (s == decrButton)
{
if(!decrButton.isEnabled())
return;
-
+
// The scroll location may be zero but the offset
// greater than zero because of an adjustement to
// make a partially visible tab completely visible.
if (currentScrollLocation > 0)
currentScrollLocation--;
-
+
// Set the offset back to 0 and recompute it.
currentScrollOffset = 0;
switch (placement)
{
case JTabbedPane.TOP:
- case JTabbedPane.BOTTOM:
+ case JTabbedPane.BOTTOM:
// Take the tab area inset into account.
if (currentScrollLocation > 0)
currentScrollOffset = getTabAreaInsets(placement).left;
@@ -340,14 +340,14 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
// Take the tab area inset into account.
if (currentScrollLocation > 0)
currentScrollOffset = getTabAreaInsets(placement).top;
-
+
for (int i = 0; i < currentScrollLocation; i++)
currentScrollOffset += rects[i].height;
- }
-
+ }
+
updateViewPosition();
updateButtons();
-
+
tabPane.repaint();
}
else if (tabPane.isEnabled())
@@ -355,12 +355,12 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
int index = tabForCoordinate(tabPane, e.getX(), e.getY());
if (!tabPane.isEnabledAt(index))
return;
-
+
if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT
&& s == panel)
{
scrollTab(index, placement);
-
+
tabPane.setSelectedIndex(index);
tabPane.repaint();
}
@@ -370,9 +370,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
tabPane.revalidate();
tabPane.repaint();
}
-
+
}
-
+
}
/**
@@ -393,7 +393,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
redispatchEvent(e);
e.setSource(s);
}
-
+
int tabIndex = tabForCoordinate(tabPane, e.getX(), e.getY());
setRolloverTab(tabIndex);
}
@@ -416,7 +416,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
redispatchEvent(e);
e.setSource(s);
}
-
+
setRolloverTab(-1);
}
@@ -434,17 +434,17 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
ev.setSource(tabPane);
tabPane.dispatchEvent(ev);
-
+
ev.setSource(s);
}
int tabIndex = tabForCoordinate(tabPane, ev.getX(), ev.getY());
setRolloverTab(tabIndex);
}
-
- /** Modifies the mouse event to originate from
+
+ /** Modifies the mouse event to originate from
* the tabbed pane and redispatches it.
- *
+ *
* @param me
*/
void redispatchEvent(MouseEvent me)
@@ -455,10 +455,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
viewPos.y -= viewport.getY();
me.translatePoint(-viewPos.x, -viewPos.y);
tabPane.dispatchEvent(me);
-
+
me.translatePoint(viewPos.x, viewPos.y);
}
-
+
}
/**
@@ -483,18 +483,18 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
if (e.getPropertyName().equals("tabLayoutPolicy"))
{
currentScrollLocation = currentScrollOffset = 0;
-
+
layoutManager = createLayoutManager();
-
+
tabPane.setLayout(layoutManager);
}
else if (e.getPropertyName().equals("tabPlacement")
- && tabPane.getTabLayoutPolicy()
+ && tabPane.getTabLayoutPolicy()
== JTabbedPane.SCROLL_TAB_LAYOUT)
{
incrButton = createIncreaseButton();
decrButton = createDecreaseButton();
-
+
// If the tab placement value was changed of a tabbed pane
// in SCROLL_TAB_LAYOUT mode we investigate the change to
// implement the following behavior which was observed in
@@ -502,7 +502,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
// The scrolling offset will be reset if we change to
// a direction which is orthogonal to the current
// direction and stays the same if it is parallel.
-
+
int oldPlacement = ((Integer) e.getOldValue()).intValue();
int newPlacement = ((Integer) e.getNewValue()).intValue();
switch (newPlacement)
@@ -512,22 +512,22 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
if (oldPlacement == JTabbedPane.TOP
|| oldPlacement == JTabbedPane.BOTTOM)
break out;
-
+
currentScrollOffset = getTabAreaInsets(newPlacement).left;
break;
default:
if (oldPlacement == JTabbedPane.LEFT
|| oldPlacement == JTabbedPane.RIGHT)
break out;
-
+
currentScrollOffset = getTabAreaInsets(newPlacement).top;
}
-
+
updateViewPosition();
updateButtons();
}
}
-
+
tabPane.revalidate();
tabPane.repaint();
}
@@ -592,7 +592,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
c = tabPane.getComponentAt(i);
if (c == null)
continue;
- dims = minimum ? c.getMinimumSize() : c.getPreferredSize();
+ dims = minimum ? c.getMinimumSize() : c.getPreferredSize();
if (dims != null)
{
height = Math.max(height, dims.height);
@@ -605,7 +605,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
|| tabPlacement == SwingConstants.BOTTOM)
{
width = Math.max(calculateMaxTabWidth(tabPlacement), width);
-
+
height += preferredTabAreaHeight(tabPlacement,
width - tabAreaInsets.left
- tabAreaInsets.right);
@@ -613,7 +613,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
else
{
height = Math.max(calculateMaxTabHeight(tabPlacement), height);
-
+
width += preferredTabAreaWidth(tabPlacement,
height - tabAreaInsets.top
- tabAreaInsets.bottom);
@@ -648,7 +648,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
Insets insets = tabPane.getInsets();
Insets tabAreaInsets = getTabAreaInsets(tabPlacement);
Dimension size = tabPane.getSize();
-
+
// The coordinates of the upper left corner of the tab area.
int x;
int y;
@@ -787,11 +787,11 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
rotateTabRuns(tabPlacement, selectedRun);
}
}
-
+
// Suppress padding if we have only one tab run.
if (runCount == 1)
return;
-
+
// Pad the runs.
int tabRunOverlay = getTabRunOverlay(tabPlacement);
for (int i = runCount - 1; i >= 0; --i)
@@ -838,7 +838,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
x -= maxTabWidth - tabRunOverlay;
else
x += maxTabWidth - tabRunOverlay;
-
+
}
}
padSelectedTab(tabPlacement, selectedIndex);
@@ -859,13 +859,13 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
Insets insets = tabPane.getInsets();
int selectedIndex = tabPane.getSelectedIndex();
-
+
Component selectedComponent = null;
if (selectedIndex >= 0)
selectedComponent = tabPane.getComponentAt(selectedIndex);
// The RI doesn't seem to change the component if the new selected
// component == null. This is probably so that applications can add
- // one single component for every tab.
+ // one single component for every tab.
if (selectedComponent != null)
{
setVisibleComponent(selectedComponent);
@@ -892,7 +892,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
compX = insets.left + contentBorderInsets.left;
compY = insets.top + contentBorderInsets.top;
break;
- case BOTTOM:
+ case BOTTOM:
tabAreaHeight = calculateTabAreaHeight(tabPlacement, runCount,
maxTabHeight);
compX = insets.left + contentBorderInsets.left;
@@ -902,7 +902,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
default:
tabAreaHeight = calculateTabAreaHeight(tabPlacement, runCount,
maxTabHeight);
-
+
compX = insets.left + contentBorderInsets.left;
compY = tabAreaHeight + insets.top + contentBorderInsets.top;
}
@@ -938,9 +938,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
// If there is more free space in an adjacent run AND the tab
// in the run can fit in the adjacent run, move it. This method
// is not perfect, it is merely an approximation.
- // If you play around with Sun's JTabbedPane, you'll see that
- // it does do some pretty strange things with regards to not moving tabs
- // that should be moved.
+ // If you play around with Sun's JTabbedPane, you'll see that
+ // it does do some pretty strange things with regards to not moving tabs
+ // that should be moved.
// start = the x position where the tabs will begin
// max = the maximum position of where the tabs can go to
// (tabAreaInsets.left + the width of the tab area)
@@ -1046,7 +1046,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
int runWidth = rects[end].x + rects[end].width;
int spaceRemaining = max - runWidth;
int numTabs = end - start + 1;
-
+
// now divvy up the space.
int spaceAllocated = spaceRemaining / numTabs;
int currX = rects[start].x;
@@ -1054,13 +1054,13 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
rects[i].x = currX;
rects[i].width += spaceAllocated;
-
+
currX += rects[i].width;
- // This is used because since the spaceAllocated
+ // This is used because since the spaceAllocated
// variable is an int, it rounds down. Sometimes,
// we don't fill an entire row, so we make it do
// so now.
-
+
if (i == end && rects[i].x + rects[i].width != max)
rects[i].width = max - rects[i].x;
}
@@ -1332,11 +1332,11 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
for (int i = 0; i < tabCount; i++)
{
width = calculateTabWidth(tabPlacement, i, fm);
-
+
// The proper instances should exists because
// assureRectsCreated() was being run already.
rects[i].setBounds(runWidth, top, width, maxHeight);
-
+
runWidth += width;
}
tabAreaRect.width = tabPane.getWidth() - insets.left - insets.right;
@@ -1396,7 +1396,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
tabAreaRect.x = contentRect.x + contentRect.width;
}
}
-
+
// Unlike the behavior in the WRAP_TAB_LAYOUT the selected
// tab is not padded specially.
}
@@ -1415,7 +1415,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
if (tabCount == 0)
return;
int tabPlacement = tabPane.getTabPlacement();
-
+
if (tabPlacement == SwingConstants.TOP
|| tabPlacement == SwingConstants.BOTTOM)
{
@@ -1452,11 +1452,11 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
- incrDims.height,
incrDims.width, incrDims.height);
}
-
+
tabAreaRect.width -= decrDims.width + incrDims.width;
-
+
updateButtons();
-
+
incrButton.setVisible(true);
decrButton.setVisible(true);
}
@@ -1464,7 +1464,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
incrButton.setVisible(false);
decrButton.setVisible(false);
-
+
currentScrollOffset = 0;
currentScrollLocation = 0;
}
@@ -1524,9 +1524,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
}
viewport.setBounds(tabAreaRect.x, tabAreaRect.y, tabAreaRect.width,
tabAreaRect.height);
-
+
updateViewPosition();
-
+
viewport.repaint();
}
}
@@ -1550,7 +1550,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
selectedRun = getRunForTab(tabPane.getTabCount(),
tabPane.getSelectedIndex());
-
+
if (tabPane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT)
tabPane.revalidate();
tabPane.repaint();
@@ -1587,7 +1587,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
else
g.fillRect(0, currentScrollOffset,
tabAreaRect.width, tabAreaRect.height);
-
+
paintTabArea(g, placement, tabPane.getSelectedIndex());
}
}
@@ -1649,7 +1649,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
/** The starting visible tab in the run in SCROLL_TAB_MODE.
* This is package-private to avoid an accessor method. */
transient int currentScrollLocation;
-
+
transient int currentScrollOffset;
/** A reusable rectangle. */
@@ -1789,13 +1789,13 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
* The currently visible component.
*/
private Component visibleComponent;
-
+
private Color selectedColor;
-
+
private Rectangle tempTextRect = new Rectangle();
-
+
private Rectangle tempIconRect = new Rectangle();
-
+
/**
* Creates a new BasicTabbedPaneUI object.
*/
@@ -1884,10 +1884,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
Point p = new Point(w, h);
return p;
}
-
+
/** TabbedPanes in scrolling mode should use this method to
* scroll properly to the tab given by the index argument.
- *
+ *
* @param index The tab to scroll to.
* @param placement The tab's placement.
*/
@@ -1902,7 +1902,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
switch (placement)
{
case JTabbedPane.TOP:
- case JTabbedPane.BOTTOM:
+ case JTabbedPane.BOTTOM:
if ((diff = rects[index].x
+ rects[index].width
- decrButton.getX() - currentScrollOffset) > 0)
@@ -1930,17 +1930,17 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
else
currentScrollOffset += diff;
}
-
+
currentScrollLocation = tabForCoordinate(tabPane,
rects[index].x,
currentScrollOffset);
}
-
+
updateViewPosition();
updateButtons();
}
}
-
+
/** Sets the enabled state of the increase and decrease button
* according to the current scrolling offset and tab pane width
* (or height in TOP/BOTTOM placement).
@@ -1948,7 +1948,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
final void updateButtons()
{
int tc = tabPane.getTabCount();
-
+
// The increase button should be enabled as long as the
// right/bottom border of the last tab is under the left/top
// border of the decrease button.
@@ -1978,7 +1978,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
final void updateViewPosition()
{
Point p = viewport.getViewPosition();
-
+
// The unneeded coordinate must be set to zero
// in order to correctly handle placement changes.
switch (tabPane.getTabPlacement())
@@ -1992,10 +1992,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
p.x = currentScrollOffset;
p.y = 0;
}
-
+
viewport.setViewPosition(p);
}
-
+
/**
* This method creates a new BasicTabbedPaneUI.
*
@@ -2019,12 +2019,12 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
if (c instanceof JTabbedPane)
{
tabPane = (JTabbedPane) c;
-
+
installComponents();
installDefaults();
installListeners();
installKeyboardActions();
-
+
layoutManager = createLayoutManager();
tabPane.setLayout(layoutManager);
}
@@ -2063,7 +2063,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
runCount = 1;
tabRuns[0] = 0;
-
+
incrButton = createIncreaseButton();
incrButton.addMouseListener(mouseListener);
@@ -2075,16 +2075,16 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
panel.setSize(Integer.MAX_VALUE, Integer.MAX_VALUE);
panel.addMouseListener(mouseListener);
panel.addFocusListener(focusListener);
-
+
viewport = new ScrollingViewport();
viewport.setBackground(Color.LIGHT_GRAY);
viewport.setView(panel);
viewport.setLayout(null);
-
+
tabPane.add(incrButton);
tabPane.add(decrButton);
tabPane.add(viewport);
-
+
return new TabbedPaneScrollLayout();
}
}
@@ -2104,7 +2104,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
if (incrButton != null)
tabPane.remove(incrButton);
-
+
if (decrButton != null)
tabPane.remove(decrButton);
@@ -2140,7 +2140,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
contentBorderInsets
= UIManager.getInsets("TabbedPane.contentBorderInsets");
tabsOpaque = UIManager.getBoolean("TabbedPane.tabsOpaque");
-
+
// Although 'TabbedPane.contentAreaColor' is not defined in the defaults
// of BasicLookAndFeel it is used by this class.
selectedColor = UIManager.getColor("TabbedPane.contentAreaColor");
@@ -2162,7 +2162,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
tabAreaRect = null;
contentRect = null;
tabRuns = null;
-
+
tempIconRect = null;
tempTextRect = null;
@@ -2176,7 +2176,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
shadow = null;
lightHighlight = null;
highlight = null;
-
+
selectedColor = null;
}
@@ -2205,13 +2205,13 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
tabPane.removePropertyChangeListener(propertyChangeListener);
tabPane.removeChangeListener(tabChangeListener);
tabPane.removeMouseListener(mouseListener);
-
+
if (incrButton != null)
incrButton.removeMouseListener(mouseListener);
-
+
if (decrButton != null)
decrButton.removeMouseListener(mouseListener);
-
+
if (panel != null)
{
panel.removeMouseListener(mouseListener);
@@ -2277,7 +2277,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
.replaceUIInputMap(tabPane,
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
keyMap);
-
+
ActionMap map = getActionMap();
SwingUtilities.replaceUIActionMap(tabPane, map);
}
@@ -2332,11 +2332,11 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
if (tabPane.getTabCount() == 0)
return;
-
+
int index = tabPane.getSelectedIndex();
if (index < 0)
index = 0;
-
+
int tabPlacement = tabPane.getTabPlacement();
// Paint the tab area only in WRAP_TAB_LAYOUT Mode from this method
@@ -2349,7 +2349,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
tabAreaRect.width, tabAreaRect.height);
paintTabArea(g, tabPlacement, index);
}
-
+
paintContentBorder(g, tabPlacement, index);
}
@@ -2363,9 +2363,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
*/
protected void paintTabArea(Graphics g, int tabPlacement, int selectedIndex)
{
- // Please note: the ordering of the painting is important.
+ // Please note: the ordering of the painting is important.
// we WANT to paint the outermost run first and then work our way in.
-
+
// The following drawing code works for both tab layouts.
int tabCount = tabPane.getTabCount();
@@ -2387,7 +2387,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
}
}
}
-
+
// Paint selected tab in front of every other tab.
if (selectedIndex >= 0)
paintTab(g, tabPlacement, rects, selectedIndex,
@@ -2430,10 +2430,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
// Paint the text.
paintText(g, tabPlacement, tabPane.getFont(), fm, tabIndex, title,
textRect, isSelected);
-
+
// Paint icon if necessary.
paintIcon(g, tabPlacement, tabIndex, icon, iconRect, isSelected);
-
+
// Paint focus indicator.
paintFocusIndicator(g, tabPlacement, rects, tabIndex, iconRect, textRect,
isSelected);
@@ -2675,7 +2675,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
w = rect.width - 6;
h = rect.height - 5;
}
-
+
BasicGraphicsUtils.drawDashedRect(g, x, y, w, h);
}
}
@@ -2707,44 +2707,44 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(darkShadow);
// Outer right line.
g.drawLine(x + w - 1, y + 2, x + w - 1, y + h);
-
+
// Upper right corner.
g.drawLine(x + w - 2, y + 1, x + w - 1, y + 2);
-
+
g.setColor(lightHighlight);
-
+
// Left line.
g.drawLine(x, y + 3, x, y + h);
-
+
// Upper line.
g.drawLine(x + 3, y, x + w - 3, y);
-
+
// Upper left corner.
g.drawLine(x, y + 2, x + 2, y);
-
+
break;
case SwingConstants.LEFT:
g.setColor(lightHighlight);
// Top line.
g.drawLine(x + 3, y, x + w - 1, y);
-
+
// Top left border.
g.drawLine(x + 2, y, x, y + 2);
-
+
// Left line.
g.drawLine(x, y + 3, x, y + h - 4);
-
+
// Bottom left corner.
g.drawLine(x, y + h - 3, x + 1, y + h - 2);
-
+
g.setColor(darkShadow);
// Outer bottom line.
g.drawLine(x + 2, y + h - 1, x + w - 1, y + h - 1);
-
+
g.setColor(shadow);
// Inner bottom line.
g.drawLine(x + 2, y + h - 2, x + w - 1, y + h - 2);
-
+
break;
case SwingConstants.BOTTOM:
g.setColor(shadow);
@@ -2757,17 +2757,17 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(darkShadow);
// Outer right line.
g.drawLine(x + w - 1, y, x + w - 1, y + h - 3);
-
+
// Bottom right corner.
g.drawLine(x + w - 1, y + h - 2, x + w - 3, y + h);
-
+
// Bottom line.
g.drawLine(x + 2, y + h, x + w - 4, y + h);
-
+
g.setColor(lightHighlight);
// Left line.
g.drawLine(x, y, x, y + h - 3);
-
+
// Bottom left corner.
g.drawLine(x, y + h - 2, x + 1, y + h - 1);
break;
@@ -2775,31 +2775,31 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(lightHighlight);
// Top line.
g.drawLine(x, y, x + w - 3, y);
-
+
g.setColor(darkShadow);
// Top right corner.
g.drawLine(x + w - 2, y + 1, x + w - 1, y + 2);
-
+
// Outer right line.
g.drawLine(x + w - 1, y + 3, x + w - 1, y + h - 3);
-
+
// Bottom right corner.
g.drawLine(x + w - 2, y + h - 2, x + w - 3, y + h - 1);
-
+
// Bottom line.
g.drawLine(x, y + h - 1, x + w - 4, y + h - 1);
-
+
g.setColor(shadow);
-
+
// Inner right line.
g.drawLine(x + w - 2, y + 2, x + w - 2, y + h - 3);
-
+
// Inner bottom line.
g.drawLine(x, y + h - 2, x + w - 3, y + h - 2);
-
+
break;
}
-
+
g.setColor(saved);
}
@@ -2820,7 +2820,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
boolean isSelected)
{
Color saved = g.getColor();
-
+
if (isSelected)
g.setColor(selectedColor);
else
@@ -2931,17 +2931,17 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
g.drawLine(x, y, startgap, y);
g.drawLine(endgap, y, x + w - 1, y);
-
+
g.setColor(selectedColor);
g.drawLine(startgap, y, endgap - 1, y);
}
else
g.drawLine(x, y, x + w, y);
-
+
g.setColor(selectedColor);
g.drawLine(x, y + 1, x + w - 1, y + 1);
g.drawLine(x, y + 2, x + w - 1, y + 2);
-
+
g.setColor(saved);
}
@@ -2971,13 +2971,13 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
g.drawLine(x, y, x, startgap);
g.drawLine(x, endgap, x, y + h - 1);
-
+
g.setColor(selectedColor);
g.drawLine(x, startgap, x, endgap - 1);
}
else
g.drawLine(x, y, x, y + h - 1);
-
+
g.setColor(selectedColor);
g.drawLine(x + 1, y + 1, x + 1, y + h - 4);
@@ -3014,7 +3014,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(darkShadow);
g.drawLine(x, y + h - 1, startgap , y + h - 1);
g.drawLine(endgap, y + h - 1, x + w - 1, y + h - 1);
-
+
g.setColor(selectedColor);
g.drawLine(startgap, y + h - 1, endgap - 1, y + h - 1);
g.drawLine(startgap, y + h - 2, endgap - 1, y + h - 2);
@@ -3026,7 +3026,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(darkShadow);
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
}
-
+
g.setColor(selectedColor);
g.drawLine(x + 1, y + h - 3, x + w - 2, y + h - 3);
@@ -3062,7 +3062,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(darkShadow);
g.drawLine(x + w - 1, y, x + w - 1, startgap);
g.drawLine(x + w - 1, endgap, x + w - 1, y + h - 2);
-
+
g.setColor(selectedColor);
g.drawLine(x + w - 2, startgap, x + w - 2, endgap - 1);
g.drawLine(x + w - 1, startgap, x + w - 1, endgap - 1);
@@ -3074,7 +3074,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
g.setColor(darkShadow);
g.drawLine(x + w - 1, y, x + w - 1, y + h - 2);
}
-
+
g.setColor(selectedColor);
g.drawLine(x + w - 3, y + 1, x + w - 3, y + h - 4);
@@ -3085,10 +3085,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
*
This method returns the bounds of a tab for the given index
* and shifts it by the current scrolling offset if the tabbed
* pane is in scrolling tab layout mode.
- *
+ *
*
Subclassses should retrievs a tab's bounds by this method
* if they want to find out whether the tab is currently visible.
- *
+ *
* @param pane The JTabbedPane.
* @param i The index to look for.
*
@@ -3099,13 +3099,13 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
// Need to re-layout container if tab does not exist.
if (i >= rects.length)
layoutManager.layoutContainer(pane);
-
+
// Properly shift coordinates if scrolling has taken
// place.
if (pane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT)
{
Rectangle r = new Rectangle(rects[i]);
-
+
switch(pane.getTabPlacement())
{
case SwingConstants.TOP:
@@ -3115,10 +3115,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
default:
r.y -= currentScrollOffset;
}
-
+
return r;
}
-
+
return rects[i];
}
@@ -3148,9 +3148,9 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
// Note: This code is tab layout mode agnostic.
if (! tabPane.isValid())
tabPane.validate();
-
+
int tabCount = tabPane.getTabCount();
-
+
// If the user clicked outside of any tab rect the
// selection should not change.
int index = tabPane.getSelectedIndex();
@@ -3168,7 +3168,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
/**
*
This method returns the tab bounds in the given rectangle.
- *
+ *
*
The returned rectangle will be shifted by the current scroll
* offset if the tabbed pane is in scrolling tab layout mode.
.
*
@@ -3652,7 +3652,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
current = getNextTabIndexInRun(tabPane.getTabCount(),
current);
-
+
if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT)
scrollTab(current, tabPane.getTabPlacement());
@@ -3668,7 +3668,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
{
current = getPreviousTabIndexInRun(tabPane.getTabCount(),
current);
-
+
if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT)
scrollTab(current, tabPane.getTabPlacement());
@@ -3698,7 +3698,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
protected void selectPreviousTab(int current)
{
current = getPreviousTabIndex(current);
-
+
if (tabPane.getTabLayoutPolicy() == JTabbedPane.SCROLL_TAB_LAYOUT)
scrollTab(current, tabPane.getTabPlacement());
@@ -3825,10 +3825,10 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
int index = getNextTabIndex(base);
int run = getRunForTab(tabCount, base);
if (base == lastTabInRun(tabCount, run))
- index = (run > 0)
+ index = (run > 0)
? lastTabInRun(tabCount, getPreviousTabRun(run)) + 1
: 0;
-
+
return index;
}
@@ -3847,7 +3847,7 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
int run = getRunForTab(tabCount, base);
if (index == lastTabInRun(tabCount, getPreviousTabRun(run)))
index = lastTabInRun(tabCount, run);
-
+
return index;
}
@@ -3933,8 +3933,8 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
break;
}
}
-
- ActionMap getActionMap()
+
+ ActionMap getActionMap()
{
ActionMap map = (ActionMap) UIManager.get("TabbedPane.actionMap");
@@ -3950,25 +3950,25 @@ public class BasicTabbedPaneUI extends TabbedPaneUI implements SwingConstants
ActionMap createActionMap()
{
ActionMap map = new ActionMapUIResource();
-
+
map.put("navigatePageDown", new NavigatePageDownAction());
map.put("navigatePageUp", new NavigatePageUpAction());
map.put("navigateDown",
new NavigateAction("navigateDown", SwingConstants.SOUTH));
-
+
map.put("navigateUp",
new NavigateAction("navigateUp", SwingConstants.NORTH));
-
+
map.put("navigateLeft",
new NavigateAction("navigateLeft", SwingConstants.WEST));
-
+
map.put("navigateRight",
new NavigateAction("navigateRight", SwingConstants.EAST));
-
+
map.put("requestFocusForVisibleComponent",
new RequestFocusForVisibleComponentAction());
map.put("requestFocus", new RequestFocusAction());
-
+
return map;
}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicTableHeaderUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicTableHeaderUI.java
index 8a8eeb8..7ff234e 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicTableHeaderUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicTableHeaderUI.java
@@ -71,28 +71,28 @@ public class BasicTableHeaderUI extends TableHeaderUI
* where mouse cursor changes shape into "resize"
*/
static int COLUMN_BOUNDARY_TOLERANCE = 3;
-
+
public static ComponentUI createUI(JComponent h)
{
return new BasicTableHeaderUI();
}
-
+
/**
* The table header that is using this interface.
*/
protected JTableHeader header;
-
+
/**
* The mouse input listener, responsible for mouse manipulations with
* the table header.
*/
protected MouseInputListener mouseInputListener;
-
+
/**
* Paint the header cell.
*/
protected CellRendererPane rendererPane;
-
+
/**
* The header cell border.
*/
@@ -102,12 +102,12 @@ public class BasicTableHeaderUI extends TableHeaderUI
* Original mouse cursor prior to resizing.
*/
private Cursor originalCursor;
-
+
/**
* If not null, one of the columns is currently being dragged.
*/
Rectangle draggingHeaderRect;
-
+
/**
* Handles column movement and rearrangement by mouse. The same instance works
* both as mouse listener and the mouse motion listner.
@@ -117,7 +117,7 @@ public class BasicTableHeaderUI extends TableHeaderUI
{
/**
* If true, the cursor is being already shown in the alternative "resize"
- * shape.
+ * shape.
*/
boolean showingResizeCursor;
@@ -127,11 +127,11 @@ public class BasicTableHeaderUI extends TableHeaderUI
* column dragging).
*/
int draggingFrom = - 1;
-
+
/**
* The number of the column being dragged.
*/
- int draggingColumnNumber;
+ int draggingColumnNumber;
/**
* The previous preferred width of the column.
@@ -245,7 +245,7 @@ public class BasicTableHeaderUI extends TableHeaderUI
if (onBoundary)
{
- originalCursor = header.getCursor();
+ originalCursor = header.getCursor();
if (p < x)
header.setCursor(Cursor.getPredefinedCursor(
Cursor.W_RESIZE_CURSOR));
@@ -351,7 +351,7 @@ public class BasicTableHeaderUI extends TableHeaderUI
/**
* Stop the dragging session.
- *
+ *
* @param e the "mouse release" mouse event, needed to determing the final
* location for the dragged column.
*/
@@ -365,11 +365,11 @@ public class BasicTableHeaderUI extends TableHeaderUI
// Find where have we dragged the column.
int x = e.getX();
int p = 0;
-
+
int col = model.getColumnCount() - 1;
int n = model.getColumnCount();
- // This loop does not find the column if the mouse if out of the
+ // This loop does not find the column if the mouse if out of the
// right boundary of the table header. Then we make this column the
// rightmost column.
Scan: for (int i = 0; i < n; i++)
@@ -385,17 +385,17 @@ public class BasicTableHeaderUI extends TableHeaderUI
header.getTable().moveColumn(draggingColumnNumber, col);
}
}
-
+
/**
* Create and return the mouse input listener.
- *
+ *
* @return the mouse listener ({@link MouseInputHandler}, if not overridden.
*/
protected MouseInputListener createMouseInputListener()
{
return new MouseInputHandler();
}
-
+
/**
* Construct a new BasicTableHeaderUI, create mouse listeners.
*/
@@ -448,7 +448,7 @@ public class BasicTableHeaderUI extends TableHeaderUI
{
// AFAICS, the RI does nothing here.
}
-
+
/**
* Remove the previously installed listeners.
*/
@@ -464,9 +464,9 @@ public class BasicTableHeaderUI extends TableHeaderUI
uninstallKeyboardActions();
uninstallDefaults();
}
-
+
/**
- * Repaint the table header.
+ * Repaint the table header.
*/
public void paint(Graphics gfx, JComponent c)
{
@@ -474,7 +474,7 @@ public class BasicTableHeaderUI extends TableHeaderUI
int ncols = cmod.getColumnCount();
if (ncols == 0)
return;
-
+
Rectangle clip = gfx.getClipBounds();
TableCellRenderer defaultRend = header.getDefaultRenderer();
@@ -505,38 +505,38 @@ public class BasicTableHeaderUI extends TableHeaderUI
bounds.width, bounds.height);
}
}
-
+
// This displays a running rectangle that is much simplier than the total
// animation, as it is seen in Sun's application.
// TODO animate the collumn dragging like in Sun's jre.
if (draggingHeaderRect != null)
{
- gfx.setColor(header.getForeground());
+ gfx.setColor(header.getForeground());
gfx.drawRect(draggingHeaderRect.x, draggingHeaderRect.y + 2,
draggingHeaderRect.width - 1, draggingHeaderRect.height - 6);
}
}
-
+
/**
* Get the preferred header size.
- *
+ *
* @param ignored unused
- *
+ *
* @return the preferred size of the associated header.
*/
public Dimension getPreferredSize(JComponent ignored)
{
TableColumnModel cmod = header.getColumnModel();
TableCellRenderer defaultRend = header.getDefaultRenderer();
- int ncols = cmod.getColumnCount();
+ int ncols = cmod.getColumnCount();
Dimension ret = new Dimension(0, 0);
int spacing = 0;
- if (header.getTable() != null
+ if (header.getTable() != null
&& header.getTable().getIntercellSpacing() != null)
spacing = header.getTable().getIntercellSpacing().width;
-
- for (int i = 0; i < ncols; ++i)
+
+ for (int i = 0; i < ncols; ++i)
{
TableColumn col = cmod.getColumn(i);
TableCellRenderer rend = col.getHeaderRenderer();
@@ -556,11 +556,11 @@ public class BasicTableHeaderUI extends TableHeaderUI
Dimension d = comp.getPreferredSize();
ret.width += spacing;
- ret.height = Math.max(d.height, ret.height);
+ ret.height = Math.max(d.height, ret.height);
}
ret.width = cmod.getTotalColumnWidth();
return ret;
}
-
-
+
+
}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicTableUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicTableUI.java
index a672173..f5a4bcb 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicTableUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicTableUI.java
@@ -82,15 +82,15 @@ import javax.swing.table.TableModel;
public class BasicTableUI extends TableUI
{
- public static ComponentUI createUI(JComponent comp)
+ public static ComponentUI createUI(JComponent comp)
{
return new BasicTableUI();
}
- protected FocusListener focusListener;
- protected KeyListener keyListener;
- protected MouseInputListener mouseInputListener;
- protected CellRendererPane rendererPane;
+ protected FocusListener focusListener;
+ protected KeyListener keyListener;
+ protected MouseInputListener mouseInputListener;
+ protected CellRendererPane rendererPane;
protected JTable table;
/** The normal cell border. */
@@ -108,7 +108,7 @@ public class BasicTableUI extends TableUI
* Handles key events for the JTable. Key events should be handled through
* the InputMap/ActionMap mechanism since JDK1.3. This class is only there
* for backwards compatibility.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*/
public class KeyHandler implements KeyListener
@@ -125,7 +125,7 @@ public class BasicTableUI extends TableUI
{
// Key events should be handled through the InputMap/ActionMap mechanism
// since JDK1.3. This class is only there for backwards compatibility.
-
+
// Editor activation is a specific kind of response to ''any''
// character key. Hence it is handled here.
if (!table.isEditing() && table.isEnabled())
@@ -208,13 +208,13 @@ public class BasicTableUI extends TableUI
ListSelectionModel rowModel = table.getSelectionModel();
if (lo_row != -1 && hi_row != -1)
{
- if (controlPressed && rowModel.getSelectionMode()
+ if (controlPressed && rowModel.getSelectionMode()
!= ListSelectionModel.SINGLE_SELECTION)
rowModel.addSelectionInterval(lo_row, hi_row);
else
rowModel.setSelectionInterval(lo_row, hi_row);
}
-
+
// Update the columns
int lo_col = table.columnAtPoint(begin);
int hi_col = table.columnAtPoint(curr);
@@ -222,14 +222,14 @@ public class BasicTableUI extends TableUI
getSelectionModel();
if (lo_col != -1 && hi_col != -1)
{
- if (controlPressed && colModel.getSelectionMode() !=
+ if (controlPressed && colModel.getSelectionMode() !=
ListSelectionModel.SINGLE_SELECTION)
colModel.addSelectionInterval(lo_col, hi_col);
else
colModel.setSelectionInterval(lo_col, hi_col);
}
}
-
+
/**
* For the double click, start the cell editor.
*/
@@ -254,7 +254,7 @@ public class BasicTableUI extends TableUI
}
}
- public void mouseDragged(MouseEvent e)
+ public void mouseDragged(MouseEvent e)
{
if (table.isEnabled())
{
@@ -278,7 +278,7 @@ public class BasicTableUI extends TableUI
// Nothing to do here.
}
- public void mousePressed(MouseEvent e)
+ public void mousePressed(MouseEvent e)
{
if (table.isEnabled())
{
@@ -292,12 +292,12 @@ public class BasicTableUI extends TableUI
//if control is pressed and the cell is already selected, deselect it
if (e.isControlDown() && table.isCellSelected(
table.rowAtPoint(begin), table.columnAtPoint(begin)))
- {
+ {
table.getSelectionModel().
- removeSelectionInterval(table.rowAtPoint(begin),
+ removeSelectionInterval(table.rowAtPoint(begin),
table.rowAtPoint(begin));
table.getColumnModel().getSelectionModel().
- removeSelectionInterval(table.columnAtPoint(begin),
+ removeSelectionInterval(table.columnAtPoint(begin),
table.columnAtPoint(begin));
}
else
@@ -314,7 +314,7 @@ public class BasicTableUI extends TableUI
}
}
- public void mouseReleased(MouseEvent e)
+ public void mouseReleased(MouseEvent e)
{
if (table.isEnabled())
{
@@ -374,12 +374,12 @@ public class BasicTableUI extends TableUI
}
}
- protected FocusListener createFocusListener()
+ protected FocusListener createFocusListener()
{
return new FocusHandler();
}
- protected MouseInputListener createMouseInputListener()
+ protected MouseInputListener createMouseInputListener()
{
return new MouseInputHandler();
}
@@ -396,16 +396,16 @@ public class BasicTableUI extends TableUI
}
/**
- * Return the maximum size of the table. The maximum height is the row
- * height times the number of rows. The maximum width is the sum of
+ * Return the maximum size of the table. The maximum height is the row
+ * height times the number of rows. The maximum width is the sum of
* the maximum widths of each column.
- *
+ *
* @param comp the component whose maximum size is being queried,
* this is ignored.
* @return a Dimension object representing the maximum size of the table,
* or null if the table has no elements.
*/
- public Dimension getMaximumSize(JComponent comp)
+ public Dimension getMaximumSize(JComponent comp)
{
int maxTotalColumnWidth = 0;
for (int i = 0; i < table.getColumnCount(); i++)
@@ -415,16 +415,16 @@ public class BasicTableUI extends TableUI
}
/**
- * Return the minimum size of the table. The minimum height is the row
- * height times the number of rows. The minimum width is the sum of
+ * Return the minimum size of the table. The minimum height is the row
+ * height times the number of rows. The minimum width is the sum of
* the minimum widths of each column.
- *
+ *
* @param comp the component whose minimum size is being queried,
* this is ignored.
* @return a Dimension object representing the minimum size of the table,
* or null if the table has no elements.
*/
- public Dimension getMinimumSize(JComponent comp)
+ public Dimension getMinimumSize(JComponent comp)
{
int minTotalColumnWidth = 0;
for (int i = 0; i < table.getColumnCount(); i++)
@@ -440,7 +440,7 @@ public class BasicTableUI extends TableUI
*
* @return the preferred size for the table of that UI
*/
- public Dimension getPreferredSize(JComponent comp)
+ public Dimension getPreferredSize(JComponent comp)
{
int prefTotalColumnWidth = 0;
TableColumnModel tcm = table.getColumnModel();
@@ -458,13 +458,13 @@ public class BasicTableUI extends TableUI
* Returns the table height. This helper method is used by
* {@link #getMinimumSize(JComponent)}, {@link #getPreferredSize(JComponent)}
* and {@link #getMaximumSize(JComponent)} to determine the table height.
- *
+ *
* @return the table height
*/
private int getHeight()
{
int height = 0;
- int rowCount = table.getRowCount();
+ int rowCount = table.getRowCount();
if (rowCount > 0 && table.getColumnCount() > 0)
{
Rectangle r = table.getCellRect(rowCount - 1, 0, true);
@@ -473,7 +473,7 @@ public class BasicTableUI extends TableUI
return height;
}
- protected void installDefaults()
+ protected void installDefaults()
{
LookAndFeel.installColorsAndFont(table, "Table.background",
"Table.foreground", "Table.font");
@@ -486,7 +486,7 @@ public class BasicTableUI extends TableUI
/**
* Installs keyboard actions on the table.
*/
- protected void installKeyboardActions()
+ protected void installKeyboardActions()
{
// Install the input map.
InputMap inputMap =
@@ -597,14 +597,14 @@ public class BasicTableUI extends TableUI
{
JTable table = (JTable) e.getSource();
- DefaultListSelectionModel rowModel
+ DefaultListSelectionModel rowModel
= (DefaultListSelectionModel) table.getSelectionModel();
- DefaultListSelectionModel colModel
+ DefaultListSelectionModel colModel
= (DefaultListSelectionModel) table.getColumnModel().getSelectionModel();
int rowLead = rowModel.getLeadSelectionIndex();
int rowMax = table.getModel().getRowCount() - 1;
-
+
int colLead = colModel.getLeadSelectionIndex();
int colMax = table.getModel().getColumnCount() - 1;
@@ -626,7 +626,7 @@ public class BasicTableUI extends TableUI
table.editCellAt(rowLead, colLead);
}
else if (command.equals("selectFirstRowExtendSelection"))
- {
+ {
rowModel.setLeadSelectionIndex(0);
}
else if (command.equals("selectFirstColumn"))
@@ -636,7 +636,7 @@ public class BasicTableUI extends TableUI
else if (command.equals("selectFirstColumnExtendSelection"))
{
colModel.setLeadSelectionIndex(0);
- }
+ }
else if (command.equals("selectLastRow"))
{
rowModel.setSelectionInterval(rowMax, rowMax);
@@ -670,11 +670,11 @@ public class BasicTableUI extends TableUI
{
int target;
if (rowLead == getFirstVisibleRowIndex(table))
- target = Math.max(0, rowLead - (getLastVisibleRowIndex(table)
+ target = Math.max(0, rowLead - (getLastVisibleRowIndex(table)
- getFirstVisibleRowIndex(table) + 1));
else
target = getFirstVisibleRowIndex(table);
-
+
rowModel.setLeadSelectionIndex(target);
colModel.setLeadSelectionIndex(colLead);
}
@@ -692,7 +692,7 @@ public class BasicTableUI extends TableUI
- getFirstVisibleColumnIndex(table) + 1));
else
target = getLastVisibleColumnIndex(table);
-
+
colModel.setSelectionInterval(target, target);
rowModel.setSelectionInterval(rowLead, rowLead);
}
@@ -705,11 +705,11 @@ public class BasicTableUI extends TableUI
{
int target;
if (colLead == getFirstVisibleColumnIndex(table))
- target = Math.max(0, colLead - (getLastVisibleColumnIndex(table)
+ target = Math.max(0, colLead - (getLastVisibleColumnIndex(table)
- getFirstVisibleColumnIndex(table) + 1));
else
target = getFirstVisibleColumnIndex(table);
-
+
colModel.setSelectionInterval(target, target);
rowModel.setSelectionInterval(rowLead, rowLead);
}
@@ -731,71 +731,71 @@ public class BasicTableUI extends TableUI
|| command.equals("selectPreviousColumnCell"))
{
// If nothing is selected, select the first cell in the table
- if (table.getSelectedRowCount() == 0 &&
+ if (table.getSelectedRowCount() == 0 &&
table.getSelectedColumnCount() == 0)
{
rowModel.setSelectionInterval(0, 0);
colModel.setSelectionInterval(0, 0);
return;
}
-
+
// If the lead selection index isn't selected (ie a remove operation
// happened, then set the lead to the first selected cell in the
// table
if (!table.isCellSelected(rowLead, colLead))
{
- rowModel.addSelectionInterval(rowModel.getMinSelectionIndex(),
+ rowModel.addSelectionInterval(rowModel.getMinSelectionIndex(),
rowModel.getMinSelectionIndex());
- colModel.addSelectionInterval(colModel.getMinSelectionIndex(),
+ colModel.addSelectionInterval(colModel.getMinSelectionIndex(),
colModel.getMinSelectionIndex());
return;
}
-
+
// multRowsSelected and multColsSelected tell us if multiple rows or
// columns are selected, respectively
boolean multRowsSelected, multColsSelected;
multRowsSelected = table.getSelectedRowCount() > 1 &&
table.getRowSelectionAllowed();
-
+
multColsSelected = table.getSelectedColumnCount() > 1 &&
table.getColumnSelectionAllowed();
-
+
// If there is just one selection, select the next cell, and wrap
// when you get to the edges of the table.
if (!multColsSelected && !multRowsSelected)
{
- if (command.indexOf("Column") != -1)
- advanceSingleSelection(colModel, colMax, rowModel, rowMax,
+ if (command.indexOf("Column") != -1)
+ advanceSingleSelection(colModel, colMax, rowModel, rowMax,
command.equals("selectPreviousColumnCell"));
else
- advanceSingleSelection(rowModel, rowMax, colModel, colMax,
+ advanceSingleSelection(rowModel, rowMax, colModel, colMax,
command.equals("selectPreviousRowCell"));
return;
}
-
-
+
+
// rowMinSelected and rowMaxSelected are the minimum and maximum
// values respectively of selected cells in the row selection model
// Similarly for colMinSelected and colMaxSelected.
- int rowMaxSelected = table.getRowSelectionAllowed() ?
+ int rowMaxSelected = table.getRowSelectionAllowed() ?
rowModel.getMaxSelectionIndex() : table.getModel().getRowCount() - 1;
- int rowMinSelected = table.getRowSelectionAllowed() ?
- rowModel.getMinSelectionIndex() : 0;
- int colMaxSelected = table.getColumnSelectionAllowed() ?
- colModel.getMaxSelectionIndex() :
+ int rowMinSelected = table.getRowSelectionAllowed() ?
+ rowModel.getMinSelectionIndex() : 0;
+ int colMaxSelected = table.getColumnSelectionAllowed() ?
+ colModel.getMaxSelectionIndex() :
table.getModel().getColumnCount() - 1;
- int colMinSelected = table.getColumnSelectionAllowed() ?
+ int colMinSelected = table.getColumnSelectionAllowed() ?
colModel.getMinSelectionIndex() : 0;
-
+
// If there are multiple rows and columns selected, select the next
- // cell and wrap at the edges of the selection.
- if (command.indexOf("Column") != -1)
+ // cell and wrap at the edges of the selection.
+ if (command.indexOf("Column") != -1)
advanceMultipleSelection(table, colModel, colMinSelected,
colMaxSelected, rowModel, rowMinSelected,
rowMaxSelected,
command.equals("selectPreviousColumnCell"),
true);
-
+
else
advanceMultipleSelection(table, rowModel, rowMinSelected,
rowMaxSelected, colModel, colMinSelected,
@@ -812,11 +812,11 @@ public class BasicTableUI extends TableUI
{
int target;
if (colLead == getFirstVisibleColumnIndex(table))
- target = Math.max(0, colLead - (getLastVisibleColumnIndex(table)
+ target = Math.max(0, colLead - (getLastVisibleColumnIndex(table)
- getFirstVisibleColumnIndex(table) + 1));
else
target = getFirstVisibleColumnIndex(table);
-
+
colModel.setLeadSelectionIndex(target);
rowModel.setLeadSelectionIndex(rowLead);
}
@@ -828,7 +828,7 @@ public class BasicTableUI extends TableUI
- getFirstVisibleRowIndex(table) + 1));
else
target = getLastVisibleRowIndex(table);
-
+
rowModel.setSelectionInterval(target, target);
colModel.setSelectionInterval(colLead, colLead);
}
@@ -836,11 +836,11 @@ public class BasicTableUI extends TableUI
{
int target;
if (colLead == getLastVisibleColumnIndex(table))
- target = Math.min(colMax, colLead + (getLastVisibleColumnIndex(table)
+ target = Math.min(colMax, colLead + (getLastVisibleColumnIndex(table)
- getFirstVisibleColumnIndex(table) + 1));
else
target = getLastVisibleColumnIndex(table);
-
+
colModel.setLeadSelectionIndex(target);
rowModel.setLeadSelectionIndex(rowLead);
}
@@ -857,29 +857,29 @@ public class BasicTableUI extends TableUI
{
int target;
if (rowLead == getLastVisibleRowIndex(table))
- target = Math.min(rowMax, rowLead + (getLastVisibleRowIndex(table)
+ target = Math.min(rowMax, rowLead + (getLastVisibleRowIndex(table)
- getFirstVisibleRowIndex(table) + 1));
else
target = getLastVisibleRowIndex(table);
-
+
rowModel.setLeadSelectionIndex(target);
colModel.setLeadSelectionIndex(colLead);
- }
+ }
else if (command.equals("scrollUpChangeSelection"))
{
int target;
if (rowLead == getFirstVisibleRowIndex(table))
- target = Math.max(0, rowLead - (getLastVisibleRowIndex(table)
+ target = Math.max(0, rowLead - (getLastVisibleRowIndex(table)
- getFirstVisibleRowIndex(table) + 1));
else
target = getFirstVisibleRowIndex(table);
-
+
rowModel.setSelectionInterval(target, target);
colModel.setSelectionInterval(colLead, colLead);
}
else if (command.equals("selectNextRowChangeLead"))
{
- if (rowModel.getSelectionMode()
+ if (rowModel.getSelectionMode()
!= ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
{
// just "selectNextRow"
@@ -892,7 +892,7 @@ public class BasicTableUI extends TableUI
}
else if (command.equals("selectPreviousRowChangeLead"))
{
- if (rowModel.getSelectionMode()
+ if (rowModel.getSelectionMode()
!= ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
{
// just selectPreviousRow
@@ -905,8 +905,8 @@ public class BasicTableUI extends TableUI
}
else if (command.equals("selectNextColumnChangeLead"))
{
- if (colModel.getSelectionMode()
- != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
+ if (colModel.getSelectionMode()
+ != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
{
// just selectNextColumn
rowModel.setSelectionInterval(rowLead, rowLead);
@@ -918,14 +918,14 @@ public class BasicTableUI extends TableUI
}
else if (command.equals("selectPreviousColumnChangeLead"))
{
- if (colModel.getSelectionMode()
- != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
+ if (colModel.getSelectionMode()
+ != ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
{
// just selectPreviousColumn
rowModel.setSelectionInterval(rowLead, rowLead);
colModel.setSelectionInterval(Math.max(colLead - 1, 0),
Math.max(colLead - 1, 0));
-
+
}
else
colModel.moveLeadSelectionIndex(Math.max(colLead - 1, 0));
@@ -955,12 +955,12 @@ public class BasicTableUI extends TableUI
rowModel.removeSelectionInterval(rowLead, rowLead);
else
rowModel.addSelectionInterval(rowLead, rowLead);
-
+
if (colModel.isSelectedIndex(colLead))
colModel.removeSelectionInterval(colLead, colLead);
else
colModel.addSelectionInterval(colLead, colLead);
-
+
rowModel.setAnchorSelectionIndex(rowLead);
colModel.setAnchorSelectionIndex(colLead);
}
@@ -968,31 +968,31 @@ public class BasicTableUI extends TableUI
{
table.editingStopped(new ChangeEvent(command));
}
- else
+ else
{
// If we're here that means we bound this TableAction class
// to a keyboard input but we either want to ignore that input
// or we just haven't implemented its action yet.
-
+
// Uncomment the following line to print the names of unused bindings
// when their keys are pressed
-
+
// System.out.println ("not implemented: "+e.getActionCommand());
}
// Any commands whose keyStrokes should be used by the Editor should not
- // cause editing to be stopped: ie, the SPACE sends "addToSelection" but
+ // cause editing to be stopped: ie, the SPACE sends "addToSelection" but
// if the table is in editing mode, the space should not cause us to stop
// editing because it should be used by the Editor.
if (table.isEditing() && command != "startEditing"
&& command != "addToSelection")
table.editingStopped(new ChangeEvent("update"));
-
+
table.scrollRectToVisible(table.getCellRect(
- rowModel.getLeadSelectionIndex(), colModel.getLeadSelectionIndex(),
+ rowModel.getLeadSelectionIndex(), colModel.getLeadSelectionIndex(),
false));
}
-
+
/**
* Returns the column index of the first visible column.
* @return the column index of the first visible column.
@@ -1005,7 +1005,7 @@ public class BasicTableUI extends TableUI
r.translate((int) r.getWidth() - 1, 0);
return table.columnAtPoint(r.getLocation());
}
-
+
/**
* Returns the column index of the last visible column.
*
@@ -1016,9 +1016,9 @@ public class BasicTableUI extends TableUI
Rectangle r = table.getVisibleRect();
if (or.isLeftToRight())
r.translate((int) r.getWidth() - 1, 0);
- return table.columnAtPoint(r.getLocation());
+ return table.columnAtPoint(r.getLocation());
}
-
+
/**
* Returns the row index of the first visible row.
*
@@ -1031,7 +1031,7 @@ public class BasicTableUI extends TableUI
r.translate((int) r.getWidth() - 1, 0);
return table.rowAtPoint(r.getLocation());
}
-
+
/**
* Returns the row index of the last visible row.
*
@@ -1067,7 +1067,7 @@ public class BasicTableUI extends TableUI
* rows (ENTER)
* @param firstMin the first selected index in firstModel
* @param firstMax the last selected index in firstModel
- * @param secondModel the ListSelectionModel for rows (TAB) or
+ * @param secondModel the ListSelectionModel for rows (TAB) or
* columns (ENTER)
* @param secondMin the first selected index in secondModel
* @param secondMax the last selected index in secondModel
@@ -1076,41 +1076,41 @@ public class BasicTableUI extends TableUI
*/
void advanceMultipleSelection(JTable table, ListSelectionModel firstModel,
int firstMin,
- int firstMax, ListSelectionModel secondModel,
+ int firstMax, ListSelectionModel secondModel,
int secondMin, int secondMax, boolean reverse,
boolean eventIsTab)
{
- // If eventIsTab, all the "firsts" correspond to columns, otherwise, to
+ // If eventIsTab, all the "firsts" correspond to columns, otherwise, to
// rows "seconds" correspond to the opposite
int firstLead = firstModel.getLeadSelectionIndex();
int secondLead = secondModel.getLeadSelectionIndex();
- int numFirsts = eventIsTab ?
+ int numFirsts = eventIsTab ?
table.getModel().getColumnCount() : table.getModel().getRowCount();
- int numSeconds = eventIsTab ?
+ int numSeconds = eventIsTab ?
table.getModel().getRowCount() : table.getModel().getColumnCount();
// check if we have to wrap the "firsts" around, going to the other side
- if ((firstLead == firstMax && !reverse) ||
+ if ((firstLead == firstMax && !reverse) ||
(reverse && firstLead == firstMin))
{
- firstModel.addSelectionInterval(reverse ? firstMax : firstMin,
+ firstModel.addSelectionInterval(reverse ? firstMax : firstMin,
reverse ? firstMax : firstMin);
-
+
// check if we have to wrap the "seconds"
- if ((secondLead == secondMax && !reverse) ||
+ if ((secondLead == secondMax && !reverse) ||
(reverse && secondLead == secondMin))
- secondModel.addSelectionInterval(reverse ? secondMax : secondMin,
+ secondModel.addSelectionInterval(reverse ? secondMax : secondMin,
reverse ? secondMax : secondMin);
// if we're not wrapping the seconds, we have to find out where we
- // are within the secondModel and advance to the next cell (or
+ // are within the secondModel and advance to the next cell (or
// go back to the previous cell if reverse == true)
else
{
int[] secondsSelected;
- if (eventIsTab && table.getRowSelectionAllowed() ||
+ if (eventIsTab && table.getRowSelectionAllowed() ||
!eventIsTab && table.getColumnSelectionAllowed())
- secondsSelected = eventIsTab ?
+ secondsSelected = eventIsTab ?
table.getSelectedRows() : table.getSelectedColumns();
else
{
@@ -1129,9 +1129,9 @@ public class BasicTableUI extends TableUI
else
while (secondsSelected[secondIndex] >= secondLead)
secondIndex--;
-
+
// and select it - updating the lead selection index
- secondModel.addSelectionInterval(secondsSelected[secondIndex],
+ secondModel.addSelectionInterval(secondsSelected[secondIndex],
secondsSelected[secondIndex]);
}
}
@@ -1140,9 +1140,9 @@ public class BasicTableUI extends TableUI
else
{
int[] firstsSelected;
- if (eventIsTab && table.getColumnSelectionAllowed() ||
+ if (eventIsTab && table.getColumnSelectionAllowed() ||
!eventIsTab && table.getRowSelectionAllowed())
- firstsSelected = eventIsTab ?
+ firstsSelected = eventIsTab ?
table.getSelectedColumns() : table.getSelectedRows();
else
{
@@ -1155,16 +1155,16 @@ public class BasicTableUI extends TableUI
if (!reverse)
while (firstsSelected[firstIndex] <= firstLead)
firstIndex++;
- else
+ else
while (firstsSelected[firstIndex] >= firstLead)
firstIndex--;
- firstModel.addSelectionInterval(firstsSelected[firstIndex],
+ firstModel.addSelectionInterval(firstsSelected[firstIndex],
firstsSelected[firstIndex]);
secondModel.addSelectionInterval(secondLead, secondLead);
}
}
-
- /**
+
+ /**
* A helper method for the key bindings. Used because the actions
* for TAB, SHIFT-TAB, ENTER, and SHIFT-ENTER are very similar.
*
@@ -1180,15 +1180,15 @@ public class BasicTableUI extends TableUI
* @param reverse true if SHIFT was pressed for the event
*/
- void advanceSingleSelection(ListSelectionModel firstModel, int firstMax,
- ListSelectionModel secondModel, int secondMax,
+ void advanceSingleSelection(ListSelectionModel firstModel, int firstMax,
+ ListSelectionModel secondModel, int secondMax,
boolean reverse)
{
// for TABs, "first" corresponds to columns and "seconds" to rows.
// the opposite is true for ENTERs
int firstLead = firstModel.getLeadSelectionIndex();
int secondLead = secondModel.getLeadSelectionIndex();
-
+
// if we are going backwards subtract 2 because we later add 1
// for a net change of -1
if (reverse && (firstLead == 0))
@@ -1198,15 +1198,15 @@ public class BasicTableUI extends TableUI
secondLead += secondMax + 1;
secondLead -= 2;
}
-
+
// do we have to wrap the "seconds"?
if (reverse && (firstLead == 0) || !reverse && (firstLead == firstMax))
- secondModel.setSelectionInterval((secondLead + 1) % (secondMax + 1),
+ secondModel.setSelectionInterval((secondLead + 1) % (secondMax + 1),
(secondLead + 1) % (secondMax + 1));
// if not, just reselect the current lead
else
secondModel.setSelectionInterval(secondLead, secondLead);
-
+
// if we are going backwards, subtract 2 because we add 1 later
// for net change of -1
if (reverse)
@@ -1217,12 +1217,12 @@ public class BasicTableUI extends TableUI
firstLead -= 2;
}
// select the next "first"
- firstModel.setSelectionInterval((firstLead + 1) % (firstMax + 1),
+ firstModel.setSelectionInterval((firstLead + 1) % (firstMax + 1),
(firstLead + 1) % (firstMax + 1));
}
}
- protected void installListeners()
+ protected void installListeners()
{
if (focusListener == null)
focusListener = createFocusListener();
@@ -1232,7 +1232,7 @@ public class BasicTableUI extends TableUI
table.addKeyListener(keyListener);
if (mouseInputListener == null)
mouseInputListener = createMouseInputListener();
- table.addMouseListener(mouseInputListener);
+ table.addMouseListener(mouseInputListener);
table.addMouseMotionListener(mouseInputListener);
if (propertyChangeListener == null)
propertyChangeListener = new PropertyChangeHandler();
@@ -1259,17 +1259,17 @@ public class BasicTableUI extends TableUI
SwingUtilities.replaceUIActionMap(table, null);
}
- protected void uninstallListeners()
+ protected void uninstallListeners()
{
- table.removeFocusListener(focusListener);
+ table.removeFocusListener(focusListener);
table.removeKeyListener(keyListener);
- table.removeMouseListener(mouseInputListener);
+ table.removeMouseListener(mouseInputListener);
table.removeMouseMotionListener(mouseInputListener);
table.removePropertyChangeListener(propertyChangeListener);
propertyChangeListener = null;
}
- public void installUI(JComponent comp)
+ public void installUI(JComponent comp)
{
table = (JTable) comp;
rendererPane = new CellRendererPane();
@@ -1280,11 +1280,11 @@ public class BasicTableUI extends TableUI
installListeners();
}
- public void uninstallUI(JComponent c)
+ public void uninstallUI(JComponent c)
{
uninstallListeners();
uninstallKeyboardActions();
- uninstallDefaults();
+ uninstallDefaults();
table.remove(rendererPane);
rendererPane = null;
@@ -1308,11 +1308,11 @@ public class BasicTableUI extends TableUI
Component comp = table.prepareRenderer(rend, row, col);
rendererPane.paintComponent(g, comp, table, bounds);
}
-
+
/**
* Paint the associated table.
*/
- public void paint(Graphics gfx, JComponent ignored)
+ public void paint(Graphics gfx, JComponent ignored)
{
int ncols = table.getColumnCount();
int nrows = table.getRowCount();
@@ -1346,19 +1346,19 @@ public class BasicTableUI extends TableUI
{
widths[i] = cmodel.getColumn(i).getWidth() - columnMargin;
}
-
+
Rectangle bounds = table.getCellRect(r0, c0, false);
// The left boundary of the area being repainted.
int left = bounds.x;
-
+
// The top boundary of the area being repainted.
int top = bounds.y;
-
+
// The bottom boundary of the area being repainted.
int bottom;
-
+
// paint the cell contents
- Color grid = table.getGridColor();
+ Color grid = table.getGridColor();
for (int r = r0; r <= rn; ++r)
{
for (int c = c0; c <= cn; ++c)
@@ -1372,18 +1372,18 @@ public class BasicTableUI extends TableUI
// Update row height for tables with custom heights.
bounds.height = table.getRowHeight(r + 1) - rowMargin;
}
-
+
bottom = bounds.y - rowMargin;
// paint vertical grid lines
if (grid != null && table.getShowVerticalLines())
- {
+ {
Color save = gfx.getColor();
gfx.setColor(grid);
int x = left - columnMargin;
for (int c = c0; c <= cn; ++c)
{
- // The vertical grid is draw right from the cells, so we
+ // The vertical grid is draw right from the cells, so we
// add before drawing.
x += widths[c] + columnMargin;
gfx.drawLine(x, top, x, bottom);
@@ -1391,15 +1391,15 @@ public class BasicTableUI extends TableUI
gfx.setColor(save);
}
- // paint horizontal grid lines
+ // paint horizontal grid lines
if (grid != null && table.getShowHorizontalLines())
- {
+ {
Color save = gfx.getColor();
gfx.setColor(grid);
int y = top - rowMargin;
for (int r = r0; r <= rn; ++r)
{
- // The horizontal grid is draw below the cells, so we
+ // The horizontal grid is draw below the cells, so we
// add before drawing.
y += table.getRowHeight(r);
gfx.drawLine(left, y, p2.x, y);
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicTextAreaUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicTextAreaUI.java
index 3f5aa27..b2541b4 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicTextAreaUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicTextAreaUI.java
@@ -1,4 +1,4 @@
-/* BasicTextAreaUI.java --
+/* BasicTextAreaUI.java --
Copyright (C) 2004, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -65,9 +65,9 @@ public class BasicTextAreaUI extends BasicTextUI
/**
* Create the view. Returns a WrappedPlainView if the text area
* has lineWrap set to true, otherwise returns a PlainView. If
- * lineWrap is true has to check whether the wrap style is word
+ * lineWrap is true has to check whether the wrap style is word
* or character and return an appropriate WrappedPlainView.
- *
+ *
* @param elem the element to create a View for
* @return an appropriate View for the element
*/
@@ -94,11 +94,11 @@ public class BasicTextAreaUI extends BasicTextUI
{
return "TextArea";
}
-
+
/**
* Receives notification whenever one of the text component's bound
* properties changes. This changes the view to WrappedPlainView
- * if setLineWrap(true) is called, and back to PlainView if
+ * if setLineWrap(true) is called, and back to PlainView if
* setLineWrap(false) is called.
*
* @param ev the property change event
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicTextFieldUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicTextFieldUI.java
index 6792aa0..5f6a927 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicTextFieldUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicTextFieldUI.java
@@ -60,7 +60,7 @@ public class BasicTextFieldUI extends BasicTextUI
{
return new FieldView(elem);
}
-
+
public static ComponentUI createUI(JComponent c)
{
return new BasicTextFieldUI();
@@ -85,7 +85,7 @@ public class BasicTextFieldUI extends BasicTextUI
* Receives notification whenever one of the text component's bound
* properties changes. Here we check for the editable and enabled
* properties and adjust the background color accordingly.
- *
+ *
*
The colors are only changed if they are not a
* ColorUIResource.
*
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicTextPaneUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicTextPaneUI.java
index a988c5a..507e0a1 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicTextPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicTextPaneUI.java
@@ -1,4 +1,4 @@
-/* BasicTextPaneUI.java --
+/* BasicTextPaneUI.java --
Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicTextUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicTextUI.java
index e152a30..bd7cc48 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicTextUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicTextUI.java
@@ -126,7 +126,7 @@ public abstract class BasicTextUI extends TextUI
private static class FocusHandler
implements FocusListener
{
- public void focusGained(FocusEvent e)
+ public void focusGained(FocusEvent e)
{
// Nothing to do here.
}
@@ -147,7 +147,7 @@ public abstract class BasicTextUI extends TextUI
{
if (sm != null)
sm.checkSystemClipboardAccess();
-
+
Clipboard cb = Toolkit.getDefaultToolkit().getSystemSelection();
if (cb != null)
{
@@ -291,7 +291,7 @@ public abstract class BasicTextUI extends TextUI
EditorKit editorKit = BasicTextUI.this.getEditorKit(getComponent());
factory = editorKit.getViewFactory();
if (factory == null)
- factory = BasicTextUI.this;
+ factory = BasicTextUI.this;
return factory;
}
@@ -317,7 +317,7 @@ public abstract class BasicTextUI extends TextUI
{
if (view != null)
view.setParent(null);
-
+
if (v != null)
v.setParent(this);
@@ -718,7 +718,7 @@ public abstract class BasicTextUI extends TextUI
if (color == null || color instanceof UIResource)
{
color = UIManager.getColor(prefix + ".selectionBackground");
- textComponent.setSelectionColor(color);
+ textComponent.setSelectionColor(color);
}
Insets margin = textComponent.getMargin();
@@ -756,7 +756,7 @@ public abstract class BasicTextUI extends TextUI
*/
protected void installListeners()
{
- //
+ //
if (SystemProperties.getProperty("gnu.swing.text.no-xlike-clipboard")
== null)
{
@@ -768,11 +768,11 @@ public abstract class BasicTextUI extends TextUI
/**
* Returns the name of the keymap for this type of TextUI.
- *
+ *
* This is implemented so that the classname of this TextUI
* without the package prefix is returned. This way subclasses
* don't have to override this method.
- *
+ *
* @return the name of the keymap for this TextUI
*/
protected String getKeymapName()
@@ -822,10 +822,10 @@ public abstract class BasicTextUI extends TextUI
getInputMap());
SwingUtilities.replaceUIActionMap(textComponent, getActionMap());
}
-
+
/**
* Creates an ActionMap to be installed on the text component.
- *
+ *
* @return an ActionMap to be installed on the text component
*/
private ActionMap getActionMap()
@@ -963,7 +963,7 @@ public abstract class BasicTextUI extends TextUI
*/
protected void uninstallKeyboardActions()
{
- SwingUtilities.replaceUIInputMap(textComponent, JComponent.WHEN_FOCUSED,
+ SwingUtilities.replaceUIInputMap(textComponent, JComponent.WHEN_FOCUSED,
null);
SwingUtilities.replaceUIActionMap(textComponent, null);
}
@@ -1150,7 +1150,7 @@ public abstract class BasicTextUI extends TextUI
highlighter.paint(g);
g.setColor(oldColor);
}
-
+
rootView.paint(g, getVisibleEditorRect());
if (caret != null && textComponent.hasFocus())
@@ -1482,11 +1482,11 @@ public abstract class BasicTextUI extends TextUI
// Return null if the component has no valid size.
if (width <= 0 || height <= 0)
return null;
-
+
Insets insets = textComponent.getInsets(cachedInsets);
return new Rectangle(insets.left, insets.top,
- width - insets.left - insets.right,
- height - insets.top - insets.bottom);
+ width - insets.left - insets.right,
+ height - insets.top - insets.bottom);
}
/**
@@ -1507,10 +1507,10 @@ public abstract class BasicTextUI extends TextUI
*/
protected void modelChanged()
{
- if (textComponent == null || rootView == null)
+ if (textComponent == null || rootView == null)
return;
ViewFactory factory = rootView.getViewFactory();
- if (factory == null)
+ if (factory == null)
return;
Document doc = textComponent.getDocument();
if (doc == null)
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicToggleButtonUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicToggleButtonUI.java
index 9216486..4550f08 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicToggleButtonUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicToggleButtonUI.java
@@ -54,22 +54,22 @@ import javax.swing.plaf.ComponentUI;
*/
public class BasicToggleButtonUI extends BasicButtonUI
{
-
+
/**
* Returns a UI delegate for the specified component.
- *
- * @param component the component (should be an instance of
+ *
+ * @param component the component (should be an instance of
* {@link JToggleButton}).
- *
+ *
* @return An instance of BasicToggleButtonUI.
*/
public static ComponentUI createUI(JComponent component)
{
return new BasicToggleButtonUI();
- }
+ }
/**
- * Returns the prefix for entries in the {@link UIManager} defaults table
+ * Returns the prefix for entries in the {@link UIManager} defaults table
* ("ToggleButton." in this case).
*
* @return "ToggleButton."
@@ -80,14 +80,14 @@ public class BasicToggleButtonUI extends BasicButtonUI
}
/**
- * Paint the component, which is an {@link AbstractButton}, according to
+ * Paint the component, which is an {@link AbstractButton}, according to
* its current state.
*
* @param g The graphics context to paint with
* @param c The component to paint the state of
*/
public void paint(Graphics g, JComponent c)
- {
+ {
AbstractButton b = (AbstractButton) c;
Rectangle tr = new Rectangle();
@@ -102,13 +102,13 @@ public class BasicToggleButtonUI extends BasicButtonUI
SwingUtilities.calculateInnerArea(b, vr);
else
vr = SwingUtilities.getLocalBounds(b);
- String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),
- b.getText(), currentIcon(b), b.getVerticalAlignment(),
- b.getHorizontalAlignment(), b.getVerticalTextPosition(),
- b.getHorizontalTextPosition(), vr, ir, tr, b.getIconTextGap()
+ String text = SwingUtilities.layoutCompoundLabel(c, g.getFontMetrics(f),
+ b.getText(), currentIcon(b), b.getVerticalAlignment(),
+ b.getHorizontalAlignment(), b.getVerticalTextPosition(),
+ b.getHorizontalTextPosition(), vr, ir, tr, b.getIconTextGap()
+ defaultTextShiftOffset);
- if ((b.getModel().isArmed() && b.getModel().isPressed())
+ if ((b.getModel().isArmed() && b.getModel().isPressed())
|| b.isSelected())
paintButtonPressed(g, b);
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicToolBarUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicToolBarUI.java
index 7be69ec..f5b2b2d 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicToolBarUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicToolBarUI.java
@@ -345,7 +345,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
protected Border createNonRolloverBorder()
{
Border b = UIManager.getBorder("ToolBar.nonrolloverBorder");
-
+
if (b == null)
{
b = new CompoundBorder(
@@ -355,7 +355,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
UIManager.getColor("Button.highlight")),
BasicBorders.getMarginBorder());
}
-
+
return b; }
/**
@@ -377,7 +377,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
protected Border createRolloverBorder()
{
Border b = UIManager.getBorder("ToolBar.rolloverBorder");
-
+
if (b == null)
{
b = new CompoundBorder(
@@ -387,7 +387,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
UIManager.getColor("Button.highlight")),
BasicBorders.getMarginBorder());
}
-
+
return b;
}
@@ -438,13 +438,13 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
if (loc != -1)
{
- dragWindow.setBorderColor(dockingBorderColor);
- dragWindow.setBackground(dockingColor);
+ dragWindow.setBorderColor(dockingBorderColor);
+ dragWindow.setBackground(dockingColor);
}
else
{
- dragWindow.setBorderColor(floatingBorderColor);
- dragWindow.setBackground(floatingColor);
+ dragWindow.setBorderColor(floatingBorderColor);
+ dragWindow.setBackground(floatingColor);
}
int w = 0;
@@ -458,13 +458,13 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
if (((cachedOrientation == SwingConstants.HORIZONTAL) && tmp)
|| ((cachedOrientation == VERTICAL) && ! tmp))
{
- w = cachedBounds.width;
- h = cachedBounds.height;
+ w = cachedBounds.width;
+ h = cachedBounds.height;
}
else
{
- w = cachedBounds.height;
- h = cachedBounds.width;
+ w = cachedBounds.height;
+ h = cachedBounds.width;
}
Point p = dragWindow.getOffset();
@@ -507,28 +507,28 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
newParent = ((RootPaneContainer) floatFrame).getContentPane();
else
{
- floatFrame.hide();
- newParent = origParent;
+ floatFrame.hide();
+ newParent = origParent;
}
String constraint;
switch (aoc)
{
case SwingConstants.EAST:
- constraint = BorderLayout.EAST;
- break;
+ constraint = BorderLayout.EAST;
+ break;
case SwingConstants.NORTH:
- constraint = BorderLayout.NORTH;
- break;
+ constraint = BorderLayout.NORTH;
+ break;
case SwingConstants.SOUTH:
- constraint = BorderLayout.SOUTH;
- break;
+ constraint = BorderLayout.SOUTH;
+ break;
case SwingConstants.WEST:
- constraint = BorderLayout.WEST;
- break;
+ constraint = BorderLayout.WEST;
+ break;
default:
- constraint = BorderLayout.CENTER;
- break;
+ constraint = BorderLayout.CENTER;
+ break;
}
int newOrientation = SwingConstants.HORIZONTAL;
@@ -538,8 +538,8 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
if (aoc != -1)
{
- constraintBeforeFloating = constraint;
- lastGoodOrientation = newOrientation;
+ constraintBeforeFloating = constraint;
+ lastGoodOrientation = newOrientation;
}
newParent.add(toolBar, constraint);
@@ -557,10 +557,10 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
if (aoc == -1)
{
- floatFrame.pack();
- floatFrame.setSize(dims.width + insets.left + insets.right,
- dims.height + insets.top + insets.bottom);
- floatFrame.show();
+ floatFrame.pack();
+ floatFrame.setSize(dims.width + insets.left + insets.right,
+ dims.height + insets.top + insets.bottom);
+ floatFrame.show();
}
newParent.invalidate();
@@ -776,14 +776,14 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
for (int i = 0; i < c.length; i++)
{
- if (c[i] instanceof JButton)
- {
- // Don't really care about anything other than JButtons
- JButton b = (JButton) c[i];
-
- if (b.getBorder() != null)
- borders.put(b, b.getBorder());
- }
+ if (c[i] instanceof JButton)
+ {
+ // Don't really care about anything other than JButtons
+ JButton b = (JButton) c[i];
+
+ if (b.getBorder() != null)
+ borders.put(b, b.getBorder());
+ }
}
}
@@ -798,11 +798,11 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
if (c instanceof JToolBar)
{
- toolBar = (JToolBar) c;
+ toolBar = (JToolBar) c;
installDefaults();
installComponents();
- installListeners();
- installKeyboardActions();
+ installListeners();
+ installKeyboardActions();
}
}
@@ -894,14 +894,14 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
{
if (c instanceof AbstractButton)
{
- AbstractButton b = (AbstractButton) c;
- b.setRolloverEnabled(false);
+ AbstractButton b = (AbstractButton) c;
+ b.setRolloverEnabled(false);
// Save old border in hashtable.
- if (b.getBorder() != null)
+ if (b.getBorder() != null)
borders.put(b, b.getBorder());
-
- b.setBorder(nonRolloverBorder);
+
+ b.setBorder(nonRolloverBorder);
}
}
@@ -931,11 +931,11 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
{
AbstractButton b = (AbstractButton) c;
b.setRolloverEnabled(false);
-
+
// Save old border in hashtable.
if (b.getBorder() != null)
- borders.put(b, b.getBorder());
-
+ borders.put(b, b.getBorder());
+
b.setBorder(rolloverBorder);
}
}
@@ -1139,7 +1139,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
public void mouseDragged(MouseEvent e)
{
if (isDragging)
- dragTo(e.getPoint(), origin);
+ dragTo(e.getPoint(), origin);
}
/**
@@ -1182,7 +1182,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
public void mousePressed(MouseEvent e)
{
if (! toolBar.isFloatable())
- return;
+ return;
Point ssd = e.getPoint();
Insets insets = toolBar.getInsets();
@@ -1190,13 +1190,13 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
// Verify that this click occurs in the top inset.
if (toolBar.getOrientation() == SwingConstants.HORIZONTAL)
{
- if (e.getX() > insets.left)
- return;
+ if (e.getX() > insets.left)
+ return;
}
else
{
- if (e.getY() > insets.top)
- return;
+ if (e.getY() > insets.top)
+ return;
}
origin = new Point(0, 0);
@@ -1204,16 +1204,16 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
SwingUtilities.convertPointToScreen(ssd, toolBar);
if (! (SwingUtilities.getAncestorOfClass(Window.class, toolBar) instanceof UIResource))
- // Need to know who keeps the toolBar if it gets dragged back into it.
- origParent = toolBar.getParent();
-
+ // Need to know who keeps the toolBar if it gets dragged back into it.
+ origParent = toolBar.getParent();
+
if (toolBar.isShowing())
SwingUtilities.convertPointToScreen(origin, toolBar);
isDragging = true;
if (dragWindow != null)
- dragWindow.setOffset(new Point(cachedBounds.width / 2,
+ dragWindow.setOffset(new Point(cachedBounds.width / 2,
cachedBounds.height / 2));
dragTo(e.getPoint(), origin);
@@ -1227,7 +1227,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
public void mouseReleased(MouseEvent e)
{
if (! isDragging || ! toolBar.isFloatable())
- return;
+ return;
isDragging = false;
floatAt(e.getPoint(), origin);
@@ -1267,7 +1267,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
public Color getBorderColor()
{
if (borderColor == null)
- return Color.BLACK;
+ return Color.BLACK;
return borderColor;
}
@@ -1341,7 +1341,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
public void setOrientation(int o)
{
toolBar.setOrientation(o);
- if (dragWindow != null)
+ if (dragWindow != null)
dragWindow.setOrientation(o);
}
}
@@ -1364,10 +1364,10 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
if (origParent != null)
{
- origParent.add(toolBar,
- (constraintBeforeFloating != null)
- ? constraintBeforeFloating : BorderLayout.NORTH);
- toolBar.setOrientation(lastGoodOrientation);
+ origParent.add(toolBar,
+ (constraintBeforeFloating != null)
+ ? constraintBeforeFloating : BorderLayout.NORTH);
+ toolBar.setOrientation(lastGoodOrientation);
}
origParent.invalidate();
@@ -1410,16 +1410,16 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
{
if (e.getChild() instanceof JButton)
{
- JButton b = (JButton) e.getChild();
+ JButton b = (JButton) e.getChild();
- if (b.getBorder() != null)
- borders.put(b, b.getBorder());
+ if (b.getBorder() != null)
+ borders.put(b, b.getBorder());
}
if (isRolloverBorders())
- setBorderToRollover(e.getChild());
+ setBorderToRollover(e.getChild());
else
- setBorderToNonRollover(e.getChild());
+ setBorderToNonRollover(e.getChild());
cachedBounds = toolBar.getPreferredSize();
cachedOrientation = toolBar.getOrientation();
@@ -1479,7 +1479,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
/**
* Receives notification when the toolbar or one of it's component
* receives the keyboard input focus.
- *
+ *
* @param e the focus event
*/
public void focusGained(FocusEvent e)
@@ -1491,7 +1491,7 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
/**
* Receives notification when the toolbar or one of it's component
* looses the keyboard input focus.
- *
+ *
* @param e the focus event
*/
public void focusLost(FocusEvent e)
@@ -1522,15 +1522,15 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
{
if (c instanceof JToolBar)
{
- JToolBar tb = (JToolBar) c;
- int orientation = tb.getOrientation();
-
- if (! tb.isFloatable())
- return new Insets(regular, regular, regular, regular);
- else if (orientation == SwingConstants.HORIZONTAL)
- return new Insets(regular, offset, regular, regular);
- else
- return new Insets(offset, regular, regular, regular);
+ JToolBar tb = (JToolBar) c;
+ int orientation = tb.getOrientation();
+
+ if (! tb.isFloatable())
+ return new Insets(regular, regular, regular, regular);
+ else if (orientation == SwingConstants.HORIZONTAL)
+ return new Insets(regular, offset, regular, regular);
+ else
+ return new Insets(offset, regular, regular, regular);
}
return new Insets(0, 0, 0, 0);
@@ -1568,9 +1568,9 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
int count = 0;
for (int i = x; i < (w + x); i += hgap)
- for (int j = ((count++ % 2) == 0) ? y : (y + (2 * size)); j < (h + y);
- j += vgap)
- g.fillRect(i, j, size, size);
+ for (int j = ((count++ % 2) == 0) ? y : (y + (2 * size)); j < (h + y);
+ j += vgap)
+ g.fillRect(i, j, size, size);
g.setColor(saved);
}
@@ -1590,20 +1590,20 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
{
if (c instanceof JToolBar)
{
- JToolBar tb = (JToolBar) c;
-
- int orientation = tb.getOrientation();
-
- if (orientation == SwingConstants.HORIZONTAL)
- {
- paintBumps(g, x, y, offset, height, 1, Color.WHITE);
- paintBumps(g, x + 1, y + 1, offset - 1, height - 1, 1, Color.GRAY);
- }
- else
- {
- paintBumps(g, x, y, width, offset, 1, Color.WHITE);
- paintBumps(g, x + 1, y + 1, width - 1, offset - 1, 1, Color.GRAY);
- }
+ JToolBar tb = (JToolBar) c;
+
+ int orientation = tb.getOrientation();
+
+ if (orientation == SwingConstants.HORIZONTAL)
+ {
+ paintBumps(g, x, y, offset, height, 1, Color.WHITE);
+ paintBumps(g, x + 1, y + 1, offset - 1, height - 1, 1, Color.GRAY);
+ }
+ else
+ {
+ paintBumps(g, x, y, width, offset, 1, Color.WHITE);
+ paintBumps(g, x + 1, y + 1, width - 1, offset - 1, 1, Color.GRAY);
+ }
}
}
}
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicToolTipUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicToolTipUI.java
index 94e7bc3..37c084b 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicToolTipUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicToolTipUI.java
@@ -80,7 +80,7 @@ public class BasicToolTipUI extends ToolTipUI
BasicHTML.updateRenderer(tip, text);
}
}
-
+
}
/** The shared instance of BasicToolTipUI used for all ToolTips. */
@@ -103,7 +103,7 @@ public class BasicToolTipUI extends ToolTipUI
}
/**
- * This method creates a new BasicToolTip UI for the given
+ * This method creates a new BasicToolTip UI for the given
* JComponent.
*
* @param c The JComponent to create a UI for.
@@ -245,10 +245,10 @@ public class BasicToolTipUI extends ToolTipUI
if (view != null)
view.paint(g, paintR);
else
- g.drawString(text, paintR.x + 3, paintR.y + ascent);
+ g.drawString(text, paintR.x + 3, paintR.y + ascent);
g.setFont(oldFont);
- g.setColor(saved);
+ g.setColor(saved);
}
/**
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicTreeUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicTreeUI.java
index 1c28a5f..af61a42 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicTreeUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicTreeUI.java
@@ -109,7 +109,7 @@ import javax.swing.tree.VariableHeightLayoutCache;
/**
* A delegate providing the user interface for JTree according to
* the Basic look and feel.
- *
+ *
* @see javax.swing.JTree
* @author Lillian Angel (langel@redhat.com)
* @author Sascha Brawer (brawer@dandelis.ch)
@@ -174,7 +174,7 @@ public class BasicTreeUI
* Set to false when editing and shouldSelectCall() returns true meaning the
* node should be selected before editing, used in completeEditing.
* GNU Classpath editing is implemented differently, so this value is not
- * actually read anywhere. However it is always set correctly to maintain
+ * actually read anywhere. However it is always set correctly to maintain
* interoperability with the derived classes that read this field.
*/
protected boolean stopEditingInCompleteEditing;
@@ -248,7 +248,7 @@ public class BasicTreeUI
/** The max height of the nodes in the tree. */
int maxHeight;
-
+
/** The hash color. */
Color hashColor;
@@ -294,7 +294,7 @@ public class BasicTreeUI
/**
* Returns an instance of the UI delegate for the specified component.
- *
+ *
* @param c the JComponent for which we need a UI delegate for.
* @return the ComponentUI for c.
*/
@@ -305,7 +305,7 @@ public class BasicTreeUI
/**
* Returns the Hash color.
- *
+ *
* @return the Color of the Hash.
*/
protected Color getHashColor()
@@ -315,7 +315,7 @@ public class BasicTreeUI
/**
* Sets the Hash color.
- *
+ *
* @param color the Color to set the Hash to.
*/
protected void setHashColor(Color color)
@@ -325,7 +325,7 @@ public class BasicTreeUI
/**
* Sets the left child's indent value.
- *
+ *
* @param newAmount is the new indent value for the left child.
*/
public void setLeftChildIndent(int newAmount)
@@ -335,7 +335,7 @@ public class BasicTreeUI
/**
* Returns the indent value for the left child.
- *
+ *
* @return the indent value for the left child.
*/
public int getLeftChildIndent()
@@ -345,7 +345,7 @@ public class BasicTreeUI
/**
* Sets the right child's indent value.
- *
+ *
* @param newAmount is the new indent value for the right child.
*/
public void setRightChildIndent(int newAmount)
@@ -355,7 +355,7 @@ public class BasicTreeUI
/**
* Returns the indent value for the right child.
- *
+ *
* @return the indent value for the right child.
*/
public int getRightChildIndent()
@@ -365,7 +365,7 @@ public class BasicTreeUI
/**
* Sets the expanded icon.
- *
+ *
* @param newG is the new expanded icon.
*/
public void setExpandedIcon(Icon newG)
@@ -375,7 +375,7 @@ public class BasicTreeUI
/**
* Returns the current expanded icon.
- *
+ *
* @return the current expanded icon.
*/
public Icon getExpandedIcon()
@@ -385,7 +385,7 @@ public class BasicTreeUI
/**
* Sets the collapsed icon.
- *
+ *
* @param newG is the new collapsed icon.
*/
public void setCollapsedIcon(Icon newG)
@@ -395,7 +395,7 @@ public class BasicTreeUI
/**
* Returns the current collapsed icon.
- *
+ *
* @return the current collapsed icon.
*/
public Icon getCollapsedIcon()
@@ -405,7 +405,7 @@ public class BasicTreeUI
/**
* Updates the componentListener, if necessary.
- *
+ *
* @param largeModel sets this.largeModel to it.
*/
protected void setLargeModel(boolean largeModel)
@@ -421,7 +421,7 @@ public class BasicTreeUI
/**
* Returns true if largeModel is set
- *
+ *
* @return true if largeModel is set, otherwise false.
*/
protected boolean isLargeModel()
@@ -431,7 +431,7 @@ public class BasicTreeUI
/**
* Sets the row height.
- *
+ *
* @param rowHeight is the height to set this.rowHeight to.
*/
protected void setRowHeight(int rowHeight)
@@ -444,7 +444,7 @@ public class BasicTreeUI
/**
* Returns the current row height.
- *
+ *
* @return current row height.
*/
protected int getRowHeight()
@@ -455,7 +455,7 @@ public class BasicTreeUI
/**
* Sets the TreeCellRenderer to tcr. This invokes
* updateRenderer.
- *
+ *
* @param tcr is the new TreeCellRenderer.
*/
protected void setCellRenderer(TreeCellRenderer tcr)
@@ -469,15 +469,15 @@ public class BasicTreeUI
// Refresh the layout if necessary.
if (treeState != null)
{
- treeState.invalidateSizes();
- updateSize();
+ treeState.invalidateSizes();
+ updateSize();
}
}
/**
* Return currentCellRenderer, which will either be the trees renderer, or
* defaultCellRenderer, which ever was not null.
- *
+ *
* @return the current Cell Renderer
*/
protected TreeCellRenderer getCellRenderer()
@@ -490,7 +490,7 @@ public class BasicTreeUI
/**
* Sets the tree's model.
- *
+ *
* @param model to set the treeModel to.
*/
protected void setModel(TreeModel model)
@@ -515,7 +515,7 @@ public class BasicTreeUI
/**
* Returns the tree's model
- *
+ *
* @return treeModel
*/
protected TreeModel getModel()
@@ -525,7 +525,7 @@ public class BasicTreeUI
/**
* Sets the root to being visible.
- *
+ *
* @param newValue sets the visibility of the root
*/
protected void setRootVisible(boolean newValue)
@@ -536,7 +536,7 @@ public class BasicTreeUI
/**
* Returns true if the root is visible.
- *
+ *
* @return true if the root is visible.
*/
protected boolean isRootVisible()
@@ -546,7 +546,7 @@ public class BasicTreeUI
/**
* Determines whether the node handles are to be displayed.
- *
+ *
* @param newValue sets whether or not node handles should be displayed.
*/
protected void setShowsRootHandles(boolean newValue)
@@ -562,7 +562,7 @@ public class BasicTreeUI
/**
* Returns true if the node handles are to be displayed.
- *
+ *
* @return true if the node handles are to be displayed.
*/
protected boolean getShowsRootHandles()
@@ -572,7 +572,7 @@ public class BasicTreeUI
/**
* Sets the cell editor.
- *
+ *
* @param editor to set the cellEditor to.
*/
protected void setCellEditor(TreeCellEditor editor)
@@ -582,7 +582,7 @@ public class BasicTreeUI
/**
* Returns the TreeCellEditor for this tree.
- *
+ *
* @return the cellEditor for this tree.
*/
protected TreeCellEditor getCellEditor()
@@ -592,7 +592,7 @@ public class BasicTreeUI
/**
* Configures the receiver to allow, or not allow, editing.
- *
+ *
* @param newValue sets the receiver to allow editing if true.
*/
protected void setEditable(boolean newValue)
@@ -602,7 +602,7 @@ public class BasicTreeUI
/**
* Returns true if the receiver allows editing.
- *
+ *
* @return true if the receiver allows editing.
*/
protected boolean isEditable()
@@ -613,7 +613,7 @@ public class BasicTreeUI
/**
* Resets the selection model. The appropriate listeners are installed on the
* model.
- *
+ *
* @param newLSM resets the selection model.
*/
protected void setSelectionModel(TreeSelectionModel newLSM)
@@ -628,7 +628,7 @@ public class BasicTreeUI
/**
* Returns the current selection model.
- *
+ *
* @return the current selection model.
*/
protected TreeSelectionModel getSelectionModel()
@@ -640,7 +640,7 @@ public class BasicTreeUI
* Returns the Rectangle enclosing the label portion that the last item in
* path will be drawn to. Will return null if any component in path is
* currently valid.
- *
+ *
* @param tree is the current tree the path will be drawn to.
* @param path is the current path the tree to draw to.
* @return the Rectangle enclosing the label portion that the last item in the
@@ -664,7 +664,7 @@ public class BasicTreeUI
/**
* Returns the max height of all the nodes in the tree.
- *
+ *
* @param tree - the current tree
* @return the max height.
*/
@@ -690,11 +690,11 @@ public class BasicTreeUI
maxHeight = Math.max(maxHeight, iconHeight + gap);
}
-
+
treeState.setRowHeight(maxHeight);
return maxHeight;
}
-
+
/**
* Get the tree node icon.
*/
@@ -711,7 +711,7 @@ public class BasicTreeUI
/**
* Returns the path for passed in row. If row is not visible null is returned.
- *
+ *
* @param tree is the current tree to return path for.
* @param row is the row number of the row to return.
* @return the path for passed in row. If row is not visible null is returned.
@@ -724,7 +724,7 @@ public class BasicTreeUI
/**
* Returns the row that the last item identified in path is visible at. Will
* return -1 if any of the elments in the path are not currently visible.
- *
+ *
* @param tree is the current tree to return the row for.
* @param path is the path used to find the row.
* @return the row that the last item identified in path is visible at. Will
@@ -738,7 +738,7 @@ public class BasicTreeUI
/**
* Returns the number of rows that are being displayed.
- *
+ *
* @param tree is the current tree to return the number of rows for.
* @return the number of rows being displayed.
*/
@@ -752,7 +752,7 @@ public class BasicTreeUI
* currently visible this will return null, otherwise it'll always return a
* valid path. If you need to test if the returned object is exactly at x,y
* you should get the bounds for the returned path and test x,y against that.
- *
+ *
* @param tree the tree to search for the closest path
* @param x is the x coordinate of the location to search
* @param y is the y coordinate of the location to search
@@ -766,7 +766,7 @@ public class BasicTreeUI
/**
* Returns true if the tree is being edited. The item that is being edited can
* be returned by getEditingPath().
- *
+ *
* @param tree is the tree to check for editing.
* @return true if the tree is being edited.
*/
@@ -779,7 +779,7 @@ public class BasicTreeUI
* Stops the current editing session. This has no effect if the tree is not
* being edited. Returns true if the editor allows the editing session to
* stop.
- *
+ *
* @param tree is the tree to stop the editing on
* @return true if the editor allows the editing session to stop.
*/
@@ -796,7 +796,7 @@ public class BasicTreeUI
/**
* Cancels the current editing session.
- *
+ *
* @param tree is the tree to cancel the editing session on.
*/
public void cancelEditing(JTree tree)
@@ -811,7 +811,7 @@ public class BasicTreeUI
/**
* Selects the last item in path and tries to edit it. Editing will fail if
* the CellEditor won't allow it for the selected item.
- *
+ *
* @param tree is the tree to edit on.
* @param path is the path in tree to edit on.
*/
@@ -824,7 +824,7 @@ public class BasicTreeUI
/**
* Returns the path to the element that is being editted.
- *
+ *
* @param tree is the tree to get the editing path from.
* @return the path that is being edited.
*/
@@ -858,7 +858,7 @@ public class BasicTreeUI
updateDepthOffset();
setSelectionModel(tree.getSelectionModel());
configureLayoutCache();
- treeState.setRootVisible(tree.isRootVisible());
+ treeState.setRootVisible(tree.isRootVisible());
treeSelectionModel.setRowMapper(treeState);
updateSize();
}
@@ -887,7 +887,7 @@ public class BasicTreeUI
* Creates an instance of NodeDimensions that is able to determine the size of
* a given node in the tree. The node dimensions must be created before
* configuring the layout cache.
- *
+ *
* @return the NodeDimensions of a given node in the tree
*/
protected AbstractLayoutCache.NodeDimensions createNodeDimensions()
@@ -898,7 +898,7 @@ public class BasicTreeUI
/**
* Creates a listener that is reponsible for the updates the UI based on how
* the tree changes.
- *
+ *
* @return the PropertyChangeListener that is reposnsible for the updates
*/
protected PropertyChangeListener createPropertyChangeListener()
@@ -909,7 +909,7 @@ public class BasicTreeUI
/**
* Creates the listener responsible for updating the selection based on mouse
* events.
- *
+ *
* @return the MouseListener responsible for updating.
*/
protected MouseListener createMouseListener()
@@ -920,7 +920,7 @@ public class BasicTreeUI
/**
* Creates the listener that is responsible for updating the display when
* focus is lost/grained.
- *
+ *
* @return the FocusListener responsible for updating.
*/
protected FocusListener createFocusListener()
@@ -930,7 +930,7 @@ public class BasicTreeUI
/**
* Creates the listener reponsible for getting key events from the tree.
- *
+ *
* @return the KeyListener responsible for getting key events.
*/
protected KeyListener createKeyListener()
@@ -941,7 +941,7 @@ public class BasicTreeUI
/**
* Creates the listener responsible for getting property change events from
* the selection model.
- *
+ *
* @returns the PropertyChangeListener reponsible for getting property change
* events from the selection model.
*/
@@ -953,7 +953,7 @@ public class BasicTreeUI
/**
* Creates the listener that updates the display based on selection change
* methods.
- *
+ *
* @return the TreeSelectionListener responsible for updating.
*/
protected TreeSelectionListener createTreeSelectionListener()
@@ -963,7 +963,7 @@ public class BasicTreeUI
/**
* Creates a listener to handle events from the current editor
- *
+ *
* @return the CellEditorListener that handles events from the current editor
*/
protected CellEditorListener createCellEditorListener()
@@ -975,7 +975,7 @@ public class BasicTreeUI
* Creates and returns a new ComponentHandler. This is used for the large
* model to mark the validCachedPreferredSize as invalid when the component
* moves.
- *
+ *
* @return a new ComponentHandler.
*/
protected ComponentListener createComponentListener()
@@ -986,7 +986,7 @@ public class BasicTreeUI
/**
* Creates and returns the object responsible for updating the treestate when
* a nodes expanded state changes.
- *
+ *
* @return the TreeExpansionListener responsible for updating the treestate
*/
protected TreeExpansionListener createTreeExpansionListener()
@@ -997,7 +997,7 @@ public class BasicTreeUI
/**
* Creates the object responsible for managing what is expanded, as well as
* the size of nodes.
- *
+ *
* @return the object responsible for managing what is expanded.
*/
protected AbstractLayoutCache createLayoutCache()
@@ -1007,7 +1007,7 @@ public class BasicTreeUI
/**
* Returns the renderer pane that renderer components are placed in.
- *
+ *
* @return the rendererpane that render components are placed in.
*/
protected CellRendererPane createCellRendererPane()
@@ -1017,7 +1017,7 @@ public class BasicTreeUI
/**
* Creates a default cell editor.
- *
+ *
* @return the default cell editor.
*/
protected TreeCellEditor createDefaultCellEditor()
@@ -1035,7 +1035,7 @@ public class BasicTreeUI
/**
* Returns the default cell renderer that is used to do the stamping of each
* node.
- *
+ *
* @return the default cell renderer that is used to do the stamping of each
* node.
*/
@@ -1046,7 +1046,7 @@ public class BasicTreeUI
/**
* Returns a listener that can update the tree when the model changes.
- *
+ *
* @return a listener that can update the tree when the model changes.
*/
protected TreeModelListener createTreeModelListener()
@@ -1099,7 +1099,7 @@ public class BasicTreeUI
/**
* The vertical element of legs between nodes starts at the bottom of the
* parent node by default. This method makes the leg start below that.
- *
+ *
* @return the vertical leg buffer
*/
protected int getVerticalLegBuffer()
@@ -1111,7 +1111,7 @@ public class BasicTreeUI
* The horizontal element of legs between nodes starts at the right of the
* left-hand side of the child node by default. This method makes the leg end
* before that.
- *
+ *
* @return the horizontal leg buffer
*/
protected int getHorizontalLegBuffer()
@@ -1133,7 +1133,7 @@ public class BasicTreeUI
* Updates the expanded state of all the descendants of the path
* by getting the expanded descendants from the tree and forwarding to the
* tree state.
- *
+ *
* @param path the path used to update the expanded states
*/
protected void updateExpandedDescendants(TreePath path)
@@ -1146,7 +1146,7 @@ public class BasicTreeUI
/**
* Returns a path to the last child of parent
- *
+ *
* @param parent is the topmost path to specified
* @return a path to the last child of parent
*/
@@ -1206,24 +1206,24 @@ public class BasicTreeUI
{
if (tree != null)
{
- TreeCellRenderer rend = tree.getCellRenderer();
- if (rend != null)
- {
- createdRenderer = false;
- currentCellRenderer = rend;
- if (createdCellEditor)
- tree.setCellEditor(null);
- }
- else
- {
- tree.setCellRenderer(createDefaultCellRenderer());
- createdRenderer = true;
- }
+ TreeCellRenderer rend = tree.getCellRenderer();
+ if (rend != null)
+ {
+ createdRenderer = false;
+ currentCellRenderer = rend;
+ if (createdCellEditor)
+ tree.setCellEditor(null);
+ }
+ else
+ {
+ tree.setCellRenderer(createDefaultCellRenderer());
+ createdRenderer = true;
+ }
}
else
{
- currentCellRenderer = null;
- createdRenderer = false;
+ currentCellRenderer = null;
+ createdRenderer = false;
}
updateCellEditor();
@@ -1262,7 +1262,7 @@ public class BasicTreeUI
/**
* Messaged from the VisibleTreeNode after it has been expanded.
- *
+ *
* @param path is the path that has been expanded.
*/
protected void pathWasExpanded(TreePath path)
@@ -1289,11 +1289,11 @@ public class BasicTreeUI
{
LookAndFeel.installColorsAndFont(tree, "Tree.background",
"Tree.foreground", "Tree.font");
-
+
hashColor = UIManager.getColor("Tree.hash");
if (hashColor == null)
hashColor = Color.black;
-
+
tree.setOpaque(true);
rightChildIndent = UIManager.getInt("Tree.rightChildIndent");
@@ -1383,7 +1383,7 @@ public class BasicTreeUI
am.put(action.getValue(Action.NAME), action);
action = new TreeTraverseAction(1, "selectChild");
am.put(action.getValue(Action.NAME), action);
-
+
// TreeToggleAction.
action = new TreeToggleAction("toggleAndAnchor");
am.put(action.getValue(Action.NAME), action);
@@ -1401,20 +1401,20 @@ public class BasicTreeUI
am.put(action.getValue(Action.NAME), action);
action = new TreePageAction(1, "scrollDownChangeLead");
am.put(action.getValue(Action.NAME), action);
-
+
// Tree editing actions
action = new TreeStartEditingAction("startEditing");
am.put(action.getValue(Action.NAME), action);
action = new TreeCancelEditingAction("cancel");
am.put(action.getValue(Action.NAME), action);
-
+
return am;
}
/**
* Converts the modifiers.
- *
+ *
* @param mod - modifier to convert
* @returns the new modifier
*/
@@ -1492,7 +1492,7 @@ public class BasicTreeUI
/**
* Install the UI for the component
- *
+ *
* @param c the component to install UI for
*/
public void installUI(JComponent c)
@@ -1506,7 +1506,7 @@ public class BasicTreeUI
installListeners();
completeUIInstall();
}
-
+
/**
* Uninstall the defaults for the tree
*/
@@ -1519,7 +1519,7 @@ public class BasicTreeUI
/**
* Uninstall the UI for the component
- *
+ *
* @param c the component to uninstall UI for
*/
public void uninstallUI(JComponent c)
@@ -1539,7 +1539,7 @@ public class BasicTreeUI
* method is invoked from the ComponentUI.update method when the specified
* component is being painted. Subclasses should override this method and use
* the specified Graphics object to render the content of the component.
- *
+ *
* @param g the Graphics context in which to paint
* @param c the component being painted; this argument is often ignored, but
* might be used if the UI object is stateless and shared by multiple
@@ -1548,9 +1548,9 @@ public class BasicTreeUI
public void paint(Graphics g, JComponent c)
{
JTree tree = (JTree) c;
-
+
int rows = treeState.getRowCount();
-
+
if (rows == 0)
// There is nothing to do if the tree is empty.
return;
@@ -1639,7 +1639,7 @@ public class BasicTreeUI
/**
* Ensures that the rows identified by beginRow through endRow are visible.
- *
+ *
* @param beginRow is the first row
* @param endRow is the last row
*/
@@ -1662,7 +1662,7 @@ public class BasicTreeUI
/**
* Sets the preferred minimum size.
- *
+ *
* @param newSize is the new preferred minimum size.
*/
public void setPreferredMinSize(Dimension newSize)
@@ -1672,7 +1672,7 @@ public class BasicTreeUI
/**
* Gets the preferred minimum size.
- *
+ *
* @returns the preferred minimum size.
*/
public Dimension getPreferredMinSize()
@@ -1686,7 +1686,7 @@ public class BasicTreeUI
/**
* Returns the preferred size to properly display the tree, this is a cover
* method for getPreferredSize(c, false).
- *
+ *
* @param c the component whose preferred size is being queried; this argument
* is often ignored but might be used if the UI object is stateless
* and shared by multiple components
@@ -1700,7 +1700,7 @@ public class BasicTreeUI
/**
* Returns the preferred size to represent the tree in c. If checkConsistancy
* is true, checkConsistancy is messaged first.
- *
+ *
* @param c the component whose preferred size is being queried.
* @param checkConsistancy if true must check consistancy
* @return the preferred size
@@ -1721,7 +1721,7 @@ public class BasicTreeUI
/**
* Returns the minimum size for this component. Which will be the min
* preferred size or (0,0).
- *
+ *
* @param c the component whose min size is being queried.
* @returns the preferred size or null
*/
@@ -1733,7 +1733,7 @@ public class BasicTreeUI
/**
* Returns the maximum size for the component, which will be the preferred
* size if the instance is currently in JTree or (0,0).
- *
+ *
* @param c the component whose preferred size is being queried
* @return the max size or null
*/
@@ -1763,7 +1763,7 @@ public class BasicTreeUI
* with stopEditing, if messageCancel is true the editor is messaged with
* cancelEditing. If messageTree is true, the treeModel is messaged with
* valueForPathChanged.
- *
+ *
* @param messageStop message to stop editing
* @param messageCancel message to cancel editing
* @param messageTree message to treeModel
@@ -1808,7 +1808,7 @@ public class BasicTreeUI
/**
* Will start editing for node if there is a cellEditor and shouldSelectCall
* returns true. This assumes that path is valid and visible.
- *
+ *
* @param path is the path to start editing
* @param event is the MouseEvent performed on the path
* @return true if successful
@@ -1826,7 +1826,7 @@ public class BasicTreeUI
{
if (ed.isCellEditable(event))
{
- editingRow = getRowForPath(tree, path);
+ editingRow = getRowForPath(tree, path);
Object value = path.getLastPathComponent();
boolean isSelected = tree.isPathSelected(path);
boolean isExpanded = tree.isExpanded(editingPath);
@@ -1852,7 +1852,7 @@ public class BasicTreeUI
}
else
editorHasDifferentSize = false;
-
+
// The editing component must be added to its container. We add the
// container, not the editing component itself.
tree.add(editingComponent);
@@ -1880,7 +1880,7 @@ public class BasicTreeUI
if (active != null)
{
MouseInputHandler ih = new MouseInputHandler(tree, active, event);
-
+
}
}
@@ -1910,13 +1910,13 @@ public class BasicTreeUI
}
else if (c.isFocusable())
c.requestFocus();
-
+
}
/**
* If the mouseX and mouseY are in the expand or
* collapse region of the row, this will toggle the row.
- *
+ *
* @param path the path we are concerned with
* @param mouseX is the cursor's x position
* @param mouseY is the cursor's y position
@@ -1932,7 +1932,7 @@ public class BasicTreeUI
* Returns true if the mouseX and mouseY fall in
* the area of row that is used to expand/collpse the node and the node at row
* does not represent a leaf.
- *
+ *
* @param path the path we are concerned with
* @param mouseX is the cursor's x position
* @param mouseY is the cursor's y position
@@ -1956,13 +1956,13 @@ public class BasicTreeUI
width = 18;
Insets i = tree.getInsets();
-
+
int depth;
if (isRootVisible())
depth = path.getPathCount()-1;
else
depth = path.getPathCount()-2;
-
+
int left = getRowX(tree.getRowForPath(path), depth)
- width + i.left;
cntlClick = mouseX >= left && mouseX <= left + width;
@@ -1973,7 +1973,7 @@ public class BasicTreeUI
/**
* Messaged when the user clicks the particular row, this invokes
* toggleExpandState.
- *
+ *
* @param path the path we are concerned with
* @param mouseX is the cursor's x position
* @param mouseY is the cursor's y position
@@ -1988,7 +1988,7 @@ public class BasicTreeUI
* expanding a path and JTree scroll on expand, ensureRowsAreVisible is
* invoked to scroll as many of the children to visible as possible (tries to
* scroll to last visible descendant of path).
- *
+ *
* @param path the path we are concerned with
*/
protected void toggleExpandState(TreePath path)
@@ -2006,17 +2006,17 @@ public class BasicTreeUI
* event as "toggle selection event" if the CTRL button was pressed while
* clicking. The event is not counted as toggle event if the associated
* tree does not support the multiple selection.
- *
+ *
* @param event is the MouseEvent performed on the row.
* @return true signifies a mouse event on the node should toggle the
* selection of only the row under the mouse.
*/
protected boolean isToggleSelectionEvent(MouseEvent event)
{
- return
- (tree.getSelectionModel().getSelectionMode() !=
+ return
+ (tree.getSelectionModel().getSelectionMode() !=
TreeSelectionModel.SINGLE_TREE_SELECTION) &&
- ((event.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) != 0);
+ ((event.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) != 0);
}
/**
@@ -2025,24 +2025,24 @@ public class BasicTreeUI
* event" if the SHIFT button was pressed while clicking. The event is not
* counted as multiple selection event if the associated tree does not support
* the multiple selection.
- *
+ *
* @param event is the MouseEvent performed on the node.
* @return true signifies a mouse event on the node should select from the
* anchor point.
*/
protected boolean isMultiSelectEvent(MouseEvent event)
{
- return
- (tree.getSelectionModel().getSelectionMode() !=
+ return
+ (tree.getSelectionModel().getSelectionMode() !=
TreeSelectionModel.SINGLE_TREE_SELECTION) &&
- ((event.getModifiersEx() & InputEvent.SHIFT_DOWN_MASK) != 0);
+ ((event.getModifiersEx() & InputEvent.SHIFT_DOWN_MASK) != 0);
}
/**
* Returning true indicates the row under the mouse should be toggled based on
* the event. This is invoked after checkForClickInExpandControl, implying the
* location is not in the expand (toggle) control.
- *
+ *
* @param event is the MouseEvent performed on the row.
* @return true indicates the row under the mouse should be toggled based on
* the event.
@@ -2065,10 +2065,10 @@ public class BasicTreeUI
* or deselected. If the event identifies a multi selection event, the
* selection is updated from the anchor point. Otherwise, the row is selected,
* and the previous selection is cleared.
- *
+ *
* @param path is the path selected for an event
* @param event is the MouseEvent performed on the path.
- *
+ *
* @see #isToggleSelectionEvent(MouseEvent)
* @see #isMultiSelectEvent(MouseEvent)
*/
@@ -2108,7 +2108,7 @@ public class BasicTreeUI
/**
* Returns true if the node at row is a leaf.
- *
+ *
* @param row is the row we are concerned with.
* @return true if the node at row is a leaf.
*/
@@ -2121,7 +2121,7 @@ public class BasicTreeUI
Object node = pathForRow.getLastPathComponent();
return treeModel.isLeaf(node);
}
-
+
/**
* The action to start editing at the current lead selection path.
*/
@@ -2130,26 +2130,26 @@ public class BasicTreeUI
{
/**
* Creates the new tree cancel editing action.
- *
+ *
* @param name the name of the action (used in toString).
*/
public TreeStartEditingAction(String name)
{
super(name);
- }
-
+ }
+
/**
* Start editing at the current lead selection path.
- *
+ *
* @param e the ActionEvent that caused this action.
*/
public void actionPerformed(ActionEvent e)
{
TreePath lead = tree.getLeadSelectionPath();
- if (!tree.isEditing())
+ if (!tree.isEditing())
tree.startEditingAtPath(lead);
}
- }
+ }
/**
* Updates the preferred size when scrolling, if necessary.
@@ -2176,7 +2176,7 @@ public class BasicTreeUI
/**
* Invoked when the component's position changes.
- *
+ *
* @param e the event that occurs when moving the component
*/
public void componentMoved(ComponentEvent e)
@@ -2225,7 +2225,7 @@ public class BasicTreeUI
/**
* Returns the JScrollPane housing the JTree, or null if one isn't found.
- *
+ *
* @return JScrollPane housing the JTree, or null if one isn't found.
*/
protected JScrollPane getScrollPane()
@@ -2242,7 +2242,7 @@ public class BasicTreeUI
/**
* Public as a result of Timer. If the scrollBar is null, or not adjusting,
* this stops the timer and updates the sizing.
- *
+ *
* @param ae is the action performed
*/
public void actionPerformed(ActionEvent ae)
@@ -2276,7 +2276,7 @@ public class BasicTreeUI
/**
* Messaged when editing has stopped in the tree. Tells the listeners
* editing has stopped.
- *
+ *
* @param e is the notification event
*/
public void editingStopped(ChangeEvent e)
@@ -2287,7 +2287,7 @@ public class BasicTreeUI
/**
* Messaged when editing has been canceled in the tree. This tells the
* listeners the editor has canceled editing.
- *
+ *
* @param e is the notification event
*/
public void editingCanceled(ChangeEvent e)
@@ -2315,7 +2315,7 @@ public class BasicTreeUI
* row. Invoked when a component gains the keyboard focus. The method
* repaints the lead row that is shown differently when the tree is in
* focus.
- *
+ *
* @param e is the focus event that is activated
*/
public void focusGained(FocusEvent e)
@@ -2328,7 +2328,7 @@ public class BasicTreeUI
* row. Invoked when a component loses the keyboard focus. The method
* repaints the lead row that is shown differently when the tree is in
* focus.
- *
+ *
* @param e is the focus event that is deactivated
*/
public void focusLost(FocusEvent e)
@@ -2373,7 +2373,7 @@ public class BasicTreeUI
* element whose first letter matches the alphanumeric key pressed by the
* user. Subsequent same key presses move the keyboard focus to the next
* object that starts with the same letter.
- *
+ *
* @param e the key typed
*/
public void keyTyped(KeyEvent e)
@@ -2389,22 +2389,22 @@ public class BasicTreeUI
return;
}
}
-
+
// Not found below, search above:
for (int row = 0; row < tree.getLeadSelectionRow(); row++)
{
if (checkMatch(row, typed))
{
tree.setSelectionRow(row);
- tree.scrollRowToVisible(row);
+ tree.scrollRowToVisible(row);
return;
}
}
}
-
+
/**
* Check if the given tree row starts with this character
- *
+ *
* @param row the tree row
* @param typed the typed char, must be converted to lowercase
* @return true if the given tree row starts with this character
@@ -2424,7 +2424,7 @@ public class BasicTreeUI
/**
* Invoked when a key has been pressed.
- *
+ *
* @param e the key pressed
*/
public void keyPressed(KeyEvent e)
@@ -2434,7 +2434,7 @@ public class BasicTreeUI
/**
* Invoked when a key has been released
- *
+ *
* @param e the key released
*/
public void keyReleased(KeyEvent e)
@@ -2451,7 +2451,7 @@ public class BasicTreeUI
extends MouseAdapter
implements MouseMotionListener
{
-
+
/**
* If the cell has been selected on mouse press.
*/
@@ -2467,7 +2467,7 @@ public class BasicTreeUI
/**
* Invoked when a mouse button has been pressed on a component.
- *
+ *
* @param e is the mouse event that occured
*/
public void mousePressed(MouseEvent e)
@@ -2488,7 +2488,7 @@ public class BasicTreeUI
* MOUSE_DRAGGED events will continue to be delivered to the component where
* the drag originated until the mouse button is released (regardless of
* whether the mouse position is within the bounds of the component).
- *
+ *
* @param e is the mouse event that occured
*/
public void mouseDragged(MouseEvent e)
@@ -2499,7 +2499,7 @@ public class BasicTreeUI
/**
* Invoked when the mouse button has been moved on a component (with no
* buttons no down).
- *
+ *
* @param e the mouse event that occured
*/
public void mouseMoved(MouseEvent e)
@@ -2509,7 +2509,7 @@ public class BasicTreeUI
/**
* Invoked when a mouse button has been released on a component.
- *
+ *
* @param e is the mouse event that occured
*/
public void mouseReleased(MouseEvent e)
@@ -2572,7 +2572,7 @@ public class BasicTreeUI
/**
* Constructor
- *
+ *
* @param source that events are coming from
* @param destination that receives all events
* @param e is the event received
@@ -2590,7 +2590,7 @@ public class BasicTreeUI
/**
* Invoked when the mouse button has been clicked (pressed and released) on
* a component.
- *
+ *
* @param e mouse event that occured
*/
public void mouseClicked(MouseEvent e)
@@ -2600,7 +2600,7 @@ public class BasicTreeUI
/**
* Invoked when a mouse button has been pressed on a component.
- *
+ *
* @param e mouse event that occured
*/
public void mousePressed(MouseEvent e)
@@ -2610,7 +2610,7 @@ public class BasicTreeUI
/**
* Invoked when a mouse button has been released on a component.
- *
+ *
* @param e mouse event that occured
*/
public void mouseReleased(MouseEvent e)
@@ -2621,7 +2621,7 @@ public class BasicTreeUI
/**
* Invoked when the mouse enters a component.
- *
+ *
* @param e mouse event that occured
*/
public void mouseEntered(MouseEvent e)
@@ -2632,7 +2632,7 @@ public class BasicTreeUI
/**
* Invoked when the mouse exits a component.
- *
+ *
* @param e mouse event that occured
*/
public void mouseExited(MouseEvent e)
@@ -2646,7 +2646,7 @@ public class BasicTreeUI
* MOUSE_DRAGGED events will continue to be delivered to the component where
* the drag originated until the mouse button is released (regardless of
* whether the mouse position is within the bounds of the component).
- *
+ *
* @param e mouse event that occured
*/
public void mouseDragged(MouseEvent e)
@@ -2657,7 +2657,7 @@ public class BasicTreeUI
/**
* Invoked when the mouse cursor has been moved onto a component but no
* buttons have been pushed.
- *
+ *
* @param e mouse event that occured
*/
public void mouseMoved(MouseEvent e)
@@ -2716,7 +2716,7 @@ public class BasicTreeUI
* The calling method is responsible for determining the Y location. If
* bounds is null, a newly created Rectangle should be returned, otherwise
* the value should be placed in bounds and returned.
- *
+ *
* @param cell the value to be represented
* @param row row being queried
* @param depth the depth of the row
@@ -2762,13 +2762,13 @@ public class BasicTreeUI
// FIXME: The y should be handled by the layout cache.
size = new Rectangle(getRowX(row, depth), prefSize.height * row, prefSize.width,
prefSize.height);
-
+
return size;
}
/**
* Returns the amount to indent the given row
- *
+ *
* @return amount to indent the given row.
*/
protected int getRowX(int row, int depth)
@@ -2795,7 +2795,7 @@ public class BasicTreeUI
/**
* This method gets called when a bound property is changed.
- *
+ *
* @param event A PropertyChangeEvent object describing the event source and
* the property that has changed.
*/
@@ -2826,7 +2826,7 @@ public class BasicTreeUI
}
else if (property.equals(JTree.EDITABLE_PROPERTY))
setEditable(((Boolean) event.getNewValue()).booleanValue());
-
+
}
}
@@ -2848,7 +2848,7 @@ public class BasicTreeUI
/**
* This method gets called when a bound property is changed.
- *
+ *
* @param event A PropertyChangeEvent object describing the event source and
* the property that has changed.
*/
@@ -2866,7 +2866,7 @@ public class BasicTreeUI
{
/**
* Creates the new tree cancel editing action.
- *
+ *
* @param name the name of the action (used in toString).
*/
public TreeCancelEditingAction(String name)
@@ -2876,8 +2876,8 @@ public class BasicTreeUI
/**
* Invoked when an action occurs, cancels the cell editing (if the
- * tree cell is being edited).
- *
+ * tree cell is being edited).
+ *
* @param e event that occured
*/
public void actionPerformed(ActionEvent e)
@@ -2904,7 +2904,7 @@ public class BasicTreeUI
/**
* Called whenever an item in the tree has been expanded.
- *
+ *
* @param event is the event that occured
*/
public void treeExpanded(TreeExpansionEvent event)
@@ -2919,7 +2919,7 @@ public class BasicTreeUI
/**
* Called whenever an item in the tree has been collapsed.
- *
+ *
* @param event is the event that occured
*/
public void treeCollapsed(TreeExpansionEvent event)
@@ -2947,7 +2947,7 @@ public class BasicTreeUI
/**
* Creates a new TreeHomeAction instance.
- *
+ *
* @param dir the direction to go to, -1 for home,
* 1 for end
* @param name the name of the action
@@ -2960,7 +2960,7 @@ public class BasicTreeUI
/**
* Invoked when an action occurs.
- *
+ *
* @param e is the event that occured
*/
public void actionPerformed(ActionEvent e)
@@ -3027,7 +3027,7 @@ public class BasicTreeUI
/**
* Returns true if the action is enabled.
- *
+ *
* @return true if the action is enabled.
*/
public boolean isEnabled()
@@ -3051,7 +3051,7 @@ public class BasicTreeUI
/**
* Creates a new TreeIncrementAction.
- *
+ *
* @param dir up or down, -1 for up, 1 for down
* @param name is the name of the direction
*/
@@ -3063,7 +3063,7 @@ public class BasicTreeUI
/**
* Invoked when an action occurs.
- *
+ *
* @param e is the event that occured
*/
public void actionPerformed(ActionEvent e)
@@ -3138,14 +3138,14 @@ public class BasicTreeUI
tree.setAnchorSelectionPath(newPath);
tree.setLeadSelectionPath(newPath);
}
-
+
// Ensure that the lead path is visible after the increment action.
tree.scrollPathToVisible(tree.getLeadSelectionPath());
}
/**
* Returns true if the action is enabled.
- *
+ *
* @return true if the action is enabled.
*/
public boolean isEnabled()
@@ -3177,7 +3177,7 @@ public class BasicTreeUI
* children will be null. Use e.getPath() to get the parent of the changed
* node(s). e.getChildIndices() returns the index(es) of the changed
* node(s).
- *
+ *
* @param e is the event that occured
*/
public void treeNodesChanged(TreeModelEvent e)
@@ -3191,7 +3191,7 @@ public class BasicTreeUI
* Invoked after nodes have been inserted into the tree. Use e.getPath() to
* get the parent of the new node(s). e.getChildIndices() returns the
* index(es) of the new node(s) in ascending order.
- *
+ *
* @param e is the event that occured
*/
public void treeNodesInserted(TreeModelEvent e)
@@ -3208,7 +3208,7 @@ public class BasicTreeUI
* siblings removed. Use e.getPath() to get the former parent of the deleted
* node(s). e.getChildIndices() returns, in ascending order, the index(es)
* the node(s) had before being deleted.
- *
+ *
* @param e is the event that occured
*/
public void treeNodesRemoved(TreeModelEvent e)
@@ -3224,7 +3224,7 @@ public class BasicTreeUI
* first element does not identify the current root node the first element
* should become the new root of the tree. Use e.getPath() to get the path
* to the node. e.getChildIndices() returns null.
- *
+ *
* @param e is the event that occured
*/
public void treeStructureChanged(TreeModelEvent e)
@@ -3249,7 +3249,7 @@ public class BasicTreeUI
/**
* Constructor
- *
+ *
* @param direction up or down
* @param name is the name of the direction
*/
@@ -3261,7 +3261,7 @@ public class BasicTreeUI
/**
* Invoked when an action occurs.
- *
+ *
* @param e is the event that occured
*/
public void actionPerformed(ActionEvent e)
@@ -3358,7 +3358,7 @@ public class BasicTreeUI
/**
* Returns true if the action is enabled.
- *
+ *
* @return true if the action is enabled.
*/
public boolean isEnabled()
@@ -3385,7 +3385,7 @@ public class BasicTreeUI
/**
* Messaged when the selection changes in the tree we're displaying for.
* Stops editing, messages super and displays the changed paths.
- *
+ *
* @param event the event that characterizes the change.
*/
public void valueChanged(TreeSelectionEvent event)
@@ -3394,15 +3394,15 @@ public class BasicTreeUI
TreePath op = event.getOldLeadSelectionPath();
TreePath np = event.getNewLeadSelectionPath();
-
+
// Repaint of the changed lead selection path.
if (op != np)
{
- Rectangle o = treeState.getBounds(event.getOldLeadSelectionPath(),
+ Rectangle o = treeState.getBounds(event.getOldLeadSelectionPath(),
new Rectangle());
- Rectangle n = treeState.getBounds(event.getNewLeadSelectionPath(),
+ Rectangle n = treeState.getBounds(event.getNewLeadSelectionPath(),
new Rectangle());
-
+
if (o != null)
tree.repaint(o);
if (n != null)
@@ -3419,7 +3419,7 @@ public class BasicTreeUI
{
/**
* Creates a new TreeToggleAction.
- *
+ *
* @param name is the name of Action field
*/
public TreeToggleAction(String name)
@@ -3429,7 +3429,7 @@ public class BasicTreeUI
/**
* Invoked when an action occurs.
- *
+ *
* @param e the event that occured
*/
public void actionPerformed(ActionEvent e)
@@ -3452,7 +3452,7 @@ public class BasicTreeUI
/**
* Returns true if the action is enabled.
- *
+ *
* @return true if the action is enabled, false otherwise
*/
public boolean isEnabled()
@@ -3475,7 +3475,7 @@ public class BasicTreeUI
/**
* Constructor
- *
+ *
* @param direction to traverse
* @param name is the name of the direction
*/
@@ -3487,7 +3487,7 @@ public class BasicTreeUI
/**
* Invoked when an action occurs.
- *
+ *
* @param e the event that occured
*/
public void actionPerformed(ActionEvent e)
@@ -3512,7 +3512,7 @@ public class BasicTreeUI
// we just select the parent. We do not select the root if it
// is not visible.
TreePath parent = current.getParentPath();
- if (parent != null &&
+ if (parent != null &&
! (parent.getPathCount() == 1 && ! tree.isRootVisible()))
tree.setSelectionPath(parent);
}
@@ -3534,14 +3534,14 @@ public class BasicTreeUI
tree.expandPath(current);
}
}
-
+
// Ensure that the lead path is visible after the increment action.
tree.scrollPathToVisible(tree.getLeadSelectionPath());
}
/**
* Returns true if the action is enabled.
- *
+ *
* @return true if the action is enabled, false otherwise
*/
public boolean isEnabled()
@@ -3553,7 +3553,7 @@ public class BasicTreeUI
/**
* Returns true if the LookAndFeel implements the control icons. Package
* private for use in inner classes.
- *
+ *
* @returns true if there are control icons
*/
boolean hasControlIcons()
@@ -3566,7 +3566,7 @@ public class BasicTreeUI
/**
* Returns control icon. It is null if the LookAndFeel does not implements the
* control icons. Package private for use in inner classes.
- *
+ *
* @return control icon if it exists.
*/
Icon getCurrentControlIcon(TreePath path)
@@ -3604,7 +3604,7 @@ public class BasicTreeUI
/**
* Returns the parent of the current node
- *
+ *
* @param root is the root of the tree
* @param node is the current node
* @return is the parent of the current node
@@ -3621,7 +3621,7 @@ public class BasicTreeUI
/**
* Recursively checks the tree for the specified node, starting at the root.
- *
+ *
* @param root is starting node to start searching at.
* @param node is the node to search for
* @return the parent node of node
@@ -3648,7 +3648,7 @@ public class BasicTreeUI
/**
* Selects the specified path in the tree depending on modes. Package private
* for use in inner classes.
- *
+ *
* @param tree is the tree we are selecting the path in
* @param path is the path we are selecting
*/
@@ -3657,7 +3657,7 @@ public class BasicTreeUI
if (path != null)
{
tree.setSelectionPath(path);
- tree.setLeadSelectionPath(path);
+ tree.setLeadSelectionPath(path);
tree.makeVisible(path);
tree.scrollPathToVisible(path);
}
@@ -3666,7 +3666,7 @@ public class BasicTreeUI
/**
* Returns the path from node to the root. Package private for use in inner
* classes.
- *
+ *
* @param node the node to get the path to
* @param depth the depth of the tree to return a path for
* @return an array of tree nodes that represent the path to node.
@@ -3689,7 +3689,7 @@ public class BasicTreeUI
/**
* Draws a vertical line using the given graphic context
- *
+ *
* @param g is the graphic context
* @param c is the component the new line will belong to
* @param x is the horizonal position
@@ -3706,7 +3706,7 @@ public class BasicTreeUI
/**
* Draws a horizontal line using the given graphic context
- *
+ *
* @param g is the graphic context
* @param c is the component the new line will belong to
* @param y is the vertical position
@@ -3723,7 +3723,7 @@ public class BasicTreeUI
/**
* Draws an icon at around a specific position
- *
+ *
* @param c is the component the new line will belong to
* @param g is the graphic context
* @param icon is the icon which will be drawn
@@ -3745,7 +3745,7 @@ public class BasicTreeUI
/**
* Draws a dashed horizontal line.
- *
+ *
* @param g - the graphics configuration.
* @param y - the y location to start drawing at
* @param x1 - the x location to start drawing at
@@ -3760,7 +3760,7 @@ public class BasicTreeUI
/**
* Draws a dashed vertical line.
- *
+ *
* @param g - the graphics configuration.
* @param x - the x location to start drawing at
* @param y1 - the y location to start drawing at
@@ -3776,7 +3776,7 @@ public class BasicTreeUI
/**
* Paints the expand (toggle) part of a row. The receiver should NOT modify
* clipBounds, or insets.
- *
+ *
* @param g - the graphics configuration
* @param clipBounds -
* @param insets -
@@ -3806,7 +3806,7 @@ public class BasicTreeUI
* Paints the horizontal part of the leg. The receiver should NOT modify
* clipBounds, or insets. NOTE: parentRow can be -1 if the root is not
* visible.
- *
+ *
* @param g - the graphics configuration
* @param clipBounds -
* @param insets -
@@ -3834,7 +3834,7 @@ public class BasicTreeUI
/**
* Paints the vertical part of the leg. The receiver should NOT modify
* clipBounds, insets.
- *
+ *
* @param g - the graphics configuration.
* @param clipBounds -
* @param insets -
@@ -3845,7 +3845,7 @@ public class BasicTreeUI
{
Rectangle bounds = getPathBounds(tree, path);
TreePath parent = path.getParentPath();
-
+
boolean paintLine;
if (isRootVisible())
paintLine = parent != null;
@@ -3854,7 +3854,7 @@ public class BasicTreeUI
if (paintLine)
{
Rectangle parentBounds = getPathBounds(tree, parent);
- paintVerticalLine(g, tree, parentBounds.x + 2 * gap,
+ paintVerticalLine(g, tree, parentBounds.x + 2 * gap,
parentBounds.y + parentBounds.height / 2,
bounds.y + bounds.height / 2);
}
@@ -3863,7 +3863,7 @@ public class BasicTreeUI
/**
* Paints the renderer part of a row. The receiver should NOT modify
* clipBounds, or insets.
- *
+ *
* @param g - the graphics configuration
* @param clipBounds -
* @param insets -
@@ -3911,7 +3911,7 @@ public class BasicTreeUI
/**
* Returns true if the expand (toggle) control should be drawn for the
* specified row.
- *
+ *
* @param path - current path to check for.
* @param row - current row to check for.
* @param isExpanded - true if the path is expanded
@@ -3929,7 +3929,7 @@ public class BasicTreeUI
/**
* Returns the amount to indent the given row
- *
+ *
* @return amount to indent the given row.
*/
protected int getRowX(int row, int depth)
diff --git a/libjava/classpath/javax/swing/plaf/basic/BasicViewportUI.java b/libjava/classpath/javax/swing/plaf/basic/BasicViewportUI.java
index 51b902d..11c7d63 100644
--- a/libjava/classpath/javax/swing/plaf/basic/BasicViewportUI.java
+++ b/libjava/classpath/javax/swing/plaf/basic/BasicViewportUI.java
@@ -43,7 +43,7 @@ import javax.swing.LookAndFeel;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ViewportUI;
-public class BasicViewportUI extends ViewportUI
+public class BasicViewportUI extends ViewportUI
{
protected void installDefaults(JComponent c)
{
@@ -61,13 +61,13 @@ public class BasicViewportUI extends ViewportUI
return new BasicViewportUI();
}
- public void installUI(JComponent c)
+ public void installUI(JComponent c)
{
super.installUI(c);
installDefaults(c);
}
- public void uninstallUI(JComponent c)
+ public void uninstallUI(JComponent c)
{
super.uninstallUI(c);
uninstallDefaults(c);
diff --git a/libjava/classpath/javax/swing/plaf/metal/DefaultMetalTheme.java b/libjava/classpath/javax/swing/plaf/metal/DefaultMetalTheme.java
index 672676f..27c569f 100644
--- a/libjava/classpath/javax/swing/plaf/metal/DefaultMetalTheme.java
+++ b/libjava/classpath/javax/swing/plaf/metal/DefaultMetalTheme.java
@@ -48,7 +48,7 @@ import javax.swing.plaf.FontUIResource;
/**
* The default theme for the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalLookAndFeel#setCurrentTheme(MetalTheme)
*/
public class DefaultMetalTheme extends MetalTheme
@@ -57,15 +57,15 @@ public class DefaultMetalTheme extends MetalTheme
new ColorUIResource(102, 102, 153);
private static final ColorUIResource PRIMARY2 =
new ColorUIResource(153, 153, 204);
- private static final ColorUIResource PRIMARY3 =
+ private static final ColorUIResource PRIMARY3 =
new ColorUIResource(204, 204, 255);
- private static final ColorUIResource SECONDARY1 =
+ private static final ColorUIResource SECONDARY1 =
new ColorUIResource(102, 102, 102);
- private static final ColorUIResource SECONDARY2 =
+ private static final ColorUIResource SECONDARY2 =
new ColorUIResource(153, 153, 153);
- private static final ColorUIResource SECONDARY3 =
+ private static final ColorUIResource SECONDARY3 =
new ColorUIResource(204, 204, 204);
-
+
private static final FontUIResource SUB_TEXT_FONT =
new FontUIResource("Dialog", Font.PLAIN, 10);
private static final FontUIResource SYSTEM_TEXT_FONT =
@@ -74,7 +74,7 @@ public class DefaultMetalTheme extends MetalTheme
new FontUIResource("Dialog", Font.PLAIN, 12);
private static final FontUIResource WINDOW_TITLE_FONT =
new FontUIResource("Dialog", Font.BOLD, 12);
-
+
/**
* The control text font for swing.boldMetal=false.
*/
@@ -108,7 +108,7 @@ public class DefaultMetalTheme extends MetalTheme
* Indicates the menu text font.
*/
static final int MENU_TEXT_FONT = 2;
-
+
/**
* Creates a new instance of this theme.
*/
@@ -119,7 +119,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the name of the theme.
- *
+ *
* @return "Steel".
*/
public String getName()
@@ -129,7 +129,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the first primary color for this theme.
- *
+ *
* @return The first primary color.
*/
protected ColorUIResource getPrimary1()
@@ -139,7 +139,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the second primary color for this theme.
- *
+ *
* @return The second primary color.
*/
protected ColorUIResource getPrimary2()
@@ -149,7 +149,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the third primary color for this theme.
- *
+ *
* @return The third primary color.
*/
protected ColorUIResource getPrimary3()
@@ -159,7 +159,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the first secondary color for this theme.
- *
+ *
* @return The first secondary color.
*/
protected ColorUIResource getSecondary1()
@@ -169,7 +169,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the second secondary color for this theme.
- *
+ *
* @return The second secondary color.
*/
protected ColorUIResource getSecondary2()
@@ -179,7 +179,7 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the third secondary color for this theme.
- *
+ *
* @return The third secondary color.
*/
protected ColorUIResource getSecondary3()
@@ -190,66 +190,66 @@ public class DefaultMetalTheme extends MetalTheme
/**
* Returns the font used for text on controls. In this case, the font is
* FontUIResource("Dialog", Font.BOLD, 12), unless the
- * swing.boldMetal UI default is set to {@link Boolean#FALSE}
+ * swing.boldMetal UI default is set to {@link Boolean#FALSE}
* in which case it is FontUIResource("Dialog", Font.PLAIN, 12).
- *
+ *
* @return The font.
*/
public FontUIResource getControlTextFont()
{
return getFont(CONTROL_TEXT_FONT);
}
-
+
/**
* Returns the font used for text in menus. In this case, the font is
* FontUIResource("Dialog", Font.BOLD, 12), unless the
- * swing.boldMetal UI default is set to {@link Boolean#FALSE}
+ * swing.boldMetal UI default is set to {@link Boolean#FALSE}
* in which case it is FontUIResource("Dialog", Font.PLAIN, 12).
- *
+ *
* @return The font used for text in menus.
*/
public FontUIResource getMenuTextFont()
{
return getFont(MENU_TEXT_FONT);
}
-
+
/**
* Returns the font used for sub text. In this case, the font is
* FontUIResource("Dialog", Font.PLAIN, 10).
- *
+ *
* @return The font used for sub text.
*/
public FontUIResource getSubTextFont()
{
return SUB_TEXT_FONT;
}
-
+
/**
* Returns the font used for system text. In this case, the font is
* FontUIResource("Dialog", Font.PLAIN, 12).
- *
+ *
* @return The font used for system text.
*/
public FontUIResource getSystemTextFont()
{
return SYSTEM_TEXT_FONT;
}
-
+
/**
* Returns the font used for user text. In this case, the font is
* FontUIResource("Dialog", Font.PLAIN, 12).
- *
- * @return The font used for user text.
+ *
+ * @return The font used for user text.
*/
public FontUIResource getUserTextFont()
{
return USER_TEXT_FONT;
}
-
+
/**
- * Returns the font used for window titles. In this case, the font is
+ * Returns the font used for window titles. In this case, the font is
* FontUIResource("Dialog", Font.BOLD, 12).
- *
+ *
* @return The font used for window titles.
*/
public FontUIResource getWindowTitleFont()
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalBorders.java b/libjava/classpath/javax/swing/plaf/metal/MetalBorders.java
index d4e3a84..2536299 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalBorders.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalBorders.java
@@ -104,15 +104,15 @@ public class MetalBorders
/**
*
A border used for {@link JButton} components.
- *
+ *
*
This {@link Border} implementation can handle only instances of
* {@link AbstractButton} and their subclasses.
- *
+ *
*
If the Metal Look and Feel's current theme is 'Ocean' the border
* will be painted with a special highlight when the mouse cursor if
* over the button (ie. the property rollover of the
* button's model is true) and is not a direct
- * child of a {@link JToolBar}.
+ * child of a {@link JToolBar}.
*/
public static class ButtonBorder extends AbstractBorder implements UIResource
{
@@ -230,7 +230,7 @@ public class MetalBorders
g.setColor(middle);
g.drawLine(x + 1, y + 1, x + w - 2, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + h - 2);
-
+
// draw crossing pixels of both borders
g.setColor(shadow);
g.drawRect(x + 1, y + h - 2, 0, 0);
@@ -238,11 +238,11 @@ public class MetalBorders
}
}
}
- else
+ else
{
// draw disabled border
g.setColor(MetalLookAndFeel.getInactiveControlTextColor());
- g.drawRect(x, y, w - 2, h - 2);
+ g.drawRect(x, y, w - 2, h - 2);
}
}
@@ -260,7 +260,7 @@ public class MetalBorders
int y, int w, int h)
{
ButtonModel bmodel = null;
-
+
// The RI will fail with a ClassCastException in such a situation.
// This code tries to be more helpful.
if (c instanceof AbstractButton)
@@ -304,11 +304,11 @@ public class MetalBorders
g.drawRect(x, y, w - 1, h - 1);
}
}
- else
+ else
{
// draw disabled border
g.setColor(MetalLookAndFeel.getInactiveControlTextColor());
- g.drawRect(x, y, w - 2, h - 2);
+ g.drawRect(x, y, w - 2, h - 2);
}
}
@@ -325,7 +325,7 @@ public class MetalBorders
}
/**
- * Returns the insets of the ButtonBorder in the specified
+ * Returns the insets of the ButtonBorder in the specified
* newInsets object.
*
* @param c the component for which the border is used (ignored).
@@ -357,22 +357,22 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return getBorderInsets(c, null);
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
* @return The border insets.
*/
@@ -387,12 +387,12 @@ public class MetalBorders
newInsets.bottom = 2;
newInsets.right = 3;
}
- return newInsets;
+ return newInsets;
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
@@ -400,13 +400,13 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
- g.setColor(MetalLookAndFeel.getControlDarkShadow());
- g.drawRect(x, y, w - 1, h - 1);
+ g.setColor(MetalLookAndFeel.getControlDarkShadow());
+ g.drawRect(x, y, w - 1, h - 1);
}
-
+
}
/**
@@ -416,7 +416,7 @@ public class MetalBorders
implements UIResource
{
private static final Insets borderInsets = new Insets(2, 2, 2, 2);
-
+
/**
* Creates a new border instance.
*/
@@ -424,27 +424,27 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return borderInsets;
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
* @param newInsets an existing insets instance, that will be populated
* with the border insets and returned as the result
* (null not permitted).
- *
+ *
* @return The newInsets reference.
*/
public Insets getBorderInsets(Component c, Insets newInsets)
@@ -453,12 +453,12 @@ public class MetalBorders
newInsets.left = borderInsets.left;
newInsets.bottom = borderInsets.bottom;
newInsets.right = borderInsets.right;
- return newInsets;
+ return newInsets;
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate.
@@ -466,9 +466,9 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
- {
+ {
Color savedColor = g.getColor();
g.setColor(MetalLookAndFeel.getControlDarkShadow());
g.drawRect(x, y, w - 2, h - 2);
@@ -479,13 +479,13 @@ public class MetalBorders
g.drawLine(x + w - 2, y + 1, x + w - 2, y + 1);
g.setColor(savedColor);
}
-
+
}
-
+
/**
- * A border used for a {@link JInternalFrame} when it is being used as a
+ * A border used for a {@link JInternalFrame} when it is being used as a
* palette.
- *
+ *
* @since 1.3
*/
public static class PaletteBorder extends AbstractBorder
@@ -500,12 +500,12 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
@@ -515,26 +515,26 @@ public class MetalBorders
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
* @param newInsets an existing insets instance, that will be populated
* with the border insets and returned as the result
* (null not permitted).
- *
+ *
* @return The newInsets reference.
*/
public Insets getBorderInsets(Component c, Insets newInsets)
- {
+ {
newInsets.top = borderInsets.top;
newInsets.left = borderInsets.left;
newInsets.bottom = borderInsets.bottom;
newInsets.right = borderInsets.right;
- return newInsets;
+ return newInsets;
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate.
@@ -542,26 +542,26 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
Color savedColor = g.getColor();
-
+
// draw the outline
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
g.drawRect(x, y, w - 1, h - 1);
-
+
// put a dot in each corner
g.setColor(MetalLookAndFeel.getControl());
g.fillRect(x, y, 1, 1);
g.fillRect(x + w - 1, y, 1, 1);
g.fillRect(x + w - 1, y + h - 1, 1, 1);
- g.fillRect(x, y + h - 1, 1, 1);
+ g.fillRect(x, y + h - 1, 1, 1);
g.setColor(savedColor);
}
}
-
+
/**
* A border used for the {@link JTextField} component.
*/
@@ -575,10 +575,10 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate.
@@ -586,7 +586,7 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
boolean enabledTextBorder;
@@ -608,7 +608,7 @@ public class MetalBorders
g.setColor(savedColor);
}
}
-
+
}
/**
@@ -626,27 +626,27 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return borderInsets;
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
* @param newInsets an existing insets instance, that will be populated
* with the border insets and returned as the result
* (null not permitted).
- *
+ *
* @return The newInsets reference.
*/
public Insets getBorderInsets(Component c, Insets newInsets)
@@ -655,12 +655,12 @@ public class MetalBorders
newInsets.left = borderInsets.left;
newInsets.bottom = borderInsets.bottom;
newInsets.right = borderInsets.right;
- return newInsets;
+ return newInsets;
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
@@ -668,47 +668,47 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
-
+
JInternalFrame f = (JInternalFrame) c;
if (f.isSelected())
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
else
g.setColor(MetalLookAndFeel.getControlDarkShadow());
-
+
// fill the border background
g.fillRect(x, y, w, 5);
g.fillRect(x, y, 5, h);
g.fillRect(x + w - 5, y, 5, h);
g.fillRect(x, y + h - 5, w, 5);
-
+
// draw a dot in each corner
g.setColor(MetalLookAndFeel.getControl());
g.fillRect(x, y, 1, 1);
g.fillRect(x + w - 1, y, 1, 1);
g.fillRect(x + w - 1, y + h - 1, 1, 1);
g.fillRect(x, y + h - 1, 1, 1);
-
+
// draw the lines
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 14, y + 2, x + w - 15, y + 2);
g.drawLine(x + 14, y + h - 3, x + w - 15, y + h - 3);
g.drawLine(x + 2, y + 14, x + 2, y + h - 15);
g.drawLine(x + w - 3, y + 14, x + w - 3, y + h - 15);
-
+
// draw the line highlights
if (f.isSelected())
g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
- else
+ else
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(x + 15, y + 3, x + w - 14, y + 3);
g.drawLine(x + 15, y + h - 2, x + w - 14, y + h - 2);
g.drawLine(x + 3, y + 15, x + 3, y + h - 14);
g.drawLine(x + w - 2, y + 15, x + w - 2, y + h - 14);
}
-
+
}
/**
@@ -718,7 +718,7 @@ public class MetalBorders
public static class OptionDialogBorder extends AbstractBorder
implements UIResource
{
-
+
/**
* Creates a new border instance.
*/
@@ -726,22 +726,22 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return getBorderInsets(c, null);
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
* @return The border insets.
*/
@@ -756,12 +756,12 @@ public class MetalBorders
newInsets.bottom = 3;
newInsets.right = 3;
}
- return newInsets;
+ return newInsets;
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
@@ -769,10 +769,10 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
-
+
JInternalFrame f = (JInternalFrame) c;
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
if (f.getContentPane() instanceof JOptionPane)
@@ -791,32 +791,32 @@ public class MetalBorders
Color bc = UIManager.getColor(
"OptionPane.warningDialog.border.background");
if (bc != null)
- g.setColor(bc);
+ g.setColor(bc);
}
else if (type == JOptionPane.ERROR_MESSAGE)
{
Color bc = UIManager.getColor(
"OptionPane.errorDialog.border.background");
if (bc != null)
- g.setColor(bc);
+ g.setColor(bc);
}
}
-
+
// fill the border background
g.fillRect(x, y, w, 3);
g.fillRect(x, y, 3, h);
g.fillRect(x + w - 3, y, 3, h);
g.fillRect(x, y + h - 3, w, 3);
-
+
// draw a dot in each corner
g.setColor(MetalLookAndFeel.getControl());
g.fillRect(x, y, 1, 1);
g.fillRect(x + w - 1, y, 1, 1);
g.fillRect(x + w - 1, y + h - 1, 1, 1);
g.fillRect(x, y + h - 1, 1, 1);
-
+
}
-
+
}
/**
@@ -827,7 +827,7 @@ public class MetalBorders
{
/** The border insets. */
protected static Insets borderInsets = new Insets(2, 2, 2, 2);
-
+
/**
* Creates a new border instance.
*/
@@ -835,11 +835,11 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Paints the border for the component. A border is painted only if the
* component is a selected {@link JMenu} or an armed {@link JMenuItem}.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate of the border area.
@@ -852,7 +852,7 @@ public class MetalBorders
{
Color dark = MetalLookAndFeel.getPrimaryControlDarkShadow();
Color light = MetalLookAndFeel.getPrimaryControlHighlight();
- if (c instanceof JMenu)
+ if (c instanceof JMenu)
{
JMenu menu = (JMenu) c;
if (menu.isSelected())
@@ -868,7 +868,7 @@ public class MetalBorders
else if (c instanceof JMenuItem)
{
JMenuItem item = (JMenuItem) c;
- if (item.isArmed())
+ if (item.isArmed())
{
g.setColor(dark);
g.drawLine(x, y, x + w, y);
@@ -883,27 +883,27 @@ public class MetalBorders
}
}
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return borderInsets;
}
-
+
/**
* Populates insets with the border insets, then returns it.
- *
+ *
* @param c the component (ignored).
* @param insets the object to populate with the border insets.
- *
+ *
* @return The border insets.
- *
+ *
* @throws NullPointerException if insets is null.
*/
public Insets getBorderInsets(Component c, Insets insets)
@@ -925,18 +925,18 @@ public class MetalBorders
{
/** The border insets. */
protected static Insets borderInsets = new Insets(1, 0, 1, 0);
-
+
/**
* Creates a new border instance.
*/
public MenuBarBorder()
{
}
-
+
/**
* Paints the border for the component. A border is painted only if the
* component is a selected {@link JMenu} or an armed {@link JMenuItem}.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate of the border area.
@@ -957,30 +957,30 @@ public class MetalBorders
g.setColor(UIManager.getColor("MenuBar.borderColor"));
else
g.setColor(MetalLookAndFeel.getControlShadow());
-
+
g.drawLine(x, y + h - 1, x + w, y + h - 1);
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return borderInsets;
}
-
+
/**
* Populates insets with the border insets, then returns it.
- *
+ *
* @param c the component (ignored).
* @param insets the object to populate with the border insets.
- *
+ *
* @return The border insets.
- *
+ *
* @throws NullPointerException if insets is null.
*/
public Insets getBorderInsets(Component c, Insets insets)
@@ -1002,7 +1002,7 @@ public class MetalBorders
{
/** The border insets. */
private static Insets insets = new Insets(1, 1, 2, 2);
-
+
/**
* Constructs a new ScrollPaneBorder.
*/
@@ -1010,7 +1010,7 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the insets of the border for the Component c.
*
@@ -1045,7 +1045,7 @@ public class MetalBorders
// paint left border line
g.drawLine(x, y, x, y + h - 2);
-
+
// paint right inner border line
g.drawLine(x + w - 2, y, x + w - 2, y + h + 1);
@@ -1067,11 +1067,11 @@ public class MetalBorders
g.drawLine(x + 1, y + h - 2, x + 1, y + h - 2);
}
-
+
}
-
+
/**
- * A button border that is only visible when the mouse pointer is within
+ * A button border that is only visible when the mouse pointer is within
* the button's bounds.
*/
public static class RolloverButtonBorder
@@ -1084,10 +1084,10 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Paints the border.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
@@ -1095,7 +1095,7 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
// TODO: What should be done here? Obviously the ButtonBorder already
@@ -1104,7 +1104,7 @@ public class MetalBorders
super.paintBorder(c, g, x, y, w, h);
}
}
-
+
/**
* This border is used in Toolbar buttons as inner border.
*/
@@ -1120,7 +1120,7 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the insets of the RolloverBorder.
*
@@ -1175,7 +1175,7 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the insets of the border, creating a new Insets instance
* with each call.
@@ -1187,7 +1187,7 @@ public class MetalBorders
{
return getBorderInsets(c, null);
}
-
+
/**
* Returns the insets of the border, using the supplied Insets instance.
*
@@ -1209,7 +1209,7 @@ public class MetalBorders
insets.bottom = borderInsets.bottom;
insets.right = borderInsets.right;
}
-
+
return insets;
}
@@ -1234,21 +1234,21 @@ public class MetalBorders
// draw dark outer border
g.setColor(darkShadow);
g.drawRect(x, y, w - 1, h - 1);
-
+
// draw highlighted inner border (only top and left)
g.setColor(light);
g.drawLine(x + 1, y + 1, x + w - 2, y + 1);
}
-
+
}
/**
* A border used for the {@link JToggleButton} component.
- *
+ *
* @since 1.3
*/
public static class ToggleButtonBorder
- extends ButtonBorder
+ extends ButtonBorder
{
/**
* Creates a new border instance.
@@ -1257,7 +1257,7 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Paints the toggle button border.
*
@@ -1272,7 +1272,7 @@ public class MetalBorders
int h)
{
ButtonModel bmodel = null;
-
+
if (c instanceof AbstractButton)
bmodel = ((AbstractButton) c).getModel();
@@ -1314,23 +1314,23 @@ public class MetalBorders
g.setColor(shadow);
g.drawLine(x + 1, y + 1, x + w - 2, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + h - 2);
-
+
// draw crossing pixels of both borders
g.setColor(shadow);
g.drawLine(x + 1, y + h - 2, x + 1, y + h - 2);
g.drawLine(x + w - 2, y + 1, x + w - 2, y + 1);
-
+
}
// draw corners
g.setColor(middle);
g.drawLine(x, y + h - 1, x, y + h - 1);
g.drawLine(x + w - 1, y, x + w - 1, y);
}
- else
+ else
{
// draw disabled border
g.setColor(MetalLookAndFeel.getControlDisabled());
- g.drawRect(x, y, w - 2, h - 2);
+ g.drawRect(x, y, w - 2, h - 2);
}
}
}
@@ -1348,22 +1348,22 @@ public class MetalBorders
{
// Nothing to do here.
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
- *
+ *
* @return The border insets.
*/
public Insets getBorderInsets(Component c)
{
return getBorderInsets(c, null);
}
-
+
/**
* Returns the border insets.
- *
+ *
* @param c the component (ignored).
* @return The border insets.
*/
@@ -1371,7 +1371,7 @@ public class MetalBorders
{
JToolBar tb = (JToolBar) c;
if (tb.getOrientation() == JToolBar.HORIZONTAL)
- {
+ {
if (newInsets == null)
newInsets = new Insets(2, 16, 2, 2);
else
@@ -1381,10 +1381,10 @@ public class MetalBorders
newInsets.bottom = 2;
newInsets.right = 2;
}
- return newInsets;
+ return newInsets;
}
else // assume JToolBar.VERTICAL
- {
+ {
if (newInsets == null)
newInsets = new Insets(16, 2, 2, 2);
else
@@ -1394,14 +1394,14 @@ public class MetalBorders
newInsets.bottom = 2;
newInsets.right = 2;
}
- return newInsets;
+ return newInsets;
}
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
@@ -1409,27 +1409,27 @@ public class MetalBorders
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
-
+
JToolBar tb = (JToolBar) c;
if (tb.getOrientation() == JToolBar.HORIZONTAL)
{
- MetalUtils.fillMetalPattern(tb, g, x + 2, y + 2, x + 11, y + h - 5,
- MetalLookAndFeel.getControlHighlight(),
+ MetalUtils.fillMetalPattern(tb, g, x + 2, y + 2, x + 11, y + h - 5,
+ MetalLookAndFeel.getControlHighlight(),
MetalLookAndFeel.getControlDarkShadow());
}
else
- {
- MetalUtils.fillMetalPattern(tb, g, x + 2, y + 2, x + w - 5, y + 11,
- MetalLookAndFeel.getControlHighlight(),
+ {
+ MetalUtils.fillMetalPattern(tb, g, x + 2, y + 2, x + w - 5, y + 11,
+ MetalLookAndFeel.getControlHighlight(),
MetalLookAndFeel.getControlDarkShadow());
}
}
-
+
}
-
+
/**
* A border for table header cells.
*
@@ -1499,17 +1499,17 @@ public class MetalBorders
{
Border outer = new ButtonBorder();
Border inner = getMarginBorder();
- buttonBorder = new BorderUIResource.CompoundBorderUIResource(outer,
+ buttonBorder = new BorderUIResource.CompoundBorderUIResource(outer,
inner);
}
return buttonBorder;
}
-
+
/**
* Returns a border for use with {@link JToggleButton} components.
*
* @return A border.
- *
+ *
* @since 1.3
*/
public static Border getToggleButtonBorder()
@@ -1527,23 +1527,23 @@ public class MetalBorders
/**
* Returns a border instance that is used with a {@link JInternalFrame} when
* it is in the iconified state.
- *
+ *
* @return A border.
- *
+ *
* @since 1.3
*/
public static Border getDesktopIconBorder()
{
if (desktopIconBorder == null)
desktopIconBorder = new DesktopIconBorder();
- return desktopIconBorder;
+ return desktopIconBorder;
}
/**
* Returns a border for use by the {@link JTextField} component.
- *
+ *
* @return A border.
- *
+ *
* @since 1.3
*/
public static Border getTextFieldBorder()
@@ -1608,7 +1608,7 @@ public class MetalBorders
/**
* Returns a shared instance of a compound border for rollover buttons.
- *
+ *
* @return A shared border instance.
*/
static Border getRolloverBorder()
@@ -1617,7 +1617,7 @@ public class MetalBorders
{
Border outer = new MetalBorders.RolloverButtonBorder();
Border inner = MetalBorders.getMarginBorder();
- rolloverBorder = new BorderUIResource.CompoundBorderUIResource(outer,
+ rolloverBorder = new BorderUIResource.CompoundBorderUIResource(outer,
inner);
}
return rolloverBorder;
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalButtonListener.java b/libjava/classpath/javax/swing/plaf/metal/MetalButtonListener.java
index f2f778f..7cf84e5 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalButtonListener.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalButtonListener.java
@@ -45,25 +45,25 @@ import javax.swing.plaf.basic.BasicButtonListener;
/**
* A listener for buttons under the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalButtonUI#createButtonListener
*/
-class MetalButtonListener extends BasicButtonListener
+class MetalButtonListener extends BasicButtonListener
{
-
+
/**
* Creates a new instance.
- *
+ *
* @param button the button.
*/
public MetalButtonListener(AbstractButton button)
{
super(button);
}
-
+
/**
* Handles property change events.
- *
+ *
* @param e the event.
*/
public void propertyChange(PropertyChangeEvent e)
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalButtonUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalButtonUI.java
index 108b3b2..974f0a8 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalButtonUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalButtonUI.java
@@ -74,7 +74,7 @@ public class MetalButtonUI
* The color used to draw the focus rectangle around the text and/or icon.
*/
protected Color focusColor;
-
+
/**
* The background color for the button when it is pressed.
*/
@@ -87,12 +87,12 @@ public class MetalButtonUI
/**
* Returns a UI delegate for the specified component.
- *
+ *
* @param c the component (should be a subclass of {@link AbstractButton}).
- *
+ *
* @return A new instance of MetalButtonUI.
*/
- public static ComponentUI createUI(JComponent c)
+ public static ComponentUI createUI(JComponent c)
{
if (sharedUI == null)
sharedUI = new MetalButtonUI();
@@ -143,9 +143,9 @@ public class MetalButtonUI
/**
* Installs the default settings for the specified button.
- *
+ *
* @param button the button.
- *
+ *
* @see #uninstallDefaults(AbstractButton)
*/
public void installDefaults(AbstractButton button)
@@ -157,7 +157,7 @@ public class MetalButtonUI
/**
* Removes the defaults added by {@link #installDefaults(AbstractButton)}.
*/
- public void uninstallDefaults(AbstractButton button)
+ public void uninstallDefaults(AbstractButton button)
{
// This is overridden to be public, for whatever reason.
super.uninstallDefaults(button);
@@ -166,22 +166,22 @@ public class MetalButtonUI
/**
* Paints the background of the button to indicate that it is in the
* "pressed" state.
- *
+ *
* @param g the graphics context.
* @param b the button.
*/
- protected void paintButtonPressed(Graphics g, AbstractButton b)
- {
+ protected void paintButtonPressed(Graphics g, AbstractButton b)
+ {
if (b.isContentAreaFilled())
{
g.setColor(getSelectColor());
g.fillRect(0, 0, b.getWidth(), b.getHeight());
}
}
-
- /**
+
+ /**
* Paints the focus rectangle around the button text and/or icon.
- *
+ *
* @param g the graphics context.
* @param b the button.
* @param viewRect the button bounds.
@@ -189,7 +189,7 @@ public class MetalButtonUI
* @param iconRect the icon bounds.
*/
protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect,
- Rectangle textRect, Rectangle iconRect)
+ Rectangle textRect, Rectangle iconRect)
{
if (b.isEnabled() && b.hasFocus() && b.isFocusPainted())
{
@@ -201,17 +201,17 @@ public class MetalButtonUI
g.setColor(savedColor);
}
}
-
+
/**
* Paints the button text.
- *
+ *
* @param g the graphics context.
* @param c the button.
* @param textRect the text bounds.
* @param text the text to display.
*/
protected void paintText(Graphics g, JComponent c, Rectangle textRect,
- String text)
+ String text)
{
AbstractButton b = (AbstractButton) c;
Font f = b.getFont();
@@ -227,7 +227,7 @@ public class MetalButtonUI
{
g.setColor(getDisabledTextColor());
g.drawString(text, textRect.x, textRect.y + fm.getAscent());
- }
+ }
}
/**
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalCheckBoxIcon.java b/libjava/classpath/javax/swing/plaf/metal/MetalCheckBoxIcon.java
index 30ee931..5e0ac06 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalCheckBoxIcon.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalCheckBoxIcon.java
@@ -134,7 +134,7 @@ public class MetalCheckBoxIcon
MetalUtils.paintGradient(g, x, y, getIconWidth(), getIconHeight(),
SwingConstants.VERTICAL, "CheckBox.gradient");
border.paintBorder(c, g, x, y, getIconWidth(), getIconHeight());
-
+
AbstractButton b = (AbstractButton) c;
if (b.isSelected())
drawCheck(b, g, x, y);
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalCheckBoxUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalCheckBoxUI.java
index c794164..11979e1 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalCheckBoxUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalCheckBoxUI.java
@@ -75,10 +75,10 @@ public class MetalCheckBoxUI
instance = new MetalCheckBoxUI();
return instance;
}
-
+
/**
* Returns the prefix for properties defined in the {@link UIDefaults} table.
- *
+ *
* @return The property prefix ("CheckBox.").
*/
public String getPropertyPrefix()
@@ -86,4 +86,3 @@ public class MetalCheckBoxUI
return "CheckBox.";
}
}
-
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxButton.java b/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxButton.java
index 265ea7e..8ec8bad 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxButton.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxButton.java
@@ -63,22 +63,22 @@ public class MetalComboBoxButton
/** A reference to the JList. */
protected JList listBox;
-
+
/**
* Used for rendering the selected item.
*/
protected CellRendererPane rendererPane;
-
+
/** The button icon. */
protected Icon comboIcon;
-
+
/** Display just the icon, or the icon plus the label. */
protected boolean iconOnly;
-
+
/**
* Creates a new button.
- *
- * @param cb the combo that the button is used for (null not
+ *
+ * @param cb the combo that the button is used for (null not
* permitted).
* @param i the icon displayed on the button.
* @param pane the rendering pane.
@@ -87,13 +87,13 @@ public class MetalComboBoxButton
public MetalComboBoxButton(JComboBox cb, Icon i, CellRendererPane pane,
JList list)
{
- this(cb, i, cb.isEditable(), pane, list);
+ this(cb, i, cb.isEditable(), pane, list);
}
-
+
/**
* Creates a new button.
- *
- * @param cb the combo that the button is used for (null not
+ *
+ * @param cb the combo that the button is used for (null not
* permitted).
* @param i the icon displayed on the button.
* @param onlyIcon a flag that specifies whether the button displays only an
@@ -116,84 +116,84 @@ public class MetalComboBoxButton
setEnabled(comboBox.isEnabled());
setFocusable(comboBox.isEnabled());
}
-
+
/**
* Returns the combo box that the button is used with.
- *
+ *
* @return The combo box.
*/
public final JComboBox getComboBox()
{
return comboBox;
}
-
+
/**
* Sets the combo box that the button is used with.
- *
+ *
* @param cb the combo box.
*/
public final void setComboBox(JComboBox cb)
{
comboBox = cb;
}
-
+
/**
* Returns the icon displayed by the button. By default, this will be an
* instance of {@link MetalComboBoxIcon}.
- *
+ *
* @return The icon displayed by the button.
*/
public final Icon getComboIcon()
{
return comboIcon;
}
-
+
/**
* Sets the icon displayed by the button.
- *
+ *
* @param i the icon.
*/
public final void setComboIcon(Icon i)
{
comboIcon = i;
}
-
+
/**
* Returns a flag that controls whether the button displays an icon only,
* or text as well.
- *
+ *
* @return A boolean.
*/
public final boolean isIconOnly()
{
return iconOnly;
}
-
+
/**
* Sets the flag that controls whether the button displays an icon only,
* or text as well.
- *
+ *
* @param isIconOnly the flag.
*/
public final void setIconOnly(boolean isIconOnly)
{
iconOnly = isIconOnly;
}
-
+
/**
* Returns false, to indicate that this component is not part
* of the focus traversal group.
- *
+ *
* @return false
*/
public boolean isFocusTraversable()
{
return false;
}
-
+
/**
* Enables or disables the button.
- *
+ *
* @param enabled the new status.
*/
public void setEnabled(boolean enabled)
@@ -210,10 +210,10 @@ public class MetalComboBoxButton
setForeground(UIManager.getColor("ComboBox.disabledForeground"));
}
}
-
+
/**
* Paints the component.
- *
+ *
* @param g the graphics device.
*/
public void paintComponent(Graphics g)
@@ -259,7 +259,7 @@ public class MetalComboBoxButton
Component comp = renderer.getListCellRendererComponent(listBox,
comboBox.getSelectedItem(), -1, false, false);
comp.setFont(rendererPane.getFont());
-
+
if ((model.isArmed() && model.isPressed())
|| (comboBox.isFocusOwner() && !comboBox.isPopupVisible()))
{
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxEditor.java b/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxEditor.java
index 11e4151..8872d74 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxEditor.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxEditor.java
@@ -65,10 +65,10 @@ public class MetalComboBoxEditor extends BasicComboBoxEditor
{
// Nothing to do here.
}
-
+
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate.
@@ -76,7 +76,7 @@ public class MetalComboBoxEditor extends BasicComboBoxEditor
* @param w the width.
* @param h the height.
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
g.translate(x, y);
@@ -123,11 +123,11 @@ public class MetalComboBoxEditor extends BasicComboBoxEditor
public Insets getBorderInsets(Component c)
{
return editorBorderInsets;
- }
+ }
}
-
+
/**
- * A subclass of {@link MetalComboBoxEditor} that implements the
+ * A subclass of {@link MetalComboBoxEditor} that implements the
* {@link javax.swing.plaf.UIResource} interface.
*/
public static class UIResource extends MetalComboBoxEditor
@@ -177,7 +177,7 @@ public class MetalComboBoxEditor extends BasicComboBoxEditor
/** The editor's border insets. */
protected static Insets editorBorderInsets = new Insets(2, 2, 2, 0);
-
+
/**
* Creates a new editor.
*/
@@ -186,5 +186,5 @@ public class MetalComboBoxEditor extends BasicComboBoxEditor
editor = new EditorTextField("", 9);
editor.setBorder(new MetalComboBoxEditorBorder());
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxIcon.java b/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxIcon.java
index 944ce39..45c8ead 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxIcon.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxIcon.java
@@ -48,20 +48,20 @@ import javax.swing.Icon;
/**
* An icon used by the {@link MetalComboBoxUI} class.
*/
-public class MetalComboBoxIcon implements Icon, Serializable
+public class MetalComboBoxIcon implements Icon, Serializable
{
-
+
/**
* Creates a new icon.
*/
- public MetalComboBoxIcon()
+ public MetalComboBoxIcon()
{
// nothing required.
}
-
+
/**
* Returns the icon width, which for this icon is 10 pixels.
- *
+ *
* @return 10.
*/
public int getIconWidth()
@@ -71,7 +71,7 @@ public class MetalComboBoxIcon implements Icon, Serializable
/**
* Returns the icon height, which for this icon is 5 pixels.
- *
+ *
* @return 5.
*/
public int getIconHeight()
@@ -81,7 +81,7 @@ public class MetalComboBoxIcon implements Icon, Serializable
/**
* Paints the icon at the location (x, y).
- *
+ *
* @param c the combo box (ignored here).
* @param g the graphics device.
* @param x the x coordinate.
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxUI.java
index 53d49c3..b9019b7 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalComboBoxUI.java
@@ -78,22 +78,22 @@ public class MetalComboBoxUI extends BasicComboBoxUI
{
// Nothing to do here.
}
-
+
/**
* Arranges the editor (if visible) and button that comprise the combo
* box.
- *
+ *
* @param parent the parent.
*/
public void layoutContainer(Container parent)
{
layoutComboBox(parent, this);
}
-
+
/**
- * Calls the layoutContainer(Container) method in the super
+ * Calls the layoutContainer(Container) method in the super
* class.
- *
+ *
* @param parent the container.
*/
public void superLayout(Container parent)
@@ -101,9 +101,9 @@ public class MetalComboBoxUI extends BasicComboBoxUI
super.layoutContainer(parent);
}
}
-
+
/**
- * A listener used to handle property changes in the {@link JComboBox}
+ * A listener used to handle property changes in the {@link JComboBox}
* component, to ensure that the UI delegate accurately reflects the current
* state in the rendering onscreen.
*/
@@ -117,11 +117,11 @@ public class MetalComboBoxUI extends BasicComboBoxUI
{
// Nothing to do here.
}
-
+
/**
* Handles a property change event, updating the UI components as
* appropriate.
- *
+ *
* @param e the event.
*/
public void propertyChange(PropertyChangeEvent e)
@@ -156,7 +156,7 @@ public class MetalComboBoxUI extends BasicComboBoxUI
/**
* A popup menu for the combo-box.
- *
+ *
* @see #createPopup()
*
* @deprecated 1.4
@@ -165,20 +165,20 @@ public class MetalComboBoxUI extends BasicComboBoxUI
{
/**
* Creates a new popup.
- *
+ *
* @param cBox the combo box.
*/
public MetalComboPopup(JComboBox cBox)
{
- super(cBox);
+ super(cBox);
}
-
+
public void delegateFocus(MouseEvent e)
{
super.delegateFocus(e);
}
}
-
+
/**
* Constructs a new instance of MetalComboBoxUI.
*/
@@ -198,61 +198,61 @@ public class MetalComboBoxUI extends BasicComboBoxUI
{
return new MetalComboBoxUI();
}
-
+
/**
* Creates an editor for the combo box.
- *
+ *
* @return An editor.
*/
protected ComboBoxEditor createEditor()
{
- return new MetalComboBoxEditor.UIResource();
+ return new MetalComboBoxEditor.UIResource();
}
-
+
/**
* Creates a popup for the combo box.
- *
+ *
* @return A popup.
*/
protected ComboPopup createPopup()
{
return super.createPopup();
}
-
+
/**
* Creates a new button for use in rendering the JComboBox.
- *
+ *
* @return A button.
*/
protected JButton createArrowButton()
{
- JButton button = new MetalComboBoxButton(comboBox, new MetalComboBoxIcon(),
- currentValuePane, listBox);
+ JButton button = new MetalComboBoxButton(comboBox, new MetalComboBoxIcon(),
+ currentValuePane, listBox);
button.setMargin(new Insets(0, 1, 1, 3));
return button;
}
-
+
/**
* Creates a new property change listener.
- *
+ *
* @return A new property change listener.
*/
public PropertyChangeListener createPropertyChangeListener()
{
return new MetalPropertyChangeListener();
}
-
+
public void paint(Graphics g, JComponent c)
{
// do nothing, the button and text field are painted elsewhere
}
-
+
/**
* Updates the button and text field to reflect a change in the 'editable'
* property.
- *
+ *
* @param e the event.
- *
+ *
* @deprecated 1.4
*/
protected void editablePropertyChanged(PropertyChangeEvent e)
@@ -265,32 +265,32 @@ public class MetalComboBoxUI extends BasicComboBoxUI
comboBox.repaint();
}
}
-
+
/**
* Creates a new layout manager for the UI delegate.
- *
+ *
* @return A new layout manager.
*/
protected LayoutManager createLayoutManager()
{
return new MetalComboBoxLayoutManager();
}
-
+
/**
* Not used in Classpath.
- *
+ *
* @deprecated 1.4
*/
protected void removeListeners()
{
- // no longer used in JDK 1.4
+ // no longer used in JDK 1.4
}
-
+
/**
* Returns the minimum size for the combo.
- *
+ *
* @param c the component
- *
+ *
* @return The minimum size for the combo box.
*/
public Dimension getMinimumSize(JComponent c)
@@ -328,7 +328,7 @@ public class MetalComboBoxUI extends BasicComboBoxUI
isMinimumSizeDirty = false;
return new Dimension(cachedMinimumSize);
}
-
+
/**
* Configures the editor for this combo box.
*/
@@ -350,8 +350,8 @@ public class MetalComboBoxUI extends BasicComboBoxUI
if (focusListener != null)
editor.removeFocusListener(focusListener);
}
-
- /**
+
+ /**
* Lays out the ComboBox
*/
public void layoutComboBox(Container parent,
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalFileChooserUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalFileChooserUI.java
index 9bded82..df49edf 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalFileChooserUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalFileChooserUI.java
@@ -100,17 +100,17 @@ import javax.swing.table.DefaultTableModel;
* A UI delegate for the {@link JFileChooser} component. This class is only
* partially implemented and is not usable yet.
*/
-public class MetalFileChooserUI
+public class MetalFileChooserUI
extends BasicFileChooserUI
{
-
+
/**
* A renderer for the files and directories in the file chooser table.
*/
class TableFileRenderer
extends DefaultTableCellRenderer
{
-
+
/**
* Creates a new renderer.
*/
@@ -118,17 +118,17 @@ public class MetalFileChooserUI
{
super();
}
-
+
/**
* Returns a component that can render the specified value.
- *
+ *
* @param table the table
* @param value the string value of the cell
* @param isSelected is the item selected?
* @param hasFocus does the item have the focus?
* @param row the row
* @param column the column
- *
+ *
* @return The renderer.
*/
public Component getTableCellRendererComponent(JTable table, Object value,
@@ -143,12 +143,12 @@ public class MetalFileChooserUI
}
else
setIcon(null);
-
+
setText(value.toString());
setOpaque(true);
setEnabled(table.isEnabled());
setFont(fileList.getFont());
-
+
if (startEditing && column == 0 || !isSelected)
{
setBackground(table.getBackground());
@@ -164,20 +164,20 @@ public class MetalFileChooserUI
setBorder(UIManager.getBorder("Table.focusCellHighlightBorder"));
else
setBorder(noFocusBorder);
-
+
return this;
}
}
-
+
/**
* ActionListener for the list view.
*/
class ListViewActionListener implements ActionListener
{
-
+
/**
* This method is invoked when an action occurs.
- *
+ *
* @param e -
* the ActionEvent that occurred
*/
@@ -195,23 +195,23 @@ public class MetalFileChooserUI
if (index.length > 0)
for (int i = 0; i < index.length; i++)
fileList.getSelectionModel().addSelectionInterval(index[i], index[i]);
-
+
fc.add(fileListPanel, BorderLayout.CENTER);
fc.revalidate();
fc.repaint();
}
}
}
-
+
/**
* ActionListener for the details view.
*/
class DetailViewActionListener implements ActionListener
{
-
+
/**
* This method is invoked when an action occurs.
- *
+ *
* @param e -
* the ActionEvent that occurred
*/
@@ -223,7 +223,7 @@ public class MetalFileChooserUI
JFileChooser fc = getFileChooser();
listView = false;
fc.remove(fileListPanel);
-
+
if (fileTable == null)
createDetailsView(fc);
else
@@ -235,18 +235,18 @@ public class MetalFileChooserUI
for (int i = 0; i < index.length; i++)
fileTable.getSelectionModel().addSelectionInterval(index[i], index[i]);
}
-
+
fc.add(fileTablePanel, BorderLayout.CENTER);
fc.revalidate();
fc.repaint();
}
}
}
-
+
/**
* A property change listener.
*/
- class MetalFileChooserPropertyChangeListener
+ class MetalFileChooserPropertyChangeListener
implements PropertyChangeListener
{
/**
@@ -255,25 +255,25 @@ public class MetalFileChooserUI
public MetalFileChooserPropertyChangeListener()
{
}
-
+
/**
* Handles a property change event.
- *
+ *
* @param e the event.
*/
public void propertyChange(PropertyChangeEvent e)
{
JFileChooser filechooser = getFileChooser();
-
+
String n = e.getPropertyName();
if (n.equals(JFileChooser.MULTI_SELECTION_ENABLED_CHANGED_PROPERTY))
{
- int mode = -1;
+ int mode = -1;
if (filechooser.isMultiSelectionEnabled())
mode = ListSelectionModel.MULTIPLE_INTERVAL_SELECTION;
else
mode = ListSelectionModel.SINGLE_SELECTION;
-
+
if (listView)
fileList.setSelectionMode(mode);
else
@@ -282,7 +282,7 @@ public class MetalFileChooserUI
else if (n.equals(JFileChooser.SELECTED_FILE_CHANGED_PROPERTY))
{
File file = filechooser.getSelectedFile();
-
+
if (file != null
&& filechooser.getDialogType() == JFileChooser.SAVE_DIALOG)
{
@@ -301,12 +301,12 @@ public class MetalFileChooserUI
filechooser.setApproveButtonToolTipText(saveButtonToolTipText);
}
}
-
+
if (file == null)
setFileName(null);
- else if (file.isFile() || filechooser.getFileSelectionMode()
- != JFileChooser.FILES_ONLY)
- setFileName(file.getName());
+ else if (file.isFile() || filechooser.getFileSelectionMode()
+ != JFileChooser.FILES_ONLY)
+ setFileName(file.getName());
int index = -1;
index = getModel().indexOf(file);
if (index >= 0)
@@ -327,7 +327,7 @@ public class MetalFileChooserUI
}
}
}
-
+
else if (n.equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY))
{
if (listView)
@@ -349,7 +349,7 @@ public class MetalFileChooserUI
boolean hasParent = currentDirectory.getParentFile() != null;
getChangeToParentDirectoryAction().setEnabled(hasParent);
}
-
+
else if (n.equals(JFileChooser.CHOOSABLE_FILE_FILTER_CHANGED_PROPERTY))
{
filterModel.propertyChange(e);
@@ -369,14 +369,14 @@ public class MetalFileChooserUI
getApproveButtonToolTipText(filechooser));
approveButton.setMnemonic(getApproveButtonMnemonic(filechooser));
}
-
+
else if (n.equals(JFileChooser.APPROVE_BUTTON_TEXT_CHANGED_PROPERTY))
approveButton.setText(getApproveButtonText(filechooser));
-
+
else if (n.equals(
JFileChooser.APPROVE_BUTTON_TOOL_TIP_TEXT_CHANGED_PROPERTY))
approveButton.setToolTipText(getApproveButtonToolTipText(filechooser));
-
+
else if (n.equals(JFileChooser.APPROVE_BUTTON_MNEMONIC_CHANGED_PROPERTY))
approveButton.setMnemonic(getApproveButtonMnemonic(filechooser));
@@ -393,7 +393,7 @@ public class MetalFileChooserUI
topPanel.repaint();
topPanel.doLayout();
}
-
+
else if (n.equals(
JFileChooser.ACCEPT_ALL_FILE_FILTER_USED_CHANGED_PROPERTY))
{
@@ -404,7 +404,7 @@ public class MetalFileChooserUI
filechooser.removeChoosableFileFilter(
getAcceptAllFileFilter(filechooser));
}
-
+
else if (n.equals(JFileChooser.ACCESSORY_CHANGED_PROPERTY))
{
JComponent old = (JComponent) e.getOldValue();
@@ -414,7 +414,7 @@ public class MetalFileChooserUI
if (newval != null)
getAccessoryPanel().add(newval);
}
-
+
if (n.equals(JFileChooser.DIRECTORY_CHANGED_PROPERTY)
|| n.equals(JFileChooser.FILE_FILTER_CHANGED_PROPERTY)
|| n.equals(JFileChooser.FILE_HIDING_CHANGED_PROPERTY))
@@ -425,7 +425,7 @@ public class MetalFileChooserUI
if (fileList != null)
fileList.removeAll();
startEditing = false;
-
+
// Set text on button back to original.
if (filechooser.getDialogType() == JFileChooser.SAVE_DIALOG)
{
@@ -434,16 +434,16 @@ public class MetalFileChooserUI
filechooser.setApproveButtonText(saveButtonText);
filechooser.setApproveButtonToolTipText(saveButtonToolTipText);
}
-
+
rescanCurrentDirectory(filechooser);
}
-
+
filechooser.revalidate();
filechooser.repaint();
}
}
-
- /**
+
+ /**
* A combo box model containing the selected directory and all its parent
* directories.
*/
@@ -453,46 +453,46 @@ public class MetalFileChooserUI
{
/** Storage for the items in the model. */
private List items;
-
+
/** The index of the selected item. */
private int selectedIndex;
-
+
/**
* Creates a new model.
*/
- public DirectoryComboBoxModel()
+ public DirectoryComboBoxModel()
{
items = new java.util.ArrayList();
selectedIndex = -1;
}
-
+
/**
* Returns the number of items in the model.
- *
+ *
* @return The number of items in the model.
*/
public int getSize()
{
return items.size();
}
-
+
/**
* Returns the item at the specified index.
- *
+ *
* @param index the item index.
- *
+ *
* @return The item.
*/
public Object getElementAt(int index)
{
return items.get(index);
}
-
+
/**
* Returns the depth of the item at the given index.
- *
+ *
* @param index the item index.
- *
+ *
* @return The depth.
*/
public int getDepth(int index)
@@ -502,22 +502,22 @@ public class MetalFileChooserUI
/**
* Returns the selected item, or null if no item is selected.
- *
+ *
* @return The selected item, or null.
*/
public Object getSelectedItem()
{
- if (selectedIndex >= 0)
+ if (selectedIndex >= 0)
return items.get(selectedIndex);
else
return null;
}
-
+
/**
* Sets the selected item. This clears all the directories from the
* existing list, and repopulates it with the new selected directory
* and all its parent directories.
- *
+ *
* @param selectedDirectory the selected directory.
*/
public void setSelectedItem(Object selectedDirectory)
@@ -533,7 +533,7 @@ public class MetalFileChooserUI
selectedIndex = items.indexOf(selectedDirectory);
fireContentsChanged(this, 0, items.size() - 1);
}
-
+
}
/**
@@ -549,10 +549,10 @@ public class MetalFileChooserUI
{
// Nothing to do here.
}
-
+
/**
* Handles the action event.
- *
+ *
* @param e the event.
*/
public void actionPerformed(ActionEvent e)
@@ -581,17 +581,17 @@ public class MetalFileChooserUI
{
indentIcon = new IndentIcon();
}
-
+
/**
- * Returns a component that can be used to paint the given value within
+ * Returns a component that can be used to paint the given value within
* the list.
- *
+ *
* @param list the list.
* @param value the value (a {@link File}).
* @param index the item index.
* @param isSelected is the item selected?
* @param cellHasFocus does the list cell have focus?
- *
+ *
* @return The list cell renderer.
*/
public Component getListCellRendererComponent(JList list, Object value,
@@ -671,7 +671,7 @@ public class MetalFileChooserUI
{
icon.paintIcon(c, g, x + depth * INDENT, y);
}
-
+
}
/**
@@ -680,7 +680,7 @@ public class MetalFileChooserUI
protected class FileRenderer
extends DefaultListCellRenderer
{
-
+
/**
* Creates a new renderer.
*/
@@ -688,16 +688,16 @@ public class MetalFileChooserUI
{
// Nothing to do here.
}
-
+
/**
* Returns a component that can render the specified value.
- *
+ *
* @param list the list.
* @param value the value (a {@link File}).
* @param index the index.
* @param isSelected is the item selected?
* @param cellHasFocus does the item have the focus?
- *
+ *
* @return The renderer.
*/
public Component getListCellRendererComponent(JList list, Object value,
@@ -751,7 +751,7 @@ public class MetalFileChooserUI
/** The index of the selected file filter. */
private Object selected;
-
+
/**
* Creates a new model.
*/
@@ -761,10 +761,10 @@ public class MetalFileChooserUI
filters[0] = getAcceptAllFileFilter(getFileChooser());
selected = filters[0];
}
-
+
/**
* Handles property changes.
- *
+ *
* @param e the property change event.
*/
public void propertyChange(PropertyChangeEvent e)
@@ -788,10 +788,10 @@ public class MetalFileChooserUI
fireContentsChanged(this, 0, filters.length);
}
}
-
+
/**
* Sets the selected filter.
- *
+ *
* @param filter the filter (null ignored).
*/
public void setSelectedItem(Object filter)
@@ -802,39 +802,39 @@ public class MetalFileChooserUI
fireContentsChanged(this, -1, -1);
}
}
-
+
/**
* Returns the selected file filter.
- *
+ *
* @return The selected file filter.
*/
public Object getSelectedItem()
{
return selected;
}
-
+
/**
* Returns the number of items in the model.
- *
+ *
* @return The number of items in the model.
*/
public int getSize()
{
return filters.length;
}
-
+
/**
* Returns the item at the specified index.
- *
+ *
* @param index the item index.
- *
+ *
* @return The item at the specified index.
*/
public Object getElementAt(int index)
{
return filters[index];
}
-
+
}
/**
@@ -850,23 +850,23 @@ public class MetalFileChooserUI
{
// Nothing to do here.
}
-
+
/**
- * Returns a component that can be used to paint the given value within
+ * Returns a component that can be used to paint the given value within
* the list.
- *
+ *
* @param list the list.
* @param value the value (a {@link FileFilter}).
* @param index the item index.
* @param isSelected is the item selected?
* @param cellHasFocus does the list cell have focus?
- *
+ *
* @return This component as the renderer.
*/
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus)
{
- super.getListCellRendererComponent(list, value, index, isSelected,
+ super.getListCellRendererComponent(list, value, index, isSelected,
cellHasFocus);
FileFilter filter = (FileFilter) value;
setText(filter.getDescription());
@@ -876,10 +876,10 @@ public class MetalFileChooserUI
/**
* A listener for selection events in the file list.
- *
+ *
* @see #createListSelectionListener(JFileChooser)
*/
- class MetalFileChooserSelectionListener
+ class MetalFileChooserSelectionListener
implements ListSelectionListener
{
/**
@@ -916,28 +916,28 @@ public class MetalFileChooserUI
protected class SingleClickListener
extends MouseAdapter
{
-
+
/** Stores instance of the list */
JList list;
-
- /**
+
+ /**
* Stores the current file that is being edited.
* It is null if nothing is currently being edited.
*/
File editFile;
-
+
/** The current file chooser. */
JFileChooser fc;
-
+
/** The last file selected. */
Object lastSelected;
-
+
/** The textfield used for editing. */
JTextField editField;
-
+
/**
* Creates a new listener.
- *
+ *
* @param list the directory/file list.
*/
public SingleClickListener(JList list)
@@ -948,10 +948,10 @@ public class MetalFileChooserUI
lastSelected = null;
startEditing = false;
}
-
+
/**
* Receives notification of a mouse click event.
- *
+ *
* @param e the event.
*/
public void mouseClicked(MouseEvent e)
@@ -974,10 +974,10 @@ public class MetalFileChooserUI
else
completeEditing();
}
-
+
/**
* Sets up the text editor for the current file.
- *
+ *
* @param index -
* the current index of the item in the list to be edited.
*/
@@ -991,7 +991,7 @@ public class MetalFileChooserUI
startEditing = true;
editField = new JTextField(editFile.getName());
editField.addActionListener(new EditingActionListener());
-
+
Icon icon = getFileView(fc).getIcon(editFile);
if (icon != null)
{
@@ -1000,9 +1000,9 @@ public class MetalFileChooserUI
bounds.width -= padding;
}
editField.setBounds(bounds);
-
+
list.add(editField);
-
+
editField.requestFocus();
editField.selectAll();
}
@@ -1010,8 +1010,8 @@ public class MetalFileChooserUI
completeEditing();
list.repaint();
}
-
- /**
+
+ /**
* Completes the editing.
*/
void completeEditing()
@@ -1020,12 +1020,12 @@ public class MetalFileChooserUI
{
String text = editField.getText();
if (text != null && text != "" && !text.equals(fc.getName(editFile)))
- {
- File f = fc.getFileSystemView().
- createFileObject(fc.getCurrentDirectory(), text);
+ {
+ File f = fc.getFileSystemView().
+ createFileObject(fc.getCurrentDirectory(), text);
if ( editFile.renameTo(f) )
rescanCurrentDirectory(fc);
- }
+ }
list.remove(editField);
}
startEditing = false;
@@ -1034,22 +1034,22 @@ public class MetalFileChooserUI
editField = null;
list.repaint();
}
-
+
/**
* ActionListener for the editing text field.
*/
class EditingActionListener implements ActionListener
{
-
+
/**
* This method is invoked when an action occurs.
- *
+ *
* @param e -
* the ActionEvent that occurred
*/
public void actionPerformed(ActionEvent e)
{
- if (editField != null)
+ if (editField != null)
completeEditing();
}
}
@@ -1070,19 +1070,19 @@ public class MetalFileChooserUI
/** The last selected file. */
Object lastSelected;
-
- /**
+
+ /**
* Stores the current file that is being edited.
* It is null if nothing is currently being edited.
*/
File editFile;
-
+
/** The textfield used for editing. */
JTextField editField;
/**
* Creates a new listener.
- *
+ *
* @param table the directory/file table
* @param fc the JFileChooser
*/
@@ -1099,7 +1099,7 @@ public class MetalFileChooserUI
/**
* Receives notification of a mouse click event.
- *
+ *
* @param e the event.
*/
public void mouseClicked(MouseEvent e)
@@ -1167,7 +1167,7 @@ public class MetalFileChooserUI
/**
* Sets up the text editor for the current file.
- *
+ *
* @param row -
* the current row of the item in the list to be edited.
*/
@@ -1184,9 +1184,9 @@ public class MetalFileChooserUI
// Need to adjust y pos
bounds.y = row * table.getRowHeight();
editField.setBounds(bounds);
-
+
table.add(editField);
-
+
editField.requestFocus();
editField.selectAll();
}
@@ -1194,8 +1194,8 @@ public class MetalFileChooserUI
completeEditing();
table.repaint();
}
-
- /**
+
+ /**
* Completes the editing.
*/
void completeEditing()
@@ -1214,26 +1214,26 @@ public class MetalFileChooserUI
editField = null;
table.repaint();
}
-
+
/**
* ActionListener for the editing text field.
*/
class EditingActionListener implements ActionListener
{
-
+
/**
* This method is invoked when an action occurs.
- *
+ *
* @param e -
* the ActionEvent that occurred
*/
public void actionPerformed(ActionEvent e)
{
- if (editField != null)
+ if (editField != null)
completeEditing();
}
}
-
+
/**
* Closes the dialog.
*/
@@ -1243,91 +1243,91 @@ public class MetalFileChooserUI
if (owner instanceof JDialog)
((JDialog) owner).dispose();
}
- }
-
+ }
+
/** The text for a label describing the directory combo box. */
private String directoryLabel;
-
+
private JComboBox directoryComboBox;
-
+
/** The model for the directory combo box. */
DirectoryComboBoxModel directoryModel;
-
+
/** The text for a label describing the file text field. */
private String fileLabel;
-
+
/** The file name text field. */
private JTextField fileTextField;
-
+
/** The text for a label describing the filter combo box. */
private String filterLabel;
- /**
- * The top panel (contains the directory combo box and the control buttons).
+ /**
+ * The top panel (contains the directory combo box and the control buttons).
*/
private JPanel topPanel;
-
+
/** A panel containing the control buttons ('up', 'home' etc.). */
private JPanel controls;
- /**
- * The panel that contains the filename field and the filter combobox.
+ /**
+ * The panel that contains the filename field and the filter combobox.
*/
private JPanel bottomPanel;
- /**
- * The panel that contains the 'Open' (or 'Save') and 'Cancel' buttons.
+ /**
+ * The panel that contains the 'Open' (or 'Save') and 'Cancel' buttons.
*/
private JPanel buttonPanel;
-
+
private JButton approveButton;
-
+
/** The file list. */
JList fileList;
-
+
/** The file table. */
JTable fileTable;
-
+
/** The panel containing the file list. */
JPanel fileListPanel;
-
+
/** The panel containing the file table. */
JPanel fileTablePanel;
-
+
/** The filter combo box model. */
private FilterComboBoxModel filterModel;
/** The action map. */
private ActionMap actionMap;
-
+
/** True if currently in list view. */
boolean listView;
-
+
/** True if we can or have started editing a cell. */
boolean startEditing;
-
+
/** The scrollpane used for the table and list. */
JScrollPane scrollPane;
-
+
/** The text for the label when saving. */
String save;
-
+
/** The text for the label when opening a directory. */
String look;
-
+
/** The label for the file combo box. */
JLabel dirLabel;
-
+
/** Listeners. */
ListSelectionListener listSelList;
MouseListener doubleClickList;
SingleClickListener singleClickList;
TableClickListener tableClickList;
-
+
/**
* A factory method that returns a UI delegate for the specified
* component.
- *
+ *
* @param c the component (which should be a {@link JFileChooser}).
*/
public static ComponentUI createUI(JComponent c)
@@ -1338,7 +1338,7 @@ public class MetalFileChooserUI
/**
* Creates a new instance of this UI delegate.
- *
+ *
* @param filechooser the file chooser component.
*/
public MetalFileChooserUI(JFileChooser filechooser)
@@ -1353,16 +1353,16 @@ public class MetalFileChooserUI
super.installUI(c);
actionMap = createActionMap();
}
-
+
public void uninstallUI(JComponent c)
{
super.uninstallUI(c);
actionMap = null;
}
-
+
/**
* Installs the sub-components of the file chooser.
- *
+ *
* @param fc the file chooser component.
*/
public void installComponents(JFileChooser fc)
@@ -1373,7 +1373,7 @@ public class MetalFileChooserUI
topPanel.add(dirLabel, BorderLayout.WEST);
this.controls = new JPanel();
addControlButtons();
-
+
JPanel dirPanel = new JPanel(new VerticalMidLayout());
directoryModel = createDirectoryComboBoxModel(fc);
directoryComboBox = new JComboBox(directoryModel);
@@ -1383,16 +1383,16 @@ public class MetalFileChooserUI
topPanel.add(controls, BorderLayout.EAST);
topPanel.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 8));
fc.add(topPanel, BorderLayout.NORTH);
-
+
JPanel list = createList(fc);
list.setBorder(BorderFactory.createEmptyBorder(8, 8, 8, 8));
fc.add(list, BorderLayout.CENTER);
-
+
JPanel bottomPanel = getBottomPanel();
filterModel = createFilterComboBoxModel();
JComboBox fileFilterCombo = new JComboBox(filterModel);
fileFilterCombo.setRenderer(createFilterComboBoxRenderer());
-
+
fileTextField = new JTextField();
JPanel fileNamePanel = new JPanel(new VerticalMidLayout());
fileNamePanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 5));
@@ -1401,21 +1401,21 @@ public class MetalFileChooserUI
row1.add(new JLabel(this.fileLabel), BorderLayout.WEST);
row1.add(fileNamePanel);
bottomPanel.add(row1);
-
+
JPanel row2 = new JPanel(new BorderLayout());
row2.add(new JLabel(this.filterLabel), BorderLayout.WEST);
row2.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
row2.add(fileFilterCombo);
bottomPanel.add(row2);
JPanel buttonPanel = new JPanel(new ButtonLayout());
-
+
approveButton = new JButton(getApproveSelectionAction());
approveButton.setText(getApproveButtonText(fc));
approveButton.setToolTipText(getApproveButtonToolTipText(fc));
approveButton.setMnemonic(getApproveButtonMnemonic(fc));
buttonPanel.add(approveButton);
buttonPanel.setBorder(BorderFactory.createEmptyBorder(8, 0, 0, 0));
-
+
JButton cancelButton = new JButton(getCancelSelectionAction());
cancelButton.setText(cancelButtonText);
cancelButton.setToolTipText(cancelButtonToolTipText);
@@ -1424,14 +1424,14 @@ public class MetalFileChooserUI
bottomPanel.add(buttonPanel, BorderLayout.SOUTH);
bottomPanel.setBorder(BorderFactory.createEmptyBorder(0, 8, 8, 8));
fc.add(bottomPanel, BorderLayout.SOUTH);
-
+
fc.add(getAccessoryPanel(), BorderLayout.EAST);
}
-
+
/**
- * Uninstalls the components added by
+ * Uninstalls the components added by
* {@link #installComponents(JFileChooser)}.
- *
+ *
* @param fc the file chooser.
*/
public void uninstallComponents(JFileChooser fc)
@@ -1444,27 +1444,27 @@ public class MetalFileChooserUI
fileListPanel = null;
fc.remove(topPanel);
topPanel = null;
-
+
directoryModel = null;
fileTextField = null;
directoryComboBox = null;
}
-
+
/**
- * Returns the panel that contains the 'Open' (or 'Save') and 'Cancel'
+ * Returns the panel that contains the 'Open' (or 'Save') and 'Cancel'
* buttons.
- *
+ *
* @return The panel.
*/
protected JPanel getButtonPanel()
{
- return buttonPanel;
+ return buttonPanel;
}
-
+
/**
* Creates and returns a new panel that will be used for the controls at
* the bottom of the file chooser.
- *
+ *
* @return A new panel.
*/
protected JPanel getBottomPanel()
@@ -1473,15 +1473,15 @@ public class MetalFileChooserUI
bottomPanel = new JPanel(new GridLayout(3, 2));
return bottomPanel;
}
-
+
/**
* Fetches localised strings for use by the labels and buttons on the
* file chooser.
- *
+ *
* @param fc the file chooser.
*/
protected void installStrings(JFileChooser fc)
- {
+ {
super.installStrings(fc);
look = "Look In: ";
save = "Save In: ";
@@ -1489,38 +1489,38 @@ public class MetalFileChooserUI
directoryLabel = save;
else
directoryLabel = look;
-
+
fileLabel = "File Name: ";
filterLabel = "Files of Type: ";
-
+
this.cancelButtonMnemonic = 0;
this.cancelButtonText = "Cancel";
this.cancelButtonToolTipText = "Abort file chooser dialog";
-
+
this.directoryOpenButtonMnemonic = 0;
this.directoryOpenButtonText = "Open";
this.directoryOpenButtonToolTipText = "Open selected directory";
-
+
this.helpButtonMnemonic = 0;
this.helpButtonText = "Help";
this.helpButtonToolTipText = "Filechooser help";
-
+
this.openButtonMnemonic = 0;
this.openButtonText = "Open";
this.openButtonToolTipText = "Open selected file";
-
+
this.saveButtonMnemonic = 0;
this.saveButtonText = "Save";
this.saveButtonToolTipText = "Save selected file";
-
+
this.updateButtonMnemonic = 0;
this.updateButtonText = "Update";
- this.updateButtonToolTipText = "Update directory listing";
+ this.updateButtonToolTipText = "Update directory listing";
}
-
+
/**
* Installs the listeners required.
- *
+ *
* @param fc the file chooser.
*/
protected void installListeners(JFileChooser fc)
@@ -1535,8 +1535,8 @@ public class MetalFileChooserUI
fileList.addMouseListener(singleClickList);
super.installListeners(fc);
}
-
- protected void uninstallListeners(JFileChooser fc)
+
+ protected void uninstallListeners(JFileChooser fc)
{
super.uninstallListeners(fc);
fc.removePropertyChangeListener(filterModel);
@@ -1544,21 +1544,21 @@ public class MetalFileChooserUI
fileList.removeListSelectionListener(listSelList);
fileList.removeMouseListener(doubleClickList);
fileList.removeMouseListener(singleClickList);
-
+
if (fileTable != null)
fileTable.removeMouseListener(tableClickList);
}
-
+
protected ActionMap getActionMap()
{
if (actionMap == null)
actionMap = createActionMap();
return actionMap;
}
-
+
/**
* Creates and returns an action map.
- *
+ *
* @return The action map.
*/
protected ActionMap createActionMap()
@@ -1572,9 +1572,9 @@ public class MetalFileChooserUI
/**
* Creates a panel containing a list of files.
- *
+ *
* @param fc the file chooser.
- *
+ *
* @return A panel.
*/
protected JPanel createList(JFileChooser fc)
@@ -1600,41 +1600,41 @@ public class MetalFileChooserUI
fileListPanel.setPreferredSize(new Dimension(405, 135));
return fileListPanel;
}
-
+
/**
* Creates a panel containing a table within a scroll pane.
- *
+ *
* @param fc the file chooser.
- *
+ *
* @return The details view.
*/
protected JPanel createDetailsView(JFileChooser fc)
{
fileTablePanel = new JPanel(new BorderLayout());
-
+
Object[] cols = new Object[] {"Name", "Size", "Modified"};
Object[][] rows = new Object[fileList.getModel().getSize()][3];
-
+
fileTable = new JTable(new DefaultTableModel(rows, cols));
-
+
if (fc.isMultiSelectionEnabled())
fileTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
else
fileTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-
+
fileTable.setShowGrid(false);
fileTable.setColumnSelectionAllowed(false);
fileTable.setDefaultRenderer(Object.class, new TableFileRenderer());
tableClickList = new TableClickListener(fileTable, fc);
fileTable.addMouseListener(tableClickList);
-
- return updateTable();
+
+ return updateTable();
}
-
+
/**
* Sets the values in the table, and puts it in the panel.
- *
+ *
* @return the panel containing the table.
*/
JPanel updateTable()
@@ -1671,10 +1671,10 @@ public class MetalFileChooserUI
return fileTablePanel;
}
-
+
/**
* Formats bytes into the appropriate size.
- *
+ *
* @param bytes the number of bytes to convert
* @return a string representation of the size
*/
@@ -1686,7 +1686,7 @@ public class MetalFileChooserUI
long gb = (long) Math.pow(2, 30);
double size = 0;
String id = "";
-
+
if ((bytes / gb) >= 1)
{
size = (double) bytes / (double) gb;
@@ -1707,27 +1707,27 @@ public class MetalFileChooserUI
size = bytes;
id = "Bytes";
}
-
+
return nf.format(size) + " " + id;
}
/**
* Creates a listener that monitors selections in the directory/file list
* and keeps the {@link JFileChooser} component up to date.
- *
+ *
* @param fc the file chooser.
- *
+ *
* @return The listener.
- *
+ *
* @see #installListeners(JFileChooser)
*/
public ListSelectionListener createListSelectionListener(JFileChooser fc)
{
return new MetalFileChooserSelectionListener();
}
-
+
/**
* Returns the preferred size for the file chooser component.
- *
+ *
* @return The preferred size.
*/
public Dimension getPreferredSize(JComponent c)
@@ -1740,7 +1740,7 @@ public class MetalFileChooserUI
/**
* Returns the minimum size for the file chooser component.
- *
+ *
* @return The minimum size.
*/
public Dimension getMinimumSize(JComponent c)
@@ -1750,25 +1750,25 @@ public class MetalFileChooserUI
Dimension fl = fileListPanel.getMinimumSize();
return new Dimension(fl.width, tp.height + bp.height + fl.height);
}
-
+
/**
* Returns the maximum size for the file chooser component.
- *
+ *
* @return The maximum size.
*/
public Dimension getMaximumSize(JComponent c)
{
return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
}
-
+
/**
* Creates a property change listener that monitors the {@link JFileChooser}
* for property change events and updates the component display accordingly.
- *
+ *
* @param fc the file chooser.
- *
+ *
* @return The property change listener.
- *
+ *
* @see #installListeners(JFileChooser)
*/
public PropertyChangeListener createPropertyChangeListener(JFileChooser fc)
@@ -1778,10 +1778,10 @@ public class MetalFileChooserUI
/**
* Creates and returns a new instance of {@link DirectoryComboBoxModel}.
- *
+ *
* @return A new instance of {@link DirectoryComboBoxModel}.
*/
- protected MetalFileChooserUI.DirectoryComboBoxModel
+ protected MetalFileChooserUI.DirectoryComboBoxModel
createDirectoryComboBoxModel(JFileChooser fc)
{
return new DirectoryComboBoxModel();
@@ -1790,9 +1790,9 @@ public class MetalFileChooserUI
/**
* Creates a new instance of the renderer used in the directory
* combo box.
- *
+ *
* @param fc the file chooser.
- *
+ *
* @return The renderer.
*/
protected DirectoryComboBoxRenderer createDirectoryComboBoxRenderer(
@@ -1803,23 +1803,23 @@ public class MetalFileChooserUI
/**
* Creates and returns a new instance of {@link FilterComboBoxModel}.
- *
+ *
* @return A new instance of {@link FilterComboBoxModel}.
*/
protected FilterComboBoxModel createFilterComboBoxModel()
{
- return new FilterComboBoxModel();
+ return new FilterComboBoxModel();
}
/**
* Creates and returns a new instance of {@link FilterComboBoxRenderer}.
- *
+ *
* @return A new instance of {@link FilterComboBoxRenderer}.
*/
- protected MetalFileChooserUI.FilterComboBoxRenderer
+ protected MetalFileChooserUI.FilterComboBoxRenderer
createFilterComboBoxRenderer()
{
- return new FilterComboBoxRenderer();
+ return new FilterComboBoxRenderer();
}
/**
@@ -1832,26 +1832,26 @@ public class MetalFileChooserUI
upButton.setIcon(this.upFolderIcon);
upButton.setMargin(new Insets(0, 0, 0, 0));
controls.add(upButton);
-
+
JButton homeButton = new JButton(getGoHomeAction());
homeButton.setText(null);
homeButton.setIcon(this.homeFolderIcon);
homeButton.setMargin(new Insets(0, 0, 0, 0));
controls.add(homeButton);
-
+
JButton newFolderButton = new JButton(getNewFolderAction());
newFolderButton.setText(null);
newFolderButton.setIcon(this.newFolderIcon);
newFolderButton.setMargin(new Insets(0, 0, 0, 0));
controls.add(newFolderButton);
-
+
JToggleButton listButton = new JToggleButton(this.listViewIcon);
listButton.setMargin(new Insets(0, 0, 0, 0));
listButton.addActionListener(new ListViewActionListener());
listButton.setSelected(true);
- listView = true;
+ listView = true;
controls.add(listButton);
-
+
JToggleButton detailButton = new JToggleButton(this.detailsViewIcon);
detailButton.setMargin(new Insets(0, 0, 0, 0));
detailButton.addActionListener(new DetailViewActionListener());
@@ -1862,7 +1862,7 @@ public class MetalFileChooserUI
buttonGroup.add(listButton);
buttonGroup.add(detailButton);
}
-
+
/**
* Removes all the buttons from the control panel.
*/
@@ -1872,10 +1872,10 @@ public class MetalFileChooserUI
controls.revalidate();
controls.repaint();
}
-
+
/**
* Updates the current directory.
- *
+ *
* @param fc the file chooser to update.
*/
public void rescanCurrentDirectory(JFileChooser fc)
@@ -1887,43 +1887,43 @@ public class MetalFileChooserUI
else
createList(fc);
}
-
+
/**
* Returns the file name in the text field.
- *
+ *
* @return The file name.
*/
public String getFileName()
{
String result = null;
- if (fileTextField != null)
+ if (fileTextField != null)
result = fileTextField.getText();
return result;
}
-
+
/**
* Sets the file name in the text field.
- *
+ *
* @param filename the file name.
*/
public void setFileName(String filename)
{
fileTextField.setText(filename);
}
-
+
/**
* DOCUMENT ME!!
- *
+ *
* @param e - DOCUMENT ME!
*/
public void valueChanged(ListSelectionEvent e)
{
// FIXME: Not sure what we should be doing here, if anything.
}
-
+
/**
* Returns the approve button.
- *
+ *
* @return The approve button.
*/
protected JButton getApproveButton(JFileChooser fc)
@@ -1939,10 +1939,10 @@ public class MetalFileChooserUI
{
/**
* Performs the layout.
- *
+ *
* @param parent the container.
*/
- public void layoutContainer(Container parent)
+ public void layoutContainer(Container parent)
{
int count = parent.getComponentCount();
if (count > 0)
@@ -1952,32 +1952,32 @@ public class MetalFileChooserUI
Dimension prefSize = c.getPreferredSize();
int h = parent.getHeight() - insets.top - insets.bottom;
int adj = Math.max(0, (h - prefSize.height) / 2);
- c.setBounds(insets.left, insets.top + adj, parent.getWidth()
- - insets.left - insets.right,
+ c.setBounds(insets.left, insets.top + adj, parent.getWidth()
+ - insets.left - insets.right,
(int) Math.min(prefSize.getHeight(), h));
}
}
-
+
/**
* Returns the minimum layout size.
- *
+ *
* @param parent the container.
- *
+ *
* @return The minimum layout size.
*/
- public Dimension minimumLayoutSize(Container parent)
+ public Dimension minimumLayoutSize(Container parent)
{
return preferredLayoutSize(parent);
}
-
+
/**
* Returns the preferred layout size.
- *
+ *
* @param parent the container.
- *
+ *
* @return The preferred layout size.
*/
- public Dimension preferredLayoutSize(Container parent)
+ public Dimension preferredLayoutSize(Container parent)
{
if (parent.getComponentCount() > 0)
{
@@ -1985,26 +1985,26 @@ public class MetalFileChooserUI
}
else return null;
}
-
+
/**
- * This layout manager does not need to track components, so this
+ * This layout manager does not need to track components, so this
* method does nothing.
- *
+ *
* @param name the name the component is associated with.
* @param component the component.
*/
- public void addLayoutComponent(String name, Component component)
+ public void addLayoutComponent(String name, Component component)
{
// do nothing
}
-
+
/**
- * This layout manager does not need to track components, so this
+ * This layout manager does not need to track components, so this
* method does nothing.
- *
+ *
* @param component the component.
*/
- public void removeLayoutComponent(Component component)
+ public void removeLayoutComponent(Component component)
{
// do nothing
}
@@ -2017,13 +2017,13 @@ public class MetalFileChooserUI
class ButtonLayout implements LayoutManager
{
static final int GAP = 4;
-
+
/**
* Performs the layout.
- *
+ *
* @param parent the container.
*/
- public void layoutContainer(Container parent)
+ public void layoutContainer(Container parent)
{
int count = parent.getComponentCount();
if (count > 0)
@@ -2036,7 +2036,7 @@ public class MetalFileChooserUI
Dimension prefSize = c.getPreferredSize();
maxW = Math.max(prefSize.width, maxW);
}
-
+
// then position the buttons
Insets insets = parent.getInsets();
int availableH = parent.getHeight() - insets.top - insets.bottom;
@@ -2044,42 +2044,42 @@ public class MetalFileChooserUI
for (int i = count - 1; i >= 0; i--)
{
Component c = parent.getComponent(i);
- Dimension prefSize = c.getPreferredSize();
+ Dimension prefSize = c.getPreferredSize();
int adj = Math.max(0, (availableH - prefSize.height) / 2);
currentX = currentX - prefSize.width;
- c.setBounds(currentX, insets.top + adj, prefSize.width,
+ c.setBounds(currentX, insets.top + adj, prefSize.width,
(int) Math.min(prefSize.getHeight(), availableH));
currentX = currentX - GAP;
}
}
}
-
+
/**
* Returns the minimum layout size.
- *
+ *
* @param parent the container.
- *
+ *
* @return The minimum layout size.
*/
- public Dimension minimumLayoutSize(Container parent)
+ public Dimension minimumLayoutSize(Container parent)
{
return preferredLayoutSize(parent);
}
-
+
/**
* Returns the preferred layout size.
- *
+ *
* @param parent the container.
- *
+ *
* @return The preferred layout size.
*/
- public Dimension preferredLayoutSize(Container parent)
+ public Dimension preferredLayoutSize(Container parent)
{
Insets insets = parent.getInsets();
int maxW = 0;
int maxH = 0;
int count = parent.getComponentCount();
- if (count > 0)
+ if (count > 0)
{
for (int i = 0; i < count; i++)
{
@@ -2089,29 +2089,29 @@ public class MetalFileChooserUI
maxH = Math.max(d.height, maxH);
}
}
- return new Dimension(maxW * count + GAP * (count - 1) + insets.left
+ return new Dimension(maxW * count + GAP * (count - 1) + insets.left
+ insets.right, maxH + insets.top + insets.bottom);
}
-
+
/**
- * This layout manager does not need to track components, so this
+ * This layout manager does not need to track components, so this
* method does nothing.
- *
+ *
* @param name the name the component is associated with.
* @param component the component.
*/
- public void addLayoutComponent(String name, Component component)
+ public void addLayoutComponent(String name, Component component)
{
// do nothing
}
-
+
/**
- * This layout manager does not need to track components, so this
+ * This layout manager does not need to track components, so this
* method does nothing.
- *
+ *
* @param component the component.
*/
- public void removeLayoutComponent(Component component)
+ public void removeLayoutComponent(Component component)
{
// do nothing
}
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalIconFactory.java b/libjava/classpath/javax/swing/plaf/metal/MetalIconFactory.java
index 2817336..5382577 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalIconFactory.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalIconFactory.java
@@ -60,67 +60,67 @@ import javax.swing.plaf.UIResource;
/**
* Creates icons for the {@link MetalLookAndFeel}.
*/
-public class MetalIconFactory implements Serializable
+public class MetalIconFactory implements Serializable
{
/** A constant representing "dark". */
public static final boolean DARK = false;
-
+
/** A constant representing "light". */
public static final boolean LIGHT = true;
-
+
/** A shared instance of the MenuArrowIcon. */
private static Icon menuArrow;
-
+
/** A shared instance of the MenuItemArrowIcon. */
private static Icon menuItemArrow;
-
+
/**
* An icon displayed for {@link JCheckBoxMenuItem} components.
*/
- private static class CheckBoxMenuItemIcon
- implements Icon, UIResource, Serializable
+ private static class CheckBoxMenuItemIcon
+ implements Icon, UIResource, Serializable
{
/**
* Creates a new icon instance.
*/
- public CheckBoxMenuItemIcon()
+ public CheckBoxMenuItemIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon (10 pixels).
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 10;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon (10 pixels).
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 10;
}
-
+
/**
* Paints the icon.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
* @param y the y-coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
JCheckBoxMenuItem item = (JCheckBoxMenuItem) c;
-
+
if (item.isArmed())
g.setColor(MetalLookAndFeel.getBlack());
else
@@ -129,7 +129,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x, y + 1, x, y + 8);
g.drawLine(x + 2, y + 8, x + 8, y + 8);
g.drawLine(x + 8, y + 2, x + 8, y + 7);
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(x + 1, y + 1, x + 7, y + 1);
g.drawLine(x + 1, y + 2, x + 1, y + 7);
@@ -145,56 +145,56 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 8 - i, y + i, x + 9 - i, y + i);
}
- }
+ }
}
/**
* An icon used for the "detail view" button on a {@link JFileChooser} under
* the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalIconFactory#getFileChooserDetailViewIcon()
*/
- private static class FileChooserDetailViewIcon
+ private static class FileChooserDetailViewIcon
implements Icon, UIResource, Serializable
{
/**
* Creates a new icon.
*/
- public FileChooserDetailViewIcon()
+ public FileChooserDetailViewIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 18;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 18;
}
-
+
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
g.setColor(MetalLookAndFeel.getBlack());
@@ -204,7 +204,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 6, y + 3, x + 6, y + 7);
g.drawLine(x + 2, y + 7, x + 6, y + 7);
g.drawLine(x + 2, y + 2, x + 2, y + 7);
-
+
// file 2 outline
g.drawLine(x + 2, y + 10, x + 5, y + 10);
g.drawLine(x + 6, y + 11, x + 6, y + 15);
@@ -214,157 +214,157 @@ public class MetalIconFactory implements Serializable
// detail lines
g.drawLine(x + 8, y + 5, x + 15, y + 5);
g.drawLine(x + 8, y + 13, x + 15, y + 13);
-
+
// fill files
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 3, y + 3, 3, 4);
g.fillRect(x + 3, y + 11, 3, 4);
-
+
// highlight files
g.setColor(MetalLookAndFeel.getPrimaryControlHighlight());
g.drawLine(x + 4, y + 4, x + 4, y + 5);
g.drawLine(x + 4, y + 12, x + 4, y + 13);
-
+
g.setColor(savedColor);
- }
+ }
}
/**
* An icon used for the "home folder" button on a {@link JFileChooser} under
* the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalIconFactory#getFileChooserHomeFolderIcon()
*/
- private static class FileChooserHomeFolderIcon
+ private static class FileChooserHomeFolderIcon
implements Icon, UIResource, Serializable
{
/**
* Creates a new icon.
*/
- public FileChooserHomeFolderIcon()
+ public FileChooserHomeFolderIcon()
{
// Nothing to do here.
}
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 18;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 18;
}
-
+
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
Color savedColor = g.getColor();
g.setColor(MetalLookAndFeel.getBlack());
-
+
// roof
g.drawLine(x + 1, y + 8, x + 8, y + 1);
g.drawLine(x + 8, y + 1, x + 15, y + 8);
-
+
// base of house
g.drawLine(x + 3, y + 6, x + 3, y + 15);
g.drawLine(x + 3, y + 15, x + 13, y + 15);
g.drawLine(x + 13, y + 6, x + 13, y + 15);
-
+
// door frame
g.drawLine(x + 6, y + 9, x + 6, y + 15);
g.drawLine(x + 6, y + 9, x + 10, y + 9);
g.drawLine(x + 10, y + 9, x + 10, y + 15);
-
+
// chimney
g.drawLine(x + 11, y + 2, x + 11, y + 4);
g.drawLine(x + 12, y + 2, x + 12, y + 5);
-
+
g.setColor(MetalLookAndFeel.getControlDarkShadow());
-
+
// roof paint
int xx = x + 8;
for (int i = 0; i < 4; i++)
g.drawLine(xx - i, y + 2 + i, xx + i, y + 2 + i);
g.fillRect(x + 4, y + 6, 9, 2);
-
+
// door knob
g.drawLine(x + 9, y + 12, x + 9, y + 12);
-
+
// house paint
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.drawLine(x + 4, y + 8, x + 12, y + 8);
g.fillRect(x + 4, y + 9, 2, 6);
g.fillRect(x + 11, y + 9, 2, 6);
-
+
g.setColor(savedColor);
- }
+ }
}
-
+
/**
* An icon used for the "list view" button on a {@link JFileChooser} under
* the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalIconFactory#getFileChooserListViewIcon()
*/
- private static class FileChooserListViewIcon
- implements Icon, UIResource, Serializable
+ private static class FileChooserListViewIcon
+ implements Icon, UIResource, Serializable
{
/**
* Creates a new icon.
*/
- public FileChooserListViewIcon()
+ public FileChooserListViewIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 18;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 18;
}
-
+
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
g.setColor(MetalLookAndFeel.getBlack());
@@ -374,37 +374,37 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 6, y + 3, x + 6, y + 7);
g.drawLine(x + 2, y + 7, x + 6, y + 7);
g.drawLine(x + 2, y + 2, x + 2, y + 7);
-
+
// file 2 outline
g.drawLine(x + 2, y + 10, x + 5, y + 10);
g.drawLine(x + 6, y + 11, x + 6, y + 15);
g.drawLine(x + 2, y + 15, x + 6, y + 15);
g.drawLine(x + 2, y + 10, x + 2, y + 15);
-
+
// file 3 outline
g.drawLine(x + 10, y + 2, x + 13, y + 2);
g.drawLine(x + 14, y + 3, x + 14, y + 7);
g.drawLine(x + 10, y + 7, x + 14, y + 7);
g.drawLine(x + 10, y + 2, x + 10, y + 7);
-
+
// file 4 outline
g.drawLine(x + 10, y + 10, x + 13, y + 10);
g.drawLine(x + 14, y + 11, x + 14, y + 15);
g.drawLine(x + 10, y + 15, x + 14, y + 15);
g.drawLine(x + 10, y + 10, x + 10, y + 15);
-
+
g.drawLine(x + 8, y + 5, x + 8, y + 5);
g.drawLine(x + 8, y + 13, x + 8, y + 13);
g.drawLine(x + 16, y + 5, x + 16, y + 5);
g.drawLine(x + 16, y + 13, x + 16, y + 13);
-
+
// fill files
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 3, y + 3, 3, 4);
g.fillRect(x + 3, y + 11, 3, 4);
g.fillRect(x + 11, y + 3, 3, 4);
g.fillRect(x + 11, y + 11, 3, 4);
-
+
// highlight files
g.setColor(MetalLookAndFeel.getPrimaryControlHighlight());
g.drawLine(x + 4, y + 4, x + 4, y + 5);
@@ -413,113 +413,113 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 12, y + 12, x + 12, y + 13);
g.setColor(savedColor);
- }
+ }
}
-
+
/**
* An icon used for the "new folder" button on a {@link JFileChooser} under
* the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalIconFactory#getFileChooserNewFolderIcon()
*/
- private static class FileChooserNewFolderIcon
+ private static class FileChooserNewFolderIcon
implements Icon, UIResource, Serializable
{
- /**
+ /**
* Creates a new icon.
*/
- public FileChooserNewFolderIcon()
+ public FileChooserNewFolderIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 18;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 18;
}
-
+
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
+ public void paintIcon(Component c, Graphics g, int x, int y)
+ {
Color savedColor = g.getColor();
g.setColor(MetalLookAndFeel.getBlack());
-
+
g.drawLine(x + 2, y + 5, x + 9, y + 5);
g.drawLine(x + 10, y + 6, x + 15, y + 6);
g.drawLine(x + 15, y + 5, x + 15, y + 14);
g.drawLine(x + 2, y + 14, x + 15, y + 14);
g.drawLine(x + 1, y + 6, x + 1, y + 14);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
g.drawLine(x + 11, y + 3, x + 15, y + 3);
g.drawLine(x + 10, y + 4, x + 15, y + 4);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 3, y + 7, 7, 7);
g.fillRect(x + 10, y + 8, 5, 6);
g.drawLine(x + 10, y + 5, x + 14, y + 5);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControlHighlight());
g.drawLine(x + 10, y + 7, x + 14, y + 7);
g.drawLine(x + 2, y + 6, x + 9, y + 6);
g.drawLine(x + 2, y + 6, x + 2, y + 13);
g.setColor(savedColor);
- }
+ }
}
/**
* An icon used for the "up folder" button on a {@link JFileChooser} under
* the {@link MetalLookAndFeel}.
- *
+ *
* @see MetalIconFactory#getFileChooserNewFolderIcon()
*/
- private static class FileChooserUpFolderIcon extends FileChooserNewFolderIcon
+ private static class FileChooserUpFolderIcon extends FileChooserNewFolderIcon
{
/**
* Creates a new icon.
*/
- public FileChooserUpFolderIcon()
+ public FileChooserUpFolderIcon()
{
// Nothing to do here.
}
-
+
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
// draw the folder
super.paintIcon(c, g, x, y);
-
+
// now draw the up arrow
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 8, y + 9, x + 8, y + 16);
@@ -527,128 +527,128 @@ public class MetalIconFactory implements Serializable
for (int i = 0; i < 4; i++)
g.drawLine(xx - i, y + 9 + i, xx + i, y + 9 + i);
g.setColor(savedColor);
- }
+ }
}
/**
* An icon representing a file (drawn as a piece of paper with the top-right
* corner turned down).
*/
- public static class FileIcon16 implements Icon, Serializable
+ public static class FileIcon16 implements Icon, Serializable
{
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 16;
}
/**
- * Returns the height of the icon, in pixels. The height returned is
- * 16 plus the value returned by
+ * Returns the height of the icon, in pixels. The height returned is
+ * 16 plus the value returned by
* {@link #getAdditionalHeight()}.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16 + getAdditionalHeight();
}
-
+
/**
* Paints the icon at the location (x, y).
- *
+ *
* @param c the component.
* @param g the graphics context.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
y = y + getShift();
g.setColor(MetalLookAndFeel.getBlack());
- g.drawLine(x, y, x + 9, y);
- g.drawLine(x, y + 1, x, y + 15);
- g.drawLine(x, y + 15, x + 12, y + 15);
- g.drawLine(x + 12, y + 15, x + 12, y + 6);
- g.drawLine(x + 12, y + 6, x + 9, y);
+ g.drawLine(x, y, x + 9, y);
+ g.drawLine(x, y + 1, x, y + 15);
+ g.drawLine(x, y + 15, x + 12, y + 15);
+ g.drawLine(x + 12, y + 15, x + 12, y + 6);
+ g.drawLine(x + 12, y + 6, x + 9, y);
g.drawLine(x + 7, y + 2, x + 11, y + 6);
g.drawLine(x + 8, y + 1, x + 9, y + 1);
g.setColor(MetalLookAndFeel.getPrimaryControl());
- g.drawLine(x + 1, y + 1, x + 7, y + 1);
- g.drawLine(x + 1, y + 1, x + 1, y + 14);
- g.drawLine(x + 1, y + 14, x + 11, y + 14);
- g.drawLine(x + 11, y + 14, x + 11, y + 7);
+ g.drawLine(x + 1, y + 1, x + 7, y + 1);
+ g.drawLine(x + 1, y + 1, x + 1, y + 14);
+ g.drawLine(x + 1, y + 14, x + 11, y + 14);
+ g.drawLine(x + 11, y + 14, x + 11, y + 7);
g.drawLine(x + 8, y + 2, x + 10, y + 4);
}
-
+
/**
- * Returns the additional height for the icon. The
+ * Returns the additional height for the icon. The
* {@link #getIconHeight()} method adds this value to the icon height it
* returns. Subclasses can override this method to adjust the icon height.
- *
+ *
* @return The additional height (0 unless overridden).
*/
- public int getAdditionalHeight()
+ public int getAdditionalHeight()
{
return 0;
}
-
+
/**
- * Returns the vertical shift, in pixels, applied when painting the icon.
- * The default value is zero, but subclasses may override this (for
+ * Returns the vertical shift, in pixels, applied when painting the icon.
+ * The default value is zero, but subclasses may override this (for
* example, see {@link TreeLeafIcon}).
- *
+ *
* @return The shift.
*/
- public int getShift()
+ public int getShift()
{
return 0;
}
-
+
}
-
+
/**
* An icon representing a folder.
*/
- public static class FolderIcon16 implements Icon, Serializable
+ public static class FolderIcon16 implements Icon, Serializable
{
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 16;
}
-
+
/**
- * Returns the height of the icon, in pixels. The height returned is
- * 16 plus the value returned by
+ * Returns the height of the icon, in pixels. The height returned is
+ * 16 plus the value returned by
* {@link #getAdditionalHeight()}.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16 + getAdditionalHeight();
}
/**
* Paints the icon at the location (x, y).
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
y = y + getShift();
g.setColor(MetalLookAndFeel.getBlack());
@@ -666,37 +666,37 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 9, y + 4, x + 15, y + 4);
g.drawLine(x + 10, y + 3, x + 15, y + 3);
}
-
+
/**
- * Returns the additional height for the icon. The
+ * Returns the additional height for the icon. The
* {@link #getIconHeight()} method adds this value to the icon height it
* returns. Subclasses can override this method to adjust the icon height.
- *
+ *
* @return The additional height (0 unless overridden).
*/
- public int getAdditionalHeight()
+ public int getAdditionalHeight()
{
return 0;
}
-
+
/**
- * Returns the vertical shift, in pixels, applied when painting the icon.
- * The default value is zero, but subclasses may override this (for
+ * Returns the vertical shift, in pixels, applied when painting the icon.
+ * The default value is zero, but subclasses may override this (for
* example, see {@link TreeFolderIcon}).
- *
+ *
* @return The shift.
*/
- public int getShift()
+ public int getShift()
{
return 0;
}
-
+
}
/**
* An icon used by the {@link MetalInternalFrameUI} class when the frame
* is displayed as a palette.
- *
+ *
* @since 1.3
*/
public static class PaletteCloseIcon
@@ -704,33 +704,33 @@ public class MetalIconFactory implements Serializable
{
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 7;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 7;
}
-
+
/**
* Paints the icon using colors from the {@link MetalLookAndFeel}.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
AbstractButton button = (AbstractButton) c;
@@ -752,9 +752,9 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 5, y + 3, x + 6, y + 2);
g.drawLine(x + 6, y + 6, x + 6, y + 6);
g.setColor(savedColor);
- }
+ }
}
-
+
/**
* An {@link Icon} implementation for {@link JCheckBox}es in the
* Metal Look & Feel.
@@ -799,13 +799,13 @@ public class MetalIconFactory implements Serializable
* Paints the icon, taking into account whether or not the component is
* enabled, selected and/or armed.
*
- * @param c the Component to draw on (must be an instance of
+ * @param c the Component to draw on (must be an instance of
* {@link JRadioButton})
* @param g the Graphics context to draw with
* @param x the X position
* @param y the Y position
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
if (UIManager.get("RadioButton.gradient") != null)
MetalUtils.paintGradient(g, x + 2, y + 2, 8, 8,
@@ -842,13 +842,13 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 10, y + 4, x + 10, y + 7);
g.fillRect(x + 2, y + 2, 8, 8);
}
- else
+ else
{
// only draw inner highlight if not filled
if (b.isEnabled())
{
g.setColor(MetalLookAndFeel.getWhite());
-
+
g.drawLine(x + 2, y + 8, x + 2, y + 9);
g.drawLine(x + 1, y + 4, x + 1, y + 7);
g.drawLine(x + 2, y + 2, x + 2, y + 3);
@@ -862,7 +862,7 @@ public class MetalIconFactory implements Serializable
if (b.isEnabled())
{
g.setColor(MetalLookAndFeel.getWhite());
-
+
// outer
g.drawLine(x + 10, y + 1, x + 10, y + 1);
g.drawLine(x + 11, y + 2, x + 11, y + 3);
@@ -873,7 +873,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 4, y + 12, x + 7, y + 12);
g.drawLine(x + 2, y + 11, x + 3, y + 11);
}
-
+
if (b.isSelected())
{
if (b.isEnabled())
@@ -885,52 +885,52 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 4, y + 8, x + 7, y + 8);
}
g.setColor(savedColor);
- }
+ }
}
/**
* An icon displayed for {@link JRadioButtonMenuItem} components.
*/
- private static class RadioButtonMenuItemIcon
- implements Icon, UIResource, Serializable
+ private static class RadioButtonMenuItemIcon
+ implements Icon, UIResource, Serializable
{
/**
* Creates a new icon instance.
*/
- public RadioButtonMenuItemIcon()
+ public RadioButtonMenuItemIcon()
{
// Nothing to do here.
}
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 10;
}
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 10;
}
/**
* Paints the icon.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
* @param y the y-coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
JRadioButtonMenuItem item = (JRadioButtonMenuItem) c;
@@ -943,7 +943,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 1, y + 7, x + 1, y + 7);
g.drawLine(x, y + 2, x, y + 6);
g.drawLine(x + 1, y + 1, x + 1, y + 1);
-
+
if (item.isSelected())
{
g.drawLine(x + 3, y + 2, x + 5, y + 2);
@@ -962,14 +962,14 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 1, y + 3, x + 1, y + 6);
g.drawLine(x + 2, y + 2, x + 2, y + 2);
g.setColor(savedColor);
- }
+ }
}
/**
* The icon used to display the thumb control on a horizontally oriented
* {@link JSlider} component.
*/
- private static class HorizontalSliderThumbIcon
+ private static class HorizontalSliderThumbIcon
implements Icon, UIResource, Serializable
{
@@ -984,52 +984,52 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new instance.
*/
- public HorizontalSliderThumbIcon()
+ public HorizontalSliderThumbIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 15;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
-
+
/**
- * Paints the icon, taking into account whether or not the component has
+ * Paints the icon, taking into account whether or not the component has
* the focus.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x-coordinate.
* @param y the y-coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
boolean enabled = false;
boolean focus = false;
if (c != null)
{
enabled = c.isEnabled();
- focus = c.hasFocus();
+ focus = c.hasFocus();
}
-
+
// draw the outline
- if (enabled)
+ if (enabled)
g.setColor(MetalLookAndFeel.getBlack());
else
g.setColor(MetalLookAndFeel.getControlDarkShadow());
@@ -1038,8 +1038,8 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 14, y + 8, x + 7, y + 15);
g.drawLine(x + 6, y + 14, x, y + 8);
g.drawLine(x, y + 7, x, y + 1);
-
-// The following is commented out until the masking for the gradient painting
+
+// The following is commented out until the masking for the gradient painting
// is working correctly
// // Fill the icon.
// if (MetalLookAndFeel.getCurrentTheme() instanceof OceanTheme
@@ -1098,7 +1098,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 2, y + 2, x + 2, y + 2);
g.drawLine(x + 6, y + 2, x + 6, y + 2);
g.drawLine(x + 10, y + 2, x + 10, y + 2);
-
+
g.drawLine(x + 4, y + 4, x + 4, y + 4);
g.drawLine(x + 8, y + 4, x + 8, y + 4);
@@ -1107,62 +1107,62 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 10, y + 6, x + 10, y + 6);
}
- }
+ }
}
-
+
/**
- * An icon used for the 'close' button in the title frame of a
+ * An icon used for the 'close' button in the title frame of a
* {@link JInternalFrame}.
*/
- private static class InternalFrameCloseIcon
+ private static class InternalFrameCloseIcon
implements Icon, UIResource, Serializable
{
/** The icon size in pixels. */
private int size;
-
+
/**
* Creates a new icon.
- *
+ *
* @param size the icon size (width and height) in pixels.
*/
- public InternalFrameCloseIcon(int size)
+ public InternalFrameCloseIcon(int size)
{
this.size = size;
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return size;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return size;
}
-
+
/**
* Paints the icon.
- *
+ *
* @param c the component (an {@link JInternalFrame} is expected).
* @param g the graphics device.
* @param x the x-coordinate.
* @param y the y-coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
AbstractButton b = (AbstractButton) c;
-
+
// fill the interior
if (b.getModel().isPressed())
// FIXME: also need to take into account whether the internal frame is
@@ -1171,7 +1171,7 @@ public class MetalIconFactory implements Serializable
else
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 2, y + 2, 10, 10);
-
+
// draw the outline box and the cross
if (b.getModel().isPressed())
g.setColor(MetalLookAndFeel.getBlack());
@@ -1191,7 +1191,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 13, y + 2, x + 13, y + 12);
g.drawLine(x + 2, y + 12, x + 2, y + 12);
g.drawLine(x + 12, y + 2, x + 12, y + 2);
-
+
g.fillRect(x + 4, y + 4, 2, 2);
g.fillRect(x + 5, y + 5, 4, 4);
g.drawLine(x + 9, y + 4, x + 10, y + 4);
@@ -1200,21 +1200,21 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 4, y + 9, x + 5, y + 9);
g.drawLine(x + 9, y + 8, x + 9, y + 10);
g.drawLine(x + 8, y + 9, x + 10, y + 9);
-
+
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x, y, x + 13, y);
g.drawLine(x, y + 1, x, y + 13);
g.drawLine(x + 3, y + 4, x + 4, y + 3);
g.drawLine(x + 3, y + 9, x + 5, y + 7);
g.drawLine(x + 7, y + 5, x + 9, y + 3);
-
+
g.drawLine(x + 12, y + 3, x + 12, y + 11);
g.drawLine(x + 3, y + 12, x + 12, y + 12);
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(x + 1, y + 14, x + 14, y + 14);
g.drawLine(x + 14, y + 1, x + 14, y + 14);
-
+
if (!b.getModel().isPressed())
{
g.drawLine(x + 5, y + 10, x + 5, y + 10);
@@ -1225,53 +1225,53 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 10, y + 11, x + 10, y + 11);
}
g.setColor(savedColor);
- }
+ }
}
/**
* The icon displayed at the top-left corner of a {@link JInternalFrame}.
*/
private static class InternalFrameDefaultMenuIcon
- implements Icon, UIResource, Serializable
+ implements Icon, UIResource, Serializable
{
-
+
/**
* Creates a new instance.
*/
- public InternalFrameDefaultMenuIcon()
+ public InternalFrameDefaultMenuIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 16;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
-
+
/**
* Paints the icon at the specified location.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
g.fillRect(x + 1, y, 14, 2);
@@ -1279,10 +1279,10 @@ public class MetalIconFactory implements Serializable
g.fillRect(x + 1, y + 14, 14, 2);
g.fillRect(x + 14, y + 1, 2, 14);
g.drawLine(x + 2, y + 5, x + 14, y + 5);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 2, y + 2, 12, 3);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
g.drawLine(x + 3, y + 3, x + 3, y + 3);
g.drawLine(x + 6, y + 3, x + 6, y + 3);
@@ -1295,59 +1295,59 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 5, y + 2, x + 5, y + 2);
g.drawLine(x + 8, y + 2, x + 8, y + 2);
g.drawLine(x + 11, y + 2, x + 11, y + 2);
- }
+ }
}
/**
- * An icon used in the title frame of a {@link JInternalFrame}. When you
+ * An icon used in the title frame of a {@link JInternalFrame}. When you
* maximise an internal frame, this icon will replace the 'maximise' icon to
* provide a 'restore' option.
*/
private static class InternalFrameAltMaximizeIcon
- implements Icon, UIResource, Serializable
+ implements Icon, UIResource, Serializable
{
/** The icon size in pixels. */
private int size;
-
+
/**
* Creates a new icon.
- *
+ *
* @param size the icon size in pixels.
*/
- public InternalFrameAltMaximizeIcon(int size)
+ public InternalFrameAltMaximizeIcon(int size)
{
this.size = size;
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return size;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return size;
}
-
+
/**
* Paints the icon at the specified location.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
@@ -1359,27 +1359,27 @@ public class MetalIconFactory implements Serializable
else
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 2, y + 6, 7, 7);
-
-
+
+
if (b.getModel().isPressed())
g.setColor(MetalLookAndFeel.getBlack());
else
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
-
+
g.drawLine(x + 12, y + 1, x + 13, y + 1);
g.drawLine(x + 11, y + 2, x + 12, y + 2);
g.drawLine(x + 10, y + 3, x + 11, y + 3);
g.drawLine(x + 8, y + 2, x + 8, y + 3);
g.fillRect(x + 8, y + 4, 3, 3);
g.drawLine(x + 11, y + 6, x + 12, y + 6);
-
+
g.drawLine(x + 1, y + 5, x + 5, y + 5);
g.drawLine(x + 1, y + 6, x + 1, y + 12);
g.drawLine(x + 9, y + 9, x + 9, y + 12);
g.drawLine(x + 1, y + 13, x + 9, y + 13);
-
+
g.drawLine(x + 2, y + 12, x + 2, y + 12);
-
+
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 12, y, x + 9, y + 3);
g.drawLine(x + 7, y + 1, x + 8, y + 1);
@@ -1390,7 +1390,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 3, y + 12, x + 8, y + 12);
g.drawLine(x + 8, y + 8, x + 8, y + 11);
g.drawLine(x + 9, y + 8, x + 9, y + 8);
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(x + 9, y + 2, x + 9, y + 2);
g.drawLine(x + 11, y + 4, x + 13, y + 2);
@@ -1399,67 +1399,67 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 6, y + 5, x + 6, y + 5);
g.drawLine(x + 10, y + 8, x + 10, y + 13);
g.drawLine(x + 1, y + 14, x + 10, y + 14);
-
+
if (!b.getModel().isPressed())
{
g.drawLine(x + 2, y + 6, x + 6, y + 6);
g.drawLine(x + 2, y + 6, x + 2, y + 11);
}
-
+
g.setColor(savedColor);
- }
+ }
}
-
+
/**
- * An icon used for the 'maximize' button in the title frame of a
+ * An icon used for the 'maximize' button in the title frame of a
* {@link JInternalFrame}.
*/
- private static class InternalFrameMaximizeIcon
+ private static class InternalFrameMaximizeIcon
implements Icon, UIResource, Serializable
{
-
+
/**
* Creates a new instance.
*/
- public InternalFrameMaximizeIcon()
+ public InternalFrameMaximizeIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 16;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
-
+
/**
* Paints the icon at the specified location.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
-
+
AbstractButton b = (AbstractButton) c;
-
+
// fill the interior
if (b.getModel().isPressed())
g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
@@ -1471,7 +1471,7 @@ public class MetalIconFactory implements Serializable
g.setColor(MetalLookAndFeel.getBlack());
else
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
-
+
g.drawLine(x + 9, y + 1, x + 10, y + 1);
g.fillRect(x + 11, y + 1, 3, 3);
g.fillRect(x + 12, y + 4, 2, 2);
@@ -1481,7 +1481,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 1, y + 6, x + 1, y + 12);
g.drawLine(x + 9, y + 6, x + 9, y + 12);
g.drawLine(x + 1, y + 13, x + 9, y + 13);
-
+
// fill
g.drawLine(x + 7, y + 6, x + 8, y + 6);
g.drawLine(x + 6, y + 7, x + 8, y + 7);
@@ -1491,7 +1491,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 2, y + 11, x + 3, y + 11);
g.drawLine(x + 2, y + 12, x + 4, y + 12);
g.drawLine(x + 8, y + 8, x + 8, y + 8);
-
+
// draw black
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 8, y, x + 13, y);
@@ -1499,11 +1499,11 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 10, y + 2, x + 9, y + 3);
g.drawLine(x, y + 4, x + 8, y + 4);
g.drawLine(x, y + 5, x, y + 13);
-
+
g.drawLine(x + 2, y + 10, x + 6, y + 6);
g.drawLine(x + 8, y + 9, x + 8, y + 11);
g.drawLine(x + 5, y + 12, x + 8, y + 12);
-
+
// draw white
g.setColor(MetalLookAndFeel.getWhite());
if (!b.getModel().isPressed())
@@ -1512,89 +1512,89 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 2, y + 7, x + 2, y + 9);
g.drawLine(x + 4, y + 11, x + 7, y + 8);
}
-
+
g.drawLine(x + 1, y + 14, x + 10, y + 14);
g.drawLine(x + 10, y + 5, x + 10, y + 13);
-
+
g.drawLine(x + 9, y + 2, x + 9, y + 2);
g.drawLine(x + 11, y + 4, x + 11, y + 5);
g.drawLine(x + 13, y + 6, x + 14, y + 6);
g.drawLine(x + 14, y + 1, x + 14, y + 5);
g.setColor(savedColor);
- }
+ }
}
/**
* An icon used in the title frame of a {@link JInternalFrame}.
*/
- private static class InternalFrameMinimizeIcon
+ private static class InternalFrameMinimizeIcon
implements Icon, UIResource, Serializable
{
-
+
/**
* Creates a new instance.
*/
- public InternalFrameMinimizeIcon()
+ public InternalFrameMinimizeIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 16;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
-
+
/**
* Paints the icon at the specified location.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color savedColor = g.getColor();
-
+
AbstractButton b = (AbstractButton) c;
-
+
if (b.getModel().isPressed())
g.setColor(MetalLookAndFeel.getBlack());
else
- // FIXME: here the color depends on whether or not the internal frame
- // is selected
+ // FIXME: here the color depends on whether or not the internal frame
+ // is selected
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
-
+
g.drawLine(x + 12, y + 1, x + 13, y + 1);
g.drawLine(x + 11, y + 2, x + 12, y + 2);
g.drawLine(x + 10, y + 3, x + 11, y + 3);
g.drawLine(x + 8, y + 2, x + 8, y + 3);
g.fillRect(x + 8, y + 4, 3, 3);
g.drawLine(x + 11, y + 6, x + 12, y + 6);
-
+
g.drawLine(x + 1, y + 8, x + 6, y + 8);
g.drawLine(x + 1, y + 9, x + 1, y + 12);
g.drawLine(x + 6, y + 9, x + 6, y + 12);
g.drawLine(x + 1, y + 13, x + 6, y + 13);
-
+
g.drawLine(x + 5, y + 9, x + 5, y + 9);
g.drawLine(x + 2, y + 12, x + 2, y + 12);
-
+
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 12, y, x + 9, y + 3);
g.drawLine(x + 7, y + 1, x + 8, y + 1);
@@ -1604,7 +1604,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 3, y + 12, x + 5, y + 12);
g.drawLine(x + 5, y + 10, x + 5, y + 11);
g.drawLine(x + 11, y + 5, x + 12, y + 5);
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(x + 9, y + 2, x + 9, y + 2);
g.drawLine(x + 11, y + 4, x + 13, y + 2);
@@ -1625,14 +1625,14 @@ public class MetalIconFactory implements Serializable
}
g.setColor(savedColor);
- }
+ }
}
/**
* The icon used to display the thumb control on a horizontally oriented
* {@link JSlider} component.
*/
- private static class VerticalSliderThumbIcon
+ private static class VerticalSliderThumbIcon
implements Icon, UIResource, Serializable
{
/**
@@ -1646,53 +1646,53 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new instance.
*/
- public VerticalSliderThumbIcon()
+ public VerticalSliderThumbIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 16;
}
-
+
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 15;
}
-
+
/**
* Paints the icon taking into account whether the slider control has the
* focus or not.
- *
+ *
* @param c the slider (must be a non-null instance of
* {@link JSlider}.
* @param g the graphics device.
* @param x the x-coordinate.
* @param y the y-coordinate.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
boolean enabled = false;
boolean focus = false;
if (c != null)
{
enabled = c.isEnabled();
- focus = c.hasFocus();
+ focus = c.hasFocus();
}
-
+
// draw the outline
- if (enabled)
+ if (enabled)
g.setColor(MetalLookAndFeel.getBlack());
else
g.setColor(MetalLookAndFeel.getControlDarkShadow());
@@ -1701,8 +1701,8 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 14, y + 8, x + 8, y + 14);
g.drawLine(x + 8, y + 14, x + 1, y + 14);
g.drawLine(x, y + 13, x, y + 1);
-
-// The following is commented out until the masking for the gradient painting
+
+// The following is commented out until the masking for the gradient painting
// is working correctly
// // Fill the icon.
// if (MetalLookAndFeel.getCurrentTheme() instanceof OceanTheme
@@ -1768,57 +1768,57 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 6, y + 2, x + 6, y + 2);
g.drawLine(x + 6, y + 6, x + 6, y + 6);
g.drawLine(x + 6, y + 10, x + 6, y + 10);
-
+
}
- }
+ }
}
-
+
/**
* A tree control icon. This icon can be in one of two states: expanded and
* collapsed.
*/
public static class TreeControlIcon implements Icon, Serializable
{
-
+
/** ???. */
protected boolean isLight;
-
+
/** A flag that controls whether or not the icon is collapsed. */
private boolean collapsed;
-
+
/**
* Creates a new icon.
- *
+ *
* @param isCollapsed a flag that controls whether the icon is in the
* collapsed state or the expanded state.
*/
- public TreeControlIcon(boolean isCollapsed)
+ public TreeControlIcon(boolean isCollapsed)
{
collapsed = isCollapsed;
}
-
+
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return The width of the icon.
*/
- public int getIconWidth()
+ public int getIconWidth()
{
return 18;
}
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return The height of the icon.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 18;
}
-
+
/**
* Paints the icon at the location (x, y).
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
@@ -1840,31 +1840,31 @@ public class MetalIconFactory implements Serializable
g.drawOval(x, y, w, w);
g.setColor(dark);
g.fillOval(x + 1, y + 1, w - 1, w - 1);
-
+
if (collapsed)
g.fillRect(x + w, y + wHalf + 1, w, 2);
else
g.fillRect(x + wHalf + 1, y + w, 2, w);
-
+
g.setColor(white);
g.fillRect(x + wHalf + 1, y + wHalf + 1, 2, 2);
- }
-
+ }
+
/**
* Simply calls {@link #paintIcon(Component, Graphics, int, int)}.
- *
+ *
* @param c the component.
* @param g the graphics device.
* @param x the x coordinate.
* @param y the y coordinate.
*/
- public void paintMe(Component c, Graphics g, int x, int y)
+ public void paintMe(Component c, Graphics g, int x, int y)
{
- paintIcon(c, g, x, y);
+ paintIcon(c, g, x, y);
}
}
-
+
/**
* A tree folder icon.
*/
@@ -1873,34 +1873,34 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new instance.
*/
- public TreeFolderIcon()
+ public TreeFolderIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the additional height for this icon, in this case 2
* pixels.
- *
+ *
* @return 2.
*/
- public int getAdditionalHeight()
+ public int getAdditionalHeight()
{
return 2;
}
-
+
/**
- * Returns the vertical shift, in pixels, applied when painting the icon.
+ * Returns the vertical shift, in pixels, applied when painting the icon.
* This overridden method returns -1.
- *
+ *
* @return The shift.
*/
- public int getShift()
+ public int getShift()
{
return -1;
}
}
-
+
/**
* A tree leaf icon.
*/
@@ -1909,29 +1909,29 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new instance.
*/
- public TreeLeafIcon()
+ public TreeLeafIcon()
{
// Nothing to do here.
}
-
+
/**
* Returns the additional height for this icon, in this case 4
* pixels.
- *
+ *
* @return 4.
*/
- public int getAdditionalHeight()
+ public int getAdditionalHeight()
{
return 4;
}
-
+
/**
- * Returns the vertical shift, in pixels, applied when painting the icon.
+ * Returns the vertical shift, in pixels, applied when painting the icon.
* This overridden method returns 2.
- *
+ *
* @return The shift.
*/
- public int getShift()
+ public int getShift()
{
return 2;
}
@@ -1939,51 +1939,51 @@ public class MetalIconFactory implements Serializable
/**
* An icon representing a hard disk.
- *
+ *
* @see MetalIconFactory#getTreeHardDriveIcon()
*/
- private static class TreeHardDriveIcon
+ private static class TreeHardDriveIcon
implements Icon, UIResource, Serializable
{
/**
* Creates a new icon instance.
*/
- public TreeHardDriveIcon()
+ public TreeHardDriveIcon()
{
// Nothing to do here.
}
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return 16.
*/
- public int getIconWidth()
- {
+ public int getIconWidth()
+ {
return 16;
}
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return 16.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
/**
- * Paints the icon at the specified location, using colors from the
+ * Paints the icon at the specified location, using colors from the
* current theme.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color saved = g.getColor();
g.setColor(MetalLookAndFeel.getBlack());
@@ -1993,7 +1993,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 14, y + 7, x + 14, y + 8);
g.drawLine(x + 1, y + 10, x + 1, y + 11);
g.drawLine(x + 14, y + 10, x + 14, y + 11);
-
+
g.drawLine(x + 2, y + 3, x + 3, y + 3);
g.drawLine(x + 12, y + 3, x + 13, y + 3);
g.drawLine(x + 2, y + 6, x + 3, y + 6);
@@ -2002,25 +2002,25 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 12, y + 9, x + 13, y + 9);
g.drawLine(x + 2, y + 12, x + 3, y + 12);
g.drawLine(x + 12, y + 12, x + 13, y + 12);
-
+
g.drawLine(x + 4, y + 2, x + 11, y + 2);
g.drawLine(x + 4, y + 7, x + 11, y + 7);
g.drawLine(x + 4, y + 10, x + 11, y + 10);
g.drawLine(x + 4, y + 13, x + 11, y + 13);
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.fillRect(x + 4, y + 3, 2, 2);
g.drawLine(x + 6, y + 4, x + 6, y + 4);
g.drawLine(x + 7, y + 3, x + 9, y + 3);
g.drawLine(x + 8, y + 4, x + 8, y + 4);
g.drawLine(x + 11, y + 3, x + 11, y + 3);
- g.fillRect(x + 2, y + 4, 2, 2);
- g.fillRect(x + 2, y + 7, 2, 2);
- g.fillRect(x + 2, y + 10, 2, 2);
+ g.fillRect(x + 2, y + 4, 2, 2);
+ g.fillRect(x + 2, y + 7, 2, 2);
+ g.fillRect(x + 2, y + 10, 2, 2);
g.drawLine(x + 4, y + 6, x + 4, y + 6);
g.drawLine(x + 4, y + 9, x + 4, y + 9);
g.drawLine(x + 4, y + 12, x + 4, y + 12);
-
+
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(x + 13, y + 4, x + 13, y + 4);
g.drawLine(x + 12, y + 5, x + 13, y + 5);
@@ -2028,7 +2028,7 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 12, y + 8, x + 13, y + 8);
g.drawLine(x + 13, y + 10, x + 13, y + 10);
g.drawLine(x + 12, y + 11, x + 13, y + 11);
-
+
g.drawLine(x + 10, y + 5, x + 10, y + 5);
g.drawLine(x + 7, y + 6, x + 7, y + 6);
g.drawLine(x + 9, y + 6, x + 9, y + 6);
@@ -2045,136 +2045,136 @@ public class MetalIconFactory implements Serializable
g.drawLine(x + 11, y + 12, x + 11, y + 12);
g.setColor(saved);
- }
- }
-
+ }
+ }
+
/**
* An icon representing a floppy disk.
- *
+ *
* @see MetalIconFactory#getTreeFloppyDriveIcon()
*/
- private static class TreeFloppyDriveIcon
+ private static class TreeFloppyDriveIcon
implements Icon, UIResource, Serializable
{
/**
* Creates a new icon instance.
*/
- public TreeFloppyDriveIcon()
+ public TreeFloppyDriveIcon()
{
// Nothing to do here.
}
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return 16.
*/
- public int getIconWidth()
- {
+ public int getIconWidth()
+ {
return 16;
}
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return 16.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
/**
- * Paints the icon at the specified location, using colors from the
+ * Paints the icon at the specified location, using colors from the
* current theme.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color saved = g.getColor();
-
+
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 1, y + 1, x + 13, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + 14);
g.drawLine(x + 1, y + 14, x + 14, y + 14);
g.drawLine(x + 14, y + 2, x + 14, y + 14);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 2, y + 2, 12, 12);
-
+
g.setColor(MetalLookAndFeel.getControlShadow());
g.fillRect(x + 5, y + 2, 6, 5);
g.drawLine(x + 4, y + 8, x + 11, y + 8);
g.drawLine(x + 3, y + 9, x + 3, y + 13);
g.drawLine(x + 12, y + 9, x + 12, y + 13);
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.fillRect(x + 8, y + 3, 2, 3);
g.fillRect(x + 4, y + 9, 8, 5);
-
+
g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
g.drawLine(x + 5, y + 10, x + 9, y + 10);
g.drawLine(x + 5, y + 12, x + 8, y + 12);
g.setColor(saved);
- }
- }
+ }
+ }
/**
* An icon representing a computer.
- *
+ *
* @see MetalIconFactory#getTreeComputerIcon()
*/
- private static class TreeComputerIcon
+ private static class TreeComputerIcon
implements Icon, UIResource, Serializable
{
/**
* Creates a new icon instance.
*/
- public TreeComputerIcon()
+ public TreeComputerIcon()
{
// Nothing to do here.
}
/**
* Returns the width of the icon, in pixels.
- *
+ *
* @return 16.
*/
- public int getIconWidth()
- {
+ public int getIconWidth()
+ {
return 16;
}
/**
* Returns the height of the icon, in pixels.
- *
+ *
* @return 16.
*/
- public int getIconHeight()
+ public int getIconHeight()
{
return 16;
}
/**
- * Paints the icon at the specified location, using colors from the
+ * Paints the icon at the specified location, using colors from the
* current theme.
- *
+ *
* @param c the component (ignored).
* @param g the graphics device.
* @param x the x-coordinate for the top-left of the icon.
* @param y the y-coordinate for the top-left of the icon.
*/
- public void paintIcon(Component c, Graphics g, int x, int y)
+ public void paintIcon(Component c, Graphics g, int x, int y)
{
Color saved = g.getColor();
-
+
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 3, y + 1, x + 12, y + 1);
g.drawLine(x + 2, y + 2, x + 2, y + 8);
@@ -2189,20 +2189,20 @@ public class MetalIconFactory implements Serializable
g.setColor(MetalLookAndFeel.getPrimaryControl());
g.fillRect(x + 5, y + 4, 6, 4);
-
+
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(x + 6, y + 12, x + 8, y + 12);
g.drawLine(x + 10, y + 12, x + 12, y + 12);
g.setColor(saved);
- }
- }
-
+ }
+ }
+
/** The icon returned by {@link #getCheckBoxIcon()}. */
private static Icon checkBoxIcon;
-
+
/** The icon returned by {@link #getCheckBoxMenuItemIcon()}. */
private static Icon checkBoxMenuItemIcon;
-
+
/** The icon returned by {@link #getFileChooserDetailViewIcon()}. */
private static Icon fileChooserDetailViewIcon;
@@ -2229,49 +2229,49 @@ public class MetalIconFactory implements Serializable
/** The icon returned by {@link #getTreeComputerIcon()}. */
private static Icon treeComputerIcon;
-
+
/** The icon instance returned by {@link #getTreeFloppyDriveIcon()}. */
private static Icon treeFloppyDriveIcon;
-
+
/** The icon instance returned by {@link #getTreeHardDriveIcon()}. */
private static Icon treeHardDriveIcon;
-
+
/** The icon instance returned by {@link #getHorizontalSliderThumbIcon()}. */
private static Icon horizontalSliderThumbIcon;
/** The icon instance returned by {@link #getVerticalSliderThumbIcon()}. */
private static Icon verticalSliderThumbIcon;
-
+
/**
- * Creates a new instance. All the methods are static, so creating an
+ * Creates a new instance. All the methods are static, so creating an
* instance isn't necessary.
*/
- public MetalIconFactory()
+ public MetalIconFactory()
{
// Nothing to do here.
}
/**
* Returns an icon for use when rendering the {@link JCheckBox} component.
- *
+ *
* @return A check box icon.
- *
+ *
* @since 1.3
*/
- public static Icon getCheckBoxIcon()
+ public static Icon getCheckBoxIcon()
{
if (checkBoxIcon == null)
checkBoxIcon = new MetalCheckBoxIcon();
return checkBoxIcon;
}
-
+
/**
- * Returns an icon for use when rendering the {@link JCheckBoxMenuItem}
+ * Returns an icon for use when rendering the {@link JCheckBoxMenuItem}
* component.
- *
+ *
* @return An icon.
*/
- public static Icon getCheckBoxMenuItemIcon()
+ public static Icon getCheckBoxMenuItemIcon()
{
if (checkBoxMenuItemIcon == null)
checkBoxMenuItemIcon = new CheckBoxMenuItemIcon();
@@ -2280,58 +2280,58 @@ public class MetalIconFactory implements Serializable
/**
* Returns an icon for use by the {@link JFileChooser} component.
- *
+ *
* @return An icon.
*/
- public static Icon getFileChooserDetailViewIcon()
+ public static Icon getFileChooserDetailViewIcon()
{
if (fileChooserDetailViewIcon == null)
fileChooserDetailViewIcon = new FileChooserDetailViewIcon();
return fileChooserDetailViewIcon;
}
-
+
/**
* Returns an icon for use by the {@link JFileChooser} component.
- *
+ *
* @return An icon.
*/
- public static Icon getFileChooserHomeFolderIcon()
+ public static Icon getFileChooserHomeFolderIcon()
{
if (fileChooserHomeFolderIcon == null)
fileChooserHomeFolderIcon = new FileChooserHomeFolderIcon();
- return fileChooserHomeFolderIcon;
+ return fileChooserHomeFolderIcon;
}
-
+
/**
* Returns an icon for use by the {@link JFileChooser} component.
- *
+ *
* @return An icon.
*/
- public static Icon getFileChooserListViewIcon()
+ public static Icon getFileChooserListViewIcon()
{
if (fileChooserListViewIcon == null)
fileChooserListViewIcon = new FileChooserListViewIcon();
return fileChooserListViewIcon;
}
-
+
/**
* Returns an icon for use by the {@link JFileChooser} component.
- *
+ *
* @return An icon.
*/
- public static Icon getFileChooserNewFolderIcon()
+ public static Icon getFileChooserNewFolderIcon()
{
if (fileChooserNewFolderIcon == null)
fileChooserNewFolderIcon = new FileChooserNewFolderIcon();
return fileChooserNewFolderIcon;
}
-
+
/**
* Returns an icon for use by the {@link JFileChooser} component.
- *
+ *
* @return An icon.
*/
- public static Icon getFileChooserUpFolderIcon()
+ public static Icon getFileChooserUpFolderIcon()
{
if (fileChooserUpFolderIcon == null)
fileChooserUpFolderIcon = new FileChooserUpFolderIcon();
@@ -2352,10 +2352,10 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new instance of the icon used in a {@link JRadioButtonMenuItem}.
- *
+ *
* @return A new icon instance.
*/
- public static Icon getRadioButtonMenuItemIcon()
+ public static Icon getRadioButtonMenuItemIcon()
{
if (radioButtonMenuItemIcon == null)
radioButtonMenuItemIcon = new RadioButtonMenuItemIcon();
@@ -2365,25 +2365,25 @@ public class MetalIconFactory implements Serializable
/**
* Returns the icon used to display the thumb for a horizontally oriented
* {@link JSlider}.
- *
+ *
* @return The icon.
*/
- public static Icon getHorizontalSliderThumbIcon()
+ public static Icon getHorizontalSliderThumbIcon()
{
if (horizontalSliderThumbIcon == null)
horizontalSliderThumbIcon = new HorizontalSliderThumbIcon();
return horizontalSliderThumbIcon;
}
-
+
/**
* Creates a new icon used to represent the 'close' button in the title
* pane of a {@link JInternalFrame}.
- *
+ *
* @param size the icon size.
- *
+ *
* @return A close icon.
*/
- public static Icon getInternalFrameCloseIcon(int size)
+ public static Icon getInternalFrameCloseIcon(int size)
{
return new InternalFrameCloseIcon(size);
}
@@ -2391,39 +2391,39 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new icon for the menu in a {@link JInternalFrame}. This is the
* icon displayed at the top left of the frame.
- *
+ *
* @return A menu icon.
*/
- public static Icon getInternalFrameDefaultMenuIcon()
+ public static Icon getInternalFrameDefaultMenuIcon()
{
if (internalFrameDefaultMenuIcon == null)
internalFrameDefaultMenuIcon = new InternalFrameDefaultMenuIcon();
return internalFrameDefaultMenuIcon;
}
-
+
/**
* Creates a new icon for the 'maximize' button in a {@link JInternalFrame}.
- *
+ *
* @param size the icon size in pixels.
- *
+ *
* @return The icon.
- *
+ *
* @see #getInternalFrameAltMaximizeIcon(int)
*/
- public static Icon getInternalFrameMaximizeIcon(int size)
+ public static Icon getInternalFrameMaximizeIcon(int size)
{
return new InternalFrameMaximizeIcon();
}
-
+
/**
* Returns the icon used for the minimize button in the frame title for a
* {@link JInternalFrame}.
- *
+ *
* @param size the icon size in pixels (ignored by this implementation).
- *
+ *
* @return The icon.
*/
- public static Icon getInternalFrameMinimizeIcon(int size)
+ public static Icon getInternalFrameMinimizeIcon(int size)
{
return new InternalFrameMinimizeIcon();
}
@@ -2431,94 +2431,94 @@ public class MetalIconFactory implements Serializable
/**
* Creates a new icon for the 'restore' button in a {@link JInternalFrame}
* that has been maximised.
- *
+ *
* @param size the icon size in pixels.
- *
+ *
* @return The icon.
- *
+ *
* @see #getInternalFrameMaximizeIcon(int)
*/
- public static Icon getInternalFrameAltMaximizeIcon(int size)
+ public static Icon getInternalFrameAltMaximizeIcon(int size)
{
return new InternalFrameAltMaximizeIcon(size);
}
-
+
/**
* Returns the icon used to display the thumb for a vertically oriented
* {@link JSlider}.
- *
+ *
* @return The icon.
*/
- public static Icon getVerticalSliderThumbIcon()
+ public static Icon getVerticalSliderThumbIcon()
{
if (verticalSliderThumbIcon == null)
verticalSliderThumbIcon = new VerticalSliderThumbIcon();
return verticalSliderThumbIcon;
}
-
+
/**
* Creates and returns a new tree folder icon.
- *
+ *
* @return A new tree folder icon.
- */
- public static Icon getTreeFolderIcon()
+ */
+ public static Icon getTreeFolderIcon()
{
return new TreeFolderIcon();
}
-
+
/**
* Creates and returns a new tree leaf icon.
- *
+ *
* @return A new tree leaf icon.
*/
- public static Icon getTreeLeafIcon()
+ public static Icon getTreeLeafIcon()
{
return new TreeLeafIcon();
}
-
+
/**
* Creates and returns a tree control icon.
- *
- * @param isCollapsed a flag that controls whether the icon is in the
+ *
+ * @param isCollapsed a flag that controls whether the icon is in the
* collapsed or expanded state.
- *
+ *
* @return A tree control icon.
*/
- public static Icon getTreeControlIcon(boolean isCollapsed)
+ public static Icon getTreeControlIcon(boolean isCollapsed)
{
return new TreeControlIcon(isCollapsed);
}
/**
* Returns a 16x16 icon representing a computer.
- *
+ *
* @return The icon.
*/
- public static Icon getTreeComputerIcon()
+ public static Icon getTreeComputerIcon()
{
if (treeComputerIcon == null)
treeComputerIcon = new TreeComputerIcon();
- return treeComputerIcon;
+ return treeComputerIcon;
}
-
+
/**
* Returns a 16x16 icon representing a floppy disk.
- *
+ *
* @return The icon.
*/
- public static Icon getTreeFloppyDriveIcon()
+ public static Icon getTreeFloppyDriveIcon()
{
if (treeFloppyDriveIcon == null)
treeFloppyDriveIcon = new TreeFloppyDriveIcon();
return treeFloppyDriveIcon;
}
-
+
/**
* Returns a 16x16 icon representing a hard disk.
- *
+ *
* @return The icon.
*/
- public static Icon getTreeHardDriveIcon()
+ public static Icon getTreeHardDriveIcon()
{
if (treeHardDriveIcon == null)
treeHardDriveIcon = new TreeHardDriveIcon();
@@ -2527,9 +2527,9 @@ public class MetalIconFactory implements Serializable
/**
* Returns a new instance of a 4 x 8 icon showing a small black triangle that
- * points to the right. This is displayed in menu items that have a
+ * points to the right. This is displayed in menu items that have a
* sub menu.
- *
+ *
* @return The icon.
*/
public static Icon getMenuArrowIcon()
@@ -2558,11 +2558,11 @@ public class MetalIconFactory implements Serializable
};
return menuArrow;
}
-
+
/**
* Returns a new instance of a 4 x 8 icon showing a small black triangle that
* points to the right. This is displayed in menu items that have a sub menu.
- *
+ *
* @return The icon.
*/
public static Icon getMenuItemArrowIcon()
@@ -2591,10 +2591,10 @@ public class MetalIconFactory implements Serializable
};
return menuItemArrow;
}
-
+
/**
* Returns a new instance of a 13 x 13 icon showing a small black check mark.
- *
+ *
* @return The icon.
*/
public static Icon getMenuItemCheckIcon()
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java b/libjava/classpath/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
index dd0c486..08de774 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
@@ -60,16 +60,16 @@ import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
/**
- * The title pane for a {@link JInternalFrame} (see
- * {@link MetalInternalFrameUI#createNorthPane(JInternalFrame)}). This can
- * be displayed in two styles: one for regular internal frames, and the other
+ * The title pane for a {@link JInternalFrame} (see
+ * {@link MetalInternalFrameUI#createNorthPane(JInternalFrame)}). This can
+ * be displayed in two styles: one for regular internal frames, and the other
* for "palette" style internal frames.
*/
-public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
+public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
{
-
+
/**
- * A property change handler that listens for changes to the
+ * A property change handler that listens for changes to the
* JInternalFrame.isPalette property and updates the title
* pane as appropriate.
*/
@@ -83,11 +83,11 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
{
super();
}
-
+
/**
* Handles JInternalFrame.isPalette property changes, with all
* other property changes being passed to the superclass.
- *
+ *
* @param e the event.
*/
public void propertyChange(PropertyChangeEvent e)
@@ -111,7 +111,7 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
/**
* A layout manager for the title pane.
- *
+ *
* @see #createLayout()
*/
private class MetalTitlePaneLayout implements LayoutManager
@@ -176,8 +176,8 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
}
Dimension titlePreferredSize = title.getPreferredSize();
- title.setBounds(insets.left + 5, insets.top,
- Math.min(titlePreferredSize.width, loc - insets.left - 10),
+ title.setBounds(insets.left + 5, insets.top,
+ Math.min(titlePreferredSize.width, loc - insets.left - 10),
height);
}
@@ -224,26 +224,26 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
/** A flag indicating whether the title pane uses the palette style. */
protected boolean isPalette;
-
- /**
+
+ /**
* The icon used for the close button - this is fetched from the look and
- * feel defaults using the key InternalFrame.paletteCloseIcon.
+ * feel defaults using the key InternalFrame.paletteCloseIcon.
*/
protected Icon paletteCloseIcon;
-
+
/**
- * The height of the title pane when isPalette is
- * true. This value is fetched from the look and feel defaults
+ * The height of the title pane when isPalette is
+ * true. This value is fetched from the look and feel defaults
* using the key InternalFrame.paletteTitleHeight.
*/
protected int paletteTitleHeight;
-
+
/** The label used to display the title for the internal frame. */
JLabel title;
-
+
/**
* Creates a new title pane for the specified frame.
- *
+ *
* @param f the internal frame.
*/
public MetalInternalFrameTitlePane(JInternalFrame f)
@@ -251,7 +251,7 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
super(f);
isPalette = false;
}
-
+
/**
* Fetches the colors used in the title pane.
*/
@@ -262,21 +262,21 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
selectedTitleColor = MetalLookAndFeel.getWindowTitleBackground();
notSelectedTextColor = MetalLookAndFeel.getInactiveControlTextColor();
notSelectedTitleColor = MetalLookAndFeel.getWindowTitleInactiveBackground();
-
+
paletteTitleHeight = UIManager.getInt("InternalFrame.paletteTitleHeight");
paletteCloseIcon = UIManager.getIcon("InternalFrame.paletteCloseIcon");
minIcon = MetalIconFactory.getInternalFrameAltMaximizeIcon(16);
- title = new JLabel(frame.getTitle(),
- MetalIconFactory.getInternalFrameDefaultMenuIcon(),
+ title = new JLabel(frame.getTitle(),
+ MetalIconFactory.getInternalFrameDefaultMenuIcon(),
SwingConstants.LEFT);
}
-
+
/**
* Clears the colors used for the title pane.
*/
protected void uninstallDefaults()
- {
+ {
super.uninstallDefaults();
selectedTextColor = null;
selectedTitleColor = null;
@@ -286,14 +286,14 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
minIcon = null;
title = null;
}
-
+
/**
* Calls the super class to create the buttons, then calls
- * setBorderPainted(false) and
+ * setBorderPainted(false) and
* setContentAreaFilled(false) for each button.
*/
protected void createButtons()
- {
+ {
super.createButtons();
closeButton.setBorderPainted(false);
closeButton.setContentAreaFilled(false);
@@ -302,7 +302,7 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
maxButton.setBorderPainted(false);
maxButton.setContentAreaFilled(false);
}
-
+
/**
* Overridden to do nothing.
*/
@@ -310,21 +310,21 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
{
// do nothing
}
-
+
/**
* Overridden to do nothing.
*/
protected void showSystemMenu()
{
- // do nothing
+ // do nothing
}
-
+
/**
* Adds the sub components of the title pane.
*/
protected void addSubComponents()
{
- // FIXME: this method is probably overridden to only add the required
+ // FIXME: this method is probably overridden to only add the required
// buttons
add(title);
add(closeButton);
@@ -335,19 +335,19 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
/**
* Creates a new instance of MetalTitlePaneLayout (not part of
* the public API).
- *
+ *
* @return A new instance of MetalTitlePaneLayout.
*/
protected LayoutManager createLayout()
{
return new MetalTitlePaneLayout();
}
-
+
/**
* Draws the title pane in the palette style.
- *
+ *
* @param g the graphics device.
- *
+ *
* @see #paintComponent(Graphics)
*/
public void paintPalette(Graphics g)
@@ -362,22 +362,22 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
SwingConstants.VERTICAL,
"InternalFrame.activeTitleGradient");
}
- MetalUtils.fillMetalPattern(this, g, b.x + 4, b.y + 2, b.width
+ MetalUtils.fillMetalPattern(this, g, b.x + 4, b.y + 2, b.width
- paletteCloseIcon.getIconWidth() - 13, b.height - 5,
- MetalLookAndFeel.getPrimaryControlHighlight(),
+ MetalLookAndFeel.getPrimaryControlHighlight(),
MetalLookAndFeel.getBlack());
-
+
// draw a line separating the title pane from the frame content
Dimension d = getSize();
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
g.drawLine(0, d.height - 1, d.width - 1, d.height - 1);
-
+
g.setColor(savedColor);
}
/**
* Paints a representation of the current state of the internal frame.
- *
+ *
* @param g the graphics device.
*/
public void paintComponent(Graphics g)
@@ -394,13 +394,13 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
else
g.setColor(MetalLookAndFeel.getControlDarkShadow());
-
+
// put a dot in each of the top corners
g.drawLine(0, 0, 0, 0);
g.drawLine(d.width - 1, 0, d.width - 1, 0);
-
+
g.drawLine(0, d.height - 1, d.width - 1, d.height - 1);
-
+
// draw the metal pattern
if (UIManager.get("InternalFrame.activeTitleGradient") != null
&& frame.isSelected())
@@ -415,22 +415,22 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
int endX = startX;
if (iconButton.isVisible())
endX = Math.max(iconButton.getX(), endX);
- else if (maxButton.isVisible())
+ else if (maxButton.isVisible())
endX = Math.max(maxButton.getX(), endX);
else if (closeButton.isVisible())
endX = Math.max(closeButton.getX(), endX);
endX -= 7;
if (endX > startX)
- MetalUtils.fillMetalPattern(this, g, startX, 3, endX - startX,
+ MetalUtils.fillMetalPattern(this, g, startX, 3, endX - startX,
getHeight() - 6, Color.white, Color.gray);
}
g.setColor(savedColor);
}
-
+
/**
- * Sets the flag that controls whether the title pane is drawn in the
+ * Sets the flag that controls whether the title pane is drawn in the
* palette style or the regular style.
- *
+ *
* @param b the new value of the flag.
*/
public void setPalette(boolean b)
@@ -444,15 +444,14 @@ public class MetalInternalFrameTitlePane extends BasicInternalFrameTitlePane
else
closeButton.setIcon(closeIcon);
}
-
+
/**
* Creates and returns a property change handler for the title pane.
- *
+ *
* @return The property change handler.
*/
protected PropertyChangeListener createPropertyChangeListener()
{
- return new MetalInternalFrameTitlePanePropertyChangeHandler();
+ return new MetalInternalFrameTitlePanePropertyChangeHandler();
}
}
-
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalInternalFrameUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalInternalFrameUI.java
index abe6a28..5eda2ff 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalInternalFrameUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalInternalFrameUI.java
@@ -54,16 +54,16 @@ import javax.swing.plaf.basic.BasicInternalFrameUI;
public class MetalInternalFrameUI
extends BasicInternalFrameUI
{
- /**
- * The key (JInternalFrame.isPalette) for the client property
- * that controls whether the internal frame is displayed using the palette
- * style.
+ /**
+ * The key (JInternalFrame.isPalette) for the client property
+ * that controls whether the internal frame is displayed using the palette
+ * style.
*/
protected static String IS_PALETTE = "JInternalFrame.isPalette";
/**
* Constructs a new instance of MetalInternalFrameUI.
- *
+ *
* @param frame the frame.
*/
public MetalInternalFrameUI(JInternalFrame frame)
@@ -82,10 +82,10 @@ public class MetalInternalFrameUI
{
return new MetalInternalFrameUI((JInternalFrame) component);
}
-
+
/**
* Sets the fields and properties for the component.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -101,23 +101,23 @@ public class MetalInternalFrameUI
/**
* Creates and returns the component that will be used for the north pane
- * of the {@link JInternalFrame}.
- *
+ * of the {@link JInternalFrame}.
+ *
* @param w the internal frame.
- *
+ *
* @return A new instance of {@link MetalInternalFrameTitlePane}.
*/
protected JComponent createNorthPane(JInternalFrame w)
{
titlePane = new MetalInternalFrameTitlePane(w);
- return titlePane;
+ return titlePane;
}
-
+
/**
* Sets the state of the {@link JInternalFrame} to reflect whether or not
* it is using the palette style. When a frame is displayed as a palette,
* it uses a different border and the title pane is drawn differently.
- *
+ *
* @param isPalette use the palette style?
*/
public void setPalette(boolean isPalette)
@@ -129,17 +129,17 @@ public class MetalInternalFrameUI
else
frame.setBorder(new MetalBorders.InternalFrameBorder());
}
-
+
/** A listener that is used to handle IS_PALETTE property changes. */
private PropertyChangeListener paletteListener;
-
+
/**
* Adds the required listeners.
*/
protected void installListeners()
{
- super.installListeners();
- paletteListener = new PropertyChangeListener()
+ super.installListeners();
+ paletteListener = new PropertyChangeListener()
{
public void propertyChange(PropertyChangeEvent e)
{
@@ -154,7 +154,7 @@ public class MetalInternalFrameUI
};
frame.addPropertyChangeListener(paletteListener);
}
-
+
/**
* Removes the listeners used.
*/
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalLabelUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalLabelUI.java
index 12b858e..915e501 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalLabelUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalLabelUI.java
@@ -79,12 +79,12 @@ public class MetalLabelUI
metalLabelUI = new MetalLabelUI();
return metalLabelUI;
}
-
+
/**
- * Draws the text for a disabled label, using the color defined in the
+ * Draws the text for a disabled label, using the color defined in the
* {@link UIManager} defaults with the key
* Label.disabledForeground.
- *
+ *
* @param l the label.
* @param g the graphics device.
* @param s the label text.
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java b/libjava/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java
index 25c624b..acc3fed 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java
@@ -56,7 +56,7 @@ import javax.swing.plaf.basic.BasicLookAndFeel;
/**
* A custom look and feel that is designed to look similar across different
- * operating systems. To install this look and feel, add the following code
+ * operating systems. To install this look and feel, add the following code
* (or something similar) near the start of your application:
*
*/
public class MetalLookAndFeel extends BasicLookAndFeel
-{
+{
private static final long serialVersionUID = 6680646159193457980L;
-
+
/** The current theme. */
private static MetalTheme theme;
-
+
/**
* Creates a new instance of the Metal look and feel.
*/
@@ -95,7 +95,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
* Returns false to indicate that this look and feel does not
* attempt to emulate the look and feel of native applications on the host
* platform.
- *
+ *
* @return false.
*/
public boolean isNativeLookAndFeel()
@@ -106,7 +106,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns true to indicate that this look and feel is supported
* on all platforms.
- *
+ *
* @return true.
*/
public boolean isSupportedLookAndFeel()
@@ -117,7 +117,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns a string describing the look and feel. In this case, the method
* returns "Metal look and feel".
- *
+ *
* @return A string describing the look and feel.
*/
public String getDescription()
@@ -127,7 +127,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the look and feel identifier.
- *
+ *
* @return "MetalLookAndFeel".
*/
public String getID()
@@ -137,7 +137,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the look and feel name.
- *
+ *
* @return "MetalLookAndFeel".
*/
public String getName()
@@ -156,7 +156,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the accelerator foreground color from the installed theme.
- *
+ *
* @return The accelerator foreground color.
*/
public static ColorUIResource getAcceleratorForeground()
@@ -167,9 +167,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the accelerator selected foreground color from the installed
+ * Returns the accelerator selected foreground color from the installed
* theme.
- *
+ *
* @return The accelerator selected foreground color.
*/
public static ColorUIResource getAcceleratorSelectedForeground()
@@ -181,7 +181,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color black from the installed theme.
- *
+ *
* @return The color black.
*/
public static ColorUIResource getBlack()
@@ -193,7 +193,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the control color from the installed theme.
- *
+ *
* @return The control color.
*/
public static ColorUIResource getControl()
@@ -206,7 +206,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used for dark shadows on controls, from the installed
* theme.
- *
+ *
* @return The color used for dark shadows on controls.
*/
public static ColorUIResource getControlDarkShadow()
@@ -218,7 +218,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used for disabled controls, from the installed theme.
- *
+ *
* @return The color used for disabled controls.
*/
public static ColorUIResource getControlDisabled()
@@ -231,7 +231,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to draw highlights for controls, from the installed
* theme.
- *
+ *
* @return The color used to draw highlights for controls.
*/
public static ColorUIResource getControlHighlight()
@@ -242,9 +242,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the color used to display control info, from the installed
+ * Returns the color used to display control info, from the installed
* theme.
- *
+ *
* @return The color used to display control info.
*/
public static ColorUIResource getControlInfo()
@@ -257,7 +257,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to draw shadows for controls, from the installed
* theme.
- *
+ *
* @return The color used to draw shadows for controls.
*/
public static ColorUIResource getControlShadow()
@@ -269,7 +269,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used for text on controls, from the installed theme.
- *
+ *
* @return The color used for text on controls.
*/
public static ColorUIResource getControlTextColor()
@@ -281,7 +281,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the font used for text on controls, from the installed theme.
- *
+ *
* @return The font used for text on controls.
*/
public static FontUIResource getControlTextFont()
@@ -292,9 +292,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the color used for the desktop background, from the installed
+ * Returns the color used for the desktop background, from the installed
* theme.
- *
+ *
* @return The color used for the desktop background.
*/
public static ColorUIResource getDesktopColor()
@@ -305,9 +305,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the color used to draw focus highlights, from the installed
+ * Returns the color used to draw focus highlights, from the installed
* theme.
- *
+ *
* @return The color used to draw focus highlights.
*/
public static ColorUIResource getFocusColor()
@@ -320,7 +320,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to draw highlighted text, from the installed
* theme.
- *
+ *
* @return The color used to draw highlighted text.
*/
public static ColorUIResource getHighlightedTextColor()
@@ -333,7 +333,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to draw text on inactive controls, from the
* installed theme.
- *
+ *
* @return The color used to draw text on inactive controls.
*/
public static ColorUIResource getInactiveControlTextColor()
@@ -346,7 +346,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to draw inactive system text, from the installed
* theme.
- *
+ *
* @return The color used to draw inactive system text.
*/
public static ColorUIResource getInactiveSystemTextColor()
@@ -358,9 +358,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the background color for menu items, from the installed theme.
- *
+ *
* @return The background color for menu items.
- *
+ *
* @see #getMenuSelectedBackground()
*/
public static ColorUIResource getMenuBackground()
@@ -373,9 +373,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the foreground color for disabled menu items, from the installed
* theme.
- *
+ *
* @return The foreground color for disabled menu items.
- *
+ *
* @see #getMenuForeground()
*/
public static ColorUIResource getMenuDisabledForeground()
@@ -387,9 +387,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the foreground color for menu items, from the installed theme.
- *
+ *
* @return The foreground color for menu items.
- *
+ *
* @see #getMenuDisabledForeground()
* @see #getMenuSelectedForeground()
*/
@@ -403,9 +403,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the background color for selected menu items, from the installed
* theme.
- *
+ *
* @return The background color for selected menu items.
- *
+ *
* @see #getMenuBackground()
*/
public static ColorUIResource getMenuSelectedBackground()
@@ -418,9 +418,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the foreground color for selected menu items, from the installed
* theme.
- *
+ *
* @return The foreground color for selected menu items.
- *
+ *
* @see #getMenuForeground()
*/
public static ColorUIResource getMenuSelectedForeground()
@@ -432,7 +432,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the font used for text in menus, from the installed theme.
- *
+ *
* @return The font used for text in menus.
*/
public static FontUIResource getMenuTextFont()
@@ -444,7 +444,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the primary color for controls, from the installed theme.
- *
+ *
* @return The primary color for controls.
*/
public static ColorUIResource getPrimaryControl()
@@ -455,9 +455,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the primary color for the dark shadow on controls, from the
+ * Returns the primary color for the dark shadow on controls, from the
* installed theme.
- *
+ *
* @return The primary color for the dark shadow on controls.
*/
public static ColorUIResource getPrimaryControlDarkShadow()
@@ -468,9 +468,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the primary color for the highlight on controls, from the
+ * Returns the primary color for the highlight on controls, from the
* installed theme.
- *
+ *
* @return The primary color for the highlight on controls.
*/
public static ColorUIResource getPrimaryControlHighlight()
@@ -481,9 +481,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the primary color for the information on controls, from the
+ * Returns the primary color for the information on controls, from the
* installed theme.
- *
+ *
* @return The primary color for the information on controls.
*/
public static ColorUIResource getPrimaryControlInfo()
@@ -496,7 +496,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the primary color for the shadow on controls, from the installed
* theme.
- *
+ *
* @return The primary color for the shadow on controls.
*/
public static ColorUIResource getPrimaryControlShadow()
@@ -508,7 +508,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the background color for separators, from the installed theme.
- *
+ *
* @return The background color for separators.
*/
public static ColorUIResource getSeparatorBackground()
@@ -520,7 +520,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the foreground color for separators, from the installed theme.
- *
+ *
* @return The foreground color for separators.
*/
public static ColorUIResource getSeparatorForeground()
@@ -532,7 +532,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the font used for sub text, from the installed theme.
- *
+ *
* @return The font used for sub text.
*/
public static FontUIResource getSubTextFont()
@@ -544,7 +544,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used for system text, from the installed theme.
- *
+ *
* @return The color used for system text.
*/
public static ColorUIResource getSystemTextColor()
@@ -556,7 +556,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the font used for system text, from the installed theme.
- *
+ *
* @return The font used for system text.
*/
public static FontUIResource getSystemTextFont()
@@ -568,7 +568,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to highlight text, from the installed theme.
- *
+ *
* @return The color used to highlight text.
*/
public static ColorUIResource getTextHighlightColor()
@@ -580,7 +580,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used to display user text, from the installed theme.
- *
+ *
* @return The color used to display user text.
*/
public static ColorUIResource getUserTextColor()
@@ -592,7 +592,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the font used for user text, obtained from the current theme.
- *
+ *
* @return The font used for user text.
*/
public static FontUIResource getUserTextFont()
@@ -604,7 +604,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the color used for white, from the installed theme.
- *
+ *
* @return The color used for white.
*/
public static ColorUIResource getWhite()
@@ -616,7 +616,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the window background color, from the installed theme.
- *
+ *
* @return The window background color.
*/
public static ColorUIResource getWindowBackground()
@@ -628,7 +628,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the window title background color, from the installed theme.
- *
+ *
* @return The window title background color.
*/
public static ColorUIResource getWindowTitleBackground()
@@ -640,9 +640,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the window title font from the current theme.
- *
+ *
* @return The window title font.
- *
+ *
* @see MetalTheme
*/
public static FontUIResource getWindowTitleFont()
@@ -654,7 +654,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
/**
* Returns the window title foreground color, from the installed theme.
- *
+ *
* @return The window title foreground color.
*/
public static ColorUIResource getWindowTitleForeground()
@@ -665,9 +665,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the background color for an inactive window title, from the
+ * Returns the background color for an inactive window title, from the
* installed theme.
- *
+ *
* @return The background color for an inactive window title.
*/
public static ColorUIResource getWindowTitleInactiveBackground()
@@ -678,9 +678,9 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Returns the foreground color for an inactive window title, from the
+ * Returns the foreground color for an inactive window title, from the
* installed theme.
- *
+ *
* @return The foreground color for an inactive window title.
*/
public static ColorUIResource getWindowTitleInactiveForeground()
@@ -691,17 +691,17 @@ public class MetalLookAndFeel extends BasicLookAndFeel
}
/**
- * Sets the current theme for the look and feel. Note that the theme must be
- * set before the look and feel is installed. To change the theme
- * for an already running application that is using the
- * {@link MetalLookAndFeel}, first set the theme with this method, then
- * create a new instance of {@link MetalLookAndFeel} and install it in the
+ * Sets the current theme for the look and feel. Note that the theme must be
+ * set before the look and feel is installed. To change the theme
+ * for an already running application that is using the
+ * {@link MetalLookAndFeel}, first set the theme with this method, then
+ * create a new instance of {@link MetalLookAndFeel} and install it in the
* usual way (see {@link UIManager#setLookAndFeel(LookAndFeel)}).
- *
+ *
* @param theme the theme (null not permitted).
- *
+ *
* @throws NullPointerException if theme is null.
- *
+ *
* @see #getCurrentTheme()
*/
public static void setCurrentTheme(MetalTheme theme)
@@ -934,7 +934,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"EditorPane.inactiveForeground", getInactiveSystemTextColor(),
"EditorPane.selectionBackground", getTextHighlightColor(),
"EditorPane.selectionForeground", getHighlightedTextColor(),
-
+
"FormattedTextField.background", getWindowBackground(),
"FormattedTextField.border",
new BorderUIResource(MetalBorders.getTextFieldBorder()),
@@ -946,15 +946,15 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"FormattedTextField.selectionBackground", getTextHighlightColor(),
"FormattedTextField.selectionForeground", getHighlightedTextColor(),
- "FileChooser.upFolderIcon",
+ "FileChooser.upFolderIcon",
MetalIconFactory.getFileChooserUpFolderIcon(),
- "FileChooser.listViewIcon",
+ "FileChooser.listViewIcon",
MetalIconFactory.getFileChooserListViewIcon(),
- "FileChooser.newFolderIcon",
+ "FileChooser.newFolderIcon",
MetalIconFactory.getFileChooserNewFolderIcon(),
- "FileChooser.homeFolderIcon",
+ "FileChooser.homeFolderIcon",
MetalIconFactory.getFileChooserHomeFolderIcon(),
- "FileChooser.detailsViewIcon",
+ "FileChooser.detailsViewIcon",
MetalIconFactory.getFileChooserDetailViewIcon(),
"FileChooser.fileNameLabelMnemonic", new Integer(78),
"FileChooser.filesOfTypeLabelMnemonic", new Integer(84),
@@ -974,15 +974,15 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"InternalFrame.borderLight", getControlHighlight(),
"InternalFrame.borderShadow", getControlShadow(),
"InternalFrame.icon", MetalIconFactory.getInternalFrameDefaultMenuIcon(),
- "InternalFrame.closeIcon",
+ "InternalFrame.closeIcon",
MetalIconFactory.getInternalFrameCloseIcon(16),
"InternalFrame.closeSound", "sounds/FrameClose.wav",
"InternalFrame.inactiveTitleBackground", getWindowTitleInactiveBackground(),
"InternalFrame.inactiveTitleForeground", getWindowTitleInactiveForeground(),
- "InternalFrame.maximizeIcon",
+ "InternalFrame.maximizeIcon",
MetalIconFactory.getInternalFrameMaximizeIcon(16),
"InternalFrame.maximizeSound", "sounds/FrameMaximize.wav",
- "InternalFrame.iconifyIcon",
+ "InternalFrame.iconifyIcon",
MetalIconFactory.getInternalFrameMinimizeIcon(16),
"InternalFrame.minimizeSound", "sounds/FrameMinimize.wav",
"InternalFrame.paletteBorder", new MetalBorders.PaletteBorder(),
@@ -1002,7 +1002,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"List.foreground", getUserTextColor(),
"List.selectionBackground", getTextHighlightColor(),
"List.selectionForeground", getHighlightedTextColor(),
- "List.focusCellHighlightBorder",
+ "List.focusCellHighlightBorder",
new LineBorderUIResource(MetalLookAndFeel.getFocusColor()),
"Menu.acceleratorFont", new FontUIResource("Dialog", Font.PLAIN, 10),
@@ -1047,7 +1047,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"OptionPane.informationSound", "sounds/OptionPaneInformation.wav",
"OptionPane.questionSound", "sounds/OptionPaneQuestion.wav",
"OptionPane.warningSound", "sounds/OptionPaneWarning.wav",
- "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51),
+ "OptionPane.errorDialog.border.background", new ColorUIResource(153, 51, 51),
"OptionPane.errorDialog.titlePane.background", new ColorUIResource(255, 153, 153),
"OptionPane.errorDialog.titlePane.foreground", new ColorUIResource(51, 0, 0),
"OptionPane.errorDialog.titlePane.shadow", new ColorUIResource(204, 102, 102),
@@ -1114,16 +1114,16 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"RadioButtonMenuItem.background", getMenuBackground(),
"RadioButtonMenuItem.border", new MetalBorders.MenuItemBorder(),
"RadioButtonMenuItem.borderPainted", Boolean.TRUE,
- "RadioButtonMenuItem.checkIcon",
+ "RadioButtonMenuItem.checkIcon",
MetalIconFactory.getRadioButtonMenuItemIcon(),
"RadioButtonMenuItem.commandSound", "sounds/MenuItemCommand.wav",
"RadioButtonMenuItem.disabledForeground", getMenuDisabledForeground(),
"RadioButtonMenuItem.font", getMenuTextFont(),
"RadioButtonMenuItem.foreground", getMenuForeground(),
"RadioButtonMenuItem.margin", new InsetsUIResource(2, 2, 2, 2),
- "RadioButtonMenuItem.selectionBackground",
+ "RadioButtonMenuItem.selectionBackground",
MetalLookAndFeel.getMenuSelectedBackground(),
- "RadioButtonMenuItem.selectionForeground",
+ "RadioButtonMenuItem.selectionForeground",
MetalLookAndFeel.getMenuSelectedForeground(),
"ScrollBar.allowsAbsolutePositioning", Boolean.TRUE,
@@ -1154,12 +1154,12 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"Slider.focusInsets", new InsetsUIResource(0, 0, 0, 0),
"Slider.foreground", getPrimaryControlShadow(),
"Slider.highlight", getControlHighlight(),
- "Slider.horizontalThumbIcon",
+ "Slider.horizontalThumbIcon",
MetalIconFactory.getHorizontalSliderThumbIcon(),
"Slider.majorTickLength", new Integer(6),
"Slider.shadow", getControlShadow(),
"Slider.trackWidth", new Integer(7),
- "Slider.verticalThumbIcon",
+ "Slider.verticalThumbIcon",
MetalIconFactory.getVerticalSliderThumbIcon(),
"Spinner.arrowButtonInsets", new InsetsUIResource(0, 0, 0, 0),
@@ -1197,7 +1197,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
// new properties in OceanTheme:
// TabbedPane.contentAreaColor
// TabbedPane.unselectedBackground
-
+
"Table.background", getWindowBackground(),
"Table.focusCellBackground", getWindowBackground(),
"Table.focusCellForeground", getControlTextColor(),
@@ -1235,7 +1235,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"TextField.selectionBackground", getTextHighlightColor(),
"TextField.selectionForeground", getHighlightedTextColor(),
"TextField.shadow", getControlShadow(),
-
+
"TextPane.background", getWindowBackground(),
"TextPane.caretForeground", getUserTextColor(),
"TextPane.font", new FontUIResource("Dialog", Font.PLAIN, 12),
@@ -1341,7 +1341,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
* an instance of {@link OceanTheme}.
*
* @return The current theme (never null).
- *
+ *
* @see #setCurrentTheme(MetalTheme)
*/
public static MetalTheme getCurrentTheme()
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalMenuBarUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalMenuBarUI.java
index 2cc52ed..35f2b05 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalMenuBarUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalMenuBarUI.java
@@ -49,7 +49,7 @@ import javax.swing.plaf.basic.BasicMenuBarUI;
/**
* A UI implementation for MenuBar in the Metal Look & Feel.
- *
+ *
* @author Roman Kennke (kennke@aicas.com)
*
* @since 1.5
@@ -84,7 +84,7 @@ public class MetalMenuBarUI extends BasicMenuBarUI
{
MetalUtils.paintGradient(g, 0, 0, c.getWidth(), height,
SwingConstants.VERTICAL, "MenuBar.gradient");
-
+
paint(g, c);
}
else
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalProgressBarUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalProgressBarUI.java
index 0f28818..005c5f0 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalProgressBarUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalProgressBarUI.java
@@ -51,7 +51,7 @@ import javax.swing.plaf.basic.BasicProgressBarUI;
* A UI delegate for the {@link JProgressBar} component.
*/
public class MetalProgressBarUI extends BasicProgressBarUI
-{
+{
/**
* Constructs a new instance of MetalProgressBarUI.
*/
@@ -88,7 +88,7 @@ public class MetalProgressBarUI extends BasicProgressBarUI
int w = progressBar.getWidth();
int h = progressBar.getHeight();
int orientation = progressBar.getOrientation();
-
+
Color shadow = MetalLookAndFeel.getControlShadow();
g.setColor(shadow);
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalRadioButtonUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalRadioButtonUI.java
index 57f5bbe..0f7f3b1 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalRadioButtonUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalRadioButtonUI.java
@@ -60,13 +60,13 @@ public class MetalRadioButtonUI
/** Used to draw the focus rectangle. */
protected Color focusColor;
-
+
/** Used to fill the icon when the button is pressed. */
protected Color selectColor;
-
+
/** Used to draw disabled text. */
protected Color disabledTextColor;
-
+
/**
* Constructs a new instance of MetalRadioButtonUI.
*/
@@ -86,10 +86,10 @@ public class MetalRadioButtonUI
{
return new MetalRadioButtonUI();
}
-
+
/**
* Sets the default values for the specified button.
- *
+ *
* @param b the button.
*/
public void installDefaults(AbstractButton b)
@@ -100,10 +100,10 @@ public class MetalRadioButtonUI
focusColor = UIManager.getColor(prefix + "focus");
selectColor = UIManager.getColor(prefix + "select");
}
-
+
/**
* Clears any defaults set in the installDefaults() method.
- *
+ *
* @param b the {@link JRadioButton}.
*/
protected void uninstallDefaults(AbstractButton b)
@@ -113,50 +113,50 @@ public class MetalRadioButtonUI
focusColor = null;
selectColor = null;
}
-
+
/**
* Returns the color used to fill the {@link JRadioButton}'s icon when the
- * button is pressed. The default color is obtained from the
- * {@link UIManager} defaults via an entry with the key
+ * button is pressed. The default color is obtained from the
+ * {@link UIManager} defaults via an entry with the key
* RadioButton.select.
- *
+ *
* @return The select color.
*/
protected Color getSelectColor()
{
- return selectColor;
+ return selectColor;
}
-
+
/**
* Returns the color for the {@link JRadioButton}'s text when the button is
* disabled. The default color is obtained from the {@link UIManager}
* defaults via an entry with the key RadioButton.disabledText.
- *
+ *
* @return The disabled text color.
*/
protected Color getDisabledTextColor()
{
return disabledTextColor;
}
-
+
/**
- * Returns the color used to draw the focus rectangle when the
- * {@link JRadioButton} has the focus. The default color is obtained from
- * the {@link UIManager} defaults via an entry with the key
+ * Returns the color used to draw the focus rectangle when the
+ * {@link JRadioButton} has the focus. The default color is obtained from
+ * the {@link UIManager} defaults via an entry with the key
* RadioButton.focus.
- *
+ *
* @return The color used to draw the focus rectangle.
- *
+ *
* @see #paintFocus(Graphics, Rectangle, Dimension)
*/
protected Color getFocusColor()
{
return focusColor;
}
-
+
/**
* Paints the {@link JRadioButton}.
- *
+ *
* @param g the graphics device.
* @param c the component (an instance of {@link JRadioButton}).
*/
@@ -166,10 +166,10 @@ public class MetalRadioButtonUI
// FIXME: disabled text isn't being drawn correctly, it's possible that
// it could be done here...
}
-
+
/**
* Paints the focus rectangle for the {@link JRadioButton}.
- *
+ *
* @param g the graphics device.
* @param t the bounding rectangle for the text.
* @param d ???
@@ -179,5 +179,5 @@ public class MetalRadioButtonUI
g.setColor(focusColor);
g.drawRect(t.x - 1, t.y - 1, t.width + 1, t.height + 1);
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalRootPaneUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalRootPaneUI.java
index eaee5bf..84f1303 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalRootPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalRootPaneUI.java
@@ -76,8 +76,8 @@ import javax.swing.plaf.basic.BasicRootPaneUI;
/**
* A UI delegate for the {@link JRootPane} component. This implementation
- * supports the JRootPane windowDecorationStyle property.
- *
+ * supports the JRootPane windowDecorationStyle property.
+ *
* @author Roman Kennke (kennke@aicas.com)
*
* @since 1.4
@@ -115,7 +115,7 @@ public class MetalRootPaneUI
newInsets.bottom = 5;
newInsets.right = 5;
}
- return newInsets;
+ return newInsets;
}
/**
@@ -132,7 +132,7 @@ public class MetalRootPaneUI
/**
* Paints the border for the specified component.
- *
+ *
* @param c the component
* @param g the graphics device
* @param x the x-coordinate
@@ -140,7 +140,7 @@ public class MetalRootPaneUI
* @param w the width
* @param h the height
*/
- public void paintBorder(Component c, Graphics g, int x, int y, int w,
+ public void paintBorder(Component c, Graphics g, int x, int y, int w,
int h)
{
JRootPane f = (JRootPane) c;
@@ -149,31 +149,31 @@ public class MetalRootPaneUI
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
else
g.setColor(MetalLookAndFeel.getControlDarkShadow());
-
+
// Fill the border background.
g.fillRect(x, y, w, 5);
g.fillRect(x, y, 5, h);
g.fillRect(x + w - 5, y, 5, h);
g.fillRect(x, y + h - 5, w, 5);
-
+
// Draw a dot in each corner.
g.setColor(MetalLookAndFeel.getControl());
g.fillRect(x, y, 1, 1);
g.fillRect(x + w - 1, y, 1, 1);
g.fillRect(x + w - 1, y + h - 1, 1, 1);
g.fillRect(x, y + h - 1, 1, 1);
-
+
// Draw the lines.
g.setColor(MetalLookAndFeel.getBlack());
g.drawLine(x + 14, y + 2, x + w - 15, y + 2);
g.drawLine(x + 14, y + h - 3, x + w - 15, y + h - 3);
g.drawLine(x + 2, y + 14, x + 2, y + h - 15);
g.drawLine(x + w - 3, y + 14, x + w - 3, y + h - 15);
-
+
// Draw the line highlights.
if (frame.isActive())
g.setColor(MetalLookAndFeel.getPrimaryControlShadow());
- else
+ else
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(x + 15, y + 3, x + w - 14, y + 3);
g.drawLine(x + 15, y + h - 2, x + w - 14, y + h - 2);
@@ -248,7 +248,7 @@ public class MetalRootPaneUI
{
super("Close");
}
-
+
/**
* This method is called when something closes the frame.
*
@@ -316,7 +316,7 @@ public class MetalRootPaneUI
f.setExtendedState(Frame.ICONIFIED);
}
}
-
+
}
/**
@@ -437,8 +437,8 @@ public class MetalRootPaneUI
}
Dimension titlePreferredSize = title.getPreferredSize();
- title.setBounds(insets.left + 5, insets.top,
- Math.min(titlePreferredSize.width, loc - insets.left - 10),
+ title.setBounds(insets.left + 5, insets.top,
+ Math.min(titlePreferredSize.width, loc - insets.left - 10),
height);
}
@@ -501,7 +501,7 @@ public class MetalRootPaneUI
/** The icon displayed in the close button. */
Icon closeIcon;
-
+
/**
* The background color of the TitlePane when the JInternalFrame is not
* selected.
@@ -653,7 +653,7 @@ public class MetalRootPaneUI
/**
* Paints a representation of the current state of the internal frame.
- *
+ *
* @param g the graphics device.
*/
public void paintComponent(Graphics g)
@@ -667,13 +667,13 @@ public class MetalRootPaneUI
g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
else
g.setColor(MetalLookAndFeel.getControlDarkShadow());
-
+
// put a dot in each of the top corners
g.drawLine(0, 0, 0, 0);
g.drawLine(d.width - 1, 0, d.width - 1, 0);
-
+
g.drawLine(0, d.height - 1, d.width - 1, d.height - 1);
-
+
// draw the metal pattern
if (UIManager.get("InternalFrame.activeTitleGradient") != null
&& frame.isActive())
@@ -688,7 +688,7 @@ public class MetalRootPaneUI
int endX = startX;
if (iconButton.isVisible())
endX = Math.max(iconButton.getX(), endX);
- else if (maxButton.isVisible())
+ else if (maxButton.isVisible())
endX = Math.max(maxButton.getX(), endX);
else if (closeButton.isVisible())
endX = Math.max(closeButton.getX(), endX);
@@ -709,10 +709,10 @@ public class MetalRootPaneUI
if (!isOpaque())
return;
-
+
Color saved = g.getColor();
Dimension dims = getSize();
-
+
Color bg = getBackground();
if (frame.isActive())
bg = selectedTitleColor;
@@ -736,8 +736,8 @@ public class MetalRootPaneUI
maxIcon = UIManager.getIcon("InternalFrame.maximizeIcon");
minIcon = MetalIconFactory.getInternalFrameAltMaximizeIcon(16);
Frame frame = (Frame) SwingUtilities.getWindowAncestor(rootPane);
- title = new JLabel(frame.getTitle(),
- MetalIconFactory.getInternalFrameDefaultMenuIcon(),
+ title = new JLabel(frame.getTitle(),
+ MetalIconFactory.getInternalFrameDefaultMenuIcon(),
SwingConstants.LEFT);
}
}
@@ -770,7 +770,7 @@ public class MetalRootPaneUI
* The cached layout info for the title pane.
*/
private Rectangle titlePaneBounds;
-
+
/**
* The cached preferred size.
*/
@@ -832,7 +832,7 @@ public class MetalRootPaneUI
public void removeLayoutComponent(Component component)
{
// TODO Auto-generated method stub
-
+
}
public Dimension preferredLayoutSize(Container parent)
@@ -894,7 +894,7 @@ public class MetalRootPaneUI
// 4. The menuBar is positioned at the upper edge of layeredPane.
// 5. The contentPane fills viewable region minus menuBar minus
// titlePane, if present.
-
+
// +-------------------------------+
// | JLayeredPane |
// | +--------------------------+ |
@@ -952,7 +952,7 @@ public class MetalRootPaneUI
contentPane.setBounds(contentPaneBounds);
titlePane.setBounds(titlePaneBounds);
}
-
+
}
/**
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalScrollBarUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalScrollBarUI.java
index 4c75fcb..5f0cbe4 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalScrollBarUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalScrollBarUI.java
@@ -59,30 +59,30 @@ import javax.swing.plaf.basic.BasicScrollBarUI;
*/
public class MetalScrollBarUI extends BasicScrollBarUI
{
-
+
/**
* A property change handler for the UI delegate that monitors for
* changes to the "JScrollBar.isFreeStanding" property, and updates
* the buttons and track rendering as appropriate.
*/
- class MetalScrollBarPropertyChangeHandler
+ class MetalScrollBarPropertyChangeHandler
extends BasicScrollBarUI.PropertyChangeHandler
{
/**
* Creates a new handler.
- *
+ *
* @see #createPropertyChangeListener()
*/
public MetalScrollBarPropertyChangeHandler()
{
// Nothing to do here.
}
-
+
/**
* Handles a property change event. If the event name is
- * JSlider.isFreeStanding, this method updates the
+ * JSlider.isFreeStanding, this method updates the
* delegate, otherwise the event is passed up to the super class.
- *
+ *
* @param e the property change event.
*/
public void propertyChange(PropertyChangeEvent e)
@@ -100,7 +100,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
super.propertyChange(e);
}
}
-
+
/** The name for the 'free standing' property. */
public static final String FREE_STANDING_PROP = "JScrollBar.isFreeStanding";
@@ -108,34 +108,34 @@ public class MetalScrollBarUI extends BasicScrollBarUI
private static final Dimension MIN_THUMB_SIZE = new Dimension(15, 15);
/** The minimum thumb size for a scroll bar that is free standing. */
- private static final Dimension MIN_THUMB_SIZE_FREE_STANDING
+ private static final Dimension MIN_THUMB_SIZE_FREE_STANDING
= new Dimension(17, 17);
-
+
/** The button that increases the value in the scroll bar. */
protected MetalScrollButton increaseButton;
-
+
/** The button that decreases the value in the scroll bar. */
protected MetalScrollButton decreaseButton;
-
- /**
- * The scroll bar width.
+
+ /**
+ * The scroll bar width.
*/
protected int scrollBarWidth;
-
- /**
- * A flag that indicates whether the scroll bar is "free standing", which
- * means it has complete borders and can be used anywhere in the UI. A
+
+ /**
+ * A flag that indicates whether the scroll bar is "free standing", which
+ * means it has complete borders and can be used anywhere in the UI. A
* scroll bar which is not free standing has borders missing from one
* side, and relies on being part of another container with its own borders
* to look right visually. */
protected boolean isFreeStanding = true;
-
- /**
- * The color for the scroll bar shadow (this is read from the UIDefaults in
+
+ /**
+ * The color for the scroll bar shadow (this is read from the UIDefaults in
* the installDefaults() method).
*/
Color scrollBarShadowColor;
-
+
/**
* Constructs a new instance of MetalScrollBarUI, with no
* specific initialisation.
@@ -161,9 +161,9 @@ public class MetalScrollBarUI extends BasicScrollBarUI
* Installs the defaults.
*/
protected void installDefaults()
- {
- // need to initialise isFreeStanding before calling the super class,
- // so that the value is set when createIncreaseButton() and
+ {
+ // need to initialise isFreeStanding before calling the super class,
+ // so that the value is set when createIncreaseButton() and
// createDecreaseButton() are called (unless there is somewhere earlier
// that we can do this).
Boolean prop = (Boolean) scrollbar.getClientProperty(FREE_STANDING_PROP);
@@ -172,35 +172,35 @@ public class MetalScrollBarUI extends BasicScrollBarUI
scrollBarWidth = UIManager.getInt("ScrollBar.width");
super.installDefaults();
}
-
+
/**
* Creates a property change listener for the delegate to use. This
- * overrides the method to provide a custom listener for the
- * {@link MetalLookAndFeel} that can handle the
+ * overrides the method to provide a custom listener for the
+ * {@link MetalLookAndFeel} that can handle the
* JScrollBar.isFreeStanding property.
- *
+ *
* @return A property change listener.
*/
protected PropertyChangeListener createPropertyChangeListener()
{
return new MetalScrollBarPropertyChangeHandler();
}
-
+
/**
* Creates a new button to use as the control at the lower end of the
* {@link JScrollBar}. This method assigns the new button (an instance of
- * {@link MetalScrollButton} to the {@link #decreaseButton} field, and also
- * returns the button. The button width is determined by the
+ * {@link MetalScrollButton} to the {@link #decreaseButton} field, and also
+ * returns the button. The button width is determined by the
* ScrollBar.width setting in the UI defaults.
- *
+ *
* @param orientation the orientation of the button ({@link #NORTH},
* {@link #SOUTH}, {@link #EAST} or {@link #WEST}).
- *
+ *
* @return The button.
*/
protected JButton createDecreaseButton(int orientation)
{
- decreaseButton = new MetalScrollButton(orientation, scrollBarWidth,
+ decreaseButton = new MetalScrollButton(orientation, scrollBarWidth,
isFreeStanding);
return decreaseButton;
}
@@ -208,25 +208,25 @@ public class MetalScrollBarUI extends BasicScrollBarUI
/**
* Creates a new button to use as the control at the upper end of the
* {@link JScrollBar}. This method assigns the new button (an instance of
- * {@link MetalScrollButton} to the {@link #increaseButton} field, and also
- * returns the button. The button width is determined by the
+ * {@link MetalScrollButton} to the {@link #increaseButton} field, and also
+ * returns the button. The button width is determined by the
* ScrollBar.width setting in the UI defaults.
- *
+ *
* @param orientation the orientation of the button ({@link #NORTH},
* {@link #SOUTH}, {@link #EAST} or {@link #WEST}).
- *
+ *
* @return The button.
*/
protected JButton createIncreaseButton(int orientation)
{
- increaseButton = new MetalScrollButton(orientation, scrollBarWidth,
+ increaseButton = new MetalScrollButton(orientation, scrollBarWidth,
isFreeStanding);
return increaseButton;
}
-
+
/**
* Paints the track for the scrollbar.
- *
+ *
* @param g the graphics device.
* @param c the component.
* @param trackBounds the track bounds.
@@ -234,20 +234,20 @@ public class MetalScrollBarUI extends BasicScrollBarUI
protected void paintTrack(Graphics g, JComponent c, Rectangle trackBounds)
{
g.setColor(MetalLookAndFeel.getControl());
- g.fillRect(trackBounds.x, trackBounds.y, trackBounds.width,
+ g.fillRect(trackBounds.x, trackBounds.y, trackBounds.width,
trackBounds.height);
- if (scrollbar.getOrientation() == HORIZONTAL)
- paintTrackHorizontal(g, c, trackBounds.x, trackBounds.y,
+ if (scrollbar.getOrientation() == HORIZONTAL)
+ paintTrackHorizontal(g, c, trackBounds.x, trackBounds.y,
trackBounds.width, trackBounds.height);
- else
- paintTrackVertical(g, c, trackBounds.x, trackBounds.y,
+ else
+ paintTrackVertical(g, c, trackBounds.x, trackBounds.y,
trackBounds.width, trackBounds.height);
-
+
}
-
+
/**
* Paints the track for a horizontal scrollbar.
- *
+ *
* @param g the graphics device.
* @param c the component.
* @param x the x-coordinate for the track bounds.
@@ -255,7 +255,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
* @param w the width for the track bounds.
* @param h the height for the track bounds.
*/
- private void paintTrackHorizontal(Graphics g, JComponent c,
+ private void paintTrackHorizontal(Graphics g, JComponent c,
int x, int y, int w, int h)
{
if (c.isEnabled())
@@ -264,12 +264,12 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x, y, x, y + h - 1);
g.drawLine(x, y, x + w - 1, y);
g.drawLine(x + w - 1, y, x + w - 1, y + h - 1);
-
+
g.setColor(scrollBarShadowColor);
g.drawLine(x + 1, y + 1, x + 1, y + h - 1);
g.drawLine(x + 1, y + 1, x + w - 2, y + 1);
-
- if (isFreeStanding)
+
+ if (isFreeStanding)
{
g.setColor(MetalLookAndFeel.getControlDarkShadow());
g.drawLine(x, y + h - 2, x + w - 1, y + h - 2);
@@ -290,10 +290,10 @@ public class MetalScrollBarUI extends BasicScrollBarUI
}
}
}
-
+
/**
* Paints the track for a vertical scrollbar.
- *
+ *
* @param g the graphics device.
* @param c the component.
* @param x the x-coordinate for the track bounds.
@@ -301,7 +301,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
* @param w the width for the track bounds.
* @param h the height for the track bounds.
*/
- private void paintTrackVertical(Graphics g, JComponent c,
+ private void paintTrackVertical(Graphics g, JComponent c,
int x, int y, int w, int h)
{
if (c.isEnabled())
@@ -310,12 +310,12 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x, y, x, y + h - 1);
g.drawLine(x, y, x + w - 1, y);
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
-
+
g.setColor(scrollBarShadowColor);
g.drawLine(x + 1, y + 1, x + w - 1, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + h - 2);
-
- if (isFreeStanding)
+
+ if (isFreeStanding)
{
g.setColor(MetalLookAndFeel.getControlDarkShadow());
g.drawLine(x + w - 2, y, x + w - 2, y + h - 1);
@@ -351,7 +351,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
return;
if (scrollbar.getOrientation() == HORIZONTAL)
paintThumbHorizontal(g, c, thumbBounds);
- else
+ else
paintThumbVertical(g, c, thumbBounds);
// Draw the pattern when the theme is not Ocean.
@@ -367,19 +367,19 @@ public class MetalScrollBarUI extends BasicScrollBarUI
/**
* Paints the thumb for a horizontal scroll bar.
- *
+ *
* @param g the graphics device.
* @param c the scroll bar component.
* @param thumbBounds the thumb bounds.
*/
- private void paintThumbHorizontal(Graphics g, JComponent c,
- Rectangle thumbBounds)
+ private void paintThumbHorizontal(Graphics g, JComponent c,
+ Rectangle thumbBounds)
{
int x = thumbBounds.x;
int y = thumbBounds.y;
int w = thumbBounds.width;
int h = thumbBounds.height;
-
+
// First we fill the background.
MetalTheme theme = MetalLookAndFeel.getCurrentTheme();
if (theme instanceof OceanTheme
@@ -408,7 +408,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x, y, x, y + h - 1);
g.drawLine(x + w - 1, y, x + w - 1, y + h - 1);
}
-
+
// then the highlight
g.setColor(thumbHighlightColor);
if (isFreeStanding)
@@ -421,7 +421,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x + 1, y + 1, x + w - 3, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + h - 1);
}
-
+
// draw the shadow line
g.setColor(UIManager.getColor("ScrollBar.shadow"));
g.drawLine(x + w, y + 1, x + w, y + h - 1);
@@ -440,22 +440,22 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(middle + 3, y + 5, middle + 3, y + h - 4);
}
}
-
+
/**
* Paints the thumb for a vertical scroll bar.
- *
+ *
* @param g the graphics device.
* @param c the scroll bar component.
* @param thumbBounds the thumb bounds.
*/
- private void paintThumbVertical(Graphics g, JComponent c,
+ private void paintThumbVertical(Graphics g, JComponent c,
Rectangle thumbBounds)
{
int x = thumbBounds.x;
int y = thumbBounds.y;
int w = thumbBounds.width;
int h = thumbBounds.height;
-
+
// First we fill the background.
MetalTheme theme = MetalLookAndFeel.getCurrentTheme();
if (theme instanceof OceanTheme
@@ -484,7 +484,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x, y, x, y + h - 1);
g.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
}
-
+
// then the highlight
g.setColor(thumbHighlightColor);
if (isFreeStanding)
@@ -497,7 +497,7 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x + 1, y + 1, x + w - 1, y + 1);
g.drawLine(x + 1, y + 1, x + 1, y + h - 3);
}
-
+
// draw the shadow line
g.setColor(UIManager.getColor("ScrollBar.shadow"));
g.drawLine(x + 1, y + h, x + w - 2, y + h);
@@ -516,10 +516,10 @@ public class MetalScrollBarUI extends BasicScrollBarUI
g.drawLine(x + 5, middle + 3, x + w - 4, middle + 3);
}
}
-
+
/**
- * Returns the minimum thumb size. For a free standing scroll bar the
- * minimum size is 17 x 17 pixels, whereas for a non free
+ * Returns the minimum thumb size. For a free standing scroll bar the
+ * minimum size is 17 x 17 pixels, whereas for a non free
* standing scroll bar the minimum size is 15 x 15 pixels.
*
* @return The minimum thumb size.
@@ -580,6 +580,5 @@ public class MetalScrollBarUI extends BasicScrollBarUI
width += insets.left + insets.right;
return new Dimension(width, height);
- }
+ }
}
-
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalScrollButton.java b/libjava/classpath/javax/swing/plaf/metal/MetalScrollButton.java
index 8678f68..3273908 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalScrollButton.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalScrollButton.java
@@ -47,32 +47,32 @@ import javax.swing.plaf.basic.BasicArrowButton;
/**
* A button used by the {@link MetalScrollBarUI}. The button appearance
- * varies according to the button direction, whether or not it is part of a
- * "free standing" scroll bar, and the current state of the button.
+ * varies according to the button direction, whether or not it is part of a
+ * "free standing" scroll bar, and the current state of the button.
*/
-public class MetalScrollButton extends BasicArrowButton
+public class MetalScrollButton extends BasicArrowButton
{
-
- /**
+
+ /**
* The maximum size for buttons.
* @see #getMaximumSize()
*/
- private static Dimension maximumSize;
-
+ private static Dimension maximumSize;
+
/** The width of the button. */
private int buttonWidth;
-
- /**
- * A flag that indicates whether the button is part of a free standing
+
+ /**
+ * A flag that indicates whether the button is part of a free standing
* scroll bar. This affects how the border is drawn.
*/
private boolean freeStanding;
-
+
/**
* Creates a new button.
- *
- * @param direction the direction (this should be one of {@link #NORTH},
- * {@link #SOUTH}, {@link #EAST} and {@link #WEST}, but
+ *
+ * @param direction the direction (this should be one of {@link #NORTH},
+ * {@link #SOUTH}, {@link #EAST} and {@link #WEST}, but
* this is not enforced).
* @param width the button width.
* @param freeStanding a flag indicating whether the scroll button is free
@@ -85,31 +85,31 @@ public class MetalScrollButton extends BasicArrowButton
this.freeStanding = freeStanding;
setFocusable(false);
}
-
+
/**
* Returns the button width.
- *
+ *
* @return The button width.
*/
public int getButtonWidth()
{
- return buttonWidth;
+ return buttonWidth;
}
/**
* Sets the free standing flag. This controls how the button border is
* drawn.
- *
+ *
* @param freeStanding the new value of the flag.
*/
public void setFreeStanding(boolean freeStanding)
{
this.freeStanding = freeStanding;
}
-
+
/**
* Paints the button.
- *
+ *
* @param g the graphics device.
*/
public void paint(Graphics g)
@@ -122,16 +122,16 @@ public class MetalScrollButton extends BasicArrowButton
else
g.setColor(MetalLookAndFeel.getControl());
g.fillRect(0, 0, bounds.width, bounds.height);
-
+
paintArrow(g, bounds.width, bounds.height);
-
+
// paint a border manually - I tried using a real (custom) Border
- // but couldn't get it to stay set for the button, something was
+ // but couldn't get it to stay set for the button, something was
// overwriting it...
- if (freeStanding)
+ if (freeStanding)
{
if (direction == WEST)
- paintWestBorderFreeStanding(g, bounds.width, bounds.height);
+ paintWestBorderFreeStanding(g, bounds.width, bounds.height);
else if (direction == EAST)
paintEastBorderFreeStanding(g, bounds.width, bounds.height);
else if (direction == SOUTH)
@@ -142,7 +142,7 @@ public class MetalScrollButton extends BasicArrowButton
else
{
if (direction == WEST)
- paintWestBorder(g, bounds.width, bounds.height);
+ paintWestBorder(g, bounds.width, bounds.height);
else if (direction == EAST)
paintEastBorder(g, bounds.width, bounds.height);
else if (direction == SOUTH)
@@ -151,14 +151,14 @@ public class MetalScrollButton extends BasicArrowButton
paintNorthBorder(g, bounds.width, bounds.height);
}
}
-
+
private void paintArrow(Graphics g, int w, int h)
{
if (isEnabled())
g.setColor(MetalLookAndFeel.getBlack());
else
g.setColor(MetalLookAndFeel.getControlDisabled());
-
+
if (direction == SOUTH)
{
int x = w / 2;
@@ -178,7 +178,7 @@ public class MetalScrollButton extends BasicArrowButton
int x = w / 2 - 3;
int y = h / 2;
for (int i = 1; i < 5; i++)
- g.drawLine(x + i, y - i, x + i, y + i - 1);
+ g.drawLine(x + i, y - i, x + i, y + i - 1);
}
else // assume NORTH
{
@@ -191,12 +191,12 @@ public class MetalScrollButton extends BasicArrowButton
/**
* Paints the border for a button with a {@link #NORTH} direction that
* belongs to a free standing scroll bar.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
*/
- private void paintNorthBorderFreeStanding(Graphics g, int w, int h)
+ private void paintNorthBorderFreeStanding(Graphics g, int w, int h)
{
if (isEnabled())
{
@@ -205,12 +205,12 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, 0, h - 1);
g.drawLine(2, h - 1, w - 2, h - 1);
g.drawLine(w - 2, 2, w - 2, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControlHighlight());
g.drawLine(1, 1, 1, h - 2);
g.drawLine(1, 1, w - 3, 1);
g.drawLine(w - 1, 1, w - 1, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControl());
g.drawLine(1, h - 1, 1, h - 1);
g.drawLine(w - 2, 1, w - 2, 1);
@@ -223,11 +223,11 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, 0, h - 1);
}
}
-
+
/**
* Paints the border for a button with a {@link #SOUTH} direction that
* belongs to a free standing scroll bar.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
@@ -241,12 +241,12 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, 0, h - 1);
g.drawLine(2, h - 1, w - 2, h - 1);
g.drawLine(w - 2, 2, w - 2, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControlHighlight());
g.drawLine(1, 1, 1, h - 1);
g.drawLine(1, 1, w - 1, 1);
g.drawLine(w - 1, 1, w - 1, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControl());
g.drawLine(1, h - 1, 1, h - 1);
g.drawLine(w - 1, 1, w - 1, 1);
@@ -259,11 +259,11 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, 0, h - 1);
}
}
-
+
/**
* Paints the border for a button with an {@link #EAST} direction that
* belongs to a free standing scroll bar.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
@@ -276,12 +276,12 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, w - 2, 0);
g.drawLine(w - 2, 0, w - 2, h - 2);
g.drawLine(0, h - 2, w - 2, h - 2);
-
+
g.setColor(MetalLookAndFeel.getControlHighlight());
g.drawLine(0, 1, w - 1, 1);
g.drawLine(w - 1, 1, w - 1, h - 1);
g.drawLine(0, h - 1, w - 1, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControl());
g.drawLine(w - 2, 1, w - 2, 1);
}
@@ -293,11 +293,11 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, h - 1, w - 1, h - 1);
}
}
-
+
/**
* Paints the border for a button with a {@link #WEST} direction that
* belongs to a free standing scroll bar.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
@@ -310,12 +310,12 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, w - 1, 0);
g.drawLine(0, 0, 0, h - 2);
g.drawLine(0, h - 2, w - 1, h - 2);
-
+
g.setColor(MetalLookAndFeel.getControlHighlight());
g.drawLine(1, 1, w - 1, 1);
g.drawLine(1, 1, 1, h - 1);
g.drawLine(1, h - 1, w - 1, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControl());
g.drawLine(1, h - 2, 1, h - 2);
}
@@ -327,22 +327,22 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, h - 1, w - 1, h - 1);
}
}
-
+
/**
* Paints the border for a button with a {@link #NORTH} direction that
* belongs to a scroll bar that is not free standing.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
*/
- private void paintNorthBorder(Graphics g, int w, int h)
+ private void paintNorthBorder(Graphics g, int w, int h)
{
if (isEnabled())
{
g.setColor(MetalLookAndFeel.getControlDarkShadow());
g.drawLine(0, 0, 0, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControlHighlight());
g.drawLine(1, 0, 1, h - 1);
g.drawLine(1, 0, w - 1, 0);
@@ -353,11 +353,11 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, 0, h - 1);
}
}
-
+
/**
* Paints the border for a button with a {@link #SOUTH} direction that
* belongs to a scroll bar that is not free standing.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
@@ -369,11 +369,11 @@ public class MetalScrollButton extends BasicArrowButton
g.setColor(MetalLookAndFeel.getControlDarkShadow());
g.drawLine(0, 0, 0, h - 1);
g.drawLine(0, h - 1, w - 1, h - 1);
-
+
g.setColor(MetalLookAndFeel.getControlHighlight());
g.drawLine(1, 0, 1, h - 1);
g.drawLine(1, 0, w - 1, 0);
-
+
g.setColor(MetalLookAndFeel.getControl());
g.drawLine(1, h - 1, 1, h - 1);
}
@@ -387,7 +387,7 @@ public class MetalScrollButton extends BasicArrowButton
/**
* Paints the border for a button with an {@link #EAST} direction that
* belongs to a scroll bar that is not free standing.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
@@ -409,11 +409,11 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, w - 1, 0);
}
}
-
+
/**
* Paints the border for a button with a {@link #WEST} direction that
* belongs to a scroll bar that is not free standing.
- *
+ *
* @param g the graphics device.
* @param w the button width.
* @param h the button height.
@@ -435,11 +435,11 @@ public class MetalScrollButton extends BasicArrowButton
g.drawLine(0, 0, bounds.width - 1, 0);
}
}
-
+
/**
- * Returns the preferred size for the button, which varies depending on
+ * Returns the preferred size for the button, which varies depending on
* the direction of the button and whether or not it is free standing.
- *
+ *
* @return The preferred size.
*/
public Dimension getPreferredSize()
@@ -447,9 +447,9 @@ public class MetalScrollButton extends BasicArrowButton
int adj = 1;
if (!freeStanding)
adj = 2;
-
+
if (direction == EAST)
- return new Dimension(buttonWidth - adj, buttonWidth);
+ return new Dimension(buttonWidth - adj, buttonWidth);
else if (direction == WEST)
return new Dimension(buttonWidth - 2, buttonWidth);
else if (direction == SOUTH)
@@ -457,27 +457,27 @@ public class MetalScrollButton extends BasicArrowButton
else // assume NORTH
return new Dimension(buttonWidth, buttonWidth - 2);
}
-
+
/**
* Returns the minimum size for the button.
- *
+ *
* @return The minimum size for the button.
*/
public Dimension getMinimumSize()
{
return getPreferredSize();
}
-
+
/**
* Returns the maximum size for the button.
- *
+ *
* @return Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE).
*/
public Dimension getMaximumSize()
{
if (maximumSize == null)
maximumSize = new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
- return maximumSize;
+ return maximumSize;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalScrollPaneUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalScrollPaneUI.java
index ae14af3..09a47c3 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalScrollPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalScrollPaneUI.java
@@ -71,12 +71,12 @@ public class MetalScrollPaneUI
{
return new MetalScrollPaneUI();
}
-
+
/**
- * Configures the specified component appropriate for the look and feel.
- * This method is invoked when the ComponentUI instance is being installed
- * as the UI delegate on the specified component. This method should
- * completely configure the component for the look and feel,
+ * Configures the specified component appropriate for the look and feel.
+ * This method is invoked when the ComponentUI instance is being installed
+ * as the UI delegate on the specified component. This method should
+ * completely configure the component for the look and feel,
* including the following:
* 1. Install any default property values for color, fonts, borders,
* icons, opacity, etc. on the component. Whenever possible, property
@@ -87,8 +87,8 @@ public class MetalScrollPaneUI
* 5. Create/install a PropertyChangeListener on the component in order
* to detect and respond to component property changes appropriately.
* 6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
- * 7. Initialize any appropriate instance data.
- *
+ * 7. Initialize any appropriate instance data.
+ *
* @param c - the component to install the ui on
*/
public void installUI(JComponent c)
@@ -101,11 +101,11 @@ public class MetalScrollPaneUI
}
/**
- * Reverses configuration which was done on the specified component
- * during installUI. This method is invoked when this UIComponent
- * instance is being removed as the UI delegate for the specified
- * component. This method should undo the configuration performed in
- * installUI, being careful to leave the JComponent instance in a
+ * Reverses configuration which was done on the specified component
+ * during installUI. This method is invoked when this UIComponent
+ * instance is being removed as the UI delegate for the specified
+ * component. This method should undo the configuration performed in
+ * installUI, being careful to leave the JComponent instance in a
* clean state (no extraneous listeners, look-and-feel-specific property
* objects, etc.). This should include the following:
* 1. Remove any UI-set borders from the component.
@@ -113,8 +113,8 @@ public class MetalScrollPaneUI
* 3. Remove any UI-added sub-components from the component.
* 4. Remove any UI-added event/property listeners from the component.
* 5. Remove any UI-installed keyboard UI from the component.
- * 6. Nullify any allocated instance data objects to allow for GC.
- *
+ * 6. Nullify any allocated instance data objects to allow for GC.
+ *
* @param c - the component to uninstall the ui on
*/
public void uninstallUI(JComponent c)
@@ -128,17 +128,17 @@ public class MetalScrollPaneUI
/**
* Installs listeners on scrollPane
- *
+ *
* @param scrollPane - the component to install the listeners on
*/
public void installListeners(JScrollPane scrollPane)
{
super.installListeners(scrollPane);
}
-
+
/**
* Uninstalls listeners on scrollPane
- *
+ *
* @param scrollPane - the component to uninstall the listeners on
*/
public void uninstallListeners(JScrollPane scrollPane)
@@ -148,7 +148,7 @@ public class MetalScrollPaneUI
/**
* TODO
- *
+ *
* @return TODO
*/
protected PropertyChangeListener createScrollBarSwapListener()
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalSeparatorUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalSeparatorUI.java
index 6d7818f..8afa98c 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalSeparatorUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalSeparatorUI.java
@@ -83,13 +83,13 @@ public class MetalSeparatorUI
}
/**
- * The separator is made of two lines. The top line will be
+ * The separator is made of two lines. The top line will be
* the Metal theme color separatorForeground (or left line if it's vertical).
* The bottom or right line will be the Metal theme color
* separatorBackground.
- * The two lines will
- * be centered inside the bounds box. If the separator is horizontal,
- * then it will be vertically centered, or if it's vertical, it will
+ * The two lines will
+ * be centered inside the bounds box. If the separator is horizontal,
+ * then it will be vertically centered, or if it's vertical, it will
* be horizontally centered.
*
* @param g The Graphics object to paint with
@@ -107,9 +107,9 @@ public class MetalSeparatorUI
s = (JSeparator) c;
else
return;
-
+
if (s.getOrientation() == JSeparator.HORIZONTAL)
- {
+ {
int midAB = r.height / 2;
g.setColor(c1);
g.drawLine(r.x, r.y + midAB - 1, r.x + r.width, r.y + midAB - 1);
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalSliderUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalSliderUI.java
index b3e8707..e85c324 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalSliderUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalSliderUI.java
@@ -74,11 +74,11 @@ public class MetalSliderUI extends BasicSliderUI
{
// Nothing to do here.
}
-
+
/**
* Handles property change events. Events with the name "JSlider.isFilled"
* are handled here, and other events are passed to the superclass.
- *
+ *
* @param e the property change event.
*/
public void propertyChange(PropertyChangeEvent e)
@@ -89,38 +89,38 @@ public class MetalSliderUI extends BasicSliderUI
if (b == null)
filledSlider = false;
else
- filledSlider = b.booleanValue();
+ filledSlider = b.booleanValue();
}
else
super.propertyChange(e);
}
}
-
+
/** The thumb color (unused, because an icon is used to draw the thumb). */
protected static Color thumbColor;
-
- /**
+
+ /**
* The highlight color used for drawing the track rect when the slider is
* enabled.
*/
protected static Color highlightColor;
-
+
/**
* The shadow color used for drawing the track rect when the slider is
* enabled.
*/
protected static Color darkShadowColor;
-
+
/** The track width. */
protected static int trackWidth = UIManager.getInt("Slider.trackWidth");
-
+
/** The length of the major tick marks. */
protected static int tickLength = UIManager.getInt("Slider.majorTickLength");
-
+
/** The icon used for the thumb control of horizontally oriented sliders. */
protected static Icon horizThumbIcon = UIManager.getIcon(
"Slider.horizontalThumbIcon");
-
+
/** The icon used for the thumb control of vertically oriented sliders. */
protected static Icon vertThumbIcon = UIManager.getIcon(
"Slider.verticalThumbIcon");
@@ -130,8 +130,8 @@ public class MetalSliderUI extends BasicSliderUI
/** A key to look up the filledSlider setting in the {@link UIManager}. */
protected final String SLIDER_FILL = "JSlider.isFilled";
-
- /**
+
+ /**
* A flag that controls whether or not the track is filled up to the value
* of the slider.
*/
@@ -159,38 +159,38 @@ public class MetalSliderUI extends BasicSliderUI
{
return new MetalSliderUI();
}
-
+
/**
* Installs the default for this UI delegate in the supplied component.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
{
super.installUI(c);
Boolean b = (Boolean) c.getClientProperty(SLIDER_FILL);
- if (b != null)
+ if (b != null)
filledSlider = b.booleanValue();
}
/**
- * Creates a property change listener for the slider.
- *
+ * Creates a property change listener for the slider.
+ *
* @param slider the slider.
- *
+ *
* @return A new instance of {@link MetalPropertyListener}.
*/
protected PropertyChangeListener createPropertyChangeListener(JSlider slider)
{
- return new MetalPropertyListener();
+ return new MetalPropertyListener();
}
-
+
/**
* Paints the thumb icon for the slider.
- *
+ *
* @param g the graphics device.
*/
- public void paintThumb(Graphics g)
+ public void paintThumb(Graphics g)
{
Color save = g.getColor();
g.setColor(thumbColor);
@@ -200,10 +200,10 @@ public class MetalSliderUI extends BasicSliderUI
vertThumbIcon.paintIcon(slider, g, thumbRect.x, thumbRect.y);
g.setColor(save);
}
-
+
/**
* Paints the track along which the thumb control moves.
- *
+ *
* @param g the graphics device.
*/
public void paintTrack(Graphics g)
@@ -215,10 +215,10 @@ public class MetalSliderUI extends BasicSliderUI
int trackY = trackRect.y + (trackRect.height - getTrackWidth()) / 2;
int trackW = trackRect.width;
int trackH = getTrackWidth();
-
+
// draw border
if (slider.isEnabled())
- BasicGraphicsUtils.drawEtchedRect(g, trackX, trackY, trackW, trackH,
+ BasicGraphicsUtils.drawEtchedRect(g, trackX, trackY, trackW, trackH,
darkShadowColor, shadowColor, darkShadowColor, highlightColor);
else
{
@@ -233,7 +233,7 @@ public class MetalSliderUI extends BasicSliderUI
{
int xPos = xPositionForValue(slider.getValue());
int x = slider.getInverted() ? xPos : trackRect.x;
- int w = slider.getInverted() ? trackX + trackW - xPos
+ int w = slider.getInverted() ? trackX + trackW - xPos
: xPos - trackRect.x;
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(x + 1, trackY + 1, x + w - 3, trackY + 1);
@@ -245,11 +245,11 @@ public class MetalSliderUI extends BasicSliderUI
g.drawLine(x + 1, trackY + 4, x + w - 3, trackY + 4);
}
}
- else if (filledSlider)
+ else if (filledSlider)
{
int xPos = xPositionForValue(slider.getValue());
int x = slider.getInverted() ? xPos : trackRect.x;
- int w = slider.getInverted() ? trackX + trackW - xPos
+ int w = slider.getInverted() ? trackX + trackW - xPos
: xPos - trackRect.x;
g.setColor(MetalLookAndFeel.getControlShadow());
g.fillRect(x + 1, trackY + 1, w - 3, getTrackWidth() - 3);
@@ -257,7 +257,7 @@ public class MetalSliderUI extends BasicSliderUI
{
g.setColor(MetalLookAndFeel.getControl());
g.drawLine(x + 1, trackY + 1, x + w - 3, trackY + 1);
- g.drawLine(x + 1, trackY + 1, x + 1,
+ g.drawLine(x + 1, trackY + 1, x + 1,
trackY + getTrackWidth() - 3);
}
}
@@ -269,7 +269,7 @@ public class MetalSliderUI extends BasicSliderUI
int trackW = getTrackWidth();
int trackH = trackRect.height;
if (slider.isEnabled())
- BasicGraphicsUtils.drawEtchedRect(g, trackX, trackY, trackW, trackH,
+ BasicGraphicsUtils.drawEtchedRect(g, trackX, trackY, trackW, trackH,
darkShadowColor, shadowColor, darkShadowColor, highlightColor);
else
{
@@ -284,9 +284,9 @@ public class MetalSliderUI extends BasicSliderUI
{
int yPos = yPositionForValue(slider.getValue());
int y = slider.getInverted() ? trackY : yPos;
- int h = slider.getInverted() ? yPos - trackY
+ int h = slider.getInverted() ? yPos - trackY
: trackY + trackH - yPos;
-
+
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(trackX + 1, y + 1, trackX + 1, y + h - 3);
g.setColor(UIManager.getColor("Slider.altTrackColor"));
@@ -297,11 +297,11 @@ public class MetalSliderUI extends BasicSliderUI
g.drawLine(trackX + 4, y + 1, trackX + 4, y + h - 3);
}
}
- else if (filledSlider)
+ else if (filledSlider)
{
int yPos = yPositionForValue(slider.getValue());
int y = slider.getInverted() ? trackY : yPos;
- int h = slider.getInverted() ? yPos - trackY
+ int h = slider.getInverted() ? yPos - trackY
: trackY + trackH - yPos;
g.setColor(MetalLookAndFeel.getControlShadow());
g.fillRect(trackX + 1, y + 1, getTrackWidth() - 3, h - 3);
@@ -314,14 +314,14 @@ public class MetalSliderUI extends BasicSliderUI
}
}
}
-
+
/**
- * Draws the focus rectangle for the slider. The Metal look and feel
- * indicates that the {@link JSlider} has the focus by changing the color of
- * the thumb control - this is handled elsewhere and so this method is empty
+ * Draws the focus rectangle for the slider. The Metal look and feel
+ * indicates that the {@link JSlider} has the focus by changing the color of
+ * the thumb control - this is handled elsewhere and so this method is empty
* (it overrides the method in the {@link BasicSliderUI} class to prevent
* a default focus highlight from being drawn).
- *
+ *
* @param g the graphics device.
*/
public void paintFocus(Graphics g)
@@ -329,25 +329,25 @@ public class MetalSliderUI extends BasicSliderUI
thumbColor = getFocusColor();
paintThumb(g);
}
-
+
/**
* Returns the size of the thumb icon.
- *
+ *
* @return The size of the thumb icon.
*/
protected Dimension getThumbSize()
{
if (slider.getOrientation() == JSlider.HORIZONTAL)
- return new Dimension(horizThumbIcon.getIconWidth(),
+ return new Dimension(horizThumbIcon.getIconWidth(),
horizThumbIcon.getIconHeight());
else
- return new Dimension(vertThumbIcon.getIconWidth(),
+ return new Dimension(vertThumbIcon.getIconWidth(),
vertThumbIcon.getIconHeight());
}
-
+
/**
* Returns the length of the major tick marks.
- *
+ *
* @return The length of the major tick marks.
*/
public int getTickLength()
@@ -357,31 +357,31 @@ public class MetalSliderUI extends BasicSliderUI
len += 2;
return len;
}
-
+
/**
* Returns the track width.
- *
+ *
* @return The track width.
*/
protected int getTrackWidth()
{
return trackWidth;
}
-
+
/**
* Returns the track length.
- *
+ *
* @return The track length.
*/
protected int getTrackLength()
{
- return slider.getOrientation() == JSlider.HORIZONTAL
+ return slider.getOrientation() == JSlider.HORIZONTAL
? tickRect.width : tickRect.height;
}
-
+
/**
* Returns the thumb overhang.
- *
+ *
* @return The thumb overhang.
*/
protected int getThumbOverhang()
@@ -389,16 +389,16 @@ public class MetalSliderUI extends BasicSliderUI
// FIXME: for what might this method be used?
return 0;
}
-
+
protected void scrollDueToClickInTrack(int dir)
{
// FIXME: for what might this method be overridden?
super.scrollDueToClickInTrack(dir);
}
-
+
/**
* Paints the minor ticks for a slider with a horizontal orientation.
- *
+ *
* @param g the graphics device.
* @param tickBounds the tick bounds.
* @param x the x value for the tick.
@@ -406,7 +406,7 @@ public class MetalSliderUI extends BasicSliderUI
protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds,
int x)
{
- // Note the incoming 'g' has a translation in place to get us to the
+ // Note the incoming 'g' has a translation in place to get us to the
// start of the tick rect already...
if (slider.isEnabled())
g.setColor(slider.getForeground());
@@ -414,10 +414,10 @@ public class MetalSliderUI extends BasicSliderUI
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(x, TICK_BUFFER, x, TICK_BUFFER + tickLength / 2);
}
-
+
/**
* Paints the major ticks for a slider with a horizontal orientation.
- *
+ *
* @param g the graphics device.
* @param tickBounds the tick bounds.
* @param x the x value for the tick.
@@ -425,7 +425,7 @@ public class MetalSliderUI extends BasicSliderUI
protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds,
int x)
{
- // Note the incoming 'g' has a translation in place to get us to the
+ // Note the incoming 'g' has a translation in place to get us to the
// start of the tick rect already...
if (slider.isEnabled())
g.setColor(slider.getForeground());
@@ -433,10 +433,10 @@ public class MetalSliderUI extends BasicSliderUI
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(x, TICK_BUFFER, x, TICK_BUFFER + tickLength - 1);
}
-
+
/**
* Paints the minor ticks for a slider with a vertical orientation.
- *
+ *
* @param g the graphics device.
* @param tickBounds the tick bounds.
* @param y the y value for the tick.
@@ -444,7 +444,7 @@ public class MetalSliderUI extends BasicSliderUI
protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds,
int y)
{
- // Note the incoming 'g' has a translation in place to get us to the
+ // Note the incoming 'g' has a translation in place to get us to the
// start of the tick rect already...
if (slider.isEnabled())
g.setColor(slider.getForeground());
@@ -452,10 +452,10 @@ public class MetalSliderUI extends BasicSliderUI
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(TICK_BUFFER, y, TICK_BUFFER + tickLength / 2, y);
}
-
+
/**
* Paints the major ticks for a slider with a vertical orientation.
- *
+ *
* @param g the graphics device.
* @param tickBounds the tick bounds.
* @param y the y value for the tick.
@@ -463,7 +463,7 @@ public class MetalSliderUI extends BasicSliderUI
protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds,
int y)
{
- // Note the incoming 'g' has a translation in place to get us to the
+ // Note the incoming 'g' has a translation in place to get us to the
// start of the tick rect already...
if (slider.isEnabled())
g.setColor(slider.getForeground());
@@ -471,5 +471,5 @@ public class MetalSliderUI extends BasicSliderUI
g.setColor(MetalLookAndFeel.getControlShadow());
g.drawLine(TICK_BUFFER, y, TICK_BUFFER + tickLength, y);
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalSplitPaneDivider.java b/libjava/classpath/javax/swing/plaf/metal/MetalSplitPaneDivider.java
index a3069da..0514998 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalSplitPaneDivider.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalSplitPaneDivider.java
@@ -197,13 +197,13 @@ class MetalSplitPaneDivider extends BasicSplitPaneDivider
/** The light color in the pattern. */
Color light;
-
+
/** The JSplitPane the divider is on. */
JSplitPane splitPane;
/** The split pane orientation. */
int orientation;
-
+
/**
* Creates a new instance of MetalSplitPaneDivider.
*
@@ -232,7 +232,7 @@ class MetalSplitPaneDivider extends BasicSplitPaneDivider
g.setColor(UIManager.getColor("SplitPane.dividerFocusColor"));
g.fillRect(0, 0, s.width, s.height);
}
-
+
// Paint border if one exists.
Border border = getBorder();
if (border != null)
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalSplitPaneUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalSplitPaneUI.java
index dbcc091..5b8f2127 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalSplitPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalSplitPaneUI.java
@@ -78,7 +78,7 @@ public class MetalSplitPaneUI extends BasicSplitPaneUI
* The divider returned by this method is a {@link BasicSplitPaneDivider}
* that is drawn using the Metal look.
*
- * @return the default divider to use for JSplitPanes.
+ * @return the default divider to use for JSplitPanes.
*/
public BasicSplitPaneDivider createDefaultDivider()
{
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalTabbedPaneUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalTabbedPaneUI.java
index 53eaa3c..77705ba 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalTabbedPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalTabbedPaneUI.java
@@ -57,15 +57,15 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
{
/**
- * A {@link LayoutManager} responsible for placing all the tabs and the
- * visible component inside the {@link JTabbedPane}. This class is only used
+ * A {@link LayoutManager} responsible for placing all the tabs and the
+ * visible component inside the {@link JTabbedPane}. This class is only used
* for {@link JTabbedPane#WRAP_TAB_LAYOUT}.
*
* @specnote Apparently this class was intended to be protected,
* but was made public by a compiler bug and is now
* public for compatibility.
*/
- public class TabbedPaneLayout
+ public class TabbedPaneLayout
extends BasicTabbedPaneUI.TabbedPaneLayout
{
/**
@@ -75,12 +75,12 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
{
// Nothing to do here.
}
-
+
/**
- * Overridden to do nothing, because tab runs are not rotated in the
+ * Overridden to do nothing, because tab runs are not rotated in the
* {@link MetalLookAndFeel}.
- *
- * @param tabPlacement the tab placement (one of {@link #TOP},
+ *
+ * @param tabPlacement the tab placement (one of {@link #TOP},
* {@link #BOTTOM}, {@link #LEFT} or {@link #RIGHT}).
* @param selectedRun the index of the selected run.
*/
@@ -88,18 +88,18 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
{
// do nothing, because tab runs are not rotated in the MetalLookAndFeel
}
-
+
/**
* Overridden to do nothing, because the selected tab does not have extra
* padding in the {@link MetalLookAndFeel}.
- *
- * @param tabPlacement the tab placement (one of {@link #TOP},
+ *
+ * @param tabPlacement the tab placement (one of {@link #TOP},
* {@link #BOTTOM}, {@link #LEFT} or {@link #RIGHT}).
* @param selectedIndex the index of the selected tab.
*/
protected void padSelectedTab(int tabPlacement, int selectedIndex)
{
- // do nothing, because the selected tab does not have extra padding in
+ // do nothing, because the selected tab does not have extra padding in
// the MetalLookAndFeel
}
@@ -162,10 +162,10 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
{
return new MetalTabbedPaneUI();
}
-
+
/**
* Creates and returns an instance of {@link TabbedPaneLayout}.
- *
+ *
* @return A layout manager used by this UI delegate.
*/
protected LayoutManager createLayoutManager()
@@ -174,12 +174,12 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
? new MetalTabbedPaneUI.TabbedPaneLayout()
: super.createLayoutManager();
}
-
+
/**
* Paints the border for a single tab.
- *
+ *
* @param g the graphics device.
- * @param tabPlacement the tab placement ({@link #TOP}, {@link #LEFT},
+ * @param tabPlacement the tab placement ({@link #TOP}, {@link #LEFT},
* {@link #BOTTOM} or {@link #RIGHT}).
* @param tabIndex the index of the tab to draw the border for.
* @param x the x-coordinate for the tab's bounding rectangle.
@@ -188,15 +188,15 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
* @param h the height for the tab's bounding rectangle.
* @param isSelected indicates whether or not the tab is selected.
*/
- protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex,
- int x, int y, int w, int h, boolean isSelected)
+ protected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex,
+ int x, int y, int w, int h, boolean isSelected)
{
int bottom = y + h - 1;
int right = x + w - 1;
switch (tabPlacement)
{
- case LEFT:
+ case LEFT:
paintLeftTabBorder(tabIndex, g, x, y, w, h, bottom, right, isSelected);
break;
case BOTTOM:
@@ -206,7 +206,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
paintRightTabBorder(tabIndex, g, x, y, w, h, bottom, right, isSelected);
break;
case TOP:
- default:
+ default:
paintTopTabBorder(tabIndex, g, x, y, w, h, bottom, right, isSelected);
}
}
@@ -214,7 +214,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
/**
* Paints the border for a tab assuming that the tab position is at the top
* ({@link #TOP}).
- *
+ *
* @param tabIndex the tab index.
* @param g the graphics device.
* @param x the x-coordinate for the tab's bounding rectangle.
@@ -306,11 +306,11 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
g.translate(-x, -y);
}
-
+
/**
* Paints the border for a tab assuming that the tab position is at the left
* ({@link #LEFT}).
- *
+ *
* @param tabIndex the tab index.
* @param g the graphics device.
* @param x the x-coordinate for the tab's bounding rectangle.
@@ -436,11 +436,11 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
g.translate(-x, -y);
}
-
+
/**
* Paints the border for a tab assuming that the tab position is at the right
* ({@link #RIGHT}).
- *
+ *
* @param tabIndex the tab index.
* @param g the graphics device.
* @param x the x-coordinate for the tab's bounding rectangle.
@@ -545,11 +545,11 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
}
g.translate(-x, -y);
}
-
+
/**
* Paints the border for a tab assuming that the tab position is at the bottom
* ({@link #BOTTOM}).
- *
+ *
* @param tabIndex the tab index.
* @param g the graphics device.
* @param x the x-coordinate for the tab's bounding rectangle.
@@ -606,7 +606,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
if (isOcean && isSelected)
{
g.drawLine(0, 0, 0, bottom - 5);
-
+
// Paint a connecting line to the tab below for all
// but the first tab in the last run.
if (tabIndex != tabRuns[runCount-1])
@@ -657,9 +657,9 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
/**
* Paints the background for a tab.
- *
+ *
* @param g the graphics device.
- * @param tabPlacement the tab placement ({@link #TOP}, {@link #LEFT},
+ * @param tabPlacement the tab placement ({@link #TOP}, {@link #LEFT},
* {@link #BOTTOM} or {@link #RIGHT}).
* @param tabIndex the index of the tab to draw the border for.
* @param x the x-coordinate for the tab's bounding rectangle.
@@ -696,7 +696,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
g.fillRect(x + 2, y + 5, 2, h - 5);
}
}
-
+
/**
* This method paints the focus rectangle around the selected tab.
*
@@ -719,19 +719,19 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
g.setColor(focus);
g.translate(rect.x, rect.y);
-
+
switch (tabPlacement)
{
case LEFT:
// Top line
g.drawLine(7, 2, rect.width-2, 2);
-
+
// Right line
g.drawLine(rect.width-1, 2, rect.width-1, rect.height-3);
-
+
// Bottom line
g.drawLine(rect.width-2, rect.height-2, 3, rect.height-2);
-
+
// Left line
g.drawLine(2, rect.height-3, 2, 7);
@@ -741,13 +741,13 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
case RIGHT:
// Top line
g.drawLine(1, 2, rect.width-8, 2);
-
+
// Slant
g.drawLine(rect.width-7, 2, rect.width-3, 6);
-
+
// Right line
g.drawLine(rect.width-3, 7, rect.width-3, rect.height-3);
-
+
// Bottom line
g.drawLine(rect.width-3, rect.height-2, 2, rect.height-2);
@@ -757,51 +757,51 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
case BOTTOM:
// Top line
g.drawLine(2, 1, rect.width-2, 1);
-
+
// Right line
g.drawLine(rect.width-1, 2, rect.width-1, rect.height-3);
-
+
// Bottom line
g.drawLine(7, rect.height-3, rect.width-2, rect.height-3);
-
+
// Slant
g.drawLine(6, rect.height-3, 2, rect.height-7);
-
+
// Left line
g.drawLine(2, rect.height-8, 2, 2);
-
+
break;
case TOP:
default:
// Top line
g.drawLine(6, 2, rect.width-2, 2);
-
+
// Right line
g.drawLine(rect.width-1, 2, rect.width-1, rect.height-3);
-
+
// Bottom line
g.drawLine(3, rect.height-3, rect.width-2, rect.height-3);
-
+
// Left line
g.drawLine(2, rect.height-3, 2, 7);
-
+
// Slant
g.drawLine(2, 6, 6, 2);
-
+
}
-
+
g.translate(-rect.x, -rect.y);
}
}
-
+
/**
- * Returns true if the tabs in the specified run should be
+ * Returns true if the tabs in the specified run should be
* padded to make the run fill the width/height of the {@link JTabbedPane}.
- *
+ *
* @param tabPlacement the tab placement for the {@link JTabbedPane} (one of
* {@link #TOP}, {@link #BOTTOM}, {@link #LEFT} and {@link #RIGHT}).
* @param run the run index.
- *
+ *
* @return A boolean.
*/
protected boolean shouldPadTabRun(int tabPlacement, int run)
@@ -824,14 +824,14 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
tabsOpaque = UIManager.getBoolean("TabbedPane.tabsOpaque");
minTabWidth = 0;
}
-
+
/**
* Returns the color for the gap.
- *
+ *
* @param currentRun - The current run to return the color for
* @param x - The x position of the current run
* @param y - The y position of the current run
- *
+ *
* @return the color for the gap in the current run.
*/
protected Color getColorForGap(int currentRun, int x, int y)
@@ -842,23 +842,23 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
return selectColor;
return tabAreaBackground;
}
-
+
/**
* Returns true if the gap should be filled in.
- *
+ *
* @param currentRun - The current run
* @param tabIndex - The current tab
* @param x - The x position of the tab
* @param y - The y position of the tab
- *
- * @return true if the gap at the current run should be filled
+ *
+ * @return true if the gap at the current run should be filled
*/
protected boolean shouldFillGap(int currentRun, int tabIndex, int x, int y)
{
// As far as I can tell, the gap is never filled in.
return false;
}
-
+
/**
* Paints the highlight below the tab, if there is one.
*/
@@ -867,14 +867,14 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
int selected = tabPane.getSelectedIndex();
int tabPlacement = tabPane.getTabPlacement();
Rectangle bounds = getTabBounds(tabPane, selected);
-
+
hg.setColor(selectColor);
int x = bounds.x;
int y = bounds.y;
int w = bounds.width;
int h = bounds.height;
- if (tabPlacement == TOP)
+ if (tabPlacement == TOP)
hg.fillRect(x, y + h - 2, w, 30);
else if (tabPlacement == LEFT)
hg.fillRect(x + w - 1, y, 20, h);
@@ -882,17 +882,17 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
hg.fillRect(x, y - h + 2, w, 30);
else if (tabPlacement == RIGHT)
hg.fillRect(x - 18, y, 20, h);
- else
+ else
throw new AssertionError("Unrecognised 'tabPlacement' argument.");
hg = null;
}
-
+
/**
- * Returns true if we should rotate the tab runs.
- *
+ * Returns true if we should rotate the tab runs.
+ *
* @param tabPlacement - The current tab placement.
* @param selectedRun - The selected run.
- *
+ *
* @return true if the tab runs should be rotated.
*/
protected boolean shouldRotateTabRuns(int tabPlacement,
@@ -1052,7 +1052,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
int w, int h)
{
g.setColor(darkShadow);
-
+
// If tabs are not placed on BOTTOM, or if the selected tab is not in the
// run directly below the content or the selected tab is not visible,
// then we draw an unbroken line.
@@ -1144,7 +1144,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
{
g.setColor(MetalLookAndFeel.getWhite());
g.drawLine(x, y + 1, x, y + h - 2);
- }
+ }
}
else
{
@@ -1163,7 +1163,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
}
}
}
-
+
}
/**
@@ -1251,7 +1251,7 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
bg = unselectedBackground;
return bg;
}
-
+
protected int getTabLabelShiftX(int tabPlacement,
int index,
boolean isSelected)
@@ -1265,5 +1265,5 @@ public class MetalTabbedPaneUI extends BasicTabbedPaneUI
{
return 0;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalTextFieldUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalTextFieldUI.java
index 30738b3..f7b18db 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalTextFieldUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalTextFieldUI.java
@@ -69,10 +69,10 @@ public class MetalTextFieldUI extends BasicTextFieldUI
{
return new MetalTextFieldUI();
}
-
+
/**
* This method gets called when a bound property is changed on the associated
- * JTextComponent. This is a hook which UI implementations may change to
+ * JTextComponent. This is a hook which UI implementations may change to
* reflect how the UI displays bound properties of JTextComponent subclasses.
*/
public void propertyChange(PropertyChangeEvent evt)
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalTheme.java b/libjava/classpath/javax/swing/plaf/metal/MetalTheme.java
index d5131af..209cbbe 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalTheme.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalTheme.java
@@ -49,7 +49,7 @@ import javax.swing.plaf.FontUIResource;
* The base class for themes used by the {@link MetalLookAndFeel}. A default
* theme ({@link DefaultMetalTheme}) is provided, or you can create and use
* your own.
- *
+ *
* @see MetalLookAndFeel#setCurrentTheme(MetalTheme)
*/
public abstract class MetalTheme
@@ -67,14 +67,14 @@ public abstract class MetalTheme
/**
* Returns the name of the theme.
- *
+ *
* @return The name of the theme.
*/
public abstract String getName();
/**
* Adds custom entries to the UI defaults table. This method is empty.
- *
+ *
* @param table the table.
*/
public void addCustomEntriesToTable(UIDefaults table)
@@ -87,7 +87,7 @@ public abstract class MetalTheme
/**
* Returns the accelerator foreground color. The default implementation
* returns the color from {@link #getPrimary1()}.
- *
+ *
* @return The accelerator foreground color.
*/
public ColorUIResource getAcceleratorForeground()
@@ -96,20 +96,20 @@ public abstract class MetalTheme
}
/**
- * Returns the accelerator selected foreground color. The default
+ * Returns the accelerator selected foreground color. The default
* implementation returns the color from {@link #getBlack()}.
- *
+ *
* @return The accelerator selected foreground color.
*/
public ColorUIResource getAcceleratorSelectedForeground()
{
return getBlack();
}
-
+
/**
- * Returns the control color. The default implementation returns the color
+ * Returns the control color. The default implementation returns the color
* from {@link #getSecondary3()}.
- *
+ *
* @return The control color.
*/
public ColorUIResource getControl()
@@ -118,9 +118,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used for dark shadows on controls. The default
+ * Returns the color used for dark shadows on controls. The default
* implementation returns the color from {@link #getSecondary1()}.
- *
+ *
* @return The color used for dark shadows on controls.
*/
public ColorUIResource getControlDarkShadow()
@@ -131,7 +131,7 @@ public abstract class MetalTheme
/**
* Returns the color used for disabled controls. The default implementation
* returns the color from {@link #getSecondary1()}.
- *
+ *
* @return The color used for disabled controls.
*/
public ColorUIResource getControlDisabled()
@@ -140,9 +140,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used to draw highlights for controls. The default
+ * Returns the color used to draw highlights for controls. The default
* implementation returns the color from {@link #getWhite()}.
- *
+ *
* @return The color used to draw highlights for controls.
*/
public ColorUIResource getControlHighlight()
@@ -151,9 +151,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used to display control info. The default
+ * Returns the color used to display control info. The default
* implementation returns the color from {@link #getBlack()}.
- *
+ *
* @return The color used to display control info.
*/
public ColorUIResource getControlInfo()
@@ -162,9 +162,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used to draw shadows for controls. The default
+ * Returns the color used to draw shadows for controls. The default
* implementation returns the color from {@link #getSecondary2()}.
- *
+ *
* @return The color used to draw shadows for controls.
*/
public ColorUIResource getControlShadow()
@@ -175,7 +175,7 @@ public abstract class MetalTheme
/**
* Returns the color used for text on controls. The default implementation
* returns the color from {@link #getControlInfo()}.
- *
+ *
* @return The color used for text on controls.
*/
public ColorUIResource getControlTextColor()
@@ -184,9 +184,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used for the desktop background. The default
+ * Returns the color used for the desktop background. The default
* implementation returns the color from {@link #getPrimary2()}.
- *
+ *
* @return The color used for the desktop background.
*/
public ColorUIResource getDesktopColor()
@@ -195,9 +195,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used to draw focus highlights. The default
+ * Returns the color used to draw focus highlights. The default
* implementation returns the color from {@link #getPrimary2()}.
- *
+ *
* @return The color used to draw focus highlights.
*/
public ColorUIResource getFocusColor()
@@ -208,7 +208,7 @@ public abstract class MetalTheme
/**
* Returns the color used to draw highlighted text. The default
* implementation returns the color from {@link #getHighlightedTextColor()}.
- *
+ *
* @return The color used to draw highlighted text.
*/
public ColorUIResource getHighlightedTextColor()
@@ -219,7 +219,7 @@ public abstract class MetalTheme
/**
* Returns the color used to draw text on inactive controls. The default
* implementation returns the color from {@link #getControlDisabled()}.
- *
+ *
* @return The color used to draw text on inactive controls.
*/
public ColorUIResource getInactiveControlTextColor()
@@ -230,7 +230,7 @@ public abstract class MetalTheme
/**
* Returns the color used to draw inactive system text. The default
* implementation returns the color from {@link #getSecondary2()}.
- *
+ *
* @return The color used to draw inactive system text.
*/
public ColorUIResource getInactiveSystemTextColor()
@@ -241,9 +241,9 @@ public abstract class MetalTheme
/**
* Returns the background color for menu items. The default implementation
* returns the color from {@link #getSecondary3()}.
- *
+ *
* @return The background color for menu items.
- *
+ *
* @see #getMenuSelectedBackground()
*/
public ColorUIResource getMenuBackground()
@@ -252,11 +252,11 @@ public abstract class MetalTheme
}
/**
- * Returns the foreground color for disabled menu items. The default
+ * Returns the foreground color for disabled menu items. The default
* implementation returns the color from {@link #getSecondary2()}.
- *
+ *
* @return The foreground color for disabled menu items.
- *
+ *
* @see #getMenuForeground()
*/
public ColorUIResource getMenuDisabledForeground()
@@ -267,9 +267,9 @@ public abstract class MetalTheme
/**
* Returns the foreground color for menu items. The default implementation
* returns the color from {@link #getBlack()}.
- *
+ *
* @return The foreground color for menu items.
- *
+ *
* @see #getMenuDisabledForeground()
* @see #getMenuSelectedForeground()
*/
@@ -279,11 +279,11 @@ public abstract class MetalTheme
}
/**
- * Returns the background color for selected menu items. The default
+ * Returns the background color for selected menu items. The default
* implementation returns the color from {@link #getPrimary2()}.
- *
+ *
* @return The background color for selected menu items.
- *
+ *
* @see #getMenuBackground()
*/
public ColorUIResource getMenuSelectedBackground()
@@ -292,11 +292,11 @@ public abstract class MetalTheme
}
/**
- * Returns the foreground color for selected menu items. The default
+ * Returns the foreground color for selected menu items. The default
* implementation returns the value from {@link #getBlack()}.
- *
+ *
* @return The foreground color for selected menu items.
- *
+ *
* @see #getMenuForeground()
*/
public ColorUIResource getMenuSelectedForeground()
@@ -307,7 +307,7 @@ public abstract class MetalTheme
/**
* Returns the primary color for controls. The default implementation
* returns the color from {@link #getPrimary3()}.
- *
+ *
* @return The primary color for controls.
*/
public ColorUIResource getPrimaryControl()
@@ -316,9 +316,9 @@ public abstract class MetalTheme
}
/**
- * Returns the primary color for the dark shadow on controls. The default
+ * Returns the primary color for the dark shadow on controls. The default
* implementation returns the color from {@link #getPrimary1()}.
- *
+ *
* @return The primary color for the dark shadow on controls.
*/
public ColorUIResource getPrimaryControlDarkShadow()
@@ -327,9 +327,9 @@ public abstract class MetalTheme
}
/**
- * Returns the primary color for the highlight on controls. The default
+ * Returns the primary color for the highlight on controls. The default
* implementation returns the color from {@link #getWhite()}.
- *
+ *
* @return The primary color for the highlight on controls.
*/
public ColorUIResource getPrimaryControlHighlight()
@@ -338,9 +338,9 @@ public abstract class MetalTheme
}
/**
- * Returns the primary color for the information on controls. The default
+ * Returns the primary color for the information on controls. The default
* implementation returns the color from {@link #getBlack()}.
- *
+ *
* @return The primary color for the information on controls.
*/
public ColorUIResource getPrimaryControlInfo()
@@ -349,9 +349,9 @@ public abstract class MetalTheme
}
/**
- * Returns the primary color for the shadow on controls. The default
+ * Returns the primary color for the shadow on controls. The default
* implementation returns the color from {@link #getPrimary2()}.
- *
+ *
* @return The primary color for the shadow on controls.
*/
public ColorUIResource getPrimaryControlShadow()
@@ -362,7 +362,7 @@ public abstract class MetalTheme
/**
* Returns the background color for separators. The default implementation
* returns the color from {@link #getWhite()}.
- *
+ *
* @return The background color for separators.
*/
public ColorUIResource getSeparatorBackground()
@@ -373,7 +373,7 @@ public abstract class MetalTheme
/**
* Returns the foreground color for separators. The default implementation
* returns the value from {@link #getPrimary1()}.
- *
+ *
* @return The foreground color for separators.
*/
public ColorUIResource getSeparatorForeground()
@@ -382,9 +382,9 @@ public abstract class MetalTheme
}
/**
- * Returns the color used for system text. The default implementation
+ * Returns the color used for system text. The default implementation
* returns the color from {@link #getBlack()}.
- *
+ *
* @return The color used for system text.
*/
public ColorUIResource getSystemTextColor()
@@ -395,7 +395,7 @@ public abstract class MetalTheme
/**
* Returns the color used to highlight text. The default implementation
* returns the color from {@link #getPrimary3()}.
- *
+ *
* @return The color used to highlight text.
*/
public ColorUIResource getTextHighlightColor()
@@ -406,18 +406,18 @@ public abstract class MetalTheme
/**
* Returns the color used to display user text. The default implementation
* returns the color from {@link #getBlack()}.
- *
+ *
* @return The color used to display user text.
*/
public ColorUIResource getUserTextColor()
{
return getBlack();
}
-
+
/**
* Returns the window background color. The default implementation returns
* the color from {@link #getWhite()}.
- *
+ *
* @return The window background color.
*/
public ColorUIResource getWindowBackground()
@@ -428,7 +428,7 @@ public abstract class MetalTheme
/**
* Returns the window title background color. The default implementation
* returns the color from {@link #getPrimary3()}.
- *
+ *
* @return The window title background color.
*/
public ColorUIResource getWindowTitleBackground()
@@ -439,7 +439,7 @@ public abstract class MetalTheme
/**
* Returns the window title foreground color. The default implementation
* returns the color from {@link #getBlack()}.
- *
+ *
* @return The window title foreground color.
*/
public ColorUIResource getWindowTitleForeground()
@@ -450,7 +450,7 @@ public abstract class MetalTheme
/**
* Returns the background color for an inactive window title. The default
* implementation returns the color from {@link #getSecondary3()}.
- *
+ *
* @return The background color for an inactive window title.
*/
public ColorUIResource getWindowTitleInactiveBackground()
@@ -461,7 +461,7 @@ public abstract class MetalTheme
/**
* Returns the foreground color for an inactive window title. The default
* implementation returns the color from {@link #getBlack()}.
- *
+ *
* @return The foreground color for an inactive window title.
*/
public ColorUIResource getWindowTitleInactiveForeground()
@@ -471,7 +471,7 @@ public abstract class MetalTheme
/**
* Returns the color used for black.
- *
+ *
* @return The color used for black.
*/
protected ColorUIResource getBlack()
@@ -481,7 +481,7 @@ public abstract class MetalTheme
/**
* Returns the color used for white.
- *
+ *
* @return The color used for white.
*/
protected ColorUIResource getWhite()
@@ -491,86 +491,86 @@ public abstract class MetalTheme
/**
* Returns the first primary color for this theme.
- *
+ *
* @return The first primary color.
*/
protected abstract ColorUIResource getPrimary1();
-
+
/**
* Returns the second primary color for this theme.
- *
+ *
* @return The second primary color.
*/
protected abstract ColorUIResource getPrimary2();
/**
* Returns the third primary color for this theme.
- *
+ *
* @return The third primary color.
*/
protected abstract ColorUIResource getPrimary3();
-
+
/**
* Returns the first secondary color for this theme.
- *
+ *
* @return The first secondary color.
*/
protected abstract ColorUIResource getSecondary1();
/**
* Returns the second secondary color for this theme.
- *
+ *
* @return The second secondary color.
*/
protected abstract ColorUIResource getSecondary2();
/**
* Returns the third secondary color for this theme.
- *
+ *
* @return The third secondary color.
*/
protected abstract ColorUIResource getSecondary3();
/**
* Returns the font used for text on controls.
- *
+ *
* @return The font used for text on controls.
*/
public abstract FontUIResource getControlTextFont();
/**
* Returns the font used for text in menus.
- *
+ *
* @return The font used for text in menus.
*/
public abstract FontUIResource getMenuTextFont();
/**
* Returns the font used for sub text.
- *
+ *
* @return The font used for sub text.
*/
public abstract FontUIResource getSubTextFont();
-
+
/**
* Returns the font used for system text.
- *
+ *
* @return The font used for system text.
*/
public abstract FontUIResource getSystemTextFont();
-
+
/**
* Returns the font used for user text.
- *
+ *
* @return The font used for user text.
*/
public abstract FontUIResource getUserTextFont();
/**
* Returns the font used for window titles.
- *
+ *
* @return The font used for window titles.
*/
public abstract FontUIResource getWindowTitleFont();
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalToggleButtonUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalToggleButtonUI.java
index 8c7a46e..2dacd7f 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalToggleButtonUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalToggleButtonUI.java
@@ -113,9 +113,9 @@ public class MetalToggleButtonUI
}
/**
- * Returns the color for the text label of disabled buttons. The value
+ * Returns the color for the text label of disabled buttons. The value
* is initialised in the {@link #installDefaults(AbstractButton)} method
- * by reading the ToggleButton.disabledText item from the UI
+ * by reading the ToggleButton.disabledText item from the UI
* defaults.
*
* @return The color for the text label of disabled buttons.
@@ -127,7 +127,7 @@ public class MetalToggleButtonUI
/**
* Updates the button with the defaults for this look and feel.
- *
+ *
* @param b the button.
*/
public void installDefaults(AbstractButton b)
@@ -137,10 +137,10 @@ public class MetalToggleButtonUI
selectColor = UIManager.getColor(getPropertyPrefix() + "select");
disabledTextColor = UIManager.getColor(getPropertyPrefix() + "disabledText");
}
-
+
/**
- * Paints the button background when it is pressed/selected.
- *
+ * Paints the button background when it is pressed/selected.
+ *
* @param g the graphics device.
* @param b the button.
*/
@@ -155,19 +155,19 @@ public class MetalToggleButtonUI
g.setColor(saved);
}
}
-
+
/**
* Paints the text for the button.
- *
+ *
* As of JDK 1.4 this method is obsolete.
- * Use {@link BasicButtonUI#paintText(java.awt.Graphics,
+ * Use {@link BasicButtonUI#paintText(java.awt.Graphics,
* javax.swing.AbstractButton, java.awt.Rectangle, java.lang.String)}.
*
* @param g the graphics device.
* @param c the component.
* @param textRect the bounds for the text.
* @param text the text.
- *
+ *
*/
protected void paintText(Graphics g, JComponent c, Rectangle textRect,
String text)
@@ -185,10 +185,10 @@ public class MetalToggleButtonUI
g.setFont(savedFont);
g.setColor(savedColor);
}
-
+
/**
* Draws the focus highlight around the text and icon.
- *
+ *
* @param g the graphics device.
* @param b the button.
*/
@@ -201,7 +201,7 @@ public class MetalToggleButtonUI
g.setColor(focusColor);
Rectangle fr = iconRect.union(textRect);
g.drawRect(fr.x - 1, fr.y - 1, fr.width + 1, fr.height + 1);
- g.setColor(saved);
+ g.setColor(saved);
}
/**
@@ -226,5 +226,5 @@ public class MetalToggleButtonUI
else
super.update(g, c);
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalToolBarUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalToolBarUI.java
index 1848c1f..64e679c 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalToolBarUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalToolBarUI.java
@@ -59,12 +59,12 @@ import javax.swing.plaf.basic.BasicToolBarUI;
*/
public class MetalToolBarUI extends BasicToolBarUI
{
-
+
/**
- * A listener (no longer used) that responds when components are added to or
+ * A listener (no longer used) that responds when components are added to or
* removed from the {@link JToolBar}. The required behaviour is now
- * handled in the super class.
- *
+ * handled in the super class.
+ *
* @see MetalToolBarUI#createContainerListener()
*/
protected class MetalContainerListener
@@ -81,9 +81,9 @@ public class MetalToolBarUI extends BasicToolBarUI
/**
* A listener (no longer used) that responds to property change events in a
- * {@link JToolBar} component. The required behaviour is now handled in the
- * super class.
- *
+ * {@link JToolBar} component. The required behaviour is now handled in the
+ * super class.
+ *
* @see MetalToolBarUI#createRolloverListener()
*/
protected class MetalRolloverListener
@@ -97,16 +97,16 @@ public class MetalToolBarUI extends BasicToolBarUI
// Nothing to do here.
}
}
-
- /**
+
+ /**
* The container listener (an implementation specific field, according to the
* spec, and not used in GNU Classpath).
*/
protected ContainerListener contListener;
-
- /**
+
+ /**
* The rollover listener (an implementation specific field, according to the
- * spec, and not used in GNU Classpath).
+ * spec, and not used in GNU Classpath).
*/
protected PropertyChangeListener rolloverListener;
@@ -129,43 +129,43 @@ public class MetalToolBarUI extends BasicToolBarUI
{
return new MetalToolBarUI();
}
-
+
/**
* Returns null as permitted by recent versions of the API
- * specification. Originally it seems this method returned a new instance of
+ * specification. Originally it seems this method returned a new instance of
* {@link MetalRolloverListener}, but this is now redundant.
- *
+ *
* @return null.
*/
protected PropertyChangeListener createRolloverListener()
{
return null;
}
-
+
/**
* Returns null as permitted by recent versions of the API
- * specification. Originally it seems this method returned a new instance of
+ * specification. Originally it seems this method returned a new instance of
* {@link MetalContainerListener}, but this is now redundant.
- *
+ *
* @return null.
*/
protected ContainerListener createContainerListener()
{
return null;
}
-
+
/**
* Returns a border with no rollover effect for buttons in the tool bar.
- *
+ *
* @return A border.
- *
+ *
* @see MetalBorders#getToolbarButtonBorder()
*/
protected Border createNonRolloverBorder()
{
- return MetalBorders.getToolbarButtonBorder();
+ return MetalBorders.getToolbarButtonBorder();
}
-
+
/**
* Sets the offset for the window used for dragging the toolbar.
* It is set as long as the window is not null (it has been installed).
@@ -175,23 +175,23 @@ public class MetalToolBarUI extends BasicToolBarUI
if (dragWindow != null)
dragWindow.setOffset(p);
}
-
- /**
+
+ /**
* Creates and returns an instance of MetalDockingListener.
- *
+ *
* @return an instance of MetalDockingListener.
*/
protected MouseInputListener createDockingListener()
{
return new MetalDockingListener(toolBar);
}
-
+
/**
* This is the MouseHandler class that allows the user to drag the JToolBar
* in and out of the parent and dock it if it can.
*/
protected class MetalDockingListener extends BasicToolBarUI.DockingListener
- {
+ {
/**
* Creates a new DockingListener object.
*
@@ -201,7 +201,7 @@ public class MetalToolBarUI extends BasicToolBarUI
{
super(t);
}
-
+
/**
* This method is called when the mouse is pressed in the JToolBar. If the
* press doesn't occur in a place where it causes the JToolBar to be
@@ -214,7 +214,7 @@ public class MetalToolBarUI extends BasicToolBarUI
super.mousePressed(e);
setDragOffset(new Point(e.getX(), e.getY()));
}
-
+
/**
* This method is called when the mouse is dragged. It delegates the drag
* painting to the dragTo method.
@@ -223,7 +223,7 @@ public class MetalToolBarUI extends BasicToolBarUI
*/
public void mouseDragged(MouseEvent e)
{
- // Does not do anything differently than dragging
+ // Does not do anything differently than dragging
// BasicToolBarUI.DockingListener
super.mouseDragged(e);
}
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalToolTipUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalToolTipUI.java
index 6647cc0..742ff22 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalToolTipUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalToolTipUI.java
@@ -63,38 +63,38 @@ import javax.swing.plaf.basic.BasicToolTipUI;
public class MetalToolTipUI
extends BasicToolTipUI
{
- /**
- * The amount of space between the tool tip text and the accelerator
- * description (if visible).
+ /**
+ * The amount of space between the tool tip text and the accelerator
+ * description (if visible).
*/
public static final int padSpaceBetweenStrings = 12;
/** The shared UI instance. */
private static MetalToolTipUI instance;
-
+
/** A flag controlling the visibility of the accelerator (if there is one). */
private boolean isAcceleratorHidden;
-
+
/** A string representing the accelerator key for the component. */
private String acceleratorString;
-
- /**
+
+ /**
* The delimiter for the accelerator string.
*/
private String acceleratorDelimiter;
-
+
/** The font for the accelerator string. */
private Font acceleratorFont;
-
+
/** The color for the accelerator string. */
private Color acceleratorForeground;
-
+
/** The active border. */
private Border activeBorder;
-
+
/** The inactive border. */
private Border inactiveBorder;
-
+
/**
* Constructs a new instance of MetalToolTipUI.
*/
@@ -124,21 +124,21 @@ public class MetalToolTipUI
instance = new MetalToolTipUI();
return instance;
}
-
+
/**
- * Returns a string representing the accelerator key (if there is one) for
+ * Returns a string representing the accelerator key (if there is one) for
* the component that the tool tip belongs to.
- *
+ *
* @return A string representing the accelerator key.
*/
public String getAcceleratorString()
{
- return acceleratorString;
+ return acceleratorString;
}
-
+
/**
* Installs the UI for the specified component (a {@link JToolTip}).
- *
+ *
* @param c the {@link JToolTip} component.
*/
public void installUI(JComponent c)
@@ -151,12 +151,12 @@ public class MetalToolTipUI
c.setBorder(activeBorder);
else
c.setBorder(inactiveBorder);
- }
+ }
}
-
+
/**
* Clears the defaults set in {@link #installUI(JComponent)}.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -165,7 +165,7 @@ public class MetalToolTipUI
if (c.getBorder() instanceof UIResource)
c.setBorder(null);
}
-
+
/**
* Returns true if the accelerator string is hidden, and
* false otherwise. This setting is controlled by the
@@ -177,12 +177,12 @@ public class MetalToolTipUI
{
return isAcceleratorHidden;
}
-
+
/**
* Returns the preferred size for the {@link JToolTip} component.
- *
+ *
* @param c the component (a {@link JToolTip}).
- *
+ *
* @return The preferred size.
*/
public Dimension getPreferredSize(JComponent c)
@@ -196,10 +196,10 @@ public class MetalToolTipUI
}
return d;
}
-
+
/**
* Paints the tool tip.
- *
+ *
* @param g the graphics context.
* @param c the {@link JToolTip} component.
*/
@@ -208,14 +208,14 @@ public class MetalToolTipUI
super.paint(g, c);
// Somehow paint accelerator. Keep care for possible HTML rendering.
}
-
+
/**
- * Returns a string representing the accelerator for the component, or
+ * Returns a string representing the accelerator for the component, or
* null if the component has no accelerator.
- *
+ *
* @param c the component.
- *
- * @return A string representing the accelerator (possibly
+ *
+ * @return A string representing the accelerator (possibly
* null).
*/
private String fetchAcceleratorString(JComponent c)
@@ -240,19 +240,19 @@ public class MetalToolTipUI
mne = button.getMnemonic();
}
if (mne > 0)
- ks = KeyStroke.getKeyStroke(Character.toUpperCase((char) mne),
+ ks = KeyStroke.getKeyStroke(Character.toUpperCase((char) mne),
InputEvent.ALT_MASK, false);
if (ks != null)
result = acceleratorToString(ks);
}
return result;
}
-
+
/**
* Returns a string representing an accelerator.
- *
+ *
* @param accelerator the accelerator (null not permitted).
- *
+ *
* @return A string representing an accelerator.
*/
private String acceleratorToString(KeyStroke accelerator)
@@ -262,9 +262,9 @@ public class MetalToolTipUI
int modifiers = accelerator.getModifiers();
char keyChar = accelerator.getKeyChar();
int keyCode = accelerator.getKeyCode();
-
+
if (modifiers != 0)
- modifiersText = KeyEvent.getKeyModifiersText(modifiers)
+ modifiersText = KeyEvent.getKeyModifiersText(modifiers)
+ acceleratorDelimiter;
if (keyCode == KeyEvent.VK_UNDEFINED)
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalTreeUI.java b/libjava/classpath/javax/swing/plaf/metal/MetalTreeUI.java
index ed1e5b4..bdfa2d4 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalTreeUI.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalTreeUI.java
@@ -69,7 +69,7 @@ public class MetalTreeUI extends BasicTreeUI
if (e.getPropertyName().equals(LINE_STYLE_PROPERTY))
decodeLineStyle(e.getNewValue());
}
-
+
}
/**
@@ -137,7 +137,7 @@ public class MetalTreeUI extends BasicTreeUI
{
return new MetalTreeUI();
}
-
+
/**
* The horizontal element of legs between nodes starts at the right of the
* left-hand side of the child node by default. This method makes the
@@ -150,19 +150,19 @@ public class MetalTreeUI extends BasicTreeUI
/**
* Configures the specified component appropriate for the look and feel.
- * This method is invoked when the ComponentUI instance is being installed
- * as the UI delegate on the specified component. This method should completely
+ * This method is invoked when the ComponentUI instance is being installed
+ * as the UI delegate on the specified component. This method should completely
* configure the component for the look and feel, including the following:
- * 1. Install any default property values for color, fonts, borders, icons,
+ * 1. Install any default property values for color, fonts, borders, icons,
* opacity, etc. on the component. Whenever possible, property values
* initialized by the client program should not be overridden.
* 2. Install a LayoutManager on the component if necessary.
* 3. Create/add any required sub-components to the component.
* 4. Create/install event listeners on the component.
- * 5. Create/install a PropertyChangeListener on the component in order
+ * 5. Create/install a PropertyChangeListener on the component in order
* to detect and respond to component property changes appropriately.
* 6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
- * 7. Initialize any appropriate instance data.
+ * 7. Initialize any appropriate instance data.
*/
public void installUI(JComponent c)
{
@@ -174,21 +174,21 @@ public class MetalTreeUI extends BasicTreeUI
lineStyleListener = new LineStyleListener();
c.addPropertyChangeListener(lineStyleListener);
}
-
+
/**
- * Reverses configuration which was done on the specified component during
- * installUI. This method is invoked when this UIComponent instance is being
- * removed as the UI delegate for the specified component. This method should
- * undo the configuration performed in installUI, being careful to leave the
- * JComponent instance in a clean state (no extraneous listeners,
- * look-and-feel-specific property objects, etc.). This should include
+ * Reverses configuration which was done on the specified component during
+ * installUI. This method is invoked when this UIComponent instance is being
+ * removed as the UI delegate for the specified component. This method should
+ * undo the configuration performed in installUI, being careful to leave the
+ * JComponent instance in a clean state (no extraneous listeners,
+ * look-and-feel-specific property objects, etc.). This should include
* the following:
* 1. Remove any UI-set borders from the component.
* 2. Remove any UI-set layout managers on the component.
* 3. Remove any UI-added sub-components from the component.
* 4. Remove any UI-added event/property listeners from the component.
* 5. Remove any UI-installed keyboard UI from the component.
- * 6. Nullify any allocated instance data objects to allow for GC.
+ * 6. Nullify any allocated instance data objects to allow for GC.
*/
public void uninstallUI(JComponent c)
{
@@ -197,13 +197,13 @@ public class MetalTreeUI extends BasicTreeUI
c.removePropertyChangeListener(lineStyleListener);
lineStyleListener = null;
}
-
+
/**
* This function converts between the string passed into the client
* property and the internal representation (currently an int).
- *
+ *
* @param lineStyleFlag - String representation
- */
+ */
protected void decodeLineStyle(Object lineStyleFlag)
{
if (lineStyleFlag == null || lineStyleFlag.equals(LINE_STYLE_VALUE_ANGLED))
@@ -218,7 +218,7 @@ public class MetalTreeUI extends BasicTreeUI
/**
* Checks if the location is in expand control.
- *
+ *
* @param row - current row
* @param rowLevel - current level
* @param mouseX - current x location of the mouse click
@@ -227,33 +227,33 @@ public class MetalTreeUI extends BasicTreeUI
protected boolean isLocationInExpandControl(int row, int rowLevel,
int mouseX, int mouseY)
{
- return super.isLocationInExpandControl(tree.getPathForRow(row),
+ return super.isLocationInExpandControl(tree.getPathForRow(row),
mouseX, mouseY);
}
-
+
/**
- * Paints the specified component appropriate for the look and feel.
- * This method is invoked from the ComponentUI.update method when the
- * specified component is being painted. Subclasses should override this
- * method and use the specified Graphics object to render the content of
+ * Paints the specified component appropriate for the look and feel.
+ * This method is invoked from the ComponentUI.update method when the
+ * specified component is being painted. Subclasses should override this
+ * method and use the specified Graphics object to render the content of
* the component.
- *
+ *
* @param g - the current graphics configuration.
* @param c - the current component to draw
*/
public void paint(Graphics g, JComponent c)
{
// Calls BasicTreeUI's paint since it takes care of painting all
- // types of icons.
+ // types of icons.
super.paint(g, c);
if (lineStyle == LINE_STYLE_HORIZONTAL)
paintHorizontalSeparators(g, c);
}
-
+
/**
* Paints the horizontal separators.
- *
+ *
* @param g - the current graphics configuration.
* @param c - the current component to draw
*/
@@ -282,14 +282,14 @@ public class MetalTreeUI extends BasicTreeUI
}
}
-
+
/**
- * Paints the vertical part of the leg. The receiver should NOT modify
+ * Paints the vertical part of the leg. The receiver should NOT modify
* clipBounds, insets.
- *
+ *
* @param g - the current graphics configuration.
* @param clipBounds -
- * @param insets -
+ * @param insets -
* @param path - the current path
*/
protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds,
@@ -311,7 +311,7 @@ public class MetalTreeUI extends BasicTreeUI
boolean isLeaf)
{
if (lineStyle == LINE_STYLE_ANGLED)
- super.paintHorizontalPartOfLeg(g, clipBounds, insets, bounds, path, row,
+ super.paintHorizontalPartOfLeg(g, clipBounds, insets, bounds, path, row,
isExpanded, hasBeenExpanded, isLeaf);
}
}
diff --git a/libjava/classpath/javax/swing/plaf/metal/MetalUtils.java b/libjava/classpath/javax/swing/plaf/metal/MetalUtils.java
index 0c3a38d..247f922 100644
--- a/libjava/classpath/javax/swing/plaf/metal/MetalUtils.java
+++ b/libjava/classpath/javax/swing/plaf/metal/MetalUtils.java
@@ -180,7 +180,7 @@ class MetalUtils
{
paintGradient(g, x, y, w, h, dir, uiProp, null);
}
-
+
/**
* Paints the typical Metal gradient. See {@link #paintGradient(Graphics,
* int, int, int, int, float, float, Color, Color, Color, int, int[][])}
@@ -216,14 +216,14 @@ class MetalUtils
/**
* Paints the typical Metal gradient. The gradient is painted as follows:
*
- *
+ *
* There are 4 distinct areas in this gradient:
*
*
A gradient from color 1 to color 2 with the relative width specified
@@ -306,7 +306,7 @@ class MetalUtils
float g1, float g2, Color c1, Color c2,
Color c3, int[][] mask)
{
-
+
if (g instanceof Graphics2D
&& SystemProperties.getProperty("gnu.javax.swing.noGraphics2D") == null)
{
diff --git a/libjava/classpath/javax/swing/plaf/metal/OceanTheme.java b/libjava/classpath/javax/swing/plaf/metal/OceanTheme.java
index 1ea0bc2..6a6a3f5 100644
--- a/libjava/classpath/javax/swing/plaf/metal/OceanTheme.java
+++ b/libjava/classpath/javax/swing/plaf/metal/OceanTheme.java
@@ -130,19 +130,19 @@ public class OceanTheme extends DefaultMetalTheme
/**
* Returns the OceanTheme's color for disabled menu foreground,
- *
+ *
*/
public ColorUIResource getMenuDisabledForeground()
{
return INACTIVE_CONTROL_TEXT;
}
-
+
/**
* Returns the OceanTheme's color for black, the RGB value
* (51, 51, 51).
*
- * @return Returns the OceanTheme's value for black
+ * @return Returns the OceanTheme's value for black
*/
protected ColorUIResource getBlack()
{
@@ -157,7 +157,7 @@ public class OceanTheme extends DefaultMetalTheme
{
return PRIMARY1;
}
-
+
/**
* Return the OceanTheme's value for primary 2, the RGB value
* (163, 184, 204).
@@ -166,7 +166,7 @@ public class OceanTheme extends DefaultMetalTheme
{
return PRIMARY2;
}
-
+
/**
* Return the OceanTheme's value for primary 1, the RGB value
* (184, 207, 229).
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiButtonUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiButtonUI.java
index ac2a5fa..044f651 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiButtonUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiButtonUI.java
@@ -53,32 +53,32 @@ import javax.swing.plaf.ComponentUI;
* A UI delegate that that coordinates multiple {@link ButtonUI} instances, one
* from the primary look and feel, and one or more from the auxiliary look and
* feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiButtonUI extends ButtonUI
+public class MultiButtonUI extends ButtonUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiButtonUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiButtonUI()
+ public MultiButtonUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiButtonUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiButtonUI extends ButtonUI
MultiButtonUI mui = new MultiButtonUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiButtonUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiButtonUI extends ButtonUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiButtonUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiButtonUI extends ButtonUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiButtonUI. The first item in the array is always
+ * MultiButtonUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiButtonUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiButtonUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiButtonUI extends ButtonUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiButtonUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiButtonUI extends ButtonUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiButtonUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiButtonUI extends ButtonUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiButtonUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiButtonUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiButtonUI extends ButtonUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiButtonUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiButtonUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiButtonUI extends ButtonUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiButtonUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiButtonUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiButtonUI extends ButtonUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiButtonUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiButtonUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiButtonUI extends ButtonUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiButtonUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiButtonUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiButtonUI extends ButtonUI
}
return result;
}
-
-}
\ No newline at end of file
+
+}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiColorChooserUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiColorChooserUI.java
index 8adb950..1a96849 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiColorChooserUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiColorChooserUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ColorChooserUI;
import javax.swing.plaf.ComponentUI;
/**
- * A UI delegate that that coordinates multiple {@link ColorChooserUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ColorChooserUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiColorChooserUI extends ColorChooserUI
+public class MultiColorChooserUI extends ColorChooserUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiColorChooserUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiColorChooserUI()
+ public MultiColorChooserUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
- * look and feels support this component, a MultiColorChooserUI
+ * Creates a delegate object for the specified component. If any auxiliary
+ * look and feels support this component, a MultiColorChooserUI
* is returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiColorChooserUI extends ColorChooserUI
MultiColorChooserUI mui = new MultiColorChooserUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiColorChooserUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiColorChooserUI extends ColorChooserUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiColorChooserUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiColorChooserUI extends ColorChooserUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiColorChooserUI. The first item in the array is always
+ * MultiColorChooserUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiColorChooserUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiColorChooserUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiColorChooserUI extends ColorChooserUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiColorChooserUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiColorChooserUI extends ColorChooserUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiColorChooserUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiColorChooserUI extends ColorChooserUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiColorChooserUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiColorChooserUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiColorChooserUI extends ColorChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiColorChooserUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiColorChooserUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiColorChooserUI extends ColorChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiColorChooserUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiColorChooserUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiColorChooserUI extends ColorChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiColorChooserUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiColorChooserUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiColorChooserUI extends ColorChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiColorChooserUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiColorChooserUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiColorChooserUI extends ColorChooserUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiComboBoxUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiComboBoxUI.java
index 33b4321..f169873 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiComboBoxUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiComboBoxUI.java
@@ -51,35 +51,35 @@ import javax.swing.plaf.ComboBoxUI;
import javax.swing.plaf.ComponentUI;
/**
- * A UI delegate that that coordinates multiple {@link ComboBoxUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ComboBoxUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiComboBoxUI extends ComboBoxUI
+public class MultiComboBoxUI extends ComboBoxUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiComboBoxUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiComboBoxUI()
+ public MultiComboBoxUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
- * look and feels support this component, a MultiComboBoxUI
+ * Creates a delegate object for the specified component. If any auxiliary
+ * look and feels support this component, a MultiComboBoxUI
* is returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -87,11 +87,11 @@ public class MultiComboBoxUI extends ComboBoxUI
MultiComboBoxUI mui = new MultiComboBoxUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiComboBoxUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -105,9 +105,9 @@ public class MultiComboBoxUI extends ComboBoxUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiComboBoxUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -119,39 +119,39 @@ public class MultiComboBoxUI extends ComboBoxUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiComboBoxUI. The first item in the array is always
+ * MultiComboBoxUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiComboBoxUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiComboBoxUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -164,11 +164,11 @@ public class MultiComboBoxUI extends ComboBoxUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiComboBoxUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -183,9 +183,9 @@ public class MultiComboBoxUI extends ComboBoxUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiComboBoxUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -198,24 +198,24 @@ public class MultiComboBoxUI extends ComboBoxUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiComboBoxUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiComboBoxUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,25 +227,25 @@ public class MultiComboBoxUI extends ComboBoxUI
/* Dimension ignored = */ ui.getPreferredSize(c);
}
return result;
- }
-
+ }
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiComboBoxUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiComboBoxUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -258,24 +258,24 @@ public class MultiComboBoxUI extends ComboBoxUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiComboBoxUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiComboBoxUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -288,24 +288,24 @@ public class MultiComboBoxUI extends ComboBoxUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiComboBoxUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiComboBoxUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -318,25 +318,25 @@ public class MultiComboBoxUI extends ComboBoxUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiComboBoxUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiComboBoxUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -349,15 +349,15 @@ public class MultiComboBoxUI extends ComboBoxUI
}
return result;
}
-
+
/**
- * Calls the {@link ComboBoxUI#setPopupVisible(JComboBox, boolean)} method
+ * Calls the {@link ComboBoxUI#setPopupVisible(JComboBox, boolean)} method
* for all the UI delegates managed by this MultiComboBoxUI.
- *
+ *
* @param c the component.
* @param visible the visible state.
*/
- public void setPopupVisible(JComboBox c, boolean visible)
+ public void setPopupVisible(JComboBox c, boolean visible)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -368,21 +368,21 @@ public class MultiComboBoxUI extends ComboBoxUI
}
/**
- * Calls the {@link ComboBoxUI#isPopupVisible(JComboBox)} method for all
- * the UI delegates managed by this MultiComboBoxUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComboBoxUI#isPopupVisible(JComboBox)} method for all
+ * the UI delegates managed by this MultiComboBoxUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The result for the UI delegate from the primary look and feel.
+ *
+ * @return The result for the UI delegate from the primary look and feel.
*/
- public boolean isPopupVisible(JComboBox c)
+ public boolean isPopupVisible(JComboBox c)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComboBoxUI ui = (ComboBoxUI) iterator.next();
result = ui.isPopupVisible(c);
@@ -397,23 +397,23 @@ public class MultiComboBoxUI extends ComboBoxUI
}
/**
- * Calls the {@link ComboBoxUI#isFocusTraversable(JComboBox)} method for all
- * the UI delegates managed by this MultiComboBoxUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComboBoxUI#isFocusTraversable(JComboBox)} method for all
+ * the UI delegates managed by this MultiComboBoxUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
+ *
* @return true if the combo box is traversable according to the
- * UI delegate in the primary look and feel, and false
- * otherwise.
+ * UI delegate in the primary look and feel, and false
+ * otherwise.
*/
- public boolean isFocusTraversable(JComboBox c)
+ public boolean isFocusTraversable(JComboBox c)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComboBoxUI ui = (ComboBoxUI) iterator.next();
result = ui.isFocusTraversable(c);
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiDesktopIconUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiDesktopIconUI.java
index 186ce32..091566e 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiDesktopIconUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiDesktopIconUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.DesktopIconUI;
/**
- * A UI delegate that that coordinates multiple {@link DesktopIconUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link DesktopIconUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiDesktopIconUI extends DesktopIconUI
+public class MultiDesktopIconUI extends DesktopIconUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiDesktopIconUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiDesktopIconUI()
+ public MultiDesktopIconUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiDesktopIconUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiDesktopIconUI extends DesktopIconUI
MultiDesktopIconUI mui = new MultiDesktopIconUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiDesktopIconUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiDesktopIconUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiDesktopIconUI extends DesktopIconUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiDesktopIconUI. The first item in the array is always
+ * MultiDesktopIconUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiDesktopIconUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiDesktopIconUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiDesktopIconUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiDesktopIconUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiDesktopIconUI extends DesktopIconUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiDesktopIconUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiDesktopIconUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -226,25 +226,25 @@ public class MultiDesktopIconUI extends DesktopIconUI
/* Dimension ignored = */ ui.getPreferredSize(c);
}
return result;
- }
-
+ }
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiDesktopIconUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiDesktopIconUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiDesktopIconUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiDesktopIconUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiDesktopIconUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiDesktopIconUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiDesktopIconUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiDesktopIconUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiDesktopIconUI extends DesktopIconUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiDesktopPaneUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiDesktopPaneUI.java
index d48fb2b..fb62257 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiDesktopPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiDesktopPaneUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.DesktopPaneUI;
/**
- * A UI delegate that that coordinates multiple {@link DesktopPaneUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link DesktopPaneUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiDesktopPaneUI extends DesktopPaneUI
+public class MultiDesktopPaneUI extends DesktopPaneUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiDesktopPaneUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiDesktopPaneUI()
+ public MultiDesktopPaneUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiDesktopPaneUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
MultiDesktopPaneUI mui = new MultiDesktopPaneUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiDesktopPaneUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiDesktopPaneUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiDesktopPaneUI. The first item in the array is always
+ * MultiDesktopPaneUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiDesktopPaneUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiDesktopPaneUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiDesktopPaneUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiDesktopPaneUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiDesktopPaneUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiDesktopPaneUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiDesktopPaneUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiDesktopPaneUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiDesktopPaneUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiDesktopPaneUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiDesktopPaneUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiDesktopPaneUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiDesktopPaneUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiDesktopPaneUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiDesktopPaneUI extends DesktopPaneUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiFileChooserUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiFileChooserUI.java
index 719f043..2ab8841 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiFileChooserUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiFileChooserUI.java
@@ -54,35 +54,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.FileChooserUI;
/**
- * A UI delegate that that coordinates multiple {@link FileChooserUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link FileChooserUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiFileChooserUI extends FileChooserUI
+public class MultiFileChooserUI extends FileChooserUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiFileChooserUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiFileChooserUI()
+ public MultiFileChooserUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiFileChooserUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -90,11 +90,11 @@ public class MultiFileChooserUI extends FileChooserUI
MultiFileChooserUI mui = new MultiFileChooserUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiFileChooserUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -108,9 +108,9 @@ public class MultiFileChooserUI extends FileChooserUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiFileChooserUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -122,39 +122,39 @@ public class MultiFileChooserUI extends FileChooserUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiFileChooserUI. The first item in the array is always
+ * MultiFileChooserUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiFileChooserUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiFileChooserUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -167,11 +167,11 @@ public class MultiFileChooserUI extends FileChooserUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiFileChooserUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -186,9 +186,9 @@ public class MultiFileChooserUI extends FileChooserUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiFileChooserUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -201,24 +201,24 @@ public class MultiFileChooserUI extends FileChooserUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiFileChooserUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiFileChooserUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -231,24 +231,24 @@ public class MultiFileChooserUI extends FileChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiFileChooserUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiFileChooserUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -261,24 +261,24 @@ public class MultiFileChooserUI extends FileChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiFileChooserUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiFileChooserUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -291,24 +291,24 @@ public class MultiFileChooserUI extends FileChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiFileChooserUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiFileChooserUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -321,25 +321,25 @@ public class MultiFileChooserUI extends FileChooserUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiFileChooserUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiFileChooserUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -352,24 +352,24 @@ public class MultiFileChooserUI extends FileChooserUI
}
return result;
}
-
+
/**
* Calls the {@link FileChooserUI#getAcceptAllFileFilter(JFileChooser)} method
- * for all the UI delegates managed by this MultiFileChooserUI,
- * returning the filter for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiFileChooserUI,
+ * returning the filter for the UI delegate from the primary look and
+ * feel.
+ *
* @param chooser the file chooser.
- *
- * @return The filter returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The filter returned by the UI delegate from the primary
+ * look and feel.
*/
- public FileFilter getAcceptAllFileFilter(JFileChooser chooser)
+ public FileFilter getAcceptAllFileFilter(JFileChooser chooser)
{
FileFilter result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
FileChooserUI ui = (FileChooserUI) iterator.next();
result = ui.getAcceptAllFileFilter(chooser);
@@ -385,21 +385,21 @@ public class MultiFileChooserUI extends FileChooserUI
/**
* Calls the {@link FileChooserUI#getFileView(JFileChooser)} method
- * for all the UI delegates managed by this MultiFileChooserUI,
- * returning the view for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiFileChooserUI,
+ * returning the view for the UI delegate from the primary look and
+ * feel.
+ *
* @param chooser the file chooser.
- *
- * @return The view returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The view returned by the UI delegate from the primary
+ * look and feel.
*/
- public FileView getFileView(JFileChooser chooser)
+ public FileView getFileView(JFileChooser chooser)
{
FileView result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
FileChooserUI ui = (FileChooserUI) iterator.next();
result = ui.getFileView(chooser);
@@ -415,21 +415,21 @@ public class MultiFileChooserUI extends FileChooserUI
/**
* Calls the {@link FileChooserUI#getApproveButtonText(JFileChooser)} method
- * for all the UI delegates managed by this MultiFileChooserUI,
- * returning the text for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiFileChooserUI,
+ * returning the text for the UI delegate from the primary look and
+ * feel.
+ *
* @param chooser the file chooser.
- *
- * @return The text returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The text returned by the UI delegate from the primary
+ * look and feel.
*/
- public String getApproveButtonText(JFileChooser chooser)
+ public String getApproveButtonText(JFileChooser chooser)
{
String result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
FileChooserUI ui = (FileChooserUI) iterator.next();
result = ui.getApproveButtonText(chooser);
@@ -445,21 +445,21 @@ public class MultiFileChooserUI extends FileChooserUI
/**
* Calls the {@link FileChooserUI#getDialogTitle(JFileChooser)} method
- * for all the UI delegates managed by this MultiFileChooserUI,
- * returning the title for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiFileChooserUI,
+ * returning the title for the UI delegate from the primary look and
+ * feel.
+ *
* @param chooser the file chooser.
- *
- * @return The title returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The title returned by the UI delegate from the primary
+ * look and feel.
*/
- public String getDialogTitle(JFileChooser chooser)
+ public String getDialogTitle(JFileChooser chooser)
{
String result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
FileChooserUI ui = (FileChooserUI) iterator.next();
result = ui.getDialogTitle(chooser);
@@ -474,13 +474,13 @@ public class MultiFileChooserUI extends FileChooserUI
}
/**
- * Calls the {@link FileChooserUI#rescanCurrentDirectory(JFileChooser)}
- * method for all the UI delegates managed by this
+ * Calls the {@link FileChooserUI#rescanCurrentDirectory(JFileChooser)}
+ * method for all the UI delegates managed by this
* MultiFileChooserUI.
- *
+ *
* @param chooser the file chooser.
*/
- public void rescanCurrentDirectory(JFileChooser chooser)
+ public void rescanCurrentDirectory(JFileChooser chooser)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -491,14 +491,14 @@ public class MultiFileChooserUI extends FileChooserUI
}
/**
- * Calls the {@link FileChooserUI#ensureFileIsVisible(JFileChooser, File)}
- * method for all the UI delegates managed by this
+ * Calls the {@link FileChooserUI#ensureFileIsVisible(JFileChooser, File)}
+ * method for all the UI delegates managed by this
* MultiFileChooserUI.
- *
+ *
* @param chooser the file chooser.
* @param file the file.
*/
- public void ensureFileIsVisible(JFileChooser chooser, File file)
+ public void ensureFileIsVisible(JFileChooser chooser, File file)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiInternalFrameUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiInternalFrameUI.java
index 01d1df6..37b2ee3 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiInternalFrameUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiInternalFrameUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.InternalFrameUI;
/**
- * A UI delegate that that coordinates multiple {@link InternalFrameUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link InternalFrameUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiInternalFrameUI extends InternalFrameUI
+public class MultiInternalFrameUI extends InternalFrameUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiInternalFrameUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiInternalFrameUI()
+ public MultiInternalFrameUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
- * look and feels support this component, a MultiInternalFrameUI
+ * Creates a delegate object for the specified component. If any auxiliary
+ * look and feels support this component, a MultiInternalFrameUI
* is returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,12 +86,12 @@ public class MultiInternalFrameUI extends InternalFrameUI
MultiInternalFrameUI mui = new MultiInternalFrameUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
-
+
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiInternalFrameUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -105,9 +105,9 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiInternalFrameUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -119,39 +119,39 @@ public class MultiInternalFrameUI extends InternalFrameUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiInternalFrameUI. The first item in the array is always
+ * MultiInternalFrameUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiInternalFrameUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiInternalFrameUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -164,11 +164,11 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiInternalFrameUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -183,9 +183,9 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiInternalFrameUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -198,24 +198,24 @@ public class MultiInternalFrameUI extends InternalFrameUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiInternalFrameUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiInternalFrameUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -228,24 +228,24 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiInternalFrameUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiInternalFrameUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -258,24 +258,24 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiInternalFrameUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiInternalFrameUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -288,24 +288,24 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiInternalFrameUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiInternalFrameUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -318,25 +318,25 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiInternalFrameUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiInternalFrameUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -349,5 +349,5 @@ public class MultiInternalFrameUI extends InternalFrameUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiLabelUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiLabelUI.java
index ba5b9d4..2f0e7d0 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiLabelUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiLabelUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.LabelUI;
/**
- * A UI delegate that that coordinates multiple {@link LabelUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link LabelUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiLabelUI extends LabelUI
+public class MultiLabelUI extends LabelUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiLabelUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiLabelUI()
+ public MultiLabelUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiLabelUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiLabelUI extends LabelUI
MultiLabelUI mui = new MultiLabelUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiLabelUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiLabelUI extends LabelUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiLabelUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiLabelUI extends LabelUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiLabelUI. The first item in the array is always
+ * MultiLabelUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiLabelUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiLabelUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiLabelUI extends LabelUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiLabelUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiLabelUI extends LabelUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiLabelUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiLabelUI extends LabelUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiLabelUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiLabelUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiLabelUI extends LabelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiLabelUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiLabelUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiLabelUI extends LabelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiLabelUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiLabelUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiLabelUI extends LabelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiLabelUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiLabelUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiLabelUI extends LabelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiLabelUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiLabelUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiLabelUI extends LabelUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiListUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiListUI.java
index 78c2241..d6b77f5 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiListUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiListUI.java
@@ -53,35 +53,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ListUI;
/**
- * A UI delegate that that coordinates multiple {@link ListUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ListUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiListUI extends ListUI
+public class MultiListUI extends ListUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiListUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiListUI()
+ public MultiListUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiListUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -89,11 +89,11 @@ public class MultiListUI extends ListUI
MultiListUI mui = new MultiListUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiListUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -107,9 +107,9 @@ public class MultiListUI extends ListUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiListUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -121,39 +121,39 @@ public class MultiListUI extends ListUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiListUI. The first item in the array is always
+ * MultiListUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiListUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiListUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -166,11 +166,11 @@ public class MultiListUI extends ListUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiListUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -185,9 +185,9 @@ public class MultiListUI extends ListUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiListUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -200,24 +200,24 @@ public class MultiListUI extends ListUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiListUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiListUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -230,24 +230,24 @@ public class MultiListUI extends ListUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiListUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiListUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -260,24 +260,24 @@ public class MultiListUI extends ListUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiListUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiListUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -290,24 +290,24 @@ public class MultiListUI extends ListUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiListUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiListUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -320,25 +320,25 @@ public class MultiListUI extends ListUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiListUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiListUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -351,25 +351,25 @@ public class MultiListUI extends ListUI
}
return result;
}
-
+
/**
* Calls the {@link ListUI#locationToIndex(JList, Point)} method for all
- * the UI delegates managed by this MultiListUI,
- * returning the index for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiListUI,
+ * returning the index for the UI delegate from the primary look and
+ * feel.
+ *
* @param list the list.
* @param location the location.
- *
- * @return The index returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The index returned by the UI delegate from the primary
+ * look and feel.
*/
- public int locationToIndex(JList list, Point location)
+ public int locationToIndex(JList list, Point location)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ListUI ui = (ListUI) iterator.next();
result = ui.locationToIndex(list, location);
@@ -385,22 +385,22 @@ public class MultiListUI extends ListUI
/**
* Calls the {@link ListUI#indexToLocation(JList, int)} method for all
- * the UI delegates managed by this MultiListUI,
- * returning the location for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiListUI,
+ * returning the location for the UI delegate from the primary look and
+ * feel.
+ *
* @param list the list.
* @param index the index.
- *
- * @return The location returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The location returned by the UI delegate from the primary
+ * look and feel.
*/
- public Point indexToLocation(JList list, int index)
+ public Point indexToLocation(JList list, int index)
{
Point result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ListUI ui = (ListUI) iterator.next();
result = ui.indexToLocation(list, index);
@@ -416,23 +416,23 @@ public class MultiListUI extends ListUI
/**
* Calls the {@link ListUI#getCellBounds(JList, int, int)} method for all
- * the UI delegates managed by this MultiListUI,
- * returning the bounds for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiListUI,
+ * returning the bounds for the UI delegate from the primary look and
+ * feel.
+ *
* @param list the list.
* @param index1 the first index.
* @param index2 the second index.
- *
- * @return The bounds returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The bounds returned by the UI delegate from the primary
+ * look and feel.
*/
- public Rectangle getCellBounds(JList list, int index1, int index2)
+ public Rectangle getCellBounds(JList list, int index1, int index2)
{
Rectangle result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ListUI ui = (ListUI) iterator.next();
result = ui.getCellBounds(list, index1, index2);
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiLookAndFeel.java b/libjava/classpath/javax/swing/plaf/multi/MultiLookAndFeel.java
index 1235165..4e81fd0 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiLookAndFeel.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiLookAndFeel.java
@@ -49,7 +49,7 @@ import javax.swing.plaf.ComponentUI;
* A look and feel that provides the ability to use auxiliary look and feels
* in addition to the primary look and feel.
*/
-public class MultiLookAndFeel extends LookAndFeel
+public class MultiLookAndFeel extends LookAndFeel
{
/**
@@ -59,62 +59,62 @@ public class MultiLookAndFeel extends LookAndFeel
{
// Nothing to do here.
}
-
+
/**
* Returns the name for the look and feel.
- *
+ *
* @return "Multiplexing Look and Feel".
*/
public String getName()
{
return "Multiplexing Look and Feel";
}
-
+
/**
* Returns an identifier for the look and feel.
- *
+ *
* @return "Multiplex".
*/
public String getID()
{
- return "Multiplex";
+ return "Multiplex";
}
-
+
/**
* Returns a description of the look and feel.
- *
+ *
* @return A description of the look and feel.
*/
public String getDescription()
{
- return "Allows multiple UI instances per component instance";
+ return "Allows multiple UI instances per component instance";
}
-
+
/**
- * Returns false to indicate that this look and feel is not
+ * Returns false to indicate that this look and feel is not
* native to any platform.
- *
+ *
* @return false.
*/
public boolean isNativeLookAndFeel()
{
- return false;
+ return false;
}
/**
* Returns true always, since this look and feel is supported on
* all platforms.
- *
+ *
* @return true.
*/
public boolean isSupportedLookAndFeel()
{
return true;
}
-
+
/**
* Creates and returns the UI defaults for this look and feel.
- *
+ *
* @return The UI defaults.
*/
public UIDefaults getDefaults()
@@ -123,7 +123,7 @@ public class MultiLookAndFeel extends LookAndFeel
defaults.put("ButtonUI", "javax.swing.plaf.multi.MultiButtonUI");
defaults.put("CheckBoxUI", "javax.swing.plaf.multi.MultiButtonUI");
defaults.put("CheckBoxMenuItemUI", "javax.swing.plaf.multi.MultiMenuItemUI");
- defaults.put("ColorChooserUI",
+ defaults.put("ColorChooserUI",
"javax.swing.plaf.multi.MultiColorChooserUI");
defaults.put("ComboBoxUI", "javax.swing.plaf.multi.MultiComboBoxUI");
defaults.put("DesktopPaneUI", "javax.swing.plaf.multi.MultiDesktopPaneUI");
@@ -131,7 +131,7 @@ public class MultiLookAndFeel extends LookAndFeel
defaults.put("EditorPaneUI", "javax.swing.plaf.multi.MultiTextUI");
defaults.put("FileChooserUI", "javax.swing.plaf.multi.MultiFileChooserUI");
defaults.put("FormattedTextFieldUI", "javax.swing.plaf.multi.MultiTextUI");
- defaults.put("InternalFrameUI",
+ defaults.put("InternalFrameUI",
"javax.swing.plaf.multi.MultiInternalFrameUI");
defaults.put("LabelUI", "javax.swing.plaf.multi.MultiLabelUI");
defaults.put("ListUI", "javax.swing.plaf.multi.MultiListUI");
@@ -142,11 +142,11 @@ public class MultiLookAndFeel extends LookAndFeel
defaults.put("PanelUI", "javax.swing.plaf.multi.MultiPanelUI");
defaults.put("PasswordFieldUI", "javax.swing.plaf.multi.MultiTextUI");
defaults.put("PopupMenuUI", "javax.swing.plaf.multi.MultiPopupMenuUI");
- defaults.put("PopupMenuSeparatorUI",
+ defaults.put("PopupMenuSeparatorUI",
"javax.swing.plaf.multi.MultiSeparatorUI");
defaults.put("ProgressBarUI", "javax.swing.plaf.multi.MultiProgressBarUI");
defaults.put("RadioButtonUI", "javax.swing.plaf.multi.MultiButtonUI");
- defaults.put("RadioButtonMenuItemUI",
+ defaults.put("RadioButtonMenuItemUI",
"javax.swing.plaf.multi.MultiMenuItemUI");
defaults.put("RootPaneUI", "javax.swing.plaf.multi.MultiRootPaneUI");
defaults.put("ScrollBarUI", "javax.swing.plaf.multi.MultiScrollBarUI");
@@ -162,43 +162,43 @@ public class MultiLookAndFeel extends LookAndFeel
defaults.put("TextFieldUI", "javax.swing.plaf.multi.MultiTextUI");
defaults.put("TextPaneUI", "javax.swing.plaf.multi.MultiTextUI");
defaults.put("ToggleButtonUI", "javax.swing.plaf.multi.MultiButtonUI");
- defaults.put("ToolBarSeparatorUI",
+ defaults.put("ToolBarSeparatorUI",
"javax.swing.plaf.multi.MultiSeparatorUI");
defaults.put("ToolBarUI", "javax.swing.plaf.multi.MultiToolBarUI");
defaults.put("ToolTipUI", "javax.swing.plaf.multi.MultiToolTipUI");
defaults.put("ViewportUI", "javax.swing.plaf.multi.MultiViewportUI");
return defaults;
}
-
+
/**
* Creates the UI delegates for the target component and
* returns a multiplexing UI delegate (mui) if there are
* multiple delegates.
- *
+ *
* @param mui a multiplexing UI delegate appropriate for the component.
* @param uis a vector into which the UI delegates will be added.
* @param target the target component.
- *
+ *
* @return A UI delegate.
*/
- public static ComponentUI createUIs(ComponentUI mui, Vector uis,
+ public static ComponentUI createUIs(ComponentUI mui, Vector uis,
JComponent target)
{
// get primary UI delegate for 'target', and add it to uis
ComponentUI ui = null;
LookAndFeel primary = UIManager.getLookAndFeel();
- if (primary != null)
+ if (primary != null)
{
ui = UIManager.getUI(target);
uis.add(ui);
}
- // for any auxiliary look and feels in use, get the UI delegate and add
+ // for any auxiliary look and feels in use, get the UI delegate and add
// it to uis
LookAndFeel[] auxlafs = UIManager.getAuxiliaryLookAndFeels();
for (int i = 0; i < auxlafs.length; i++)
{
LookAndFeel auxlaf = auxlafs[i];
- // FIXME: here I call getDefaults() to get the UI delegate from the
+ // FIXME: here I call getDefaults() to get the UI delegate from the
// auxiliary look and feel. But getDefaults() creates a new set of
// defaults every time it is called, which is wasteful. Unfortunately
// I cannot find another way to get the UI delegate, so I'm doing it
@@ -208,36 +208,36 @@ public class MultiLookAndFeel extends LookAndFeel
if (ui != null)
uis.add(ui);
}
- // if uis contains more than 1 delegate, return mui, otherwise return
+ // if uis contains more than 1 delegate, return mui, otherwise return
// the primary delegate
if (uis.size() > 1)
return mui;
else
- return ui;
+ return ui;
}
-
+
/**
* Returns an array containing the same {@link ComponentUI} instances as
* uis. If uis is null, a zero-length
* array is returned.
- *
- * @param uis a list of {@link ComponentUI} references (null
+ *
+ * @param uis a list of {@link ComponentUI} references (null
* permitted).
- *
+ *
* @return An array containing the same {@link ComponentUI} instances as
* uis, or null if uis is
- * empty.
+ * empty.
*/
protected static ComponentUI[] uisToArray(Vector uis)
{
- if (uis == null)
+ if (uis == null)
return new ComponentUI[0];
int size = uis.size();
- if (size == 0)
+ if (size == 0)
return null;
ComponentUI[] result = new ComponentUI[size];
uis.copyInto(result);
- return result;
+ return result;
}
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiMenuBarUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiMenuBarUI.java
index a8e805a..5b43f6b 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiMenuBarUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiMenuBarUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.MenuBarUI;
/**
- * A UI delegate that that coordinates multiple {@link MenuBarUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link MenuBarUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiMenuBarUI extends MenuBarUI
+public class MultiMenuBarUI extends MenuBarUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiMenuBarUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiMenuBarUI()
+ public MultiMenuBarUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiMenuBarUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiMenuBarUI extends MenuBarUI
MultiMenuBarUI mui = new MultiMenuBarUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiMenuBarUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiMenuBarUI extends MenuBarUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiMenuBarUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiMenuBarUI extends MenuBarUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiMenuBarUI. The first item in the array is always
+ * MultiMenuBarUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiMenuBarUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiMenuBarUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiMenuBarUI extends MenuBarUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiMenuBarUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiMenuBarUI extends MenuBarUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiMenuBarUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiMenuBarUI extends MenuBarUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiMenuBarUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiMenuBarUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiMenuBarUI extends MenuBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiMenuBarUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiMenuBarUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiMenuBarUI extends MenuBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiMenuBarUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiMenuBarUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiMenuBarUI extends MenuBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiMenuBarUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiMenuBarUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiMenuBarUI extends MenuBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiMenuBarUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiMenuBarUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiMenuBarUI extends MenuBarUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiMenuItemUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiMenuItemUI.java
index ccab5fe..6d361b0 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiMenuItemUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiMenuItemUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.MenuItemUI;
/**
- * A UI delegate that that coordinates multiple {@link MenuItemUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link MenuItemUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiMenuItemUI extends MenuItemUI
+public class MultiMenuItemUI extends MenuItemUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiMenuItemUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiMenuItemUI()
+ public MultiMenuItemUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiItemUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiMenuItemUI extends MenuItemUI
MultiMenuItemUI mui = new MultiMenuItemUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiMenuItemUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiMenuItemUI extends MenuItemUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiMenuItemUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiMenuItemUI extends MenuItemUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiMenuItemUI. The first item in the array is always
+ * MultiMenuItemUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiMenuItemUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiMenuItemUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiMenuItemUI extends MenuItemUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiMenuItemUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiMenuItemUI extends MenuItemUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiMenuItemUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiMenuItemUI extends MenuItemUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiMenuItemUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiMenuItemUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiMenuItemUI extends MenuItemUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiMenuItemUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiMenuItemUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiMenuItemUI extends MenuItemUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiMenuItemUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiMenuItemUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiMenuItemUI extends MenuItemUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiMenuItemUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiMenuItemUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiMenuItemUI extends MenuItemUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiMenuItemUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiMenuItemUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiMenuItemUI extends MenuItemUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiOptionPaneUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiOptionPaneUI.java
index 8d6f386..eaa4a42 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiOptionPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiOptionPaneUI.java
@@ -51,35 +51,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.OptionPaneUI;
/**
- * A UI delegate that that coordinates multiple {@link OptionPaneUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link OptionPaneUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiOptionPaneUI extends OptionPaneUI
+public class MultiOptionPaneUI extends OptionPaneUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiOptionPaneUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiOptionPaneUI()
+ public MultiOptionPaneUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiOptionPaneUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -87,11 +87,11 @@ public class MultiOptionPaneUI extends OptionPaneUI
MultiOptionPaneUI mui = new MultiOptionPaneUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiOptionPaneUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -105,9 +105,9 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiOptionPaneUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -119,39 +119,39 @@ public class MultiOptionPaneUI extends OptionPaneUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiOptionPaneUI. The first item in the array is always
+ * MultiOptionPaneUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiOptionPaneUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiOptionPaneUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -164,11 +164,11 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiOptionPaneUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -183,9 +183,9 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiOptionPaneUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -198,24 +198,24 @@ public class MultiOptionPaneUI extends OptionPaneUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiOptionPaneUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiOptionPaneUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -228,24 +228,24 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiOptionPaneUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiOptionPaneUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -258,24 +258,24 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiOptionPaneUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiOptionPaneUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -288,24 +288,24 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiOptionPaneUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiOptionPaneUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -318,25 +318,25 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiOptionPaneUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiOptionPaneUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -349,14 +349,14 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
return result;
}
-
+
/**
* Calls the {@link OptionPaneUI#selectInitialValue(JOptionPane)} method for
* all the UI delegates managed by this MultiOptionPaneUI.
- *
+ *
* @param pane the option pane.
*/
- public void selectInitialValue(JOptionPane pane)
+ public void selectInitialValue(JOptionPane pane)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -367,21 +367,21 @@ public class MultiOptionPaneUI extends OptionPaneUI
}
/**
- * Calls the {@link OptionPaneUI#containsCustomComponents(JOptionPane)}
- * method for all the UI delegates managed by this
- * MultiOptionPaneUI, returning the result for the UI delegate
- * from the primary look and feel.
- *
+ * Calls the {@link OptionPaneUI#containsCustomComponents(JOptionPane)}
+ * method for all the UI delegates managed by this
+ * MultiOptionPaneUI, returning the result for the UI delegate
+ * from the primary look and feel.
+ *
* @param pane the option pane.
- *
- * @return The result for the UI delegate from the primary look and feel.
+ *
+ * @return The result for the UI delegate from the primary look and feel.
*/
- public boolean containsCustomComponents(JOptionPane pane)
+ public boolean containsCustomComponents(JOptionPane pane)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
OptionPaneUI ui = (OptionPaneUI) iterator.next();
result = ui.containsCustomComponents(pane);
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiPanelUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiPanelUI.java
index 67629b2..7b84599 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiPanelUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiPanelUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.PanelUI;
/**
- * A UI delegate that that coordinates multiple {@link PanelUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link PanelUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiPanelUI extends PanelUI
+public class MultiPanelUI extends PanelUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiPanelUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiPanelUI()
+ public MultiPanelUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiPanelUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiPanelUI extends PanelUI
MultiPanelUI mui = new MultiPanelUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiPanelUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiPanelUI extends PanelUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiPanelUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiPanelUI extends PanelUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiPanelUI. The first item in the array is always
+ * MultiPanelUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiPanelUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiPanelUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiPanelUI extends PanelUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiPanelUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiPanelUI extends PanelUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiPanelUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiPanelUI extends PanelUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiPanelUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiPanelUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiPanelUI extends PanelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiPanelUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiPanelUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiPanelUI extends PanelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiPanelUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiPanelUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiPanelUI extends PanelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiPanelUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiPanelUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiPanelUI extends PanelUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiPanelUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiPanelUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiPanelUI extends PanelUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiPopupMenuUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiPopupMenuUI.java
index 161429d..0afaaf7 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiPopupMenuUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiPopupMenuUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.PopupMenuUI;
/**
- * A UI delegate that that coordinates multiple {@link PopupMenuUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link PopupMenuUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiPopupMenuUI extends PopupMenuUI
+public class MultiPopupMenuUI extends PopupMenuUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiPopupMenuUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiPopupMenuUI()
+ public MultiPopupMenuUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiPopupMenuUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiPopupMenuUI extends PopupMenuUI
MultiPopupMenuUI mui = new MultiPopupMenuUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiPopupMenuUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiPopupMenuUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiPopupMenuUI extends PopupMenuUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiPopupMenuUI. The first item in the array is always
+ * MultiPopupMenuUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiPopupMenuUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiPopupMenuUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiPopupMenuUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiPopupMenuUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiPopupMenuUI extends PopupMenuUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiPopupMenuUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiPopupMenuUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiPopupMenuUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiPopupMenuUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiPopupMenuUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiPopupMenuUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiPopupMenuUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiPopupMenuUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiPopupMenuUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiPopupMenuUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiPopupMenuUI extends PopupMenuUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiProgressBarUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiProgressBarUI.java
index c5dbbe8..0395bdd 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiProgressBarUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiProgressBarUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ProgressBarUI;
/**
- * A UI delegate that that coordinates multiple {@link ProgressBarUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ProgressBarUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiProgressBarUI extends ProgressBarUI
+public class MultiProgressBarUI extends ProgressBarUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiProgressBarUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiProgressBarUI()
+ public MultiProgressBarUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiProgressBarUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiProgressBarUI extends ProgressBarUI
MultiProgressBarUI mui = new MultiProgressBarUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiProgressBarUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiProgressBarUI extends ProgressBarUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiProgressBarUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiProgressBarUI extends ProgressBarUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiProgressBarUI. The first item in the array is always
+ * MultiProgressBarUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiProgressBarUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiProgressBarUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiProgressBarUI extends ProgressBarUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiProgressBarUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiProgressBarUI extends ProgressBarUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiProgressBarUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiProgressBarUI extends ProgressBarUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiProgressBarUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiProgressBarUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiProgressBarUI extends ProgressBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiProgressBarUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiProgressBarUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiProgressBarUI extends ProgressBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiProgressBarUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiProgressBarUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiProgressBarUI extends ProgressBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiProgressBarUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiProgressBarUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiProgressBarUI extends ProgressBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiProgressBarUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiProgressBarUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiProgressBarUI extends ProgressBarUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiRootPaneUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiRootPaneUI.java
index bd0cb5c..69c7ffe 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiRootPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiRootPaneUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.RootPaneUI;
/**
- * A UI delegate that that coordinates multiple {@link RootPaneUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link RootPaneUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiRootPaneUI extends RootPaneUI
+public class MultiRootPaneUI extends RootPaneUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiRootPanelUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiRootPaneUI()
+ public MultiRootPaneUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiRootPaneUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiRootPaneUI extends RootPaneUI
MultiRootPaneUI mui = new MultiRootPaneUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiRootPaneUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiRootPaneUI extends RootPaneUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiRootPaneUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiRootPaneUI extends RootPaneUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiRootPaneUI. The first item in the array is always
+ * MultiRootPaneUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiRootPaneUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiRootPaneUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiRootPaneUI extends RootPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiRootPaneUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiRootPaneUI extends RootPaneUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiRootPaneUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiRootPaneUI extends RootPaneUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiRootPaneUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiRootPaneUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiRootPaneUI extends RootPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiRootPaneUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiRootPaneUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiRootPaneUI extends RootPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiRootPaneUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiRootPaneUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiRootPaneUI extends RootPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiRootPaneUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiRootPaneUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiRootPaneUI extends RootPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiRootPaneUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiRootPaneUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiRootPaneUI extends RootPaneUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiScrollBarUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiScrollBarUI.java
index 1a993b8..4ec8b3f 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiScrollBarUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiScrollBarUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ScrollBarUI;
/**
- * A UI delegate that that coordinates multiple {@link ScrollBarUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ScrollBarUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiScrollBarUI extends ScrollBarUI
+public class MultiScrollBarUI extends ScrollBarUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiScrollBarUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiScrollBarUI()
+ public MultiScrollBarUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiScrollBarUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiScrollBarUI extends ScrollBarUI
MultiScrollBarUI mui = new MultiScrollBarUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiScrollBarUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiScrollBarUI extends ScrollBarUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiScrollBarUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiScrollBarUI extends ScrollBarUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiScrollBarUI. The first item in the array is always
+ * MultiScrollBarUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiScrollBarUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiScrollBarUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiScrollBarUI extends ScrollBarUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiScrollBarUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiScrollBarUI extends ScrollBarUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiScrollBarUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiScrollBarUI extends ScrollBarUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiScrollBarUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiScrollBarUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -230,21 +230,21 @@ public class MultiScrollBarUI extends ScrollBarUI
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiScrollBarUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiScrollBarUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiScrollBarUI extends ScrollBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiScrollBarUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiScrollBarUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiScrollBarUI extends ScrollBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiScrollBarUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiScrollBarUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiScrollBarUI extends ScrollBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiScrollBarUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiScrollBarUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiScrollBarUI extends ScrollBarUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiScrollPaneUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiScrollPaneUI.java
index a50c3ba..5a0bc1e 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiScrollPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiScrollPaneUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ScrollPaneUI;
/**
- * A UI delegate that that coordinates multiple {@link ScrollPaneUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ScrollPaneUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiScrollPaneUI extends ScrollPaneUI
+public class MultiScrollPaneUI extends ScrollPaneUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiScrollPaneUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiScrollPaneUI()
+ public MultiScrollPaneUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiScrollPaneUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiScrollPaneUI extends ScrollPaneUI
MultiScrollPaneUI mui = new MultiScrollPaneUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiScrollPaneUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiScrollPaneUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiScrollPaneUI extends ScrollPaneUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiScrollPaneUI. The first item in the array is always
+ * MultiScrollPaneUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiScrollPaneUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiScrollPaneUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiScrollPaneUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiScrollPaneUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiScrollPaneUI extends ScrollPaneUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiScrollPaneUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiScrollPaneUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiScrollPaneUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiScrollPaneUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiScrollPaneUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiScrollPaneUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiScrollPaneUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiScrollPaneUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiScrollPaneUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiScrollPaneUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiScrollPaneUI extends ScrollPaneUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiSeparatorUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiSeparatorUI.java
index f8e4fea..fbd9712 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiSeparatorUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiSeparatorUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.SeparatorUI;
/**
- * A UI delegate that that coordinates multiple {@link MultiSeparatorUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link MultiSeparatorUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiSeparatorUI extends SeparatorUI
+public class MultiSeparatorUI extends SeparatorUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiSeparatorUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiSeparatorUI()
+ public MultiSeparatorUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiSeparatorUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiSeparatorUI extends SeparatorUI
MultiSeparatorUI mui = new MultiSeparatorUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiSeparatorUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiSeparatorUI extends SeparatorUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiSeparatorUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiSeparatorUI extends SeparatorUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiSeparatorUI. The first item in the array is always
+ * MultiSeparatorUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiSeparatorUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiSeparatorUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiSeparatorUI extends SeparatorUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiSeparatorUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiSeparatorUI extends SeparatorUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiSeparatorUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiSeparatorUI extends SeparatorUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiSeparatorUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiSeparatorUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiSeparatorUI extends SeparatorUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiSeparatorUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiSeparatorUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiSeparatorUI extends SeparatorUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiSeparatorUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiSeparatorUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiSeparatorUI extends SeparatorUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiSeparatorUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiSeparatorUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiSeparatorUI extends SeparatorUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiSeparatorUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiSeparatorUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiSeparatorUI extends SeparatorUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiSliderUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiSliderUI.java
index 8a4aab6..cb896c5 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiSliderUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiSliderUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.SliderUI;
/**
- * A UI delegate that that coordinates multiple {@link SliderUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link SliderUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiSliderUI extends SliderUI
+public class MultiSliderUI extends SliderUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiSliderUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiSliderUI()
+ public MultiSliderUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiSliderUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiSliderUI extends SliderUI
MultiSliderUI mui = new MultiSliderUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiSliderUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiSliderUI extends SliderUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiSliderUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiSliderUI extends SliderUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiSliderUI. The first item in the array is always
+ * MultiSliderUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiSliderUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiSliderUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiSliderUI extends SliderUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiSliderUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiSliderUI extends SliderUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiSliderUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiSliderUI extends SliderUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiSliderUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiSliderUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiSliderUI extends SliderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiSliderUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiSliderUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiSliderUI extends SliderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiSliderUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiSliderUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiSliderUI extends SliderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiSliderUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiSliderUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiSliderUI extends SliderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiSliderUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiSliderUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiSliderUI extends SliderUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiSpinnerUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiSpinnerUI.java
index 70068e8..fd805f9 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiSpinnerUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiSpinnerUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.SpinnerUI;
/**
- * A UI delegate that that coordinates multiple {@link SpinnerUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link SpinnerUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiSpinnerUI extends SpinnerUI
+public class MultiSpinnerUI extends SpinnerUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiSpinnerUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiSpinnerUI()
+ public MultiSpinnerUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiSpinnerUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiSpinnerUI extends SpinnerUI
MultiSpinnerUI mui = new MultiSpinnerUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiSpinnerUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiSpinnerUI extends SpinnerUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiSpinnerUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiSpinnerUI extends SpinnerUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiSpinnerUI. The first item in the array is always
+ * MultiSpinnerUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiSpinnerUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiSpinnerUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiSpinnerUI extends SpinnerUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiSpinnerUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiSpinnerUI extends SpinnerUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiSpinnerUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiSpinnerUI extends SpinnerUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiSpinnerUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiSpinnerUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiSpinnerUI extends SpinnerUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiSpinnerUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiSpinnerUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiSpinnerUI extends SpinnerUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiSpinnerUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiSpinnerUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiSpinnerUI extends SpinnerUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiSpinnerUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiSpinnerUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiSpinnerUI extends SpinnerUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiSpinnerUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiSpinnerUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiSpinnerUI extends SpinnerUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiSplitPaneUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiSplitPaneUI.java
index 70ea4f1..1eb2e41 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiSplitPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiSplitPaneUI.java
@@ -51,35 +51,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.SplitPaneUI;
/**
- * A UI delegate that that coordinates multiple {@link SplitPaneUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link SplitPaneUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiSplitPaneUI extends SplitPaneUI
+public class MultiSplitPaneUI extends SplitPaneUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiSplitPaneUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiSplitPaneUI()
+ public MultiSplitPaneUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiSplitPaneUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -87,11 +87,11 @@ public class MultiSplitPaneUI extends SplitPaneUI
MultiSplitPaneUI mui = new MultiSplitPaneUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiSplitPaneUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -105,9 +105,9 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiSplitPaneUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -119,39 +119,39 @@ public class MultiSplitPaneUI extends SplitPaneUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiSplitPaneUI. The first item in the array is always
+ * MultiSplitPaneUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiSplitPaneUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiSplitPaneUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -164,11 +164,11 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiSplitPaneUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -183,9 +183,9 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiSplitPaneUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -198,24 +198,24 @@ public class MultiSplitPaneUI extends SplitPaneUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiSplitPaneUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiSplitPaneUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -231,21 +231,21 @@ public class MultiSplitPaneUI extends SplitPaneUI
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiSplitPaneUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiSplitPaneUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -258,24 +258,24 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiSplitPaneUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiSplitPaneUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -288,24 +288,24 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiSplitPaneUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiSplitPaneUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -318,25 +318,25 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiSplitPaneUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiSplitPaneUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -349,14 +349,14 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link SplitPaneUI#resetToPreferredSizes(JSplitPane)} method
+ * Calls the {@link SplitPaneUI#resetToPreferredSizes(JSplitPane)} method
* for all the UI delegates managed by this MultiSplitPaneUI.
- *
+ *
* @param pane the component.
*/
- public void resetToPreferredSizes(JSplitPane pane)
+ public void resetToPreferredSizes(JSplitPane pane)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -367,13 +367,13 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
/**
- * Calls the {@link SplitPaneUI#setDividerLocation(JSplitPane, int)} method
+ * Calls the {@link SplitPaneUI#setDividerLocation(JSplitPane, int)} method
* for all the UI delegates managed by this MultiSplitPaneUI.
- *
+ *
* @param pane the component.
* @param location the location.
*/
- public void setDividerLocation(JSplitPane pane, int location)
+ public void setDividerLocation(JSplitPane pane, int location)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -385,21 +385,21 @@ public class MultiSplitPaneUI extends SplitPaneUI
/**
* Calls the {@link SplitPaneUI#getDividerLocation(JSplitPane)} method for all
- * the UI delegates managed by this MultiSplitPaneUI,
- * returning the location for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiSplitPaneUI,
+ * returning the location for the UI delegate from the primary look and
+ * feel.
+ *
* @param pane the component.
- *
- * @return The location returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The location returned by the UI delegate from the primary
+ * look and feel.
*/
- public int getDividerLocation(JSplitPane pane)
+ public int getDividerLocation(JSplitPane pane)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
SplitPaneUI ui = (SplitPaneUI) iterator.next();
result = ui.getDividerLocation(pane);
@@ -414,22 +414,22 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
/**
- * Calls the {@link SplitPaneUI#getMinimumDividerLocation(JSplitPane)} method
- * for all the UI delegates managed by this MultiSplitPaneUI,
- * returning the location for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link SplitPaneUI#getMinimumDividerLocation(JSplitPane)} method
+ * for all the UI delegates managed by this MultiSplitPaneUI,
+ * returning the location for the UI delegate from the primary look and
+ * feel.
+ *
* @param pane the component.
- *
- * @return The location returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The location returned by the UI delegate from the primary
+ * look and feel.
*/
- public int getMinimumDividerLocation(JSplitPane pane)
+ public int getMinimumDividerLocation(JSplitPane pane)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
SplitPaneUI ui = (SplitPaneUI) iterator.next();
result = ui.getMinimumDividerLocation(pane);
@@ -444,22 +444,22 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
/**
- * Calls the {@link SplitPaneUI#getMaximumDividerLocation(JSplitPane)} method
- * for all the UI delegates managed by this MultiSplitPaneUI,
- * returning the location for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link SplitPaneUI#getMaximumDividerLocation(JSplitPane)} method
+ * for all the UI delegates managed by this MultiSplitPaneUI,
+ * returning the location for the UI delegate from the primary look and
+ * feel.
+ *
* @param pane the component.
- *
- * @return The location returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The location returned by the UI delegate from the primary
+ * look and feel.
*/
- public int getMaximumDividerLocation(JSplitPane pane)
+ public int getMaximumDividerLocation(JSplitPane pane)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
SplitPaneUI ui = (SplitPaneUI) iterator.next();
result = ui.getMaximumDividerLocation(pane);
@@ -474,14 +474,14 @@ public class MultiSplitPaneUI extends SplitPaneUI
}
/**
- * Calls the {@link SplitPaneUI#finishedPaintingChildren(JSplitPane,
- * Graphics)} method for all the UI delegates managed by this
+ * Calls the {@link SplitPaneUI#finishedPaintingChildren(JSplitPane,
+ * Graphics)} method for all the UI delegates managed by this
* MultiSplitPaneUI.
- *
+ *
* @param pane the component.
* @param g the graphics device.
*/
- public void finishedPaintingChildren(JSplitPane pane, Graphics g)
+ public void finishedPaintingChildren(JSplitPane pane, Graphics g)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiTabbedPaneUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiTabbedPaneUI.java
index 2a2599b..3f9d22a 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiTabbedPaneUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiTabbedPaneUI.java
@@ -52,35 +52,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.TabbedPaneUI;
/**
- * A UI delegate that that coordinates multiple {@link TabbedPaneUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link TabbedPaneUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiTabbedPaneUI extends TabbedPaneUI
+public class MultiTabbedPaneUI extends TabbedPaneUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiTabbedPaneUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiTabbedPaneUI()
+ public MultiTabbedPaneUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiTabbedPaneUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -88,11 +88,11 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
MultiTabbedPaneUI mui = new MultiTabbedPaneUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiTabbedPaneUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -106,9 +106,9 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiTabbedPaneUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -120,39 +120,39 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiTabbedPaneUI. The first item in the array is always
+ * MultiTabbedPaneUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiTabbedPaneUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiTabbedPaneUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -165,11 +165,11 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiTabbedPaneUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -184,9 +184,9 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiTabbedPaneUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -199,24 +199,24 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiTabbedPaneUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTabbedPaneUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -232,21 +232,21 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiTabbedPaneUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTabbedPaneUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -259,24 +259,24 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiTabbedPaneUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTabbedPaneUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -289,24 +289,24 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiTabbedPaneUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTabbedPaneUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -319,25 +319,25 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiTabbedPaneUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTabbedPaneUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -350,26 +350,26 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
return result;
}
-
+
/**
- * Calls the {@link TabbedPaneUI#tabForCoordinate(JTabbedPane, int, int)}
- * method for all the UI delegates managed by this
- * MultiTabbedPaneUI, returning the tab index for the UI
- * delegate from the primary look and feel.
- *
+ * Calls the {@link TabbedPaneUI#tabForCoordinate(JTabbedPane, int, int)}
+ * method for all the UI delegates managed by this
+ * MultiTabbedPaneUI, returning the tab index for the UI
+ * delegate from the primary look and feel.
+ *
* @param pane the tabbed pane.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
- * @return The tab index returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The tab index returned by the UI delegate from the primary
+ * look and feel.
*/
- public int tabForCoordinate(JTabbedPane pane, int x, int y)
+ public int tabForCoordinate(JTabbedPane pane, int x, int y)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TabbedPaneUI ui = (TabbedPaneUI) iterator.next();
result = ui.tabForCoordinate(pane, x, y);
@@ -384,23 +384,23 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
/**
- * Calls the {@link TabbedPaneUI#getTabBounds(JTabbedPane, int)}
- * method for all the UI delegates managed by this
- * MultiTabbedPaneUI, returning the bounds for the UI
- * delegate from the primary look and feel.
- *
+ * Calls the {@link TabbedPaneUI#getTabBounds(JTabbedPane, int)}
+ * method for all the UI delegates managed by this
+ * MultiTabbedPaneUI, returning the bounds for the UI
+ * delegate from the primary look and feel.
+ *
* @param pane the tabbed pane.
* @param index the index.
- *
- * @return The bounds returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The bounds returned by the UI delegate from the primary
+ * look and feel.
*/
- public Rectangle getTabBounds(JTabbedPane pane, int index)
+ public Rectangle getTabBounds(JTabbedPane pane, int index)
{
Rectangle result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TabbedPaneUI ui = (TabbedPaneUI) iterator.next();
result = ui.getTabBounds(pane, index);
@@ -415,22 +415,22 @@ public class MultiTabbedPaneUI extends TabbedPaneUI
}
/**
- * Calls the {@link TabbedPaneUI#getTabRunCount(JTabbedPane)}
- * method for all the UI delegates managed by this
- * MultiTabbedPaneUI, returning the nt for the UI
- * delegate from the primary look and feel.
- *
+ * Calls the {@link TabbedPaneUI#getTabRunCount(JTabbedPane)}
+ * method for all the UI delegates managed by this
+ * MultiTabbedPaneUI, returning the nt for the UI
+ * delegate from the primary look and feel.
+ *
* @param pane the tabbed pane.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
- public int getTabRunCount(JTabbedPane pane)
+ public int getTabRunCount(JTabbedPane pane)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TabbedPaneUI ui = (TabbedPaneUI) iterator.next();
result = ui.getTabRunCount(pane);
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiTableHeaderUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiTableHeaderUI.java
index 6c59cef..972303b 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiTableHeaderUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiTableHeaderUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.TableHeaderUI;
/**
- * A UI delegate that that coordinates multiple {@link TableHeaderUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link TableHeaderUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiTableHeaderUI extends TableHeaderUI
+public class MultiTableHeaderUI extends TableHeaderUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiTableHeaderUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiTableHeaderUI()
+ public MultiTableHeaderUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiTableHeaderUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiTableHeaderUI extends TableHeaderUI
MultiTableHeaderUI mui = new MultiTableHeaderUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiTableHeaderUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiTableHeaderUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiTableHeaderUI extends TableHeaderUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiTableHeaderUI. The first item in the array is always
+ * MultiTableHeaderUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiTableHeaderUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiTableHeaderUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiTableHeaderUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiTableHeaderUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiTableHeaderUI extends TableHeaderUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiTableHeaderUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTableHeaderUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiTableHeaderUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTableHeaderUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiTableHeaderUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTableHeaderUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiTableHeaderUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTableHeaderUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiTableHeaderUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTableHeaderUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiTableHeaderUI extends TableHeaderUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiTableUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiTableUI.java
index 2e5b5bc..1cd1a4c 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiTableUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiTableUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.TableUI;
/**
- * A UI delegate that that coordinates multiple {@link TableUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link TableUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiTableUI extends TableUI
+public class MultiTableUI extends TableUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiTableUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiTableUI()
+ public MultiTableUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiTableUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiTableUI extends TableUI
MultiTableUI mui = new MultiTableUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiTableUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiTableUI extends TableUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiTableUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiTableUI extends TableUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiTableUI. The first item in the array is always
+ * MultiTableUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiTableUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiTableUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiTableUI extends TableUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiTableUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiTableUI extends TableUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiTableUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiTableUI extends TableUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiTableUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTableUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiTableUI extends TableUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiTableUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTableUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiTableUI extends TableUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiTableUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTableUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiTableUI extends TableUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiTableUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTableUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiTableUI extends TableUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiTableUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTableUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiTableUI extends TableUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiTextUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiTextUI.java
index c5dee24..392fd98 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiTextUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiTextUI.java
@@ -58,35 +58,35 @@ import javax.swing.text.View;
import javax.swing.text.Position.Bias;
/**
- * A UI delegate that that coordinates multiple {@link TextUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link TextUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiTextUI extends TextUI
+public class MultiTextUI extends TextUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiTextUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiTextUI()
+ public MultiTextUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiTextUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -94,11 +94,11 @@ public class MultiTextUI extends TextUI
MultiTextUI mui = new MultiTextUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiTextUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -112,9 +112,9 @@ public class MultiTextUI extends TextUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiTextUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -126,39 +126,39 @@ public class MultiTextUI extends TextUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiTextUI. The first item in the array is always
+ * MultiTextUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiTextUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiTextUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -171,11 +171,11 @@ public class MultiTextUI extends TextUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiTextUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -190,9 +190,9 @@ public class MultiTextUI extends TextUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiTextUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -205,24 +205,24 @@ public class MultiTextUI extends TextUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiTextUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTextUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -235,24 +235,24 @@ public class MultiTextUI extends TextUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiTextUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTextUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -265,24 +265,24 @@ public class MultiTextUI extends TextUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiTextUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTextUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -295,24 +295,24 @@ public class MultiTextUI extends TextUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiTextUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTextUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -325,25 +325,25 @@ public class MultiTextUI extends TextUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiTextUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTextUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -356,25 +356,25 @@ public class MultiTextUI extends TextUI
}
return result;
}
-
+
/**
* Calls the {@link TextUI#modelToView(JTextComponent, int)} method for all
- * the UI delegates managed by this MultiTextUI,
- * returning the bounds for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTextUI,
+ * returning the bounds for the UI delegate from the primary look and
+ * feel.
+ *
* @param tc the text component.
- *
- * @return The bounds returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The bounds returned by the UI delegate from the primary
+ * look and feel.
*/
public Rectangle modelToView(JTextComponent tc, int pos)
- throws BadLocationException
+ throws BadLocationException
{
Rectangle result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
result = ui.modelToView(tc, pos);
@@ -389,23 +389,23 @@ public class MultiTextUI extends TextUI
}
/**
- * Calls the {@link TextUI#modelToView(JTextComponent, int, Position.Bias)}
- * method for all the UI delegates managed by this MultiTextUI,
- * returning the bounds for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link TextUI#modelToView(JTextComponent, int, Position.Bias)}
+ * method for all the UI delegates managed by this MultiTextUI,
+ * returning the bounds for the UI delegate from the primary look and
+ * feel.
+ *
* @param tc the text component.
- *
- * @return The bounds returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The bounds returned by the UI delegate from the primary
+ * look and feel.
*/
public Rectangle modelToView(JTextComponent tc, int pos, Bias bias)
- throws BadLocationException
+ throws BadLocationException
{
Rectangle result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
result = ui.modelToView(tc, pos, bias);
@@ -421,22 +421,22 @@ public class MultiTextUI extends TextUI
/**
* Calls the {@link TextUI#viewToModel(JTextComponent, Point)} method for all
- * the UI delegates managed by this MultiTextUI,
- * returning the position for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTextUI,
+ * returning the position for the UI delegate from the primary look and
+ * feel.
+ *
* @param t the text component.
* @param pt the point.
- *
- * @return The position returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The position returned by the UI delegate from the primary
+ * look and feel.
*/
- public int viewToModel(JTextComponent t, Point pt)
+ public int viewToModel(JTextComponent t, Point pt)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
result = ui.viewToModel(t, pt);
@@ -451,22 +451,22 @@ public class MultiTextUI extends TextUI
}
/**
- * Calls the {@link TextUI#viewToModel(JTextComponent, Point, Bias[])} method
- * for all the UI delegates managed by this MultiTextUI,
- * returning the position for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link TextUI#viewToModel(JTextComponent, Point, Bias[])} method
+ * for all the UI delegates managed by this MultiTextUI,
+ * returning the position for the UI delegate from the primary look and
+ * feel.
+ *
* @param tc the text component.
- *
- * @return The position returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The position returned by the UI delegate from the primary
+ * look and feel.
*/
- public int viewToModel(JTextComponent tc, Point loc, Bias[] outBias)
+ public int viewToModel(JTextComponent tc, Point loc, Bias[] outBias)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
result = ui.viewToModel(tc, loc, outBias);
@@ -481,48 +481,48 @@ public class MultiTextUI extends TextUI
}
/**
- * Calls the {@link TextUI#getNextVisualPositionFrom(JTextComponent, int,
+ * Calls the {@link TextUI#getNextVisualPositionFrom(JTextComponent, int,
* Position.Bias, int, Position.Bias[])} method for all
- * the UI delegates managed by this MultiTextUI,
- * returning the position for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTextUI,
+ * returning the position for the UI delegate from the primary look and
+ * feel.
+ *
* @param tc the text component.
- *
- * @return The position returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The position returned by the UI delegate from the primary
+ * look and feel.
*/
public int getNextVisualPositionFrom(JTextComponent tc, int pos, Bias bias,
- int direction, Bias[] outBias) throws BadLocationException
+ int direction, Bias[] outBias) throws BadLocationException
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
- result = ui.getNextVisualPositionFrom(tc, pos, bias, direction,
+ result = ui.getNextVisualPositionFrom(tc, pos, bias, direction,
outBias);
}
// return values from auxiliary UI delegates are ignored
while (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
- /* int ignored = */ ui.getNextVisualPositionFrom(tc, pos, bias,
+ /* int ignored = */ ui.getNextVisualPositionFrom(tc, pos, bias,
direction, outBias);
}
return result;
}
/**
- * Calls the {@link TextUI#damageRange(JTextComponent, int, int)} method for
+ * Calls the {@link TextUI#damageRange(JTextComponent, int, int)} method for
* all the UI delegates managed by this MultiTextUI.
- *
+ *
* @param tc the component.
* @param start the start position.
* @param end the end position.
*/
- public void damageRange(JTextComponent tc, int start, int end)
+ public void damageRange(JTextComponent tc, int start, int end)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -533,10 +533,10 @@ public class MultiTextUI extends TextUI
}
/**
- * Calls the {@link TextUI#damageRange(JTextComponent, int, int,
- * Position.Bias, Position.Bias)} method for all the UI delegates managed by
+ * Calls the {@link TextUI#damageRange(JTextComponent, int, int,
+ * Position.Bias, Position.Bias)} method for all the UI delegates managed by
* this MultiTextUI.
- *
+ *
* @param tc the component.
* @param start the start position.
* @param end the end position.
@@ -544,7 +544,7 @@ public class MultiTextUI extends TextUI
* @param endBias the end bias.
*/
public void damageRange(JTextComponent tc, int start, int end,
- Bias startBias, Bias endBias)
+ Bias startBias, Bias endBias)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -556,21 +556,21 @@ public class MultiTextUI extends TextUI
/**
* Calls the {@link TextUI#getEditorKit(JTextComponent)} method for all
- * the UI delegates managed by this MultiTextUI,
- * returning the editor kit for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTextUI,
+ * returning the editor kit for the UI delegate from the primary look and
+ * feel.
+ *
* @param tc the text component.
- *
- * @return The editor kit returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The editor kit returned by the UI delegate from the primary
+ * look and feel.
*/
- public EditorKit getEditorKit(JTextComponent tc)
+ public EditorKit getEditorKit(JTextComponent tc)
{
EditorKit result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
result = ui.getEditorKit(tc);
@@ -586,21 +586,21 @@ public class MultiTextUI extends TextUI
/**
* Calls the {@link TextUI#getRootView(JTextComponent)} method for all
- * the UI delegates managed by this MultiTextUI,
- * returning the view for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTextUI,
+ * returning the view for the UI delegate from the primary look and
+ * feel.
+ *
* @param tc the text component.
- *
- * @return The view returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The view returned by the UI delegate from the primary
+ * look and feel.
*/
- public View getRootView(JTextComponent tc)
+ public View getRootView(JTextComponent tc)
{
View result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TextUI ui = (TextUI) iterator.next();
result = ui.getRootView(tc);
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiToolBarUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiToolBarUI.java
index afe63bf..5f308d9 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiToolBarUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiToolBarUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ToolBarUI;
/**
- * A UI delegate that that coordinates multiple {@link ToolBarUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ToolBarUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiToolBarUI extends ToolBarUI
+public class MultiToolBarUI extends ToolBarUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiToolBarUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiToolBarUI()
+ public MultiToolBarUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiToolBarUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiToolBarUI extends ToolBarUI
MultiToolBarUI mui = new MultiToolBarUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiToolBarUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiToolBarUI extends ToolBarUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiToolBarUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiToolBarUI extends ToolBarUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiToolBarUI. The first item in the array is always
+ * MultiToolBarUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiToolBarUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiToolBarUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiToolBarUI extends ToolBarUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiToolBarUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiToolBarUI extends ToolBarUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiToolBarUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiToolBarUI extends ToolBarUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiToolBarUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiToolBarUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiToolBarUI extends ToolBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiToolBarUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiToolBarUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiToolBarUI extends ToolBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiToolBarUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiToolBarUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiToolBarUI extends ToolBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiToolBarUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiToolBarUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiToolBarUI extends ToolBarUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiToolBarUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiToolBarUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiToolBarUI extends ToolBarUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiToolTipUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiToolTipUI.java
index fcd622d..9db9efb 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiToolTipUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiToolTipUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ToolTipUI;
/**
- * A UI delegate that that coordinates multiple {@link ToolTipUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ToolTipUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiToolTipUI extends ToolTipUI
+public class MultiToolTipUI extends ToolTipUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiToolTipUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiToolTipUI()
+ public MultiToolTipUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiToolTipUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiToolTipUI extends ToolTipUI
MultiToolTipUI mui = new MultiToolTipUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiToolTipUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiToolTipUI extends ToolTipUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiToolTipUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiToolTipUI extends ToolTipUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiToolTipUI. The first item in the array is always
+ * MultiToolTipUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiToolTipUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiToolTipUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiToolTipUI extends ToolTipUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiToolTipUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiToolTipUI extends ToolTipUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiToolTipUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiToolTipUI extends ToolTipUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiToolTipUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiToolTipUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -230,21 +230,21 @@ public class MultiToolTipUI extends ToolTipUI
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiToolTipUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiToolTipUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiToolTipUI extends ToolTipUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiToolTipUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiToolTipUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiToolTipUI extends ToolTipUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiToolTipUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiToolTipUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiToolTipUI extends ToolTipUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiToolTipUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiToolTipUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiToolTipUI extends ToolTipUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiTreeUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiTreeUI.java
index de1dc6c..f70decc 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiTreeUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiTreeUI.java
@@ -53,35 +53,35 @@ import javax.swing.plaf.TreeUI;
import javax.swing.tree.TreePath;
/**
- * A UI delegate that that coordinates multiple {@link TreeUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link TreeUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiTreeUI extends TreeUI
+public class MultiTreeUI extends TreeUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiTreeUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiTreeUI()
+ public MultiTreeUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiTreeUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -89,11 +89,11 @@ public class MultiTreeUI extends TreeUI
MultiTreeUI mui = new MultiTreeUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiTreeUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -107,9 +107,9 @@ public class MultiTreeUI extends TreeUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiTreeUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -121,39 +121,39 @@ public class MultiTreeUI extends TreeUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiTreeUI. The first item in the array is always
+ * MultiTreeUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiTreeUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiTreeUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -166,11 +166,11 @@ public class MultiTreeUI extends TreeUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiTreeUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -185,9 +185,9 @@ public class MultiTreeUI extends TreeUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiTreeUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -200,24 +200,24 @@ public class MultiTreeUI extends TreeUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiTreeUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTreeUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -230,24 +230,24 @@ public class MultiTreeUI extends TreeUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiTreeUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTreeUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -260,24 +260,24 @@ public class MultiTreeUI extends TreeUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiTreeUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTreeUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -290,24 +290,24 @@ public class MultiTreeUI extends TreeUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiTreeUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTreeUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -320,25 +320,25 @@ public class MultiTreeUI extends TreeUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiTreeUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTreeUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -351,24 +351,24 @@ public class MultiTreeUI extends TreeUI
}
return result;
}
-
+
/**
* Calls the {@link TreeUI#getPathBounds(JTree, TreePath)} method
- * for all the UI delegates managed by this MultiTreeUI,
- * returning the bounds for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTreeUI,
+ * returning the bounds for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The bounds returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The bounds returned by the UI delegate from the primary
+ * look and feel.
*/
- public Rectangle getPathBounds(JTree tree, TreePath path)
+ public Rectangle getPathBounds(JTree tree, TreePath path)
{
Rectangle result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.getPathBounds(tree, path);
@@ -384,21 +384,21 @@ public class MultiTreeUI extends TreeUI
/**
* Calls the {@link TreeUI#getPathForRow(JTree, int)} method
- * for all the UI delegates managed by this MultiTreeUI,
- * returning the path for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTreeUI,
+ * returning the path for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The path returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The path returned by the UI delegate from the primary
+ * look and feel.
*/
- public TreePath getPathForRow(JTree tree, int row)
+ public TreePath getPathForRow(JTree tree, int row)
{
TreePath result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.getPathForRow(tree, row);
@@ -414,21 +414,21 @@ public class MultiTreeUI extends TreeUI
/**
* Calls the {@link TreeUI#getRowForPath(JTree, TreePath)} method
- * for all the UI delegates managed by this MultiTreeUI,
- * returning the row index for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTreeUI,
+ * returning the row index for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The row index returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The row index returned by the UI delegate from the primary
+ * look and feel.
*/
- public int getRowForPath(JTree tree, TreePath path)
+ public int getRowForPath(JTree tree, TreePath path)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.getRowForPath(tree, path);
@@ -439,26 +439,26 @@ public class MultiTreeUI extends TreeUI
TreeUI ui = (TreeUI) iterator.next();
/* int ignored = */ ui.getRowForPath(tree, path);
}
- return result;
+ return result;
}
/**
* Calls the {@link TreeUI#getRowCount(JTree)} method
- * for all the UI delegates managed by this MultiTreeUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTreeUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
- public int getRowCount(JTree tree)
+ public int getRowCount(JTree tree)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.getRowCount(tree);
@@ -469,26 +469,26 @@ public class MultiTreeUI extends TreeUI
TreeUI ui = (TreeUI) iterator.next();
/* int ignored = */ ui.getRowCount(tree);
}
- return result;
+ return result;
}
/**
* Calls the {@link TreeUI#getClosestPathForLocation(JTree, int, int)} method
- * for all the UI delegates managed by this MultiTreeUI,
- * returning the path for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiTreeUI,
+ * returning the path for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The path returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The path returned by the UI delegate from the primary
+ * look and feel.
*/
- public TreePath getClosestPathForLocation(JTree tree, int x, int y)
+ public TreePath getClosestPathForLocation(JTree tree, int x, int y)
{
TreePath result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.getClosestPathForLocation(tree, x, y);
@@ -499,26 +499,26 @@ public class MultiTreeUI extends TreeUI
TreeUI ui = (TreeUI) iterator.next();
/* TreePath ignored = */ ui.getClosestPathForLocation(tree, x, y);
}
- return result;
+ return result;
}
/**
* Calls the {@link TreeUI#isEditing(JTree)} method for all
- * the UI delegates managed by this MultiTreeUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTreeUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The result returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The result returned by the UI delegate from the primary
+ * look and feel.
*/
- public boolean isEditing(JTree tree)
+ public boolean isEditing(JTree tree)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.isEditing(tree);
@@ -534,21 +534,21 @@ public class MultiTreeUI extends TreeUI
/**
* Calls the {@link TreeUI#stopEditing(JTree)} method for all
- * the UI delegates managed by this MultiTreeUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTreeUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The result returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The result returned by the UI delegate from the primary
+ * look and feel.
*/
- public boolean stopEditing(JTree tree)
+ public boolean stopEditing(JTree tree)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.stopEditing(tree);
@@ -563,12 +563,12 @@ public class MultiTreeUI extends TreeUI
}
/**
- * Calls the {@link TreeUI#cancelEditing(JTree)} method for
+ * Calls the {@link TreeUI#cancelEditing(JTree)} method for
* all the UI delegates managed by this MultiTreeUI.
- *
+ *
* @param tree the tree component.
*/
- public void cancelEditing(JTree tree)
+ public void cancelEditing(JTree tree)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -579,13 +579,13 @@ public class MultiTreeUI extends TreeUI
}
/**
- * Calls the {@link TreeUI#startEditingAtPath(JTree, TreePath)} method for
+ * Calls the {@link TreeUI#startEditingAtPath(JTree, TreePath)} method for
* all the UI delegates managed by this MultiTreeUI.
- *
+ *
* @param tree the tree component.
* @param path the path.
*/
- public void startEditingAtPath(JTree tree, TreePath path)
+ public void startEditingAtPath(JTree tree, TreePath path)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
@@ -597,21 +597,21 @@ public class MultiTreeUI extends TreeUI
/**
* Calls the {@link TreeUI#getEditingPath(JTree)} method for all
- * the UI delegates managed by this MultiTreeUI,
- * returning the path for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiTreeUI,
+ * returning the path for the UI delegate from the primary look and
+ * feel.
+ *
* @param tree the tree component.
- *
- * @return The path returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The path returned by the UI delegate from the primary
+ * look and feel.
*/
- public TreePath getEditingPath(JTree tree)
+ public TreePath getEditingPath(JTree tree)
{
TreePath result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
TreeUI ui = (TreeUI) iterator.next();
result = ui.getEditingPath(tree);
@@ -622,7 +622,7 @@ public class MultiTreeUI extends TreeUI
TreeUI ui = (TreeUI) iterator.next();
/* TreePath ignored = */ ui.getEditingPath(tree);
}
- return result;
+ return result;
}
}
diff --git a/libjava/classpath/javax/swing/plaf/multi/MultiViewportUI.java b/libjava/classpath/javax/swing/plaf/multi/MultiViewportUI.java
index 33bbc3b..55f9cba 100644
--- a/libjava/classpath/javax/swing/plaf/multi/MultiViewportUI.java
+++ b/libjava/classpath/javax/swing/plaf/multi/MultiViewportUI.java
@@ -50,35 +50,35 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.ViewportUI;
/**
- * A UI delegate that that coordinates multiple {@link ViewportUI}
- * instances, one from the primary look and feel, and one or more from the
+ * A UI delegate that that coordinates multiple {@link ViewportUI}
+ * instances, one from the primary look and feel, and one or more from the
* auxiliary look and feel(s).
- *
+ *
* @see UIManager#addAuxiliaryLookAndFeel(LookAndFeel)
*/
-public class MultiViewportUI extends ViewportUI
+public class MultiViewportUI extends ViewportUI
{
/** A list of references to the actual component UIs. */
protected Vector uis;
-
+
/**
* Creates a new MultiViewPortUI instance.
- *
+ *
* @see #createUI(JComponent)
*/
- public MultiViewportUI()
+ public MultiViewportUI()
{
uis = new Vector();
}
-
+
/**
- * Creates a delegate object for the specified component. If any auxiliary
+ * Creates a delegate object for the specified component. If any auxiliary
* look and feels support this component, a MultiViewportUI is
* returned, otherwise the UI from the default look and feel is returned.
- *
+ *
* @param target the component.
- *
+ *
* @see MultiLookAndFeel#createUIs(ComponentUI, Vector, JComponent)
*/
public static ComponentUI createUI(JComponent target)
@@ -86,11 +86,11 @@ public class MultiViewportUI extends ViewportUI
MultiViewportUI mui = new MultiViewportUI();
return MultiLookAndFeel.createUIs(mui, mui.uis, target);
}
-
+
/**
- * Calls the {@link ComponentUI#installUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#installUI(JComponent)} method for all
* the UI delegates managed by this MultiViewportUI.
- *
+ *
* @param c the component.
*/
public void installUI(JComponent c)
@@ -104,9 +104,9 @@ public class MultiViewportUI extends ViewportUI
}
/**
- * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
+ * Calls the {@link ComponentUI#uninstallUI(JComponent)} method for all
* the UI delegates managed by this MultiViewportUI.
- *
+ *
* @param c the component.
*/
public void uninstallUI(JComponent c)
@@ -118,39 +118,39 @@ public class MultiViewportUI extends ViewportUI
ui.uninstallUI(c);
}
}
-
+
/**
* Returns an array containing the UI delegates managed by this
- * MultiViewportUI. The first item in the array is always
+ * MultiViewportUI. The first item in the array is always
* the UI delegate from the installed default look and feel.
- *
+ *
* @return An array of UI delegates.
*/
public ComponentUI[] getUIs()
{
return MultiLookAndFeel.uisToArray(uis);
}
-
+
/**
- * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
- * the UI delegates managed by this MultiViewportUI,
- * returning the result for the UI delegate from the primary look and
- * feel.
- *
+ * Calls the {@link ComponentUI#contains(JComponent, int, int)} method for all
+ * the UI delegates managed by this MultiViewportUI,
+ * returning the result for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
* @param x the x-coordinate.
* @param y the y-coordinate.
- *
+ *
* @return true if the specified (x, y) coordinate falls within
* the bounds of the component as rendered by the UI delegate in the
- * primary look and feel, and false otherwise.
+ * primary look and feel, and false otherwise.
*/
- public boolean contains(JComponent c, int x, int y)
+ public boolean contains(JComponent c, int x, int y)
{
boolean result = false;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.contains(c, x, y);
@@ -163,11 +163,11 @@ public class MultiViewportUI extends ViewportUI
}
return result;
}
-
+
/**
- * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
+ * Calls the {@link ComponentUI#update(Graphics, JComponent)} method for all
* the UI delegates managed by this MultiViewportUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -182,9 +182,9 @@ public class MultiViewportUI extends ViewportUI
}
/**
- * Calls the paint(Graphics, JComponent) method for all the UI
+ * Calls the paint(Graphics, JComponent) method for all the UI
* delegates managed by this MultiViewportUI.
- *
+ *
* @param g the graphics device.
* @param c the component.
*/
@@ -197,24 +197,24 @@ public class MultiViewportUI extends ViewportUI
ui.paint(g, c);
}
}
-
+
/**
* Calls the {@link ComponentUI#getPreferredSize(JComponent)} method for all
- * the UI delegates managed by this MultiViewportUI,
- * returning the preferred size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiViewportUI,
+ * returning the preferred size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The preferred size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The preferred size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getPreferredSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getPreferredSize(c);
@@ -227,24 +227,24 @@ public class MultiViewportUI extends ViewportUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all
- * the UI delegates managed by this MultiViewportUI,
- * returning the minimum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiViewportUI,
+ * returning the minimum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The minimum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The minimum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMinimumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMinimumSize(c);
@@ -257,24 +257,24 @@ public class MultiViewportUI extends ViewportUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getMaximumSize(JComponent)} method for all
- * the UI delegates managed by this MultiViewportUI,
- * returning the maximum size for the UI delegate from the primary look and
- * feel.
- *
+ * the UI delegates managed by this MultiViewportUI,
+ * returning the maximum size for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The maximum size returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The maximum size returned by the UI delegate from the primary
+ * look and feel.
*/
public Dimension getMaximumSize(JComponent c)
{
Dimension result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getMaximumSize(c);
@@ -287,24 +287,24 @@ public class MultiViewportUI extends ViewportUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChildrenCount(JComponent)} method
- * for all the UI delegates managed by this MultiViewportUI,
- * returning the count for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiViewportUI,
+ * returning the count for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component.
- *
- * @return The count returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The count returned by the UI delegate from the primary
+ * look and feel.
*/
public int getAccessibleChildrenCount(JComponent c)
{
int result = 0;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChildrenCount(c);
@@ -317,25 +317,25 @@ public class MultiViewportUI extends ViewportUI
}
return result;
}
-
+
/**
* Calls the {@link ComponentUI#getAccessibleChild(JComponent, int)} method
- * for all the UI delegates managed by this MultiViewportUI,
- * returning the child for the UI delegate from the primary look and
- * feel.
- *
+ * for all the UI delegates managed by this MultiViewportUI,
+ * returning the child for the UI delegate from the primary look and
+ * feel.
+ *
* @param c the component
* @param i the child index.
- *
- * @return The child returned by the UI delegate from the primary
- * look and feel.
+ *
+ * @return The child returned by the UI delegate from the primary
+ * look and feel.
*/
public Accessible getAccessibleChild(JComponent c, int i)
{
Accessible result = null;
Iterator iterator = uis.iterator();
// first UI delegate provides the return value
- if (iterator.hasNext())
+ if (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
result = ui.getAccessibleChild(c, i);
@@ -348,5 +348,5 @@ public class MultiViewportUI extends ViewportUI
}
return result;
}
-
+
}
diff --git a/libjava/classpath/javax/swing/plaf/synth/SynthGraphicsUtils.java b/libjava/classpath/javax/swing/plaf/synth/SynthGraphicsUtils.java
index 1907d75..76a46cb 100644
--- a/libjava/classpath/javax/swing/plaf/synth/SynthGraphicsUtils.java
+++ b/libjava/classpath/javax/swing/plaf/synth/SynthGraphicsUtils.java
@@ -91,10 +91,10 @@ public class SynthGraphicsUtils
* Lays out a label and (if non-null) an icon. The calculated coordinates are
* then stored in viewR, iconR and
* textR.
- *
+ *
* The alignment and position parameters may be one of the alignment or
* position constants defined in {@link javax.swing.SwingConstants}.
- *
+ *
* @param ctx the synth context, identifies the current region
* @param fm the font metrics to use to fetch the text measures
* @param text the text to lay out, may be null
@@ -123,7 +123,7 @@ public class SynthGraphicsUtils
/**
* Returns the width of the string text for the specified font
* and font metrics.
- *
+ *
* @param ctx identifies the current region
* @param font the font
* @param fm the font metrics to use
diff --git a/libjava/classpath/javax/swing/plaf/synth/SynthLookAndFeel.java b/libjava/classpath/javax/swing/plaf/synth/SynthLookAndFeel.java
index 46a95f0..ac24dd4 100644
--- a/libjava/classpath/javax/swing/plaf/synth/SynthLookAndFeel.java
+++ b/libjava/classpath/javax/swing/plaf/synth/SynthLookAndFeel.java
@@ -73,7 +73,7 @@ public class SynthLookAndFeel
* Creates a new instance of SynthLookAndFeel. In order to use
* the Synth look and feel you either need to call {@link #load} to load a
* set of styles from an XML file, or you need to call
- * {@link #setStyleFactory} to provide your own style factory.
+ * {@link #setStyleFactory} to provide your own style factory.
*/
public SynthLookAndFeel()
{
diff --git a/libjava/classpath/javax/swing/plaf/synth/SynthPainter.java b/libjava/classpath/javax/swing/plaf/synth/SynthPainter.java
index fa1f6f5..6a57dad 100644
--- a/libjava/classpath/javax/swing/plaf/synth/SynthPainter.java
+++ b/libjava/classpath/javax/swing/plaf/synth/SynthPainter.java
@@ -68,7 +68,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param dir the orientation of the arrow
@@ -86,7 +86,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param dir the orientation of the progress bar
@@ -105,7 +105,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param dir the orientation of the separator
@@ -124,7 +124,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param dir the orientation of the divider
@@ -143,7 +143,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param dir the orientation of the divider
@@ -162,7 +162,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -179,7 +179,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -196,7 +196,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -213,7 +213,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -230,7 +230,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -247,7 +247,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -264,7 +264,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -281,7 +281,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -298,7 +298,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -315,7 +315,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -332,7 +332,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -349,7 +349,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -366,7 +366,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -383,7 +383,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -400,7 +400,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -417,7 +417,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -434,7 +434,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -451,7 +451,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -468,7 +468,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -485,7 +485,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -502,7 +502,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -519,7 +519,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -536,7 +536,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -553,7 +553,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -570,7 +570,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -587,7 +587,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -604,7 +604,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -621,7 +621,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -638,7 +638,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -655,7 +655,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -672,7 +672,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -689,7 +689,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -706,7 +706,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -723,7 +723,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -740,7 +740,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -757,7 +757,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -774,7 +774,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -791,7 +791,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -808,7 +808,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -825,7 +825,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -842,7 +842,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -859,7 +859,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -876,7 +876,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -893,7 +893,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -910,7 +910,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -927,7 +927,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -944,7 +944,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -961,7 +961,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -978,7 +978,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -995,7 +995,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1012,7 +1012,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1029,7 +1029,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1046,7 +1046,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1063,7 +1063,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1080,7 +1080,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1097,7 +1097,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param orientation orientation of the scrollbar
@@ -1115,7 +1115,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param orientation orientation of the scrollbar
@@ -1133,7 +1133,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1150,7 +1150,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1167,7 +1167,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1184,7 +1184,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1201,7 +1201,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1218,7 +1218,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1235,7 +1235,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1252,7 +1252,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1269,7 +1269,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param orientation orientation of the slider
@@ -1287,7 +1287,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param orientation orientation of the slider
@@ -1305,7 +1305,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1322,7 +1322,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1339,7 +1339,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1356,7 +1356,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1373,7 +1373,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1390,7 +1390,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1407,7 +1407,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1424,7 +1424,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1441,7 +1441,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1458,7 +1458,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1475,7 +1475,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1492,7 +1492,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1509,7 +1509,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1526,7 +1526,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param index the index of the tab to paint
@@ -1544,7 +1544,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
* @param index the index of the tab to paint
@@ -1562,7 +1562,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1579,7 +1579,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1596,7 +1596,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1613,7 +1613,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1630,7 +1630,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1647,7 +1647,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1664,7 +1664,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1681,7 +1681,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1698,7 +1698,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1715,7 +1715,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1732,7 +1732,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1749,7 +1749,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1766,7 +1766,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1783,7 +1783,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1800,7 +1800,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1817,7 +1817,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1834,7 +1834,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1851,7 +1851,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1868,7 +1868,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1885,7 +1885,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1902,7 +1902,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1919,7 +1919,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1936,7 +1936,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1953,7 +1953,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1970,7 +1970,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
@@ -1987,7 +1987,7 @@ public abstract class SynthPainter
* painting
* @param g the graphics context to use for painting
* @param x the X coordinate of the area to paint
- * @param y the Y coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
* @param w the width of the area to paint
* @param h the height of the area to paint
*/
diff --git a/libjava/classpath/javax/swing/table/AbstractTableModel.java b/libjava/classpath/javax/swing/table/AbstractTableModel.java
index 743e5d4..7e9886d 100644
--- a/libjava/classpath/javax/swing/table/AbstractTableModel.java
+++ b/libjava/classpath/javax/swing/table/AbstractTableModel.java
@@ -48,9 +48,9 @@ import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
/**
- * A base class that can be used to create implementations of the
+ * A base class that can be used to create implementations of the
* {@link TableModel} interface.
- *
+ *
* @author Andrew Selkirk
*/
public abstract class AbstractTableModel implements TableModel, Serializable
@@ -71,10 +71,10 @@ public abstract class AbstractTableModel implements TableModel, Serializable
}
/**
- * Returns the name of the specified column. This method generates default
- * names in a sequence (starting with column 0): A, B, C, ..., Z, AA, AB,
+ * Returns the name of the specified column. This method generates default
+ * names in a sequence (starting with column 0): A, B, C, ..., Z, AA, AB,
* AC, ..., AZ, BA, BB, BC, and so on. Subclasses may override this method
- * to allow column names to be specified on some other basis.
+ * to allow column names to be specified on some other basis.
*
* @param columnIndex the column index.
*
@@ -98,19 +98,19 @@ public abstract class AbstractTableModel implements TableModel, Serializable
* @param columnName the name of the column (null not permitted).
*
* @return The index of the column, -1 if not found.
- *
+ *
* @see #getColumnName(int)
- * @throws NullPointerException if columnName is
+ * @throws NullPointerException if columnName is
* null.
*/
public int findColumn(String columnName)
{
int count = getColumnCount();
-
+
for (int index = 0; index < count; index++)
{
String name = getColumnName(index);
-
+
if (columnName.equals(name))
return index;
}
@@ -121,10 +121,10 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Returns the Class for all Object instances
- * in the specified column.
- *
+ * in the specified column.
+ *
* @param columnIndex the column index.
- *
+ *
* @return The class.
*/
public Class> getColumnClass(int columnIndex)
@@ -133,9 +133,9 @@ public abstract class AbstractTableModel implements TableModel, Serializable
}
/**
- * Returns true if the specified cell is editable, and
- * false if it is not. This implementation returns
- * false for all arguments, subclasses should override the
+ * Returns true if the specified cell is editable, and
+ * false if it is not. This implementation returns
+ * false for all arguments, subclasses should override the
* method if necessary.
*
* @param rowIndex the row index of the cell.
@@ -149,8 +149,8 @@ public abstract class AbstractTableModel implements TableModel, Serializable
}
/**
- * Sets the value of the given cell. This implementation ignores all
- * arguments and does nothing, subclasses should override the
+ * Sets the value of the given cell. This implementation ignores all
+ * arguments and does nothing, subclasses should override the
* method if necessary.
*
* @param value the new value (null permitted).
@@ -219,7 +219,7 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Sends a {@link TableModelEvent} to all registered listeners to inform
* them that some rows have been inserted into the model.
- *
+ *
* @param firstRow the index of the first row.
* @param lastRow the index of the last row.
*/
@@ -233,7 +233,7 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Sends a {@link TableModelEvent} to all registered listeners to inform
* them that some rows have been updated.
- *
+ *
* @param firstRow the index of the first row.
* @param lastRow the index of the last row.
*/
@@ -247,7 +247,7 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Sends a {@link TableModelEvent} to all registered listeners to inform
* them that some rows have been deleted from the model.
- *
+ *
* @param firstRow the index of the first row.
* @param lastRow the index of the last row.
*/
@@ -261,7 +261,7 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Sends a {@link TableModelEvent} to all registered listeners to inform
* them that a single cell has been updated.
- *
+ *
* @param row the row index.
* @param column the column index.
*/
@@ -272,15 +272,15 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Sends the specified event to all registered listeners.
- *
+ *
* @param event the event to send.
*/
public void fireTableChanged(TableModelEvent event)
{
- int index;
+ int index;
TableModelListener listener;
Object[] list = listenerList.getListenerList();
-
+
for (index = 0; index < list.length; index += 2)
{
listener = (TableModelListener) list [index + 1];
@@ -291,9 +291,9 @@ public abstract class AbstractTableModel implements TableModel, Serializable
/**
* Returns an array of listeners of the given type that are registered with
* this model.
- *
+ *
* @param listenerType the listener class.
- *
+ *
* @return An array of listeners (possibly empty).
*/
public T[] getListeners(Class listenerType)
diff --git a/libjava/classpath/javax/swing/table/DefaultTableCellRenderer.java b/libjava/classpath/javax/swing/table/DefaultTableCellRenderer.java
index 7fecefe..5d4a160 100644
--- a/libjava/classpath/javax/swing/table/DefaultTableCellRenderer.java
+++ b/libjava/classpath/javax/swing/table/DefaultTableCellRenderer.java
@@ -131,7 +131,7 @@ public class DefaultTableCellRenderer extends JLabel
* @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,
@@ -180,8 +180,8 @@ public class DefaultTableCellRenderer extends JLabel
// can avoid filling the background by setting the renderer opaque.
Color back = getBackground();
setOpaque(back != null && back.equals(table.getBackground()));
-
- return this;
+
+ return this;
}
/**
@@ -254,14 +254,14 @@ public class DefaultTableCellRenderer extends JLabel
* do something.
*/
public void firePropertyChange(String propertyName, boolean oldValue,
- boolean newValue)
+ boolean newValue)
{
// Does nothing.
}
/**
* Sets the String for this cell.
- *
+ *
* @param value the string value for this cell; if value is null it
* sets the text value to an empty string
*/
diff --git a/libjava/classpath/javax/swing/table/DefaultTableColumnModel.java b/libjava/classpath/javax/swing/table/DefaultTableColumnModel.java
index 717ea98..532b513 100644
--- a/libjava/classpath/javax/swing/table/DefaultTableColumnModel.java
+++ b/libjava/classpath/javax/swing/table/DefaultTableColumnModel.java
@@ -57,10 +57,10 @@ import javax.swing.event.TableColumnModelListener;
/**
* A model that stores information about the columns used in a {@link JTable}.
- *
+ *
* @see JTable#setColumnModel(TableColumnModel)
- *
- * @author Andrew Selkirk
+ *
+ * @author Andrew Selkirk
*/
public class DefaultTableColumnModel
implements TableColumnModel, PropertyChangeListener, ListSelectionListener,
@@ -89,15 +89,15 @@ public class DefaultTableColumnModel
protected EventListenerList listenerList = new EventListenerList();
/**
- * A change event used when notifying listeners of a change to the
+ * A change event used when notifying listeners of a change to the
* columnMargin field. This single event is reused for all
- * notifications (it is lazily instantiated within the
+ * notifications (it is lazily instantiated within the
* {@link #fireColumnMarginChanged()} method).
*/
protected transient ChangeEvent changeEvent;
/**
- * A flag that indicates whether or not columns can be selected.
+ * A flag that indicates whether or not columns can be selected.
*/
protected boolean columnSelectionAllowed;
@@ -107,10 +107,10 @@ public class DefaultTableColumnModel
protected int totalColumnWidth;
/**
- * Creates a new table column model with zero columns. A default column
+ * Creates a new table column model with zero columns. A default column
* selection model is created by calling {@link #createSelectionModel()}.
* The default value for columnMargin is 1 and
- * the default value for columnSelectionAllowed is
+ * the default value for columnSelectionAllowed is
* false.
*/
public DefaultTableColumnModel()
@@ -123,17 +123,17 @@ public class DefaultTableColumnModel
}
/**
- * Adds a column to the model then calls
+ * Adds a column to the model then calls
* {@link #fireColumnAdded(TableColumnModelEvent)} to notify the registered
* listeners. The model registers itself with the column as a
* {@link PropertyChangeListener} so that changes to the column width will
* invalidate the cached {@link #totalColumnWidth} value.
*
* @param column the column (null not permitted).
- *
- * @throws IllegalArgumentException if column is
+ *
+ * @throws IllegalArgumentException if column is
* null.
- *
+ *
* @see #removeColumn(TableColumn)
*/
public void addColumn(TableColumn column)
@@ -143,18 +143,18 @@ public class DefaultTableColumnModel
tableColumns.add(column);
column.addPropertyChangeListener(this);
invalidateWidthCache();
- fireColumnAdded(new TableColumnModelEvent(this, 0,
+ fireColumnAdded(new TableColumnModelEvent(this, 0,
tableColumns.size() - 1));
}
/**
* Removes a column from the model then calls
* {@link #fireColumnRemoved(TableColumnModelEvent)} to notify the registered
- * listeners. If the specified column does not belong to the model, or is
+ * listeners. If the specified column does not belong to the model, or is
* null, this method does nothing.
*
* @param column the column to be removed (null permitted).
- *
+ *
* @see #addColumn(TableColumn)
*/
public void removeColumn(TableColumn column)
@@ -163,21 +163,21 @@ public class DefaultTableColumnModel
if (index < 0)
return;
tableColumns.remove(column);
- fireColumnRemoved(new TableColumnModelEvent(this, index, 0));
+ fireColumnRemoved(new TableColumnModelEvent(this, index, 0));
column.removePropertyChangeListener(this);
invalidateWidthCache();
}
/**
- * Moves the column at index i to the position specified by index j, then
+ * Moves the column at index i to the position specified by index j, then
* calls {@link #fireColumnMoved(TableColumnModelEvent)} to notify registered
* listeners.
*
* @param i index of the column that will be moved.
* @param j index of the column's new location.
- *
+ *
* @throws IllegalArgumentException if i or j are
- * outside the range 0 to N-1, where
+ * outside the range 0 to N-1, where
* N is the column count.
*/
public void moveColumn(int i, int j)
@@ -195,9 +195,9 @@ public class DefaultTableColumnModel
/**
* Sets the column margin then calls {@link #fireColumnMarginChanged()} to
* notify the registered listeners.
- *
+ *
* @param margin the column margin.
- *
+ *
* @see #getColumnMargin()
*/
public void setColumnMargin(int margin)
@@ -208,7 +208,7 @@ public class DefaultTableColumnModel
/**
* Returns the number of columns in the model.
- *
+ *
* @return The column count.
*/
public int getColumnCount()
@@ -218,7 +218,7 @@ public class DefaultTableColumnModel
/**
* Returns an enumeration of the columns in the model.
- *
+ *
* @return An enumeration of the columns in the model.
*/
public Enumeration getColumns()
@@ -230,10 +230,10 @@ public class DefaultTableColumnModel
* Returns the index of the {@link TableColumn} with the given identifier.
*
* @param identifier the identifier (null 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.
*/
public int getColumnIndex(Object identifier)
@@ -241,7 +241,7 @@ public class DefaultTableColumnModel
if (identifier == null)
throw new IllegalArgumentException("Null identifier.");
int columnCount = tableColumns.size();
- for (int i = 0; i < columnCount; i++)
+ for (int i = 0; i < columnCount; i++)
{
TableColumn tc = tableColumns.get(i);
if (identifier.equals(tc.getIdentifier()))
@@ -252,13 +252,13 @@ public class DefaultTableColumnModel
/**
* Returns the column at the specified index.
- *
- * @param columnIndex the column index (in the range from 0 to
- * N-1, where N is the number of columns in
+ *
+ * @param columnIndex the column index (in the range from 0 to
+ * N-1, where N is the number of columns in
* the model).
- *
+ *
* @return The column at the specified index.
- *
+ *
* @throws ArrayIndexOutOfBoundsException if i is not within
* the specified range.
*/
@@ -269,9 +269,9 @@ public class DefaultTableColumnModel
/**
* Returns the column margin.
- *
+ *
* @return The column margin.
- *
+ *
* @see #setColumnMargin(int)
*/
public int getColumnMargin()
@@ -288,15 +288,15 @@ public class DefaultTableColumnModel
*
individual column widths are taken into account, but the column margin
* is ignored.
*
- * If no column contains the specified position, this method returns
+ * If no column contains the specified position, this method returns
* -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 T[] getListeners(Class listenerType)
@@ -605,23 +605,23 @@ public class DefaultTableColumnModel
/**
* Receives notification of property changes for the columns in the model.
* If the 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)}.
*
- *
+ *
* @param listener the listener to add (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.
*/
Enumeration getColumns();
@@ -108,28 +108,28 @@ public interface TableColumnModel
* Returns the index of the {@link TableColumn} with the given identifier.
*
* @param identifier the identifier (null 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
*
individual column widths are taken into account, but the column margin
* is ignored.
*
- * If no column contains the specified position, this method returns
+ * If no column contains the specified position, this method returns
* -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.
- *
+ *
*
* @param offset the location at which the string should be inserted
* @param text the content to be inserted
@@ -665,7 +665,7 @@ public abstract class AbstractDocument implements Document, Serializable
return;
DefaultDocumentEvent event =
new DefaultDocumentEvent(offset, text.length(),
- DocumentEvent.EventType.INSERT);
+ DocumentEvent.EventType.INSERT);
UndoableEdit undo = content.insertString(offset, text);
if (undo != null)
@@ -1078,14 +1078,14 @@ public abstract class AbstractDocument implements Document, Serializable
// balance by using a finally block:
// readLock()
// try
- // {
- // doSomethingHere
+ // {
+ // doSomethingHere
// }
// finally
// {
// readUnlock();
// }
-
+
// All that the JDK seems to check for is that you don't call unlock
// more times than you've previously called lock, but it doesn't make
// sure that the threads calling unlock were the same ones that called lock
@@ -1096,13 +1096,13 @@ public abstract class AbstractDocument implements Document, Serializable
if (currentWriter == Thread.currentThread())
return;
- // FIXME: the reference implementation throws a
+ // FIXME: the reference implementation throws a
// javax.swing.text.StateInvariantError here
if (numReaders <= 0)
throw new IllegalStateException("document lock failure");
-
- // If currentWriter is not null, the application code probably had a
- // writeLock and then tried to obtain a readLock, in which case
+
+ // If currentWriter is not null, the application code probably had a
+ // writeLock and then tried to obtain a readLock, in which case
// numReaders wasn't incremented
numReaders--;
notify();
@@ -1110,16 +1110,16 @@ public abstract class AbstractDocument implements Document, Serializable
/**
* Removes a piece of content from this 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.
- *
+ *
* @param offset the start offset of the fragment to be removed
* @param length the length of the fragment to be removed
*
@@ -1159,8 +1159,8 @@ public abstract class AbstractDocument implements Document, Serializable
DefaultDocumentEvent event =
new DefaultDocumentEvent(offset, length,
DocumentEvent.EventType.REMOVE);
-
- // The order of the operations below is critical!
+
+ // The order of the operations below is critical!
removeUpdate(event);
UndoableEdit temp = content.remove(offset, length);
@@ -1172,10 +1172,10 @@ public abstract class AbstractDocument implements Document, Serializable
/**
* Replaces a piece of content in this 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.
@@ -1196,7 +1196,7 @@ public abstract class AbstractDocument implements Document, Serializable
throws BadLocationException
{
// Bail out if we have a bogus replacement (Behavior observed in RI).
- if (length == 0
+ if (length == 0
&& (text == null || text.length() == 0))
return;
@@ -1222,9 +1222,9 @@ public abstract class AbstractDocument implements Document, Serializable
writeUnlock();
}
}
-
+
void replaceImpl(int offset, int length, String text,
- AttributeSet attributes)
+ AttributeSet attributes)
throws BadLocationException
{
removeImpl(offset, length);
@@ -1356,7 +1356,7 @@ public abstract class AbstractDocument implements Document, Serializable
}
/**
- * Blocks until a write lock can be obtained. Must wait if there are
+ * Blocks until a write lock can be obtained. Must wait if there are
* readers currently reading or another thread is currently writing.
*/
protected synchronized final void writeLock()
@@ -1882,7 +1882,7 @@ public abstract class AbstractDocument implements Document, Serializable
/**
* Returns the resolve parent of this element.
* This is taken from the AttributeSet, but if this is null,
- * this method instead returns the Element's parent's
+ * this method instead returns the Element's parent's
* AttributeSet
*
* @return the resolve parent of this element
@@ -1919,7 +1919,7 @@ public abstract class AbstractDocument implements Document, Serializable
* is equal to this element's 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 to invisible.
- *
+ *
* @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 this Caret 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();
- }
+ }
/**
* Returns true 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 Actions 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 ElementSpecs 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 '