Class DelegateView
java.lang.Object
javax.swing.text.View
net.thevpc.more.shef.DelegateView
- All Implemented Interfaces:
SwingConstants
This class is essentially a wrapper for another view. The paint method
is left abstract so that custom drawing can be done.
This is useful for extending the functionallity of non-public Swing views
such as javax.swing.text.html.TableView
- Author:
- Bob Tantlinger
-
Field Summary
FieldsFields inherited from class View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXISFields inherited from interface SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbreakView(int axis, int offset, float pos, float len) voidchangedUpdate(DocumentEvent e, Shape a, ViewFactory f) createFragment(int p0, int p1) booleanfloatgetAlignment(int axis) intgetBreakWeight(int axis, float pos, float len) getChildAllocation(int index, Shape a) intfloatgetMaximumSpan(int axis) floatgetMinimumSpan(int axis) intgetNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) floatgetPreferredSpan(int axis) intgetResizeWeight(int axis) intgetToolTipText(float x, float y, Shape allocation) getView(int n) intintgetViewIndex(float x, float y, Shape allocation) intgetViewIndex(int pos, Position.Bias b) inthashCode()voidvoidinsertUpdate(DocumentEvent e, Shape a, ViewFactory f) booleanmodelToView(int pos, Shape a) modelToView(int pos, Shape a, Position.Bias b) modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) voidpreferenceChanged(View child, boolean width, boolean height) voidremove(int i) voidvoidremoveUpdate(DocumentEvent e, Shape a, ViewFactory f) voidvoidvoidsetSize(float width, float height) toString()intviewToModel(float x, float y, Shape a) intviewToModel(float x, float y, Shape a, Position.Bias[] biasReturn) Methods inherited from class View
forwardUpdate, forwardUpdateToView, paint, updateChildren, updateLayout
-
Field Details
-
delegate
-
-
Constructor Details
-
DelegateView
-
-
Method Details
-
append
-
breakView
-
changedUpdate
- Overrides:
changedUpdatein classView
-
createFragment
- Overrides:
createFragmentin classView
-
equals
-
getAlignment
public float getAlignment(int axis) - Overrides:
getAlignmentin classView
-
getAttributes
- Overrides:
getAttributesin classView
-
getBreakWeight
public int getBreakWeight(int axis, float pos, float len) - Overrides:
getBreakWeightin classView
-
getChildAllocation
- Overrides:
getChildAllocationin classView
-
getContainer
- Overrides:
getContainerin classView
-
getDocument
- Overrides:
getDocumentin classView
-
getElement
- Overrides:
getElementin classView
-
getEndOffset
public int getEndOffset()- Overrides:
getEndOffsetin classView
-
getGraphics
- Overrides:
getGraphicsin classView
-
getMaximumSpan
public float getMaximumSpan(int axis) - Overrides:
getMaximumSpanin classView
-
getMinimumSpan
public float getMinimumSpan(int axis) - Overrides:
getMinimumSpanin classView
-
getNextVisualPositionFrom
public int getNextVisualPositionFrom(int pos, Position.Bias b, Shape a, int direction, Position.Bias[] biasRet) throws BadLocationException - Overrides:
getNextVisualPositionFromin classView- Throws:
BadLocationException
-
getParent
-
getPreferredSpan
public float getPreferredSpan(int axis) - Specified by:
getPreferredSpanin classView
-
getResizeWeight
public int getResizeWeight(int axis) - Overrides:
getResizeWeightin classView
-
getStartOffset
public int getStartOffset()- Overrides:
getStartOffsetin classView
-
getToolTipText
- Overrides:
getToolTipTextin classView
-
getView
-
getViewCount
public int getViewCount()- Overrides:
getViewCountin classView
-
getViewFactory
- Overrides:
getViewFactoryin classView
-
getViewIndex
- Overrides:
getViewIndexin classView
-
getViewIndex
- Overrides:
getViewIndexin classView
-
hashCode
-
insert
-
insertUpdate
- Overrides:
insertUpdatein classView
-
isVisible
-
modelToView
public Shape modelToView(int p0, Position.Bias b0, int p1, Position.Bias b1, Shape a) throws BadLocationException - Overrides:
modelToViewin classView- Throws:
BadLocationException
-
modelToView
- Specified by:
modelToViewin classView- Throws:
BadLocationException
-
modelToView
- Overrides:
modelToViewin classView- Throws:
BadLocationException
-
preferenceChanged
- Overrides:
preferenceChangedin classView
-
remove
-
removeAll
-
removeUpdate
- Overrides:
removeUpdatein classView
-
replace
-
setParent
-
setSize
-
toString
-
viewToModel
- Specified by:
viewToModelin classView
-
viewToModel
- Overrides:
viewToModelin classView
-