Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## info.bioinfweb.treegraph.document.format
Class LegendFormats

    java.lang.Object
      info.bioinfweb.treegraph.document.format.ConcreteTextFormats
          info.bioinfweb.treegraph.document.format.LegendFormats

All Implemented Interfaces:
  CornerRadiusFormats, ElementFormats, LineFormats, TextFormats, java.lang.Cloneable

    public class LegendFormats

extends ConcreteTextFormats
implements ElementFormats, LineFormats, TextFormats, CornerRadiusFormats, java.lang.Cloneable

Field Summary
`private java.lang.String[]` | `anchorNames`
`private DistanceValue` | `cornerRadius`
`static float` | `DEFAULT_SPACING_IN_MM`
`private LegendStyle` | `legendStyle`
`private java.awt.Color` | `lineColor`
`private DistanceValue` | `lineWidth`
`private Margin` | `margin`
`private DistanceValue` | `minTreeDistance`
`private TextOrientation` | `orientation`
`private Legend` | `owner`
`private int` | `position`
`private DistanceValue` | `spacing`
`static LegendStyle` | `STD_LEGEND_STYLE`
`static TextOrientation` | `STD_ORIENTATION`
`static int` | `STD_POSITION`

Fields inherited from interface info.bioinfweb.treegraph.document.format.LineFormats
`DEFAULT_LINE_COLOR, DEFAULT_LINE_WIDTH_IN_MM`

Fields inherited from interface info.bioinfweb.treegraph.document.format.TextFormats
`BOLD, DEFAULT_DECIMAL_FORMAT_EXPR, DEFAULT_FONT_NAME, DEFAULT_LOCALE, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_HEIGHT_IN_MM, ITALIC, PLAIN, UNDERLINE`

Fields inherited from interface info.bioinfweb.treegraph.document.format.CornerRadiusFormats
`STD_EDGE_RADIUS_IN_MM`

Constructor Summary
`LegendFormats(Legend owner)`

Method Summary
`void` | `assign(LegendFormats other)`
`void` | `assignCornerRadiusFormats(CornerRadiusFormats other)`
`void` | `assignLegendFormats(LegendFormats other)`
`void` | `assignLegendPosition(LegendFormats other)` Adopts the position values and the anchors but not the owning legend object.
`void` | `assignLineFormats(LineFormats other)`
`LegendFormats` | `clone()` Returns a deep copy of this class.
`Node` | `getAnchor(int no)`
`java.lang.String` | `getAnchorName(int no)`
`DistanceValue` | `getCornerRadius()`
`LegendStyle` | `getLegendStyle()`
`java.awt.Color` | `getLineColor()`
`DistanceValue` | `getLineWidth()`
`Margin` | `getMargin()`
`DistanceValue` | `getMinTreeDistance()`
`TextOrientation` | `getOrientation()`
`Legend` | `getOwner()`
`int` | `getPosition()` The position of a legend defined in which order vertically overlapping legends are positioned.
`DistanceValue` | `getSpacing()` The legend spacing is the distance between the bracket and the text of a legend.
`boolean` | `hasOneAnchor()` Tests whether only one anchor is specified.
`void` | `setAnchor(int no, Node node)`
`void` | `setAnchorName(int no, java.lang.String value)`
`void` | `setLegendStyle(LegendStyle style)`
`void` | `setLineColor(java.awt.Color lineColor)`
`void` | `setOrientation(TextOrientation orientation)`
`void` | `setOwner(Legend owner)`
`void` | `setPosition(int position)` The position of a legend defined in which order vertically overlapping legends are positioned.
`void` | `sortAnchors(PositionPaintType type)` Sorts the anchors by the y-coordinates of their according terminal subnodes.

Methods inherited from class info.bioinfweb.treegraph.document.format.ConcreteTextFormats
`addTextStyle, assignTextFormats, getDecimalFormat, getDescent, getFont, getFontName, getLocale, getTextColor, getTextHeight, getTextStyle, hasTextStyle, removeTextStyle, setDecimalFormat, setFontName, setLocale, setTextColor, setTextStyle`

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

Methods inherited from interface info.bioinfweb.treegraph.document.format.TextFormats
`addTextStyle, assignTextFormats, getDecimalFormat, getDescent, getFont, getFontName, getLocale, getTextColor, getTextHeight, getTextStyle, hasTextStyle, removeTextStyle, setDecimalFormat, setFontName, setLocale, setTextColor, setTextStyle`

Field Detail

### STD_ORIENTATION

    public static final TextOrientation STD_ORIENTATION

