net.sourceforge.spedit.ui
Class BlockView

java.lang.Object
  |
  +--javax.swing.text.View
        |
        +--javax.swing.text.CompositeView
              |
              +--javax.swing.text.BoxView
                    |
                    +--net.sourceforge.spedit.ui.BlockView
All Implemented Interfaces:
Styleable, SwingConstants

public class BlockView
extends BoxView
implements Styleable


Inner classes inherited from class net.sourceforge.spedit.core.Styleable
Styleable.StyleSheet, Styleable.Utils
 
Field Summary
protected  boolean focused
           
protected  boolean selected
           
protected  Styleable.StyleSheet styleSheet
           
static Integer X_AXIS
           
static Integer Y_AXIS
           
 
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
BlockView(Element e, Integer axis)
           
 
Method Summary
protected  Shape adjustC2V(Shape shape)
          Transforms the given shape that corresponds to the container view to the destination view.
protected  Shape adjustV2C(Shape shape)
          Transforms the given shape that corresponds to the container view to the destination view.
 void childAllocation(int off, Rectangle r)
           
 float getAlignment(int axis)
           
 short getBottomInset()
           
 short getLeftInset()
           
 Styleable.StyleSheet getParentStyleSheet()
           
 short getRightInset()
           
 Styleable.StyleSheet getStyleSheet()
           
 short getTopInset()
           
 Shape modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a)
           
 Shape modelToView(int pos, Shape a)
           
 Shape modelToView(int pos, Shape a, Position.Bias b)
           
 void paint(Graphics g, Shape bounds)
           
 void setStyleSheet(Styleable.StyleSheet s)
           
 int viewToModel(float x, float y, Shape a)
           
 int viewToModel(float x, float y, Shape a, Position.Bias[] biasReturn)
           
 
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, calculateMinorAxisRequirements, flipEastAndWestAtEnds, forwardUpdate, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, layout, layoutChanged, layoutMajorAxis, layoutMinorAxis, paintChild, preferenceChanged, replace, setAxis, setSize
 
Methods inherited from class javax.swing.text.CompositeView
getInsideAllocation, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, setInsets, setParagraphInsets, setParent
 
Methods inherited from class javax.swing.text.View
append, breakView, changedUpdate, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getViewFactory, insert, insertUpdate, isVisible, remove, removeAll, removeUpdate, updateChildren, updateLayout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

X_AXIS

public static Integer X_AXIS

Y_AXIS

public static Integer Y_AXIS

styleSheet

protected Styleable.StyleSheet styleSheet

focused

protected boolean focused

selected

protected boolean selected
Constructor Detail

BlockView

public BlockView(Element e,
                 Integer axis)
Method Detail

paint

public void paint(Graphics g,
                  Shape bounds)
Overrides:
paint in class BoxView

childAllocation

public void childAllocation(int off,
                            Rectangle r)
Overrides:
childAllocation in class BoxView

adjustC2V

protected Shape adjustC2V(Shape shape)
Transforms the given shape that corresponds to the container view to the destination view.

adjustV2C

protected Shape adjustV2C(Shape shape)
Transforms the given shape that corresponds to the container view to the destination view.

viewToModel

public int viewToModel(float x,
                       float y,
                       Shape a)
Overrides:
viewToModel in class View

viewToModel

public int viewToModel(float x,
                       float y,
                       Shape a,
                       Position.Bias[] biasReturn)
Overrides:
viewToModel in class BoxView

modelToView

public Shape modelToView(int p0,
                         Position.Bias b0,
                         int p1,
                         Position.Bias b1,
                         Shape a)
                  throws BadLocationException
Overrides:
modelToView in class CompositeView

modelToView

public Shape modelToView(int pos,
                         Shape a)
                  throws BadLocationException
Overrides:
modelToView in class View

modelToView

public Shape modelToView(int pos,
                         Shape a,
                         Position.Bias b)
                  throws BadLocationException
Overrides:
modelToView in class BoxView

getLeftInset

public short getLeftInset()
Overrides:
getLeftInset in class CompositeView

getTopInset

public short getTopInset()
Overrides:
getTopInset in class CompositeView

getBottomInset

public short getBottomInset()
Overrides:
getBottomInset in class CompositeView

getRightInset

public short getRightInset()
Overrides:
getRightInset in class CompositeView

getAlignment

public float getAlignment(int axis)
Overrides:
getAlignment in class BoxView

getStyleSheet

public Styleable.StyleSheet getStyleSheet()
Specified by:
getStyleSheet in interface Styleable

setStyleSheet

public void setStyleSheet(Styleable.StyleSheet s)
Specified by:
setStyleSheet in interface Styleable

getParentStyleSheet

public Styleable.StyleSheet getParentStyleSheet()
Specified by:
getParentStyleSheet in interface Styleable