Java Doc for SColor.java in  » Swing-Library » Swinglets » com » javelin » swinglets » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » Swinglets » com.javelin.swinglets 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.javelin.swinglets.SColor

SColor
public class SColor (Code)
SColor is a Support class for mapping AWT colors to web colors.

SColor caches SColor objects, as well as the Hex Strings used to render colors to web pages.

SColor allows colors to be loaded by name using the getColor() method. The following colors are available.

snow,ghost white,ghostwhite,white smoke,whitesmoke,gainsboro,floral white, floralwhite,old lace,oldlace,linen,antique white,antiquewhite,papaya whip, papayawhip,blanched almond,blanchedalmond,bisque,peach puff,peachpuff, navajo white,navajowhite,moccasin,cornsilk,ivory,lemon chiffon,lemonchiffon, seashell,honeydew,mint cream,mintcream,azure,alice blue,aliceblue,lavender, lavender blush,lavenderblush,misty rose,mistyrose,white,black,dark slate gray, darkslategray,dark slate grey,darkslategrey,dim gray,dimgray,dim grey, dimgrey,slate gray,slategray,slate grey,slategrey,light slate gray, lightslategray,light slate grey,lightslategrey,gray,grey,light grey, lightgrey,light gray,lightgray,midnight blue,midnightblue,navy, navy blue,navyblue,cornflower blue,cornflowerblue,dark slate blue, darkslateblue,slate blue,slateblue,medium slate blue,mediumslateblue, light slate blue,lightslateblue,medium blue,mediumblue,royal blue, royalblue,blue,dodger blue,dodgerblue,deep sky blue,deepskyblue, sky blue,skyblue,light sky blue,lightskyblue,steel blue,steelblue, light steel blue,lightsteelblue,light blue,lightblue,powder blue, powderblue,pale turquoise,paleturquoise,dark turquoise,darkturquoise, medium turquoise,mediumturquoise,turquoise,cyan,light cyan,lightcyan, cadet blue,cadetblue,medium aquamarine,mediumaquamarine,aquamarine, dark green,darkgreen,dark olive green,darkolivegreen,dark sea green, darkseagreen,sea green,seagreen,medium sea green,mediumseagreen, light sea green,lightseagreen,pale green,palegreen,spring green, springgreen,lawn green,lawngreen,green,chartreuse,medium spring green, mediumspringgreen,green yellow,greenyellow,lime green,limegreen,yellow green, yellowgreen,forest green,forestgreen,olive drab,olivedrab,dark khaki, darkkhaki,khaki,pale goldenrod,palegoldenrod,light goldenrod yellow, lightgoldenrodyellow,light yellow,lightyellow,yellow,gold,light goldenrod, lightgoldenrod,goldenrod,dark goldenrod,darkgoldenrod,rosy brown, rosybrown,indian red,indianred,saddle brown,saddlebrown,sienna, peru,burlywood,beige,wheat,sandy brown,sandybrown,tan,chocolate,firebrick, brown,dark salmon,darksalmon,salmon,light salmon,lightsalmon, orange,dark orange,darkorange,coral,light coral,lightcoral, tomato,orange red,orangered,red,hot pink,hotpink,deep pink,deeppink, pink,light pink,lightpink,pale violet red,palevioletred, maroon,medium violet red,mediumvioletred,violet red,violetred,magenta, violet,plum,orchid,medium orchid,mediumorchid,dark orchid,darkorchid, dark violet,darkviolet,blue violet,blueviolet,purple,medium purple, mediumpurple,thistle,snow1,snow2,snow3,snow4,seashell1,seashell2, seashell3,seashell4,antiquewhite1,antiquewhite2,antiquewhite3,antiquewhite4, bisque1,bisque2,bisque3,bisque4,peachpuff1,peachpuff2,peachpuff3,peachpuff4, navajowhite1,navajowhite2,navajowhite3,navajowhite4,lemonchiffon1, lemonchiffon2,lemonchiffon3,lemonchiffon4,cornsilk1,cornsilk2, cornsilk3,cornsilk4,ivory1,ivory2,ivory3,ivory4,honeydew1,honeydew2, honeydew3,honeydew4,lavenderblush1,lavenderblush2,lavenderblush3, lavenderblush4,mistyrose1,mistyrose2,mistyrose3,mistyrose4,azure1, azure2,azure3,azure4,slateblue1,slateblue2,slateblue3,slateblue4, royalblue1,royalblue2,royalblue3,royalblue4,blue1,blue2,blue3,blue4, dodgerblue1,dodgerblue2,dodgerblue3,dodgerblue4,steelblue1,steelblue2, steelblue3,steelblue4,deepskyblue1,deepskyblue2,deepskyblue3,deepskyblue4, skyblue1,skyblue2,skyblue3,skyblue4,lightskyblue1,lightskyblue2,lightskyblue3, lightskyblue4,slategray1,slategray2,slategray3,slategray4,lightsteelblue1, lightsteelblue2,lightsteelblue3,lightsteelblue4,lightblue1,lightblue2, lightblue3,lightblue4,lightcyan1,lightcyan2,lightcyan3,lightcyan4, paleturquoise1,paleturquoise2,paleturquoise3,paleturquoise4,cadetblue1, cadetblue2,cadetblue3,cadetblue4,turquoise1,turquoise2,turquoise3, turquoise4,cyan1,cyan2,cyan3,cyan4,darkslategray1,darkslategray2, darkslategray3,darkslategray4,aquamarine1,aquamarine2,aquamarine3, aquamarine4,darkseagreen1,darkseagreen2,darkseagreen3,darkseagreen4, seagreen1,seagreen2,seagreen3,seagreen4,palegreen1,palegreen2,palegreen3, palegreen4,springgreen1,springgreen2,springgreen3,springgreen4,green1, green2,green3,green4,chartreuse1,chartreuse2,chartreuse3,chartreuse4, olivedrab1,olivedrab2,olivedrab3,olivedrab4,darkolivegreen1,darkolivegreen2, darkolivegreen3,darkolivegreen4,khaki1,khaki2,khaki3,khaki4,lightgoldenrod1, lightgoldenrod2,lightgoldenrod3,lightgoldenrod4,lightyellow1,lightyellow2, lightyellow3,lightyellow4,yellow1,yellow2,yellow3,yellow4,gold1, gold2,gold3,gold4,goldenrod1,goldenrod2,goldenrod3,goldenrod4,darkgoldenrod1, darkgoldenrod2,darkgoldenrod3,darkgoldenrod4,rosybrown1,rosybrown2,rosybrown3, rosybrown4,indianred1,indianred2,indianred3,indianred4,sienna1,sienna2, sienna3,sienna4,burlywood1,burlywood2,burlywood3,burlywood4,wheat1, wheat2,wheat3,wheat4,tan1,tan2,tan3,tan4,chocolate1,chocolate2,chocolate3, chocolate4,firebrick1,firebrick2,firebrick3,firebrick4,brown1,brown2, brown3,brown4,salmon1,salmon2,salmon3,salmon4,lightsalmon1,lightsalmon2, lightsalmon3,lightsalmon4,orange1,orange2,orange3,orange4,darkorange1, darkorange2,darkorange3,darkorange4,coral1,coral2,coral3,coral4, tomato1,tomato2,tomato3,tomato4,orangered1,orangered2,orangered3, orangered4,red1,red2,red3,red4,deeppink1,deeppink2,deeppink3,deeppink4, hotpink1,hotpink2,hotpink3,hotpink4,pink1,pink2,pink3,pink4,lightpink1, lightpink2,lightpink3,lightpink4,palevioletred1,palevioletred2,palevioletred3, palevioletred4,maroon1,maroon2,maroon3,maroon4,violetred1,violetred2, violetred3,violetred4,magenta1,magenta2,magenta3,magenta4,orchid1, orchid2,orchid3,orchid4,plum1,plum2,plum3,plum4,mediumorchid1,mediumorchid2, mediumorchid3,mediumorchid4,darkorchid1,darkorchid2,darkorchid3,darkorchid4, purple1,purple2,purple3,purple4,mediumpurple1,mediumpurple2,mediumpurple3, mediumpurple4,thistle1,thistle2,thistle3,thistle4,gray0,grey0,gray1, grey1,gray2,grey2,gray3,grey3,gray4,grey4,gray5,grey5,gray6,grey6, gray7,grey7,gray8,grey8,gray9,grey9,gray10,grey10,gray11,grey11,gray12, grey12,gray13,grey13,gray14,grey14,gray15,grey15,gray16,grey16,gray17, grey17,gray18,grey18,gray19,grey19,gray20,grey20,gray21,grey21,gray22, grey22,gray23,grey23,gray24,grey24,gray25,grey25,gray26,grey26,gray27, grey27,gray28,grey28,gray29,grey29,gray30,grey30,gray31,grey31,gray32, grey32,gray33,grey33,gray34,grey34,gray35,grey35,gray36,grey36,gray37, grey37,gray38,grey38,gray39,grey39,gray40,grey40,gray41,grey41,gray42, grey42,gray43,grey43,gray44,grey44,gray45,grey45,gray46,grey46,gray47, grey47,gray48,grey48,gray49,grey49,gray50,grey50,gray51,grey51,gray52, grey52,gray53,grey53,gray54,grey54,gray55,grey55,gray56,grey56,gray57, grey57,gray58,grey58,gray59,grey59,gray60,grey60,gray61,grey61,gray62, grey62,gray63,grey63,gray64,grey64,gray65,grey65,gray66,grey66,gray67, grey67,gray68,grey68,gray69,grey69,gray70,grey70,gray71,grey71,gray72, grey72,gray73,grey73,gray74,grey74,gray75,grey75,gray76,grey76,gray77, grey77,gray78,grey78,gray79,grey79,gray80,grey80,gray81,grey81,gray82, grey82,gray83,grey83,gray84,grey84,gray85,grey85,gray86,grey86,gray87, grey87,gray88,grey88,gray89,grey89,gray90,grey90,gray91,grey91,gray92, grey92,gray93,grey93,gray94,grey94,gray95,grey95,gray96,grey96,gray97, grey97,gray98,grey98,gray99,grey99,gray100,grey100,dark grey,darkgrey, dark gray,darkgray,dark blue,darkblue,dark cyan,darkcyan,dark magenta, darkmagenta,dark red,darkred,light


author:
   Robin Sharp



Field Summary
final public static  doubleFACTOR
    
final public static  SColorblack
    
final public static  SColorblue
    
static  HashMapbrighterHexStrings
    
final static  ObjectcolorArray
    
static  HashMapcolors
    
final public static  SColorcyan
    
final public static  SColordarkGray
    
static  HashMapdarkerHexStrings
    
final public static  SColorgray
    
final public static  SColorgreen
    
static  HashMaphexStrings
    
static  HashMapinverseColors
    
static  HashMapinverseHexStrings
    
final public static  SColorlightGray
    
final public static  SColormagenta
    
final public static  SColororange
    
final public static  SColorpink
    
final public static  SColorred
    
protected  intvalue
    
final public static  SColorwhite
    
final public static  SColoryellow
    

Constructor Summary
public  SColor(int r, int g, int b)
     Creates a SColor with the specified red, green, blue.
public  SColor(int r, int g, int b, int a)
     Creates a SColor with the specified red, green, blue, and alpha.
public  SColor(int rgb)
    

Method Summary
public static  voidaddColor(String name, SColor color)
     Add a color by name.
public  SColorbrighter()
    
public  SColordarker()
    
public  booleanequals(Object obj)
     Determines whether another object is equal to this color.
public  intgetAlpha()
     Returns the alpha component.