### STD_LEGEND_STYLE

    public static final LegendStyle STD_LEGEND_STYLE

### DEFAULT_SPACING_IN_MM

    public static final float DEFAULT_SPACING_IN_MM

See Also:
  Constant Field Values

### STD_POSITION

    public static final int STD_POSITION

See Also:
  Constant Field Values

### owner

    private Legend owner

### orientation

    private TextOrientation orientation

### legendStyle

    private LegendStyle legendStyle

### lineColor

    private java.awt.Color lineColor

### lineWidth

    private DistanceValue lineWidth

### cornerRadius

    private DistanceValue cornerRadius

### margin

    private Margin margin

### spacing

    private DistanceValue spacing

### position

    private int position

### minTreeDistance

    private DistanceValue minTreeDistance

### anchorNames

    private java.lang.String[] anchorNames

Constructor Detail

### LegendFormats

    public LegendFormats(Legend owner)

Method Detail

### getOwner

    public Legend getOwner()

### setOwner

    public void setOwner(Legend owner)

### getOrientation

    public TextOrientation getOrientation()

### setOrientation

    public void setOrientation(TextOrientation orientation)

### getLineColor

    public java.awt.Color getLineColor()

  Specified by:
    `getLineColor` in interface `LineFormats`

### setLineColor

    public void setLineColor(java.awt.Color lineColor)

  Specified by:
    `setLineColor` in interface `LineFormats`

### getLineWidth

    public DistanceValue getLineWidth()

  Specified by:
    `getLineWidth` in interface `LineFormats`

### getPosition

    public int getPosition()

  The position of a legend defined in which order vertically overlapping legends are positioned. Legends with higher position numbers are displayed further right.

  Returns:
    the position number (can also be negative)

### setPosition

    public void setPosition(int position)

  The position of a legend defined in which order vertically overlapping legends are positioned. Legends with higher position numbers are displayed further right.
  The assinged legend (if present) is reinserted into its `Legends`-object to ensure the correct order.

  Parameters:
    `position` - - the new position number (can also be negative)

### getMinTreeDistance

    public DistanceValue getMinTreeDistance()

### getLegendStyle

    public LegendStyle getLegendStyle()

### setLegendStyle

    public void setLegendStyle(LegendStyle style)

### getMargin

    public Margin getMargin()

### getSpacing

    public DistanceValue getSpacing()

  The legend spacing is the distance between the bracket and the text of a legend.

### getCornerRadius

    public DistanceValue getCornerRadius()

  Specified by:
    `getCornerRadius` in interface `CornerRadiusFormats`

### getAnchorName

    public java.lang.String getAnchorName(int no)

### setAnchorName

    public void setAnchorName(int no,
                              java.lang.String value)

### getAnchor

    public Node getAnchor(int no)

### setAnchor

    public void setAnchor(int no,
                          Node node)

### sortAnchors

    public void sortAnchors(PositionPaintType type)

  Sorts the anchors by the y-coordinates of their according terminal subnodes. The upper most one becomes first. If only one anchor is specified it is made shure that the secound anchor is `null`.
  Note that the anchors of a legend can be only positioned by the y-values for one painter ID at a time. Therefor positioners have to call this method every time they are executed.

  Parameters:
    `type` - - the painter type for the y-coordinates

### hasOneAnchor

    public boolean hasOneAnchor()

  Tests whether only one anchor is specified.

### assignLineFormats

    public void assignLineFormats(LineFormats other)

  Specified by:
    `assignLineFormats` in interface `LineFormats`

### assignCornerRadiusFormats

    public void assignCornerRadiusFormats(CornerRadiusFormats other)

  Specified by:
    `assignCornerRadiusFormats` in interface `CornerRadiusFormats`

### assignLegendPosition

    public void assignLegendPosition(LegendFormats other)

  Adopts the position values and the anchors but not the owning legend object.

  Parameters:
    `other` - - the object that contains the source values

### assignLegendFormats

    public void assignLegendFormats(LegendFormats other)

### assign

    public void assign(LegendFormats other)

### clone

    public LegendFormats clone()

  Returns a deep copy of this class. (Note that the value of `owner` is copied as well althogh the owning legend is only connected to this and not to the returned object.)

  Specified by:
    `clone` in interface `CornerRadiusFormats`
  Specified by:
    `clone` in interface `ElementFormats`
  Specified by:
    `clone` in interface `LineFormats`
  Specified by:
    `clone` in interface `TextFormats`
  Overrides:
    `clone` in class `ConcreteTextFormats`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD