com.yworks.yfiles.server.graphml.flexio.data
Class Stripe

java.lang.Object
  extended bycom.yworks.yfiles.server.graphml.flexio.data.Stripe
Direct Known Subclasses:
Column, Row

public abstract class Stripe
extends java.lang.Object

Abstract base class for a Table's Column or Row.


Constructor Summary
protected Stripe()
           
 
Method Summary
 void addLabel(Label label)
          Adds a new Label to the stripe.
 Label addLabel(java.lang.String text)
          Creates and adds a new label with the default label model parameter and style to this stripe.
 Label addLabel(java.lang.String text, ILabelModelParameter labelModelParameter, ILabelStyle style)
          Creates and adds a new label to this stripe.
 double getActualSize()
          Gets the actual size of this stripe.
abstract  java.util.ArrayList getChildren()
          Gets a list of this stripe's direct children.
 double getEffectiveMinSize()
          Gets the maximum of minimum size and the insets.
 Insets getInsets()
          Gets the insets of this stripe.
 java.util.ArrayList getLabels()
          The list of this stripe's labels.
 java.util.ArrayList getLeaves()
          Gets all leaf stripes which are descendants of this stripe.
 double getMinimumSize()
          Gets the minimum size of this stripe.
 double getSize()
          Gets the size of this stripe.
 INodeStyle getStyle()
          This stripe's style.
 Table getTable()
          Gets the table which owns the Column or Row.
 void setInsets(Insets insets)
          Sets the insets of this stripe.
 void setMinimumSize(double minimumSize)
          Sets the minimum size of this stripe.
 void setSize(double size)
          Sets the size of this stripe.
 void setStyle(INodeStyle style)
          Sets this stripe's style.
protected  void setTable(Table table)
          Sets the table which owns the Column or Row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stripe

protected Stripe()
Method Detail

getTable

public Table getTable()
Gets the table which owns the Column or Row.

Returns:
The table which owns this stripe.

setTable

protected void setTable(Table table)
Sets the table which owns the Column or Row.

Adding the stripe with addColumn or addRow always sets the table and parent stripe correctly.

This implementation also sets the table of all child stripes.

Parameters:
table - The table which owns this stripe.

getInsets

public Insets getInsets()
Gets the insets of this stripe.

Returns:
The insets of this stripe.

setInsets

public void setInsets(Insets insets)
Sets the insets of this stripe.

Parameters:
insets - The insets to set.

getSize

public double getSize()
Gets the size of this stripe.

The size of a Column is its width, the size of a Row is its height.

Returns:
The size.

setSize

public void setSize(double size)
Sets the size of this stripe.

The size of a Column is its width, the size of a Row is its height.

Parameters:
size - The size.

getMinimumSize

public double getMinimumSize()
Gets the minimum size of this stripe.

The size of a Column is its width, the size of a Row is its height.

Returns:
The minimum size.

setMinimumSize

public void setMinimumSize(double minimumSize)
Sets the minimum size of this stripe.

The size of a Column is its width, the size of a Row is its height.

Parameters:
minimumSize - The minimum size.

getLabels

public java.util.ArrayList getLabels()
The list of this stripe's labels.

Developers should not add labels directly to this list but use addLabel(String) or addLabel(String, com.yworks.yfiles.server.graphml.flexio.data.ILabelModelParameter, com.yworks.yfiles.server.graphml.flexio.data.ILabelStyle) instead.

Returns:
The list of this stripe's labels.

addLabel

public void addLabel(Label label)
Adds a new Label to the stripe.

Parameters:
label - The label to add.

addLabel

public Label addLabel(java.lang.String text)
Creates and adds a new label with the default label model parameter and style to this stripe.

Parameters:
text - The label text.
Returns:
The newly created label.

addLabel

public Label addLabel(java.lang.String text,
                      ILabelModelParameter labelModelParameter,
                      ILabelStyle style)
Creates and adds a new label to this stripe.

Parameters:
text - The text.
labelModelParameter - The model parameter.
style - The label style.

getStyle

public INodeStyle getStyle()
This stripe's style.

The rendering of columns and rows is done by a INodeStyle.

Returns:
The stripe's style.

setStyle

public void setStyle(INodeStyle style)
Sets this stripe's style.

The rendering of columns and rows is done by a INodeStyle.

Parameters:
style - The stripe's style.

getChildren

public abstract java.util.ArrayList getChildren()
Gets a list of this stripe's direct children.

Subclasses have to override this method to return a list of their direct children.

Returns:
A list of this stripe's children.

getActualSize

public double getActualSize()
Gets the actual size of this stripe.

If a stripe has children the actual size is the accumulated size of all descendants plus the insets of this stripe. If it doesn't have children the explicit getSize() size} is returned.

Returns:
The actual size of this stripe.

getEffectiveMinSize

public double getEffectiveMinSize()
Gets the maximum of minimum size and the insets.

Returns:
The effective minimum size.

getLeaves

public java.util.ArrayList getLeaves()
Gets all leaf stripes which are descendants of this stripe.

Returns:
All leaves of this stripe.


Copyright © 2000-2013 yWorks GmbH. All rights reserved