public  intgetBlue()
     Returns the blue component.
public static  SColorgetColor(String colorString)
     Turns a string into a SColor For example "#00ff00" will return SColor.green and "snow" will return SColor(255, 250, 250) For a full list of standard colours look in SColor.java a SColor for a string.
public  intgetGreen()
     Returns the green component.
public  intgetRGB()
     Returns the RGB value.
public  intgetRed()
     Returns the red component.
public  inthashCode()
    
public static  voidmain(String[] args)
    
public static  Stringmatch(SColor color)
    
public static  StringtoBrighterHexString(SColor color)
     Get the brighter hex string, and cache it.
public static  StringtoDarkerHexString(SColor color)
     Get the darker hex string, and cache it.
public static  StringtoHexString(SColor color)
     Get the hex string, and cache it.
public static  SColortoInverse(SColor color)
     Inverse the color, and cache it.
public static  StringtoInverseHexString(SColor color)
     If the color is < 125 then brighten, else darken.
public  StringtoString()
    

Field Detail
FACTOR
final public static double FACTOR(Code)



black
final public static SColor black(Code)



blue
final public static SColor blue(Code)



brighterHexStrings
static HashMap brighterHexStrings(Code)



colorArray
final static Object colorArray(Code)



colors
static HashMap colors(Code)



cyan
final public static SColor cyan(Code)



darkGray
final public static SColor darkGray(Code)



darkerHexStrings
static HashMap darkerHexStrings(Code)



gray
final public static SColor gray(Code)



green
final public static SColor green(Code)



hexStrings
static HashMap hexStrings(Code)



inverseColors
static HashMap inverseColors(Code)



inverseHexStrings
static HashMap inverseHexStrings(Code)



lightGray
final public static SColor lightGray(Code)



magenta
final public static SColor magenta(Code)



orange
final public static SColor orange(Code)



pink
final public static SColor pink(Code)



red
final public static SColor red(Code)



value
protected int value(Code)



white
final public static SColor white(Code)



yellow
final public static SColor yellow(Code)




Constructor Detail
SColor
public SColor(int r, int g, int b)(Code)
Creates a SColor with the specified red, green, blue.



SColor
public SColor(int r, int g, int b, int a)(Code)
Creates a SColor with the specified red, green, blue, and alpha.



SColor
public SColor(int rgb)(Code)
Create a SColor from the specified rgb value




Method Detail
addColor
public static void addColor(String name, SColor color)(Code)
Add a color by name. If the color is null it is removed.



brighter
public SColor brighter()(Code)



darker
public SColor darker()(Code)



equals
public boolean equals(Object obj)(Code)
Determines whether another object is equal to this color.



getAlpha
public int getAlpha()(Code)
Returns the alpha component.



getBlue
public int getBlue()(Code)
Returns the blue component.



getColor
public static SColor getColor(String colorString)(Code)
Turns a string into a SColor For example "#00ff00" will return SColor.green and "snow" will return SColor(255, 250, 250) For a full list of standard colours look in SColor.java a SColor for a string. A null or non-sensical string will return null



getGreen
public int getGreen()(Code)
Returns the green component.



getRGB
public int getRGB()(Code)
Returns the RGB value.



getRed
public int getRed()(Code)
Returns the red component.



hashCode
public int hashCode()(Code)



main
public static void main(String[] args)(Code)



match
public static String match(SColor color)(Code)
Get the closest named color



toBrighterHexString
public static String toBrighterHexString(SColor color)(Code)
Get the brighter hex string, and cache it.



toDarkerHexString
public static String toDarkerHexString(SColor color)(Code)
Get the darker hex string, and cache it.



toHexString
public static String toHexString(SColor color)(Code)
Get the hex string, and cache it.



toInverse
public static SColor toInverse(SColor color)(Code)
Inverse the color, and cache it.



toInverseHexString
public static String toInverseHexString(SColor color)(Code)
If the color is < 125 then brighten, else darken. and cache it.



toString
public String toString()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.