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.TextFormats
          info.bioinfweb.treegraph.document.format.LegendFormats

All Implemented Interfaces:
  EdgeRadiusFormats, ElementFormats, LineFormats, java.lang.Cloneable

    public class LegendFormats

extends TextFormats
implements ElementFormats, LineFormats, EdgeRadiusFormats, java.lang.Cloneable

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

Fields inherited from class info.bioinfweb.treegraph.document.format.TextFormats
`BOLD, DEFAULT_DECIMAL_FORMAT_EXPR, ITALIC, PLAIN, UNDERLINE`

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

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

Constructor Summary
`LegendFormats(Legend owner)`

Method Summary
`void` | `assignEdgeRadiusFormats(EdgeRadiusFormats other)`
`void` | `assignLegendFormats(LegendFormats other)`
`void` | `assignLegendPosition(LegendFormats other)`
`void` | `assignLineFormats(LineFormats other)`
`LegendFormats` | `clone()`
`Node` | `getAnchor(int no)`
`java.lang.String` | `getAnchorName(int no)`
`DistanceValue` | `getEdgeRadius()`
`LegendStyle` | `getLegendStyle()`
`java.awt.Color` | `getLineColor()`
`DistanceValue` | `getLineWidth()`
`DistanceValue` | `getMinTreeDistance()`
`TextOrientation` | `getOrientation()`
`Legend` | `getOwner()`
`int` | `getPosition()` The position of a legend defined in which order vertically overlapping legends are positioned.
`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)` Sort the anchord by the y-coordinates of their according terminal subnodes.

Methods inherited from class info.bioinfweb.treegraph.document.format.TextFormats
`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`

Field Detail

### STD_ORIENTATION

    public static final TextOrientation STD_ORIENTATION

### STD_LEGEND_STYLE

    public static final LegendStyle STD_LEGEND_STYLE

### 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

### edgeRadius

    private DistanceValue edgeRadius

### 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)

### getEdgeRadius

    public DistanceValue getEdgeRadius()

  Specified by:
    `getEdgeRadius` in interface `EdgeRadiusFormats`

### 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)

  Sort the anchord 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`

### assignEdgeRadiusFormats

    public void assignEdgeRadiusFormats(EdgeRadiusFormats other)

  Specified by:
    `assignEdgeRadiusFormats` in interface `EdgeRadiusFormats`

### assignLegendPosition

    public void assignLegendPosition(LegendFormats other)

### assignLegendFormats

    public void assignLegendFormats(LegendFormats other)

### clone

    public LegendFormats clone()

  Specified by:
    `clone` in interface `ElementFormats`
  Overrides:
    `clone` in class `TextFormats`

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