|
Multivalent API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmultivalent.Context
Graphics context object passed from node to node. Holds graphics attributes, list of prevailing ContextListeners, random "signals" (name-value pairs),
Field Summary | |
---|---|
byte |
align
|
java.awt.Color |
background
|
int |
baseline
|
static byte |
BOOL_FALSE
|
static byte |
BOOL_INHERIT
|
static byte |
BOOL_INVALID
|
static byte |
BOOL_TRUE
|
int |
borderbottom
|
int |
borderleft
|
int |
borderright
|
int |
bordertop
|
static java.awt.Color |
COLOR_INHERIT
Special color. |
static java.awt.Color |
COLOR_INVALID
Special color. |
float[] |
dasharray
|
float |
dashphase
|
java.lang.String |
display
|
boolean |
elide
|
java.lang.String |
family
Font properties set independently of one another. |
int |
flags
More than just Font.ITALIC , flags . |
static float |
FLOAT_INVALID
|
static float[] |
FLOATARRAY_INVALID
|
byte |
floats
|
byte |
flush
Pending flush at next flowFloats()? |
java.awt.Color |
foreground
Foreground/fill color. |
java.awt.Graphics2D |
g
|
static int |
INT_INVALID
Use to set primitive-based properties to invalid. |
int |
justify
Corresponds to CSS text-align property. |
int |
linecap
|
int |
linejoin
|
float |
linewidth
|
int |
marginbottom
|
int |
marginleft
|
int |
marginright
|
int |
margintop
|
float |
miterlimit
|
int |
mode
Text fill mode . |
static java.lang.Object |
OBJECT_INVALID
Use to set Object-based properties to invalid, as null is valid for some properties. |
java.awt.Color |
overline
|
java.awt.Color |
overstrike
|
int |
paddingbottom
|
int |
paddingleft
|
int |
paddingright
|
int |
paddingtop
|
java.awt.Color |
pagebackground
|
java.util.Map<java.lang.Object,java.lang.Object> |
signal
|
float |
size
Size in pixels. |
int |
spaceabove
|
int |
spacebelow
|
NFont |
spot
A spot font overrides font properties. |
static java.lang.String |
STRING_INVALID
|
static java.awt.BasicStroke |
STROKE_DEFAULT
|
java.awt.Color |
strokeColor
|
StyleSheet |
styleSheet
|
java.awt.geom.AffineTransform |
textAT
|
java.lang.String |
texttransform
|
java.awt.Color |
underline
|
java.awt.Color |
underline2
|
java.util.List<ContextListener> |
vactive_
|
boolean |
valid
Valid means all property settings are current for current Node in tree. |
byte |
valign
|
int |
weight
More than just Font.BOLD , weights . |
float |
x
current point a la PostScript (OUT). |
float |
xdelta
{sub,super}scripts, opening gaps for spliced in text. |
java.awt.Color |
xor
Doesn't seem very useful, though does affect images. |
float |
y
current point a la PostScript (OUT). |
float |
ydelta
{sub,super}scripts, opening gaps for spliced in text. |
float |
zoom
or pagewise? |
Constructor Summary | |
---|---|
Context()
Usually use getStyleSheet().getContext() instead. |
Method Summary | |
---|---|
void |
add(ContextListener r)
Add ContextListener to active set, bring Context values up to date. |
void |
addBase(ContextListener cl)
|
void |
addq(ContextListener r)
Add ContextListener, leave Context in need of reset(). |
void |
clear()
|
void |
clearBase()
|
void |
clearNonInherited()
|
void |
deleteBase(ContextListener cl)
|
void |
eatHeight(int h,
Node lastn,
int lastnoff)
|
int |
floatStackSize()
|
void |
flowFloats(int y,
int width)
Position queued floats. |
int |
flushFloats(int side)
|
int |
getFloatHeightToGo(int side)
Returns max height of left height-to-go's. |
int |
getFloatWidth(int side)
Returns total width of active left floats |
NFont |
getFont()
Returns active font, which is the spot font if set, otherwise computed from family, weight, flags, and size. |
java.awt.Stroke |
getStroke()
|
boolean |
paintAfter(Context cx,
INode node)
|
void |
paintAfter(Context cx,
Leaf n)
|
boolean |
paintBefore(Context cx,
INode node)
Upon entering node, Draw background, border, |
void |
paintBefore(Context cx,
Leaf n)
|
void |
popFloat()
|
static int |
priorityInsert(ContextListener r,
java.util.List<ContextListener> v)
Order by priority, low to high so high wins; within equal priority, latest set added last so it wins. |
void |
pushFloat()
|
void |
queueFloat(Node n)
Encountered float, queue up for next time have chance to position. |
void |
remove(ContextListener r)
Remove ContextListener to active set, bring Context values up to date. |
void |
removeq(ContextListener r)
Remove ContextListener, leave Context in need of reset(). |
void |
reset()
|
void |
reset(Mark m)
|
void |
reset(Node n)
|
void |
reset(Node n,
int offset)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int INT_INVALID
public static final float FLOAT_INVALID
public static final float[] FLOATARRAY_INVALID
public static final java.lang.Object OBJECT_INVALID
public static final java.lang.String STRING_INVALID
public static final java.awt.Color COLOR_INHERIT
==
, not equals()
.
public static final java.awt.Color COLOR_INVALID
==
, not equals()
.
public static final byte BOOL_FALSE
public static final byte BOOL_TRUE
public static final byte BOOL_INHERIT
public static final byte BOOL_INVALID
public static final java.awt.BasicStroke STROKE_DEFAULT
public boolean valid
public java.util.List<ContextListener> vactive_
public java.awt.Graphics2D g
public StyleSheet styleSheet
public float zoom
public float x
public float y
public int baseline
public float xdelta
public float ydelta
public java.awt.Color xor
public java.awt.Color foreground
public java.awt.Color background
public java.awt.Color strokeColor
public java.awt.Color pagebackground
public float linewidth
public int linecap
public int linejoin
public float miterlimit
public float[] dasharray
public float dashphase
public java.lang.String family
public float size
public int flags
Font.ITALIC
, flags
.
public int weight
Font.BOLD
, weights
.
public java.awt.geom.AffineTransform textAT
public int mode
fill mode
.
public java.lang.String texttransform
public java.lang.String display
public java.awt.Color underline
public java.awt.Color underline2
public java.awt.Color overline
public java.awt.Color overstrike
public boolean elide
public int justify
public int spaceabove
public int spacebelow
public byte align
public byte valign
public byte floats
public byte flush
public NFont spot
NFont#setWidths(int[])
.
For example, fonts embedded in PDF are set as spot fonts.
public int marginleft
public int marginright
public int margintop
public int marginbottom
public int paddingleft
public int paddingright
public int paddingtop
public int paddingbottom
public int borderleft
public int borderright
public int bordertop
public int borderbottom
public java.util.Map<java.lang.Object,java.lang.Object> signal
Constructor Detail |
---|
public Context()
Method Detail |
---|
public NFont getFont()
public java.awt.Stroke getStroke()
public void clear()
public void clearNonInherited()
public void reset()
public void addBase(ContextListener cl)
public void deleteBase(ContextListener cl)
public void clearBase()
public void reset(Node n)
public void reset(Mark m)
public void reset(Node n, int offset)
public int floatStackSize()
public void pushFloat()
public void popFloat()
public void queueFloat(Node n)
public void flowFloats(int y, int width)
public int flushFloats(int side)
public int getFloatWidth(int side)
public int getFloatHeightToGo(int side)
public void eatHeight(int h, Node lastn, int lastnoff)
public static final int priorityInsert(ContextListener r, java.util.List<ContextListener> v)
public final void add(ContextListener r)
public final void remove(ContextListener r)
public final void addq(ContextListener r)
reset()
).
public final void removeq(ContextListener r)
public boolean paintBefore(Context cx, INode node)
public boolean paintAfter(Context cx, INode node)
public void paintBefore(Context cx, Leaf n)
public void paintAfter(Context cx, Leaf n)
public java.lang.String toString()
toString
in class java.lang.Object
|
Multivalent API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |