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

## ru.biosoft.graphics
Class GraphicProperties

    java.lang.Object
      ru.biosoft.graphics.GraphicProperties

public class GraphicProperties
extends java.lang.Object

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

See Also:
  `Pen`, `Brush`

Field Summary
`protected java.util.Hashtable` | `_hs` Hash table to store attributes.
`Brush` | `brushDefault` Default brush: black, solid.
`ColorFont` | `fontDefault` Default ColorFont: SansSerif, PLAIN, 12, black.
`java.awt.Dimension` | `marginDefault` Default margin: (5,5).
`Pen` | `penDefault` Default pen: black, 1 line thickness, solid.

Constructor Summary
`protected` | `GraphicProperties()`

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

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

Field Detail

### _hs

    protected java.util.Hashtable _hs

  Hash table to store attributes.

### penDefault

    public Pen penDefault

  Default pen: black, 1 line thickness, solid.

### brushDefault

    public Brush brushDefault

  Default brush: black, solid.

### fontDefault

    public ColorFont fontDefault

  Default ColorFont: SansSerif, PLAIN, 12, black.

### marginDefault

    public java.awt.Dimension marginDefault

  Default margin: (5,5).

Constructor Detail

### GraphicProperties

    protected GraphicProperties()

Method Detail

### getPen

    public Pen getPen(java.lang.String penName)

  Returns pen with specified name. If such pen is absent, returns penDefault.

  Parameters:
    `penName` - the pen name

### getBrush

    public Brush getBrush(java.lang.String brushName)

  Returns brush with specified name. If such brush is absent, returns brushDefault.

  Parameters:
    `brushName` - the brush name

### getFont

    public ColorFont getFont(java.lang.String fontName)

  Returns font with specified name. If such font is absent, returns fontDefault.

  Parameters:
    `fontName` - the font name

### getMargin

    public java.awt.Dimension getMargin(java.lang.String marginName)

  Returns margin (or size) with specified name. If such margin is absent, returns marginDefault.

  Parameters:
    `marginName` - the margin name

### setPen

    public void setPen(java.lang.String penName,
                       Pen pen)

  Set (add if such pen absent) pen with specified name.

  Parameters:
    `penName` - the pen name
    `pen` - the pen

### setBrush

    public void setBrush(java.lang.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(java.lang.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(java.lang.String marginName,
                          java.awt.Dimension margin)

  Set (add if such margin absent) margin with specified name.

  Parameters:
    `marginName` - the margin name
    `margin` - the margin

### getInstance

    public static GraphicProperties getInstance()

  Pendung:
    high Remove this method.

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

Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.