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

## jchrest.gui
Class Size

    java.lang.Object
      jchrest.gui.Size

    public class Size

extends java.lang.Object

Method Summary
`void` | `drawText(java.awt.Graphics2D g, float x, float y, java.lang.String str)` Display given text at coordinates.
`java.awt.Font` | `getFont()`
`int` | `getHeight(java.lang.String str, java.awt.Graphics2D g)`
`int` | `getHorizontalSeparator(jchrest.gui.Orientation orientation)`
`int` | `getMargin()`
`int` | `getSmallSize()` Size of box for small size.
`java.awt.geom.Rectangle2D` | `getTextBounds(java.lang.String str, java.awt.Graphics2D g)` Return the bounding box for given string drawn at this size
`java.awt.font.TextLayout` | `getTextLayout(java.lang.String str, java.awt.Graphics2D g)` Return the TextLayout for given string at this size
`static java.util.List<Size>` | `getValues()`
`int` | `getVerticalSeparator(jchrest.gui.Orientation orientation)`
`int` | `getWidth(java.lang.String str, java.awt.Graphics2D g)`
`boolean` | `isSmall()` Return true if this size should be drawn as a box rather than with text and graphics.
`java.lang.String` | `toString()`

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

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getFont

    public java.awt.Font getFont()

### getMargin

    public int getMargin()

### getHorizontalSeparator

    public int getHorizontalSeparator(jchrest.gui.Orientation orientation)

### getVerticalSeparator

    public int getVerticalSeparator(jchrest.gui.Orientation orientation)

### isSmall

    public boolean isSmall()

  Return true if this size should be drawn as a box rather than with text and graphics. Indicator is whether a margin has been provided or not.

### getSmallSize

    public int getSmallSize()

  Size of box for small size.

### getValues

    public static java.util.List<Size> getValues()

### getTextLayout

    public java.awt.font.TextLayout getTextLayout(java.lang.String str,
                                                  java.awt.Graphics2D g)

  Return the TextLayout for given string at this size

### getTextBounds

    public java.awt.geom.Rectangle2D getTextBounds(java.lang.String str,
                                                   java.awt.Graphics2D g)

  Return the bounding box for given string drawn at this size

### getHeight

    public int getHeight(java.lang.String str,
                         java.awt.Graphics2D g)

### getWidth

    public int getWidth(java.lang.String str,
                        java.awt.Graphics2D g)

### drawText

    public void drawText(java.awt.Graphics2D g,
                         float x,
                         float y,
                         java.lang.String str)

  Display given text at coordinates. x, y represent the top left corner. Add the desired margin.

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