|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.muntjak.tinylookandfeel.util.SBReference
public class SBReference
SBReference describes a (mutable) color, specified by a reference color and values for brightness and saturation.
| Field Summary | |
|---|---|
static int |
ABS_COLOR
|
protected static de.muntjak.tinylookandfeel.util.SBReference.ColorIcon |
absoluteIcon
|
static int |
BACK_COLOR
|
protected int |
bri
|
protected javax.swing.plaf.ColorUIResource |
color
|
static int |
DIS_COLOR
|
static int |
FRAME_COLOR
|
protected de.muntjak.tinylookandfeel.util.SBReference.ColorIcon |
icon
|
protected boolean |
locked
|
static int |
MAIN_COLOR
|
protected int |
ref
|
protected javax.swing.plaf.ColorUIResource |
referenceColor
|
protected int |
sat
|
static int |
SUB1_COLOR
|
static int |
SUB2_COLOR
|
static int |
SUB3_COLOR
|
static int |
SUB4_COLOR
|
static int |
SUB5_COLOR
|
static int |
SUB6_COLOR
|
static int |
SUB7_COLOR
|
static int |
SUB8_COLOR
|
| Constructor Summary | |
|---|---|
SBReference()
Constructor for font colors and super constructor for HSBReferences. |
|
SBReference(boolean dummy)
Super constructor for HSBReference copy constructor. |
|
SBReference(java.awt.Color c,
int sat,
int bri,
int ref)
Called from Theme.initData() |
|
SBReference(java.awt.Color c,
int sat,
int bri,
int ref,
boolean locked)
Constructor for our 4 locked color references. |
|
SBReference(SBReference other)
Copy constructor. |
|
| Method Summary | |
|---|---|
SBReference |
copy()
Returns a copy of this SBReference and additionally stores the color reference (if any). |
javax.swing.Icon |
getAbsoluteIcon()
|
int |
getBrightness()
|
javax.swing.plaf.ColorUIResource |
getColor()
|
javax.swing.Icon |
getIcon()
|
static int |
getNumReferences(int ref)
|
int |
getReference()
|
javax.swing.plaf.ColorUIResource |
getReferenceColor()
|
static javax.swing.plaf.ColorUIResource |
getReferencedColor(int ref)
|
java.lang.String |
getReferenceString()
|
int |
getSaturation()
|
boolean |
isAbsoluteColor()
|
boolean |
isLocked()
|
boolean |
isReferenceColor()
|
void |
load(java.io.DataInputStream in)
|
static void |
loadDummyData(java.io.DataInputStream in)
|
static void |
printReferences(int ref)
|
void |
reset()
|
void |
save(java.io.DataOutputStream out)
|
void |
setBrightness(int newBri)
|
void |
setColor(java.awt.Color newColor)
|
void |
setColor(int sat,
int bri)
|
void |
setLocked(boolean newLocked)
|
void |
setReference(int newRef)
|
void |
setSaturation(int newSat)
|
java.lang.String |
toString()
|
javax.swing.plaf.ColorUIResource |
update()
|
void |
update(java.awt.Color c)
|
void |
update(java.awt.Color c,
int sat,
int bri,
int ref)
|
void |
update(SBReference sb)
Called if user pastes parameters via Copy-Paste popup. |
void |
update(SBReference other,
java.util.Vector referenceColors)
Updates this SBReference from values of other
argument. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ABS_COLOR
public static final int MAIN_COLOR
public static final int BACK_COLOR
public static final int DIS_COLOR
public static final int FRAME_COLOR
public static final int SUB1_COLOR
public static final int SUB2_COLOR
public static final int SUB3_COLOR
public static final int SUB4_COLOR
public static final int SUB5_COLOR
public static final int SUB6_COLOR
public static final int SUB7_COLOR
public static final int SUB8_COLOR
protected javax.swing.plaf.ColorUIResource color
protected javax.swing.plaf.ColorUIResource referenceColor
protected int sat
protected int bri
protected int ref
protected boolean locked
protected de.muntjak.tinylookandfeel.util.SBReference.ColorIcon icon
protected static de.muntjak.tinylookandfeel.util.SBReference.ColorIcon absoluteIcon
| Constructor Detail |
|---|
public SBReference()
public SBReference(boolean dummy)
dummy - ignored
public SBReference(java.awt.Color c,
int sat,
int bri,
int ref)
c - sat - bri - ref -
public SBReference(java.awt.Color c,
int sat,
int bri,
int ref,
boolean locked)
c - sat - bri - ref - locked - public SBReference(SBReference other)
other - | Method Detail |
|---|
public SBReference copy()
public static int getNumReferences(int ref)
public static void printReferences(int ref)
public void update(java.awt.Color c,
int sat,
int bri,
int ref)
public void update(SBReference sb)
cr -
public void update(SBReference other,
java.util.Vector referenceColors)
other
argument. If the current reference color differs from the
one stored in referenceColors vector, this
SBReference will switch to absolute color mode.
other - referenceColors - public void update(java.awt.Color c)
public void reset()
public javax.swing.plaf.ColorUIResource getColor()
public int getSaturation()
public int getBrightness()
public int getReference()
public javax.swing.plaf.ColorUIResource getReferenceColor()
public static javax.swing.plaf.ColorUIResource getReferencedColor(int ref)
public java.lang.String getReferenceString()
public void setColor(java.awt.Color newColor)
public void setSaturation(int newSat)
public void setBrightness(int newBri)
public void setReference(int newRef)
public void setColor(int sat,
int bri)
public javax.swing.plaf.ColorUIResource update()
public boolean isAbsoluteColor()
public boolean isReferenceColor()
public void setLocked(boolean newLocked)
public boolean isLocked()
public java.lang.String toString()
toString in class java.lang.Objectpublic javax.swing.Icon getIcon()
public javax.swing.Icon getAbsoluteIcon()
public void save(java.io.DataOutputStream out)
throws java.io.IOException
java.io.IOException
public void load(java.io.DataInputStream in)
throws java.io.IOException
java.io.IOException
public static void loadDummyData(java.io.DataInputStream in)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||