OverviewSingleDeprecated

jsx3.chart

class ChartLabel

Object
->jsx3.lang.Object
  ->jsx3.app.Model
    ->jsx3.gui.Painted
      ->jsx3.gui.Block
        ->jsx3.chart.ChartComponent
          ->jsx3.chart.ChartLabel

All Implemented Interfaces:

jsx3.gui.Interactive, jsx3.util.EventDispatcher

class ChartLabel
extends jsx3.chart.ChartComponent
A chart component to render a text box. Used to render the titles of charts, legends, axes, and series. Encapsulates all the font settings of the label so that the parent container does not experience property bloat.

Field Summary
static int
DEFAULT_WIDTH
the default preferred width
static int
ROTATION_CCW
angle for one-quarter counter-clockwise rotation
static int
ROTATION_CW
angle for one-quarter clockwise rotation
static int
ROTATION_NORMAL
non-rotated angle
Constructor Summary
void
init(name : String, text : String)
The instance initializer.
Method Summary
float
Returns the alpha field, the opacity of the background fill.
String
Returns the borderStroke field, string representation of the VectorStroke used to outline the background.
int
Returns the labelRotation field.
int
Returns the preferredHeight field.
int
Returns the preferredWidth field.
String
Returns the text field.
static String
Deprecated.
boolean
whether this label is display at 90 or -90 degrees
void
setAlpha(alpha : float)
Sets the alpha field.
void
setBorderStroke(borderStroke : String)
Sets the borderStroke field.
void
setLabelRotation(labelRotation : int)
Sets the labelRotation field.
void
setPreferredHeight(preferredHeight : int)
Sets the preferredHeight field.
void
setPreferredWidth(preferredWidth : int)
Sets the preferredWidth field.
void
setText(text : String)
Sets the text field.
Methods Inherited From jsx3.chart.ChartComponent
getChart
Methods Inherited From jsx3.gui.Block
getBackground, getBackgroundColor, getBorder, getCSSOverride, getClassName, getColor, getCursor, getDimensions, getDisplay, getFontName, getFontSize, getFontWeight, getHeight, getIndex, getLeft, getMargin, getOverflow, getPadding, getRelativePosition, getTagName, getTextAlign, getTip, getTop, getVisibility, getWidth, getZIndex, hideMask, paint, setBackground, setBackgroundColor, setBorder, setCSSOverride, setClassName, setColor, setCursor, setDimensions, setDisplay, setFontName, setFontSize, setFontWeight, setHeight, setIndex, setLeft, setMargin, setOverflow, setPadding, setRelativePosition, setTagName, setTextAlign, setTip, setTop, setVisibility, setWidth, setZIndex, showMask
Methods Inherited From jsx3.gui.Interactive
doEvent, getCanDrag, getCanDrop, getCanMove, getCanSpy, getEvent, getEvents, getMenu, hasEvent, registerHotKey, removeEvent, removeEvents, setCanDrag, setCanDrop, setCanMove, setCanSpy, setEvent, setMenu, setSpyStyles, showSpy
Methods Inherited From jsx3.gui.Painted
focus, getAbsolutePosition, getAttribute, getAttributes, getDynamicProperty, getRendered, insertHTML, onAfterPaint, paintChild, paintChildren, recalcBox, removeAttribute, removeAttributes, repaint, setAttribute, setDynamicProperty
Methods Inherited From jsx3.app.Model
adoptChild, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, setChild, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Field Detail

DEFAULT_WIDTH

static int DEFAULT_WIDTH
the default preferred width

ROTATION_CCW

static final int ROTATION_CCW
angle for one-quarter counter-clockwise rotation

ROTATION_CW

static final int ROTATION_CW
angle for one-quarter clockwise rotation

ROTATION_NORMAL

static final int ROTATION_NORMAL
non-rotated angle
Constructor Detail

init

void init(name : String, text : String)
The instance initializer.

Parameters:

namethe GI name of the instance
texttext to display in the label
Method Detail

getAlpha

float getAlpha()
Returns the alpha field, the opacity of the background fill.

Returns:

alpha  

getBorderStroke

String getBorderStroke()
Returns the borderStroke field, string representation of the VectorStroke used to outline the background.

Returns:

borderStroke  

getLabelRotation

int getLabelRotation()
Returns the labelRotation field.

Returns:

labelRotation  

getPreferredHeight

int getPreferredHeight()
Returns the preferredHeight field.

Returns:

preferredHeight  

getPreferredWidth

int getPreferredWidth()
Returns the preferredWidth field.

Returns:

preferredWidth  

getText

String getText()
Returns the text field.

Returns:

text  

Overrides:

getText in jsx3.gui.Block

getVersion

static String getVersion()
Deprecated.
Returns the release/build for the class (i.e., "2.2.00").

Returns:

 

isRotated

boolean isRotated()
whether this label is display at 90 or -90 degrees

Returns:

 

setAlpha

void setAlpha(alpha : float)
Sets the alpha field.

Parameters:

alphathe new value for alpha

setBorderStroke

void setBorderStroke(borderStroke : String)
Sets the borderStroke field.

Parameters:

borderStrokethe new value for borderStroke

setLabelRotation

void setLabelRotation(labelRotation : int)
Sets the labelRotation field.

Parameters:

labelRotationthe new value for labelRotation, one of {0, 90, 270}

setPreferredHeight

void setPreferredHeight(preferredHeight : int)
Sets the preferredHeight field.

Parameters:

preferredHeightthe new value for preferredHeight

setPreferredWidth

void setPreferredWidth(preferredWidth : int)
Sets the preferredWidth field.

Parameters:

preferredWidththe new value for preferredWidth

setText

void setText(text : String)
Sets the text field.

Parameters:

textthe new value for text

Overrides:

setText in jsx3.gui.Block