multivalent

Class CLGeneral

public class CLGeneral extends Object implements ContextListener

Generic context modifier, for runtime creation of new spans and structure, as by style sheets. Not as efficient as special-purpose spans, such as multivalent.std.span.BoldSpan. Use: client creates new GenericContextListener, sets desired parameters, uses like span or structure. Handles all appearance and priority, but nothing about event bindings (need scripting language). Don't need accessors for everything now that assuming everything affectsLayout().

Used frequently by style sheets, same as CLGeneral except priority set to structural priority and box-only attributes such as margin and padding. INode responsible for slipping into/out of Context base__ as enter/exit.

CLGeneral should inherit from CLGeneral because it adds structural attributes: margin, border, padding, .... But CLGeneral should inherit from CLGeneral because it doesn't want the Span fields and methods.

Different style sheets should subclass multivalent.StyleSheet, and their generic ContextListeners should subclass this class, in both cases so that other behaviors can in various situations get an object of type StyleSheet or type CLGeneral and make hay.

Version: $Revision: 1.5 $ $Date: 2003/06/02 04:58:39 $

Field Summary
Colorbackground_
intborderbottom
intborderleft
intborderright
intbordertop
float[]dasharray_
floatdashphase_
Stringdisplay_
byteelide_
Stringfamily_
Colorforeground_
intjustify_
intlinecap_
intlinejoin_
floatlinewidth_
intmarginbottom
intmarginleft
intmarginright
intmargintop
floatmiterlimit_
Coloroverline_
Coloroverstrike_
intpaddingbottom
intpaddingleft
intpaddingright
intpaddingtop
protected intpriority_
Map<Object,Object>signal_
floatsize_
intspaceabove_
intspacebelow_
ColorstrokeColor_
intstyle_
Stringtexttransform_
Colorunderline_
Colorunderline2_
intxdelta_
Colorxor_
intydelta_
doublezoom_
Constructor Summary
CLGeneral()
CLGeneral(int priority)
Method Summary
booleanappearance(Context cx, boolean all)
All attributes or just inherited ones?
voidcopyInto(CLGeneral dest)
All attributes or just inherited ones?
booleanequals(Object o)
Are all attributes equal to those of another CLGeneral?
bytegetAlign()
ColorgetBackground()
StringgetDisplay()
bytegetElide()
StringgetFamily()
bytegetFloats()
ColorgetForeground()
intgetJustify()
ColorgetOverline()
ColorgetOverstrike()
intgetPriority()
floatgetSize()
intgetSpaceAbove()
intgetSpaceBelow()
Colorgetstroke()
intgetStyle()
StringgetTextTransform()
ColorgetUnderline()
ColorgetUnderline2()
bytegetVAlign()
intgetXdelta()
ColorgetXor()
intgetYdelta()
inthashCode()
voidinvalidate()
voidsetAlign(byte align)
voidsetBackground(Color background)
voidsetBorder(int border)
voidsetBorder(Insets borders)
voidsetBorder(int top, int left, int bottom, int right)
voidsetDisplay(String display)
voidsetElide(byte elide)
voidsetFamily(String family)
voidsetFloats(byte floats)
voidsetFont(Font font)
Convenience method for setFamily, setStyle, and setSize.
voidsetForeground(Color foreground)
voidsetJustify(int justify)
voidsetMargins(int margin)
voidsetMargins(Insets margins)
voidsetMargins(int top, int left, int bottom, int right)
voidsetOverline(Color overline)
voidsetOverstrike(Color overstrike)
voidsetPadding(int padding)
voidsetPadding(Insets padding)
voidsetPadding(int top, int left, int bottom, int right)
voidsetPriority(int priority)
voidsetSignal(Object name, Object value)
voidsetSize(float size)
voidsetSpaceAbove(int spaceabove)
voidsetSpaceBelow(int spacebelow)
voidsetStroke(Color stroke)
voidsetStyle(int style)
voidsetTextTransform(String transform)
voidsetUnderline(Color underline)
voidsetUnderline2(Color underline2)
voidsetVAlign(byte valign)
voidsetXdelta(int xdelta)
voidsetXor(Color xor)
voidsetYdelta(int ydelta)
StringtoString()

Field Detail

background_

public Color background_

borderbottom

public int borderbottom

borderleft

public int borderleft

borderright

public int borderright

bordertop

public int bordertop

dasharray_

public float[] dasharray_

dashphase_

public float dashphase_

display_

public String display_

elide_

public byte elide_

family_

public String family_

foreground_

public Color foreground_

justify_

public int justify_

linecap_

public int linecap_

linejoin_

public int linejoin_

linewidth_

public float linewidth_

marginbottom

public int marginbottom

marginleft

public int marginleft

marginright

public int marginright

margintop

public int margintop

miterlimit_

public float miterlimit_

overline_

public Color overline_

overstrike_

public Color overstrike_

paddingbottom

public int paddingbottom

paddingleft

public int paddingleft

paddingright

public int paddingright

paddingtop

public int paddingtop

priority_

protected int priority_

signal_

public Map<Object,Object> signal_

size_

public float size_

spaceabove_

public int spaceabove_

spacebelow_

public int spacebelow_

strokeColor_

public Color strokeColor_

style_

public int style_

texttransform_

public String texttransform_

underline_

public Color underline_

underline2_

public Color underline2_

xdelta_

public int xdelta_

xor_

public Color xor_

ydelta_

public int ydelta_

zoom_

public double zoom_

Constructor Detail

CLGeneral

public CLGeneral()

CLGeneral

public CLGeneral(int priority)

Method Detail

appearance

public boolean appearance(Context cx, boolean all)
All attributes or just inherited ones?

copyInto

public void copyInto(CLGeneral dest)
All attributes or just inherited ones?

equals

public boolean equals(Object o)
Are all attributes equal to those of another CLGeneral? Can see if any fields have been set by comparing to a known-unmodified ContextSpan.

getAlign

public byte getAlign()

getBackground

public Color getBackground()

getDisplay

public String getDisplay()

getElide

public byte getElide()

getFamily

public String getFamily()

getFloats

public byte getFloats()

getForeground

public Color getForeground()

getJustify

public int getJustify()

getOverline

public Color getOverline()

getOverstrike

public Color getOverstrike()

getPriority

public int getPriority()

getSize

public float getSize()

getSpaceAbove

public int getSpaceAbove()

getSpaceBelow

public int getSpaceBelow()

getstroke

public Color getstroke()

getStyle

public int getStyle()

getTextTransform

public String getTextTransform()

getUnderline

public Color getUnderline()

getUnderline2

public Color getUnderline2()

getVAlign

public byte getVAlign()

getXdelta

public int getXdelta()

getXor

public Color getXor()

getYdelta

public int getYdelta()

hashCode

public int hashCode()

invalidate

public void invalidate()

setAlign

public void setAlign(byte align)

setBackground

public void setBackground(Color background)

setBorder

public void setBorder(int border)

setBorder

public void setBorder(Insets borders)

setBorder

public void setBorder(int top, int left, int bottom, int right)

setDisplay

public void setDisplay(String display)

setElide

public void setElide(byte elide)

setFamily

public void setFamily(String family)

setFloats

public void setFloats(byte floats)

setFont

public void setFont(Font font)
Convenience method for setFamily, setStyle, and setSize.

setForeground

public void setForeground(Color foreground)

setJustify

public void setJustify(int justify)

setMargins

public void setMargins(int margin)

setMargins

public void setMargins(Insets margins)

setMargins

public void setMargins(int top, int left, int bottom, int right)

setOverline

public void setOverline(Color overline)

setOverstrike

public void setOverstrike(Color overstrike)

setPadding

public void setPadding(int padding)

setPadding

public void setPadding(Insets padding)

setPadding

public void setPadding(int top, int left, int bottom, int right)

setPriority

public void setPriority(int priority)

setSignal

public void setSignal(Object name, Object value)

setSize

public void setSize(float size)

setSpaceAbove

public void setSpaceAbove(int spaceabove)

setSpaceBelow

public void setSpaceBelow(int spacebelow)

setStroke

public void setStroke(Color stroke)

setStyle

public void setStyle(int style)

setTextTransform

public void setTextTransform(String transform)

setUnderline

public void setUnderline(Color underline)

setUnderline2

public void setUnderline2(Color underline2)

setVAlign

public void setVAlign(byte valign)

setXdelta

public void setXdelta(int xdelta)

setXor

public void setXor(Color xor)

setYdelta

public void setYdelta(int ydelta)

toString

public String toString()