From: <qa...@us...> - 2006-12-20 08:51:19
|
Revision: 2945 http://jnode.svn.sourceforge.net/jnode/?rev=2945&view=rev Author: qades Date: 2006-12-20 00:51:17 -0800 (Wed, 20 Dec 2006) Log Message: ----------- consolidated arguments added optinal API constraint to DeviceArgument Modified Paths: -------------- trunk/distr/src/apps/org/jnode/apps/edit/EditCommand.java trunk/distr/src/apps/org/jnode/apps/editor/LeedCommand.java trunk/fs/src/driver/org/jnode/driver/block/ramdisk/command/RamDiskCommand.java trunk/fs/src/fs/org/jnode/fs/command/CatCommand.java trunk/fs/src/fs/org/jnode/fs/command/CdCommand.java trunk/fs/src/fs/org/jnode/fs/command/CpCommand.java trunk/fs/src/fs/org/jnode/fs/command/DeleteCommand.java trunk/fs/src/fs/org/jnode/fs/command/DirCommand.java trunk/fs/src/fs/org/jnode/fs/command/EjectCommand.java trunk/fs/src/fs/org/jnode/fs/command/FormatCommand.java trunk/fs/src/fs/org/jnode/fs/command/HexdumpCommand.java trunk/fs/src/fs/org/jnode/fs/command/MkdirCommand.java trunk/fs/src/fs/org/jnode/fs/command/MountCommand.java trunk/fs/src/fs/org/jnode/fs/command/TouchCommand.java trunk/fs/src/fs/org/jnode/fs/ftpfs/command/FTPMountCommand.java trunk/fs/src/fs/org/jnode/fs/jifs/command/createJIFS.java trunk/fs/src/fs/org/jnode/fs/smbfs/command/SMBMountCommand.java trunk/fs/src/fs/org/jnode/partitions/command/FdiskCommand.java trunk/gui/src/awt/org/jnode/awt/JNodeCursors.java trunk/gui/src/driver/org/jnode/driver/video/HardwareCursorImage.java trunk/gui/src/test/org/jnode/test/gui/FBTest.java trunk/net/descriptors/org.jnode.net.command.xml trunk/net/src/net/org/jnode/net/command/BootpCommand.java trunk/net/src/net/org/jnode/net/command/DhcpCommand.java trunk/net/src/net/org/jnode/net/command/IfconfigCommand.java trunk/net/src/net/org/jnode/net/command/NetCommand.java trunk/net/src/net/org/jnode/net/command/PingCommand.java trunk/net/src/net/org/jnode/net/command/ResolverCommand.java trunk/net/src/net/org/jnode/net/command/RouteCommand.java trunk/net/src/net/org/jnode/net/command/TftpCommand.java trunk/net/src/net/org/jnode/net/command/WLanCtlCommand.java trunk/net/src/net/org/jnode/net/ipv4/dhcp/DHCPClient.java trunk/shell/.classpath trunk/shell/descriptors/org.jnode.shell.xml trunk/shell/src/shell/org/jnode/shell/CommandShell.java trunk/shell/src/shell/org/jnode/shell/command/AliasCommand.java trunk/shell/src/shell/org/jnode/shell/command/ClassCommand.java trunk/shell/src/shell/org/jnode/shell/command/ClasspathCommand.java trunk/shell/src/shell/org/jnode/shell/command/CompileCommand.java trunk/shell/src/shell/org/jnode/shell/command/DisassembleCommand.java trunk/shell/src/shell/org/jnode/shell/command/EchoCommand.java trunk/shell/src/shell/org/jnode/shell/command/ExecCommand.java trunk/shell/src/shell/org/jnode/shell/command/GrepCommand.java trunk/shell/src/shell/org/jnode/shell/command/HelpCommand.java trunk/shell/src/shell/org/jnode/shell/command/HistoryCommand.java trunk/shell/src/shell/org/jnode/shell/command/JavaCommand.java trunk/shell/src/shell/org/jnode/shell/command/KillCommand.java trunk/shell/src/shell/org/jnode/shell/command/LoadkeysCommand.java trunk/shell/src/shell/org/jnode/shell/command/LocaleCommand.java trunk/shell/src/shell/org/jnode/shell/command/OnHeapCommand.java trunk/shell/src/shell/org/jnode/shell/command/RunCommand.java trunk/shell/src/shell/org/jnode/shell/command/SetCommand.java trunk/shell/src/shell/org/jnode/shell/command/ThreadCommand.java trunk/shell/src/shell/org/jnode/shell/command/debug/UDPOutputCommand.java trunk/shell/src/shell/org/jnode/shell/command/driver/DeviceCommand.java trunk/shell/src/shell/org/jnode/shell/command/driver/system/acpi/AcpiCommand.java trunk/shell/src/shell/org/jnode/shell/command/log4j/Log4jCommand.java trunk/shell/src/shell/org/jnode/shell/command/plugin/PluginCommand.java trunk/shell/src/shell/org/jnode/shell/command/system/KdbCommand.java trunk/shell/src/shell/org/jnode/shell/command/test/SuiteCommand.java trunk/shell/src/shell/org/jnode/shell/command/test/TestCommand.java trunk/shell/src/shell/org/jnode/shell/help/Argument.java Added Paths: ----------- trunk/net/src/net/org/jnode/net/help/ trunk/net/src/net/org/jnode/net/help/argument/ trunk/net/src/net/org/jnode/net/help/argument/HostArgument.java trunk/net/src/net/org/jnode/net/help/argument/NetworkArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/ trunk/shell/src/shell/org/jnode/shell/help/argument/AliasArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/ClassNameArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/CountryArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/DeviceArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/FileArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/HostNameArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/InetAddressArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/IntegerArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/LanguageArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/LongArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/OptionArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/PluginArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/PropertyNameArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/StringArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/StringListArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/ThreadNameArgument.java trunk/shell/src/shell/org/jnode/shell/help/argument/URLArgument.java Removed Paths: ------------- trunk/net/src/net/org/jnode/net/command/HostArgument.java trunk/net/src/net/org/jnode/net/command/HostNameArgument.java trunk/net/src/net/org/jnode/net/command/NetworkArgument.java trunk/shell/src/shell/org/jnode/shell/help/AliasArgument.java trunk/shell/src/shell/org/jnode/shell/help/ClassNameArgument.java trunk/shell/src/shell/org/jnode/shell/help/CountryArgument.java trunk/shell/src/shell/org/jnode/shell/help/DeviceArgument.java trunk/shell/src/shell/org/jnode/shell/help/FileArgument.java trunk/shell/src/shell/org/jnode/shell/help/InetAddressArgument.java trunk/shell/src/shell/org/jnode/shell/help/IntegerArgument.java trunk/shell/src/shell/org/jnode/shell/help/LanguageArgument.java trunk/shell/src/shell/org/jnode/shell/help/LongArgument.java trunk/shell/src/shell/org/jnode/shell/help/OptionArgument.java trunk/shell/src/shell/org/jnode/shell/help/PluginArgument.java trunk/shell/src/shell/org/jnode/shell/help/PropertyNameArgument.java trunk/shell/src/shell/org/jnode/shell/help/StringArgument.java trunk/shell/src/shell/org/jnode/shell/help/StringListArgument.java trunk/shell/src/shell/org/jnode/shell/help/ThreadNameArgument.java trunk/shell/src/shell/org/jnode/shell/help/URLArgument.java Modified: trunk/distr/src/apps/org/jnode/apps/edit/EditCommand.java =================================================================== --- trunk/distr/src/apps/org/jnode/apps/edit/EditCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/distr/src/apps/org/jnode/apps/edit/EditCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -21,10 +21,10 @@ package org.jnode.apps.edit; -import org.jnode.shell.help.FileArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.FileArgument; import java.io.File; Modified: trunk/distr/src/apps/org/jnode/apps/editor/LeedCommand.java =================================================================== --- trunk/distr/src/apps/org/jnode/apps/editor/LeedCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/distr/src/apps/org/jnode/apps/editor/LeedCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -1,9 +1,9 @@ package org.jnode.apps.editor; -import org.jnode.shell.help.FileArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.FileArgument; import java.io.File; Modified: trunk/fs/src/driver/org/jnode/driver/block/ramdisk/command/RamDiskCommand.java =================================================================== --- trunk/fs/src/driver/org/jnode/driver/block/ramdisk/command/RamDiskCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/driver/org/jnode/driver/block/ramdisk/command/RamDiskCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -25,13 +25,13 @@ import org.jnode.driver.block.ramdisk.RamDiskDevice; import org.jnode.driver.block.ramdisk.RamDiskDriver; import org.jnode.naming.InitialNaming; -import org.jnode.shell.help.DeviceArgument; import org.jnode.shell.help.Help; -import org.jnode.shell.help.IntegerArgument; -import org.jnode.shell.help.OptionArgument; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; import org.jnode.shell.help.Syntax; +import org.jnode.shell.help.argument.DeviceArgument; +import org.jnode.shell.help.argument.IntegerArgument; +import org.jnode.shell.help.argument.OptionArgument; /** * @author Ewout Prangsma (ep...@us...) Modified: trunk/fs/src/fs/org/jnode/fs/command/CatCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/command/CatCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/command/CatCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -33,7 +33,7 @@ import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; -import org.jnode.shell.help.FileArgument; +import org.jnode.shell.help.argument.FileArgument; /** * @author epr Modified: trunk/fs/src/fs/org/jnode/fs/command/CdCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/command/CdCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/command/CdCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -27,10 +27,10 @@ import org.jnode.shell.Command; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.FileArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.FileArgument; /** * @author Ewout Prangsma (ep...@us...) Modified: trunk/fs/src/fs/org/jnode/fs/command/CpCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/command/CpCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/command/CpCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -32,11 +32,11 @@ import java.net.MalformedURLException; import java.net.URL; -import org.jnode.shell.help.FileArgument; import org.jnode.shell.help.Help; -import org.jnode.shell.help.OptionArgument; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.Syntax; +import org.jnode.shell.help.argument.FileArgument; +import org.jnode.shell.help.argument.OptionArgument; /** * Modified: trunk/fs/src/fs/org/jnode/fs/command/DeleteCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/command/DeleteCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/command/DeleteCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -29,10 +29,10 @@ import org.jnode.naming.InitialNaming; import org.jnode.shell.Command; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.FileArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.FileArgument; import javax.naming.NameNotFoundException; Modified: trunk/fs/src/fs/org/jnode/fs/command/DirCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/command/DirCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/command/DirCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -23,10 +23,10 @@ import org.jnode.shell.Command; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.FileArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.FileArgument; import org.jnode.util.NumberUtils; import java.io.File; Modified: trunk/fs/src/fs/org/jnode/fs/command/EjectCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/command/EjectCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/command/EjectCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -28,10 +28,10 @@ import org.jnode.driver.RemovableDeviceAPI; import org.jnode.shell.Command; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.DeviceArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.DeviceArgument; /** Modified: trunk/fs/src/fs/org/jnode/fs/command/FormatCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/command/FormatCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/command/FormatCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -40,12 +40,12 @@ import org.jnode.naming.InitialNaming; import org.jnode.shell.Command; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.DeviceArgument; import org.jnode.shell.help.Help; -import org.jnode.shell.help.OptionArgument; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; import org.jnode.shell.help.Syntax; +import org.jnode.shell.help.argument.DeviceArgument; +import org.jnode.shell.help.argument.OptionArgument; /** * @author gbin Modified: trunk/fs/src/fs/org/jnode/fs/command/HexdumpCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/command/HexdumpCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/command/HexdumpCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -7,10 +7,10 @@ import org.jnode.shell.Command; import org.jnode.shell.CommandLine; import org.jnode.shell.help.Argument; -import org.jnode.shell.help.FileArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.FileArgument; import org.jnode.util.NumberUtils; import java.io.File; Modified: trunk/fs/src/fs/org/jnode/fs/command/MkdirCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/command/MkdirCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/command/MkdirCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -27,10 +27,10 @@ import org.jnode.shell.Command; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.FileArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.FileArgument; /** * @author Guillaume BINET (gb...@us...) Modified: trunk/fs/src/fs/org/jnode/fs/command/MountCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/command/MountCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/command/MountCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -30,11 +30,11 @@ import org.jnode.naming.InitialNaming; import org.jnode.shell.Command; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.DeviceArgument; -import org.jnode.shell.help.FileArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.DeviceArgument; +import org.jnode.shell.help.argument.FileArgument; /** * @author Ewout Prangsma (ep...@us...) Modified: trunk/fs/src/fs/org/jnode/fs/command/TouchCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/command/TouchCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/command/TouchCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -27,10 +27,10 @@ import org.jnode.shell.Command; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.FileArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.FileArgument; /** * Touch a file Modified: trunk/fs/src/fs/org/jnode/fs/ftpfs/command/FTPMountCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ftpfs/command/FTPMountCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/ftpfs/command/FTPMountCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -33,10 +33,10 @@ import org.jnode.shell.CommandLine; import org.jnode.shell.Command; import org.jnode.shell.help.Argument; -import org.jnode.shell.help.FileArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.FileArgument; import java.io.InputStream; import java.io.PrintStream; Modified: trunk/fs/src/fs/org/jnode/fs/jifs/command/createJIFS.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jifs/command/createJIFS.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/jifs/command/createJIFS.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -33,10 +33,10 @@ import org.jnode.shell.Command; import org.jnode.shell.CommandLine; import org.jnode.shell.help.Help; -import org.jnode.shell.help.OptionArgument; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; import org.jnode.shell.help.Syntax; +import org.jnode.shell.help.argument.OptionArgument; /** * Just mounts initial JIFS on /Jifs Modified: trunk/fs/src/fs/org/jnode/fs/smbfs/command/SMBMountCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/smbfs/command/SMBMountCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/fs/smbfs/command/SMBMountCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -21,11 +21,11 @@ package org.jnode.fs.smbfs.command; -import org.jnode.shell.help.FileArgument; import org.jnode.shell.help.Argument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.FileArgument; import org.jnode.shell.CommandLine; import org.jnode.fs.service.FileSystemService; import org.jnode.fs.FileSystemType; Modified: trunk/fs/src/fs/org/jnode/partitions/command/FdiskCommand.java =================================================================== --- trunk/fs/src/fs/org/jnode/partitions/command/FdiskCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/fs/src/fs/org/jnode/partitions/command/FdiskCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -45,14 +45,14 @@ import org.jnode.partitions.ibm.IBMPartitionTableEntry; import org.jnode.partitions.ibm.IBMPartitionTableType; import org.jnode.partitions.ibm.IBMPartitionTypes; -import org.jnode.shell.help.DeviceArgument; import org.jnode.shell.help.Help; -import org.jnode.shell.help.OptionArgument; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; -import org.jnode.shell.help.StringArgument; import org.jnode.shell.help.Syntax; import org.jnode.shell.help.SyntaxErrorException; +import org.jnode.shell.help.argument.DeviceArgument; +import org.jnode.shell.help.argument.OptionArgument; +import org.jnode.shell.help.argument.StringArgument; /** * @author gbin * @author Trickkiste Modified: trunk/gui/src/awt/org/jnode/awt/JNodeCursors.java =================================================================== --- trunk/gui/src/awt/org/jnode/awt/JNodeCursors.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/gui/src/awt/org/jnode/awt/JNodeCursors.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -29,140 +29,186 @@ */ public class JNodeCursors { - /** White */ - private static final int W = 0xFFFFFFFF; - /** Black */ - private static final int B = 0xFF000000; - /** Transparent */ - private static final int T = 0x00000000; - private static final int[] ARROW_IMAGE_16x16 = { - B, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, - T, B, W, W, B, T, T, T, T, T, T, T, T, T, T, T, - T, B, W, W, B, T, T, T, T, T, T, T, T, T, T, T, - T, T, B, W, B, T, T, T, T, T, T, T, T, T, T, T, - T, T, B, B, T, T, T, T, T, T, T, T, T, T, T, T, + private static final String ARROW_IMAGE_16x16 = + "BBTTTTTTTTTTTTTT" + + "BWBTTTTTTTTTTTTT" + + "BWWBTTTTTTTTTTTT" + + "BWWWBTTTTTTTTTTT" + + "BWWWWBTTTTTTTTTT" + + "BWWWWWBTTTTTTTTT" + + "BWWWWWWBTTTTTTTT" + + "BWWWWWWWBTTTTTTT" + + "BWWWWWWWWBTTTTTT" + + "BWWWWWWWWWBTTTTT" + + "BWWBWWWBBBBBTTTT" + + "BWBTBWWBTTTTTTTT" + + "BBTTTBWWBTTTTTTT" + + "TTTTTTBWWBTTTTTT" + + "TTTTTTTBWWBTTTTT" + + "TTTTTTTTBBBTTTTT"; + + private static final String ARROW_IMAGE_32x32 = + "BTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "BBTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "BWBTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "BWWBTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "BWWWBTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "BWWWWBTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "BWWWWWBTTTTTTTTTTTTTTTTTTTTTTTTT" + + "BWWWWWWBTTTTTTTTTTTTTTTTTTTTTTTT" + + "BWWWWWWWBTTTTTTTTTTTTTTTTTTTTTTT" + + "BWWWWWWWWBTTTTTTTTTTTTTTTTTTTTTT" + + "BWWWWWWWWWBTTTTTTTTTTTTTTTTTTTTT" + + "BWWWWWWWWWWBTTTTTTTTTTTTTTTTTTTT" + + "BWWWWWWWWWWWBTTTTTTTTTTTTTTTTTTT" + + "BWWWWWWWWWWWWBTTTTTTTTTTTTTTTTTT" + + "BWWWWWWWWWWWWWBTTTTTTTTTTTTTTTTT" + + "BWWWWWWWWWWWWWWBTTTTTTTTTTTTTTTT" + + "BWWWWWWWWWWWWWWWBTTTTTTTTTTTTTTT" + + "BWWWWWWWWWWWWWWWWBTTTTTTTTTTTTTT" + + "BWWWWWWWWWWWWWWWWWBTTTTTTTTTTTTT" + + "BWWWWWWWWWWWWWWWWWWBTTTTTTTTTTTT" + + "BWWWWWWWWWWWWWWWWWWWBTTTTTTTTTTT" + + "BWWWWWWWWWWWWWWWWWWWWBTTTTTTTTTT" + + "BWWWWWWWWWWWWWWWWWWWWWBTTTTTTTTT" + + "BWWWWWWBWWWWWWBBBBBBBBBBTTTTTTTT" + + "BWWWWWBTBWWWWWWBTTTTTTTTTTTTTTTT" + + "BWWWWBTTTBWWWWWWBTTTTTTTTTTTTTTT" + + "BWWWBTTTTTBWWWWWWBTTTTTTTTTTTTTT" + + "BWWBTTTTTTTBWWWWWWBTTTTTTTTTTTTT" + + "BWBTTTTTTTTTBWWWWWWBTTTTTTTTTTTT" + + "BBTTTTTTTTTTTBWWWWWWBTTTTTTTTTTT" + + "BTTTTTTTTTTTTTBWWWWWWBTTTTTTTTTT" + + "TTTTTTTTTTTTTTTBBBBBBBBTTTTTTTTT"; +/* + private static final String ARROW_IMAGE_16x16 = { + BBTTTTTTTTTTTTTT, + BWBTTTTTTTTTTTTT, + BWBTTTTTTTTTTTTT, + BWWBTTTTTTTTTTTT, + BWWBTTTTTTTTTTTT, + BWWWBTTTTTTTTTTT, + BWWWBTTTTTTTTTTT, + BWWWWBTTTTTTTTTT, + BWWWWBTTTTTTTTTT, + BWWWBTTTTTTTTTTT, + BWWBTTTTTTTTTTTT, + BWWBTTTTTTTTTTTT, + TBWWBTTTTTTTTTTT, + TBWWBTTTTTTTTTTT, + TTBWBTTTTTTTTTTT, + TTBBTTTTTTTTTTTT, }; private static final int[] ARROW_IMAGE_32x32 = { - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, W, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, W, W, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, W, W, W, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, W, W, W, W, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, W, W, W, W, W, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, W, W, W, W, W, W, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, W, W, W, W, W, W, W, W, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, W, W, W, W, B, B, B, B, B, B, B, B, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, W, B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, W, B, T, B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, W, B, T, T, B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, W, B, T, T, T, T, B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, B, T, T, T, T, T, B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - B, T, T, T, T, T, T, T, B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, B, W, W, W, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, B, B, B, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, + TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT, + BTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT, + BBTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT, + BWBTTTTTTTTTTTTTTTTTTTTTTTTTTTTT, + BWWBTTTTTTTTTTTTTTTTTTTTTTTTTTTT, + BWWWBTTTTTTTTTTTTTTTTTTTTTTTTTTT, + BWWWWBTTTTTTTTTTTTTTTTTTTTTTTTTT, + BWWWWWBTTTTTTTTTTTTTTTTTTTTTTTTT, + BWWWWWWBTTTTTTTTTTTTTTTTTTTTTTTT, + BWWWWWWWBTTTTTTTTTTTTTTTTTTTTTTT, + BWWWWWWWWBTTTTTTTTTTTTTTTTTTTTTT, + BWWWWWWWWWBTTTTTTTTTTTTTTTTTTTTT, + BWWWWWWWWWWBTTTTTTTTTTTTTTTTTTTT, + BWWWWWWWWWWWBTTTTTTTTTTTTTTTTTTT, + BWWWWWWWWWWWWBTTTTTTTTTTTTTTTTTT, + BWWWWWWWWWWWWWBTTTTTTTTTTTTTTTTT, + BWWWWWWWWWWWWWWBTTTTTTTTTTTTTTTT, + BWWWWWWWWWWWWWWWBTTTTTTTTTTTTTTT, + BWWWWWWWWBBBBBBBBBTTTTTTTTTTTTTT, + BWWWWBWWWBTTTTTTTTTTTTTTTTTTTTTT, + BWWWBTBWWWBTTTTTTTTTTTTTTTTTTTTT, + BWWBTTBWWWBTTTTTTTTTTTTTTTTTTTTT, + BWBTTTTBWWWBTTTTTTTTTTTTTTTTTTTT, + BBTTTTTBWWWBTTTTTTTTTTTTTTTTTTTT, + BTTTTTTTBWWWBTTTTTTTTTTTTTTTTTTT, + TTTTTTTTBWWWBTTTTTTTTTTTTTTTTTTT, + TTTTTTTTTBWWWBTTTTTTTTTTTTTTTTTT, + TTTTTTTTTBWWWBTTTTTTTTTTTTTTTTTT, + TTTTTTTTTTBWWWBTTTTTTTTTTTTTTTTT, + TTTTTTTTTTBWWWBTTTTTTTTTTTTTTTTT, + TTTTTTTTTTTBBBTTTTTTTTTTTTTTTTTT, + TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT, }; +*/ + private static final String RESIZE_VERTICAL_IMAGE_16x16 = + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTBTTTTTTTTBTTT" + + "TTBTTTTTTTTTTBTT" + + "TBTTTTTTTTTTTTBT" + + "BBBBBBBBBBBBBBBB" + + "TBTTTTTTTTTTTTBT" + + "TTBTTTTTTTTTTBTT" + + "TTTBTTTTTTTTBTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + ; -// private static final int[] ARROW_IMAGE_32x32 = { -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, -// }; + + // --- Templates --- + + private static final String EMPTY_IMAGE_16x16 = + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTT"; - // to be used for feature cursors - /* - private static final int[] EMPTY_IMAGE_16x16 = { - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - };*/ - private static final int[] RESIZE_VERTICAL_IMAGE_16x16 = { - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, B, T, T, T, T, T, T, T, T, B, T, T, T, - T, T, B, T, T, T, T, T, T, T, T, T, T, B, T, T, - T, B, T, T, T, T, T, T, T, T, T, T, T, T, B, T, - B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, B, - T, B, T, T, T, T, T, T, T, T, T, T, T, T, B, T, - T, T, B, T, T, T, T, T, T, T, T, T, T, B, T, T, - T, T, T, B, T, T, T, T, T, T, T, T, B, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, - }; + private static final String EMPTY_IMAGE_32x32 = + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT" + + "TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT"; private static HardwareCursorImage ARROW_16x16 = new HardwareCursorImage(16, 16, ARROW_IMAGE_16x16, 0, 0); private static HardwareCursorImage ARROW_32x32 = new HardwareCursorImage(32, 32, ARROW_IMAGE_32x32, 0, 0); Modified: trunk/gui/src/driver/org/jnode/driver/video/HardwareCursorImage.java =================================================================== --- trunk/gui/src/driver/org/jnode/driver/video/HardwareCursorImage.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/gui/src/driver/org/jnode/driver/video/HardwareCursorImage.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -25,7 +25,14 @@ * @author Ewout Prangsma (ep...@us...) */ public class HardwareCursorImage { - + + /** White */ + private static final int W = 0xFFFFFFFF; + /** Black */ + private static final int B = 0xFF000000; + /** Transparent */ + private static final int T = 0x00000000; + private final int width; private final int height; private final int[] image; @@ -52,6 +59,46 @@ } /** + * Initialize this instance by parsing the pixels from a given String. + * @param width + * @param height + * @param image + * @param hotSpotX + * @param hotSpotY + */ + public HardwareCursorImage(int width, int height, String image, int hotSpotX, int hotSpotY) { + if (image.length() != width * height) { + throw new IllegalArgumentException("Invalid image length"); + } + this.width = width; + this.height = height; + this.image = parse(image); + this.hotSpotX = hotSpotX; + this.hotSpotY = hotSpotY; + } + + private int[] parse(String image) { + int[] res = new int[image.length()]; + int i = 0; + for( char c : image.toCharArray() ) { + switch( c ) { + case 'T': + res[i++] = T; + break; + case 'B': + res[i++] = B; + break; + case 'W': + res[i++] = W; + break; + default: + throw new IllegalArgumentException("Unknown pixel color indicator '" + c + "'"); + } + } + return res; + } + + /** * Gets the argb image. * @return int[] */ Modified: trunk/gui/src/test/org/jnode/test/gui/FBTest.java =================================================================== --- trunk/gui/src/test/org/jnode/test/gui/FBTest.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/gui/src/test/org/jnode/test/gui/FBTest.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -39,9 +39,9 @@ import org.jnode.driver.video.Surface; import org.jnode.naming.InitialNaming; import org.jnode.shell.help.Argument; -import org.jnode.shell.help.DeviceArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; +import org.jnode.shell.help.argument.DeviceArgument; /** * @author epr Modified: trunk/net/descriptors/org.jnode.net.command.xml =================================================================== --- trunk/net/descriptors/org.jnode.net.command.xml 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/net/descriptors/org.jnode.net.command.xml 2006-12-20 08:51:17 UTC (rev 2945) @@ -30,6 +30,7 @@ <alias name="ping" class="org.jnode.net.command.PingCommand"/> <alias name="route" class="org.jnode.net.command.RouteCommand"/> <alias name="resolver" class="org.jnode.net.command.ResolverCommand"/> + <alias name="resolve" class="org.jnode.net.command.ResolveCommand"/> <alias name="tftp" class="org.jnode.net.command.TftpCommand"/> <alias name="wlanctl" class="org.jnode.net.command.WLanCtlCommand"/> <alias name="net" class="org.jnode.net.command.NetCommand"/> Modified: trunk/net/src/net/org/jnode/net/command/BootpCommand.java =================================================================== --- trunk/net/src/net/org/jnode/net/command/BootpCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/net/src/net/org/jnode/net/command/BootpCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -25,21 +25,22 @@ import java.io.PrintStream; import org.jnode.driver.Device; +import org.jnode.driver.net.NetDeviceAPI; import org.jnode.naming.InitialNaming; import org.jnode.net.ipv4.config.IPv4ConfigurationService; import org.jnode.shell.Command; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.DeviceArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.DeviceArgument; /** * @author epr */ public class BootpCommand implements Command { - static final DeviceArgument ARG_DEVICE = new DeviceArgument("device", "the device to boot from"); + static final DeviceArgument ARG_DEVICE = new DeviceArgument("device", "the device to boot from", NetDeviceAPI.class); public static Help.Info HELP_INFO = new Help.Info( "bootp", Modified: trunk/net/src/net/org/jnode/net/command/DhcpCommand.java =================================================================== --- trunk/net/src/net/org/jnode/net/command/DhcpCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/net/src/net/org/jnode/net/command/DhcpCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -25,21 +25,22 @@ import java.io.PrintStream; import org.jnode.driver.Device; +import org.jnode.driver.net.NetDeviceAPI; import org.jnode.naming.InitialNaming; import org.jnode.net.ipv4.config.IPv4ConfigurationService; import org.jnode.shell.Command; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.DeviceArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.argument.DeviceArgument; /** * @author markhale */ public class DhcpCommand implements Command { - static final DeviceArgument ARG_DEVICE = new DeviceArgument("device", "the device to boot from"); + static final DeviceArgument ARG_DEVICE = new DeviceArgument("device", "the device to boot from", NetDeviceAPI.class); public static Help.Info HELP_INFO = new Help.Info( "dhcp", Deleted: trunk/net/src/net/org/jnode/net/command/HostArgument.java =================================================================== --- trunk/net/src/net/org/jnode/net/command/HostArgument.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/net/src/net/org/jnode/net/command/HostArgument.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -1,49 +0,0 @@ -/* - * $Id$ - * - * JNode.org - * Copyright (C) 2003-2006 JNode.org - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * This library 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 Lesser General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; If not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package org.jnode.net.command; - -import org.jnode.net.ipv4.IPv4Address; -import org.jnode.shell.help.Argument; -import org.jnode.shell.help.ParsedArguments; - -/** - * @author qades - */ -public class HostArgument extends Argument { - - public HostArgument(String name, String description, boolean multi) { - super(name, description, multi); - } - - public HostArgument(String name, String description) { - super(name, description); - } - - // here the specific command line completion would be implemented - - public IPv4Address getAddress(ParsedArguments args) { - String value = getValue(args); - if( value == null ) - return null; - return new IPv4Address(value); - } -} Deleted: trunk/net/src/net/org/jnode/net/command/HostNameArgument.java =================================================================== --- trunk/net/src/net/org/jnode/net/command/HostNameArgument.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/net/src/net/org/jnode/net/command/HostNameArgument.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -1,57 +0,0 @@ -/* - * $Id$ - * - * JNode.org - * Copyright (C) 2003-2006 JNode.org - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * This library 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 Lesser General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; If not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package org.jnode.net.command; - -import org.jnode.shell.help.Argument; -import org.jnode.shell.help.ParsedArguments; - -import java.net.InetAddress; -import java.net.UnknownHostException; - -/** - * @author Martin Hartvig - */ - -public class HostNameArgument extends Argument -{ - - public HostNameArgument(String _name, String _description, boolean _multi) - { - super(_name, _description, _multi); - } - - public HostNameArgument(String _name, String _description) - { - super(_name, _description); - } - - - public InetAddress getAddress(ParsedArguments _parsedArguments) throws UnknownHostException - { - String value = getValue(_parsedArguments); - - if (value == null) - return null; - - return InetAddress.getByName(value); - } -} Modified: trunk/net/src/net/org/jnode/net/command/IfconfigCommand.java =================================================================== --- trunk/net/src/net/org/jnode/net/command/IfconfigCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/net/src/net/org/jnode/net/command/IfconfigCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -29,22 +29,23 @@ import org.jnode.driver.net.NetDeviceAPI; import org.jnode.naming.InitialNaming; import org.jnode.net.ethernet.EthernetConstants; +import org.jnode.net.help.argument.HostArgument; import org.jnode.net.ipv4.IPv4Address; import org.jnode.net.ipv4.config.IPv4ConfigurationService; import org.jnode.shell.Command; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.DeviceArgument; import org.jnode.shell.help.Help; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; import org.jnode.shell.help.Syntax; +import org.jnode.shell.help.argument.DeviceArgument; /** * @author epr */ public class IfconfigCommand implements Command { - static final DeviceArgument ARG_DEVICE = new DeviceArgument("device", "the device"); + static final DeviceArgument ARG_DEVICE = new DeviceArgument("device", "the device", NetDeviceAPI.class); static final HostArgument ARG_IP_ADDRESS = new HostArgument("ip-address", "the IP address to bind the device to"); static final HostArgument ARG_SUBNET_MASK = new HostArgument("subnet-mask", "if given, specifies the range of reachable subnets"); Modified: trunk/net/src/net/org/jnode/net/command/NetCommand.java =================================================================== --- trunk/net/src/net/org/jnode/net/command/NetCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/net/src/net/org/jnode/net/command/NetCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -13,11 +13,11 @@ import org.jnode.shell.CommandLine; import org.jnode.shell.help.Help; -import org.jnode.shell.help.InetAddressArgument; -import org.jnode.shell.help.IntegerArgument; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; import org.jnode.shell.help.Syntax; +import org.jnode.shell.help.argument.InetAddressArgument; +import org.jnode.shell.help.argument.IntegerArgument; public class NetCommand { Deleted: trunk/net/src/net/org/jnode/net/command/NetworkArgument.java =================================================================== --- trunk/net/src/net/org/jnode/net/command/NetworkArgument.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/net/src/net/org/jnode/net/command/NetworkArgument.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -1,49 +0,0 @@ -/* - * $Id$ - * - * JNode.org - * Copyright (C) 2003-2006 JNode.org - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * This library 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 Lesser General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; If not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -package org.jnode.net.command; - -import org.jnode.net.ipv4.IPv4Address; -import org.jnode.shell.help.Argument; -import org.jnode.shell.help.ParsedArguments; - -/** - * @author qades - */ -public class NetworkArgument extends Argument { - - public NetworkArgument(String name, String description, boolean multi) { - super(name, description, multi); - } - - public NetworkArgument(String name, String description) { - super(name, description); - } - - // here the specific command line completion would be implemented - - public IPv4Address getAddress(ParsedArguments args) { - String value = getValue(args); - if( "default".equals(value) ) - value = "0.0.0.0"; - return new IPv4Address(value); - } -} Modified: trunk/net/src/net/org/jnode/net/command/PingCommand.java =================================================================== --- trunk/net/src/net/org/jnode/net/command/PingCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/net/src/net/org/jnode/net/command/PingCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -42,6 +42,7 @@ import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; import org.jnode.shell.help.Syntax; +import org.jnode.shell.help.argument.HostNameArgument; /** * @author JPG Modified: trunk/net/src/net/org/jnode/net/command/ResolverCommand.java =================================================================== --- trunk/net/src/net/org/jnode/net/command/ResolverCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/net/src/net/org/jnode/net/command/ResolverCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -23,12 +23,18 @@ import java.io.InputStream; import java.io.PrintStream; +import java.util.Collection; +import org.jnode.net.help.argument.HostArgument; import org.jnode.net.ipv4.IPv4Address; import org.jnode.net.ipv4.util.ResolverImpl; import org.jnode.shell.Command; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.*; +import org.jnode.shell.help.Help; +import org.jnode.shell.help.Parameter; +import org.jnode.shell.help.ParsedArguments; +import org.jnode.shell.help.Syntax; +import org.jnode.shell.help.argument.OptionArgument; public class ResolverCommand implements Command @@ -70,8 +76,15 @@ if (cmdLine.size() == 0) { - System.out.println("DNS servers"); - ResolverImpl.printDnsServers(); + Collection<String> resolvers = ResolverImpl.getDnsServers(); + if( resolvers == null ) + System.out.println("No DNS servers found."); + else { + System.out.println("DNS servers"); + for (String dnsServer : resolvers) { + System.out.println(dnsServer); + } + } } else { Modified: trunk/net/src/net/org/jnode/net/command/RouteCommand.java =================================================================== --- trunk/net/src/net/org/jnode/net/command/RouteCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/net/src/net/org/jnode/net/command/RouteCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -27,18 +27,20 @@ import org.jnode.driver.Device; import org.jnode.naming.InitialNaming; import org.jnode.net.ethernet.EthernetConstants; +import org.jnode.net.help.argument.HostArgument; +import org.jnode.net.help.argument.NetworkArgument; import org.jnode.net.ipv4.IPv4Address; import org.jnode.net.ipv4.config.IPv4ConfigurationService; import org.jnode.net.ipv4.layer.IPv4NetworkLayer; import org.jnode.net.util.NetUtils; import org.jnode.shell.Command; import org.jnode.shell.CommandLine; -import org.jnode.shell.help.DeviceArgument; import org.jnode.shell.help.Help; -import org.jnode.shell.help.OptionArgument; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; import org.jnode.shell.help.Syntax; +import org.jnode.shell.help.argument.DeviceArgument; +import org.jnode.shell.help.argument.OptionArgument; /** * @author epr Modified: trunk/net/src/net/org/jnode/net/command/TftpCommand.java =================================================================== --- trunk/net/src/net/org/jnode/net/command/TftpCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/net/src/net/org/jnode/net/command/TftpCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -24,14 +24,15 @@ import java.io.InputStream; import java.io.PrintStream; +import org.jnode.net.help.argument.HostArgument; import org.jnode.net.ipv4.tftp.TFTPClient; import org.jnode.shell.Command; import org.jnode.shell.CommandLine; import org.jnode.shell.help.Argument; import org.jnode.shell.help.Help; -import org.jnode.shell.help.OptionArgument; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.Syntax; +import org.jnode.shell.help.argument.OptionArgument; /** * @author markhale Modified: trunk/net/src/net/org/jnode/net/command/WLanCtlCommand.java =================================================================== --- trunk/net/src/net/org/jnode/net/command/WLanCtlCommand.java 2006-12-20 03:33:57 UTC (rev 2944) +++ trunk/net/src/net/org/jnode/net/command/WLanCtlCommand.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -32,12 +32,12 @@ import org.jnode.shell.Command; import org.jnode.shell.CommandLine; import org.jnode.shell.help.Argument; -import org.jnode.shell.help.DeviceArgument; import org.jnode.shell.help.Help; -import org.jnode.shell.help.OptionArgument; import org.jnode.shell.help.Parameter; import org.jnode.shell.help.ParsedArguments; import org.jnode.shell.help.SyntaxErrorException; +import org.jnode.shell.help.argument.DeviceArgument; +import org.jnode.shell.help.argument.OptionArgument; /** * @author Ewout Prangsma (ep...@us...) @@ -52,7 +52,7 @@ FUNC_SETESSID, "Set the ESSID"), }); private static final DeviceArgument ARG_DEVICE = new DeviceArgument( - "device", "the device to control"); + "device", "the device to control", WirelessNetDeviceAPI.class); private static final Argument ARG_VALUE = new Argument("value", "Value of the function"); Added: trunk/net/src/net/org/jnode/net/help/argument/HostArgument.java =================================================================== --- trunk/net/src/net/org/jnode/net/help/argument/HostArgument.java (rev 0) +++ trunk/net/src/net/org/jnode/net/help/argument/HostArgument.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -0,0 +1,49 @@ +/* + * $Id: HostArgument.java 2224 2006-01-01 12:49:03Z epr $ + * + * JNode.org + * Copyright (C) 2003-2006 JNode.org + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; If not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package org.jnode.net.help.argument; + +import org.jnode.net.ipv4.IPv4Address; +import org.jnode.shell.help.Argument; +import org.jnode.shell.help.ParsedArguments; + +/** + * @author qades + */ +public class HostArgument extends Argument { + + public HostArgument(String name, String description, boolean multi) { + super(name, description, multi); + } + + public HostArgument(String name, String description) { + super(name, description); + } + + // here the specific command line completion would be implemented + + public IPv4Address getAddress(ParsedArguments args) { + String value = getValue(args); + if( value == null ) + return null; + return new IPv4Address(value); + } +} Added: trunk/net/src/net/org/jnode/net/help/argument/NetworkArgument.java =================================================================== --- trunk/net/src/net/org/jnode/net/help/argument/NetworkArgument.java (rev 0) +++ trunk/net/src/net/org/jnode/net/help/argument/NetworkArgument.java 2006-12-20 08:51:17 UTC (rev 2945) @@ -0,0 +1,49 @@ +/* + * $Id: NetworkArgument.java 2224 2006-01-01 12:49:03Z epr $ + * + * JNode.org + * Copyright (C) 2003-2006 JNode.org + * + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library 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 Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; If not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +package org.jnode.net.help.argument; + +import org.jnode.net.ipv4.IPv4Address; +import org.jnode.shell.help.Argument; +import org.jnode.shell.help.ParsedArguments; + +/** + * @author qades + */ +public class NetworkArgument extends Argument { + + public NetworkArgument(String name, String description, boolean multi) { + super(name, description, multi); + } + + public NetworkArgument(String name, String description) { + super(name, description); + } + + // here the specific command line completion would be implemented + + public IPv4Address getAddress(ParsedArguments args) { + String value = getValue(args); + if( "default".equals(value) ) + value = "0.0.0.0"; + return new IPv4Address(value); + } +} Modified: trunk/net/src/net/org/jnode/net/ipv4/dhcp/DHCPClient.java ==============================... [truncated message content] |