Overview | Package | Class | Use | Tree | Help
| HEADER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ru.biosoft.graphics
Class GraphicProperties

public class GraphicProperties

GraphicContext stores graphic attributes used by graphics classes for painting.

This attributes can include next objects:

- Pen - specifies pen for Line, Rect and border of BoxFramed painting
- Brush - specifies brush for Box and BoxFramed painting
- Font - specifies font for Text painting
- Dimension- specifies different margins

Next default attributes are set:

    Attribute       Attribute Name            Graphic objects, that use it
    -----------------------------------------------------------------------
    Pen              Pen_Site                    SiteBase
    Pen              Pen_SiteComposite
    Pen              Pen_Ruler_Axis
    Pen              Pen_Ruler_Ticks

    Brush            Brush_Site                  SiteBase
    Brush            Brush_SiteCore
    Brush            Brush_SiteFP

    ColorFont            Font_Title
    ColorFont            Font_SiteTitle
    ColorFont            Font_SitePosition           SiteBase
    ColorFont            Font_SiteSequence           SiteBase
    ColorFont            Font_DB_H1
    ColorFont            Font_DB_H2
    ColorFont            Font_DB_H3
    ColorFont            Font_DB_Field
    ColorFont            Font_DB_Value
    ColorFont            Font_DB_Reference
    ColorFont            Font_Preformat
    ColorFont            Font_PreformatBold
    ColorFont            Font_Error
    ColorFont            Font_Ruler_Labels_Major
    ColorFont            Font_Ruler_Labels_Minor
    ColorFont            Font_Field_Label
    ColorFont            Font_Field_Label_Obligatory
    ColorFont            Font_Field_Value

    Dimension        Margin_Text
    Dimension        Margin_Sites
    Dimension        Margin_SiteComposite
    Dimension        Margin_Ruler_Text

    Dimension        Size_BP
    Dimension        Size_Scrollbar
    Dimension        Size_Ruler_TickSize
    Dimension        Size_Ruler_DecDig

Version: 2.0.1, 1 July 1998
See Also: Pen, Brush

Field Summary
`Brush` | `brushDefault` Default brush: black, solid.
`ColorFont` | `fontDefault` Default ColorFont: TimesRoman, PLAIN, 10, black.
`Dimension` | `marginDefault` Default margin: (5,5).
`Pen` | `penDefault` Default pen: black, 1 line thickness, solid.

Method Summary
`Brush` | `getBrush(String brushName)` Returns brush with specified name.
`ColorFont` | `getFont(String fontName)` Returns font with specified name.
`Dimension` | `getMargin(String marginName)` Returns margin (or size) with specified name.
`Pen` | `getPen(String penName)` Returns pen with specified name.
`void` | `setBrush(String brushName, Brush brush)` Set (add if such brush absent) brush with specified name.
`void` | `setFont(String fontName, ColorFont font)` Set (add if such font absent) font with specified name.
`void` | `setMargin(String marginName, Dimension margin)` Set (add if such margin absent) margin with specified name.
`void` | `setPen(String penName, Pen pen)` Set (add if such pen absent) pen with specified name.

Field Detail

### brushDefault

    public Brush brushDefault

  Default brush: black, solid.

### fontDefault

    public ColorFont fontDefault

  Default ColorFont: TimesRoman, PLAIN, 10, black.

### marginDefault

    public Dimension marginDefault

  Default margin: (5,5).

### penDefault

    public Pen penDefault

  Default pen: black, 1 line thickness, solid.

Method Detail

### getBrush

    public Brush getBrush(String brushName)

  Returns brush with specified name. If such brush is absent, returns brushDefault.
  Parameters:
    brushName - the brush name

### getFont

    public ColorFont getFont(String fontName)

  Returns font with specified name. If such font is absent, returns fontDefault.
  Parameters:
    fontName - the font name

### getMargin

    public Dimension getMargin(String marginName)

  Returns margin (or size) with specified name. If such margin is absent, returns marginDefault.
  Parameters:
    marginName - the margin name

### getPen

    public Pen getPen(String penName)

  Returns pen with specified name. If such pen is absent, returns penDefault.
  Parameters:
    penName - the pen name

### setBrush

    public void setBrush(String brushName, Brush brush)

  Set (add if such brush absent) brush with specified name.
  Parameters:
    brushName - the brush name
    brush - the brush

### setFont

    public void setFont(String fontName, ColorFont font)

  Set (add if such font absent) font with specified name.
  Parameters:
    fontName - the font name
    font - the font

### setMargin

    public void setMargin(String marginName, Dimension margin)

  Set (add if such margin absent) margin with specified name.
  Parameters:
    marginName - the margin name
    margin - the margin

### setPen

    public void setPen(String penName, Pen pen)

  Set (add if such pen absent) pen with specified name.
  Parameters:
    penName - the pen name
    pen - the pen

Association Links

to Class java.util.Hashtable

  Hash table to store attributes.

to Class ru.biosoft.graphics.Pen

  Default pen: black, 1 line thickness, solid.

to Class ru.biosoft.graphics.Brush

  Default brush: black, solid.

to Class ru.biosoft.graphics.font.ColorFont

  Default ColorFont: TimesRoman, PLAIN, 10, black.

to Class java.awt.Dimension

  Default margin: (5,5).

Overview | Package | Class | Use | Tree | Help
| FOOTER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

BOTTOM