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.math.view
Class FormulaViewBuilder

    java.lang.Object
      ru.biosoft.math.view.FormulaViewBuilder

public class FormulaViewBuilder
extends java.lang.Object

Field Summary
`protected Pen` | `boldPen`
`protected ColorFont` | `defaultFont`
`protected Pen` | `defaultPen`
`protected int` | `dy` Offset for the last created view reltive center line.
`protected ColorFont` | `errorFont`
`protected org.apache.log4j.Category` | `log`
`protected java.awt.Point` | `offset`
`protected java.awt.Point` | `subscript`
`protected ColorFont` | `subscriptFont`
`protected java.awt.Point` | `superscript`
`protected ColorFont` | `superscriptFont`
`protected int` | `y` Current center horizontal line used for alignment.

Constructor Summary
`FormulaViewBuilder()`

Method Summary
`protected void` | `addAligned(CompositeView cv, Node node, int mode, java.awt.Point offset, java.awt.Graphics g)`
`protected void` | `addAligned(CompositeView cv, View view, int mode, java.awt.Point offset)`
`protected void` | `addHorisontalLine(CompositeView view, int h)`
`protected void` | `align(View view)`
`View` | `createConstantView(AstConstant node, java.awt.Graphics g)`
`View` | `createDifferentiationView(AstFunNode node, java.awt.Graphics g)`
`View` | `createDivisionView(AstFunNode node, java.awt.Graphics g)`
`View` | `createFunctionDeclarationView(AstFunctionDeclaration node, java.awt.Graphics g)`
`View` | `createFunctionView(AstFunNode node, java.awt.Graphics g)`
`View` | `createNodeView(Node node, java.awt.Graphics g)`
`View` | `createPieceView(AstPiece node, View valueView, int valueDy, int conditionOffset, java.awt.Graphics g)`
`View` | `createPiecewiseView(AstPiecewise node, java.awt.Graphics g)`
`protected View` | `createPowerView(AstFunNode node, java.awt.Graphics g)`
`View` | `createTitleView(java.lang.String title, ColorFont font, java.awt.Graphics g)` Creates view for variable or function name. '_' character indicates that subscript should be used for last part of expression.
`View` | `createVariableView(AstVarNode node, java.awt.Graphics g)`
`CompositeView` | `createView(AstStart start, java.awt.Graphics g)`
`ColorFont` | `getDefaultFont()`
`protected void` | `init()` Convinience mthod to be used i anonymous subclasses.
`static boolean` | `needParenthis(AstFunNode node)`

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

Field Detail

### log

    protected org.apache.log4j.Category log

### defaultFont

    protected ColorFont defaultFont

### superscriptFont

    protected ColorFont superscriptFont

### subscriptFont

    protected ColorFont subscriptFont

### errorFont

    protected ColorFont errorFont

### offset

    protected java.awt.Point offset

### subscript

    protected java.awt.Point subscript

### superscript

    protected java.awt.Point superscript

### y

    protected int y

  Current center horizontal line used for alignment.

### dy

    protected int dy

  Offset for the last created view reltive center line. It is used by align functions to align new view.

### defaultPen

    protected Pen defaultPen

### boldPen

    protected Pen boldPen

Constructor Detail

### FormulaViewBuilder

    public FormulaViewBuilder()

Method Detail

### getDefaultFont

    public ColorFont getDefaultFont()

### init

    protected void init()

  Convinience mthod to be used i anonymous subclasses.

### createView

    public CompositeView createView(AstStart start,
                                    java.awt.Graphics g)

### needParenthis

    public static boolean needParenthis(AstFunNode node)

### createTitleView

    public View createTitleView(java.lang.String title,
                                ColorFont font,
                                java.awt.Graphics g)

  Creates view for variable or function name. '_' character indicates that subscript should be used for last part of expression.

  Pendung:
    whether we should use different fonts if expression has several levels of subscript?

### addAligned

    protected void addAligned(CompositeView cv,
                              Node node,
                              int mode,
                              java.awt.Point offset,
                              java.awt.Graphics g)

### addAligned

    protected void addAligned(CompositeView cv,
                              View view,
                              int mode,
                              java.awt.Point offset)

### align

    protected void align(View view)

### createNodeView

    public View createNodeView(Node node,
                               java.awt.Graphics g)

### createConstantView

    public View createConstantView(AstConstant node,
                                   java.awt.Graphics g)

### createVariableView

    public View createVariableView(AstVarNode node,
                                   java.awt.Graphics g)

### createFunctionView

    public View createFunctionView(AstFunNode node,
                                   java.awt.Graphics g)

### createDivisionView

    public View createDivisionView(AstFunNode node,
                                   java.awt.Graphics g)

### createDifferentiationView

    public View createDifferentiationView(AstFunNode node,
                                          java.awt.Graphics g)

### addHorisontalLine

    protected void addHorisontalLine(CompositeView view,
                                     int h)

### createPowerView

    protected View createPowerView(AstFunNode node,
                                   java.awt.Graphics g)

### createFunctionDeclarationView

    public View createFunctionDeclarationView(AstFunctionDeclaration node,
                                              java.awt.Graphics g)

### createPiecewiseView

    public View createPiecewiseView(AstPiecewise node,
                                    java.awt.Graphics g)

### createPieceView

    public View createPieceView(AstPiece node,
                                View valueView,
                                int valueDy,
                                int conditionOffset,
                                java.awt.Graphics g)

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.