Summ:  Fields Constr. Methods    Details:  Fields Constr. Methods      Class:  Constants Prev Next
com.artfulbits.aiCharts.Base
Class ChartLayoutElement

java.lang.Object com.artfulbits.aiCharts.Base.ChartLayoutElement

Declaration: public abstract class ChartLayoutElement extends Object
implements ILayout.IElement
All Interfaces: ILayout.IElement
Direct Subclasses: ChartLegend, ChartTitle

 

Represents base class for all chart elements that intend to be docked or aligned to the chart.

 

Since: 1.0

 

 

Fields Summary
static int ALIGNMENT_CENTER
    
Centered disregarding element's Orientation orientation.
static int ALIGNMENT_FAR
    
Right or Bottom depending on element's Orientation orientation.
static int ALIGNMENT_NEAR
    
Left or Top depending on element's Orientation orientation.
static int ALIGNMENT_STRETCH
    
Stretch disregarding element's Orientation orientation.
static int DOCK_BOTTOM
    
Identifies that element is to be docked to the bottom of chart.
static int DOCK_LEFT
    
Identifies that element is to be docked at the left side of chart.
static int DOCK_RIGHT
    
Identifies that element is to be docked at the right side of chart.
static int DOCK_TOP
    
Identifies that element is to be docked to the top of chart.

 

 

Constructors Summary
ChartLayoutElement()
    

 

 

Methods Summary
int getAlignment()
    
Gets alignment for this element.
XYRect getBounds()
    
Gets area occupied by this element.
int getDock()
    
Gets current dock mode for the element.
int getMeasuredHeight()
    
Gets height calculated during measure pass.
int getMeasureWidth()
    
Gets width calculated during measure pass.
boolean isVisible()
    
Gets the visibility state for this element.
void layout(XYRect inOutBounds)
    
Sets bounds for this element.
void measure(XYDimension inOutSize)
    
Measures the element.
void setAlignment(int alignment)
    
Sets alignment for this element.
void setDock(int dock)
    
Sets docking mode for the element.
void setVisible(boolean value)
    
Sets visibility of this element on parent chart field.

 

Methods inherited from class: java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

 

 

 

DOCK_LEFT

 

public static final int DOCK_LEFT

 

Identifies that element is to be docked at the left side of chart.

 

Since: 1.0
See also: Constants

 

 

 

DOCK_RIGHT

 

public static final int DOCK_RIGHT

 

Identifies that element is to be docked at the right side of chart.

 

Since: 1.0
See also: Constants

 

 

 

DOCK_TOP

 

public static final int DOCK_TOP

 

Identifies that element is to be docked to the top of chart.

 

Since: 1.0
See also: Constants

 

 

 

DOCK_BOTTOM

 

public static final int DOCK_BOTTOM

 

Identifies that element is to be docked to the bottom of chart.

 

Since: 1.0
See also: Constants

 

 

 

ALIGNMENT_NEAR

 

public static final int ALIGNMENT_NEAR

 

Left or Top depending on element's Orientation orientation.

 

Since: 1.0
See also: Constants

 

 

 

ALIGNMENT_CENTER

 

public static final int ALIGNMENT_CENTER

 

Centered disregarding element's Orientation orientation.

 

Since: 1.0
See also: Constants

 

 

 

ALIGNMENT_FAR

 

public static final int ALIGNMENT_FAR

 

Right or Bottom depending on element's Orientation orientation.

 

Since: 1.0
See also: Constants

 

 

 

ALIGNMENT_STRETCH

 

public static final int ALIGNMENT_STRETCH

 

Stretch disregarding element's Orientation orientation.

 

Since: 1.0
See also: Constants

 

 

 

 

ChartLayoutElement

 

public ChartLayoutElement( )

 

 

 

 

layout

 

public void layout( XYRect inOutBounds)

 

[ description from ILayout.IElement.layout(XYRect) ]
 
Sets bounds for this element.

 

Parameters:
inOutBounds-
instance of XYRect representing bounds for element.

 

Implements: ILayout.IElement.layout(XYRect)

 

 

 

measure

 

public void measure( XYDimension inOutSize)

 

[ description from ILayout.IElement.measure(XYDimension) ]
 
Measures the element.

 

Parameters:
inOutSize-
available size to contains the element. This parameter will be used to return the desired size of element.

 

Implements: ILayout.IElement.measure(XYDimension)

 

 

 

getDock

 

public int getDock( )

 

Gets current dock mode for the element.

 

Returns:
value of dock mode.

 

Since: 1.0

 

 

 

setDock

 

public void setDock( int dock)

 

Sets docking mode for the element.

 

Parameters:
dock-
one of DOCK_LEFT, DOCK_RIGHT, DOCK_TOP, DOCK_BOTTOM

 

Since: 1.0

 

 

 

setVisible

 

public void setVisible( boolean value)

 

Sets visibility of this element on parent chart field.

 

Parameters:
value-
true if element should be visible, otherwise false.

 

Since: 1.0

 

 

 

isVisible

 

public boolean isVisible( )

 

Gets the visibility state for this element.

 

Returns:
true if element is visible, otherwise false.

 

Since: 1.0

 

 

 

setAlignment

 

public void setAlignment( int alignment)

 

Sets alignment for this element.

 

Parameters:
alignment-
value of desired alignment.

 

Since: 1.0

 

 

 

getAlignment

 

public int getAlignment( )

 

Gets alignment for this element.

 

Returns:
value of currently applied alignment.

 

Since: 1.0

 

 

 

getMeasureWidth

 

public int getMeasureWidth( )

 

Gets width calculated during measure pass.

 

Returns:
value of measured width.

 

Since: 1.0

 

 

 

getMeasuredHeight

 

public int getMeasuredHeight( )

 

Gets height calculated during measure pass.

 

Returns:
value of measured height.

 

Since: 1.0

 

 

 

getBounds

 

public XYRect getBounds( )

 

Gets area occupied by this element.

 

Returns:
instance of XYRect class representing current bounds.

 

Since: 1.0

 

 

© 2005 - 2010 ArtfulBits. All rights reserved.