|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jcurzez.Attribute
A Jcurzez attribute (bold, underline, and so on). There are several predefined attributes :
normal attribute
attribute
bold attribute
dim attribute
reverse attribute
standout attribute
underline attribute
Attributes can be combined (using and()
or andNot()
). Thus, if we want to use
a bold and underline attribute, we create this compound attribute
as shown below:
Attribute boldAndUnderline = Attribute.BOLD.and(Attribute.UNDERLINE);
Field Summary | |
static Attribute |
BLINK
BLINK attribute. |
static Attribute |
BOLD
BOLD attribute. |
static Attribute |
DIM
DIM attribute. |
static Attribute |
NORMAL
NORMAL attribute. |
static Attribute |
REVERSE
REVERSE attribute. |
static Attribute |
STANDOUT
STANDOUT attribute. |
static Attribute |
UNDERLINE
UNDERLINE attribute. |
private byte |
value
The value of the attribute. |
Constructor Summary | |
private |
Attribute(byte value)
Creates a new attribute, having name name . |
Method Summary | |
Attribute |
and(Attribute a)
Creates a new Attribute that combines a
and this . |
Attribute |
andNot(Attribute a)
Create a new attribute that has attribute a off. |
boolean |
equals(java.lang.Object o)
Tests equality of this with o . |
byte |
getValue()
Returns the value describing this . |
boolean |
hasAttribute(Attribute a)
Checks whether this has attribute a . |
int |
hashCode()
Returns the hashcode of this attribute. |
java.lang.String |
toString()
Returns a string representation of this , in
the form [ bold underline ]. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private final byte value
public static final Attribute NORMAL
public static final Attribute BLINK
public static final Attribute BOLD
public static final Attribute DIM
public static final Attribute REVERSE
public static final Attribute STANDOUT
public static final Attribute UNDERLINE
Constructor Detail |
private Attribute(byte value)
name
.
value
- the value of the attribute.Method Detail |
public boolean hasAttribute(Attribute a)
this
has attribute a
.
a
- the attribute we want to check this
against.true
if this
has attribute
a
on.public Attribute and(Attribute a)
Attribute
that combines a
and this
.
a
- the attribute to combine with this
.this
if a
attribute was already set for
this
.public Attribute andNot(Attribute a)
a
off.
a
- the attribute to unset from this
.this
if a
was not set in it.public boolean equals(java.lang.Object o)
this
with o
.
equals
in class java.lang.Object
o
- the object we want to test.true
if this
and o
are equal.public int hashCode()
value
means attributes are equal, this is the the hashcode.
hashCode
in class java.lang.Object
value
.public java.lang.String toString()
this
, in
the form [ bold underline ].
toString
in class java.lang.Object
this
.public byte getValue()
this
.
value
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |