Class AutoSpellView
java.lang.Object
javax.swing.text.View
com.swabunga.spell.swing.autospell.AutoSpellView
- All Implemented Interfaces:
AutoSpellConstants,SwingConstants
This View just forward all calls to the original view but also paints
the waved line if the Elements is marked as misspelled.
- Author:
- Robert Gustavsson (robert@lindesign.se)
-
Field Summary
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXISFields inherited from interface com.swabunga.spell.swing.autospell.AutoSpellConstants
wordMisspelled, wordMisspelledTrueFields inherited from interface javax.swing.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 arg0, int arg1, float arg2, float arg3) voidchangedUpdate(DocumentEvent arg0, Shape arg1, ViewFactory arg2) createFragment(int arg0, int arg1) booleanfloatgetAlignment(int arg0) intgetBreakWeight(int arg0, float arg1, float arg2) getChildAllocation(int arg0, Shape arg1) intfloatgetMaximumSpan(int arg0) floatgetMinimumSpan(int arg0) intgetNextVisualPositionFrom(int arg0, Position.Bias arg1, Shape arg2, int arg3, Position.Bias[] arg4) floatgetPreferredSpan(int arg0) intgetResizeWeight(int arg0) intgetToolTipText(float arg0, float arg1, Shape arg2) getView(int arg0) intintgetViewIndex(float arg0, float arg1, Shape arg2) intgetViewIndex(int arg0, Position.Bias arg1) voidvoidinsertUpdate(DocumentEvent arg0, Shape arg1, ViewFactory arg2) booleanmodelToView(int arg0, Shape arg1, Position.Bias arg2) modelToView(int arg0, Position.Bias arg1, int arg2, Position.Bias arg3, Shape arg4) voidvoidpreferenceChanged(View arg0, boolean arg1, boolean arg2) voidremove(int arg0) voidvoidremoveUpdate(DocumentEvent arg0, Shape arg1, ViewFactory arg2) voidvoidvoidsetSize(float arg0, float arg1) intviewToModel(float arg0, float arg1, Shape arg2, Position.Bias[] arg3) Methods inherited from class javax.swing.text.View
forwardUpdate, forwardUpdateToView, modelToView, updateChildren, updateLayout, viewToModel
-
Constructor Details
-
AutoSpellView
-
-
Method Details
-
append
-
breakView
-
changedUpdate
- Overrides:
changedUpdatein classView
-
createFragment
- Overrides:
createFragmentin classView
-
equals
-
getAlignment
public float getAlignment(int arg0) - Overrides:
getAlignmentin classView
-
getAttributes
- Overrides:
getAttributesin classView
-
getBreakWeight
public int getBreakWeight(int arg0, float arg1, float arg2) - 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 arg0) - Overrides:
getMaximumSpanin classView
-
getMinimumSpan
public float getMinimumSpan(int arg0) - Overrides:
getMinimumSpanin classView
-
getNextVisualPositionFrom
public int getNextVisualPositionFrom(int arg0, Position.Bias arg1, Shape arg2, int arg3, Position.Bias[] arg4) throws BadLocationException - Overrides:
getNextVisualPositionFromin classView- Throws:
BadLocationException
-
getParent
-
getPreferredSpan
public float getPreferredSpan(int arg0) - Specified by:
getPreferredSpanin classView- Parameters:
arg0-- Returns:
-
getResizeWeight
public int getResizeWeight(int arg0) - 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
-
insert
-
insertUpdate
- Overrides:
insertUpdatein classView
-
isVisible
public boolean isVisible() -
modelToView
- Specified by:
modelToViewin classView- Parameters:
arg0-arg1-arg2-- Returns:
- Throws:
BadLocationException
-
modelToView
public Shape modelToView(int arg0, Position.Bias arg1, int arg2, Position.Bias arg3, Shape arg4) throws BadLocationException - Overrides:
modelToViewin classView- Throws:
BadLocationException
-
paint
-
preferenceChanged
- Overrides:
preferenceChangedin classView
-
remove
public void remove(int arg0) -
removeAll
public void removeAll() -
removeUpdate
- Overrides:
removeUpdatein classView
-
replace
-
setParent
-
setSize
public void setSize(float arg0, float arg1) -
viewToModel
- Specified by:
viewToModelin classView- Parameters:
arg0-arg1-arg2-arg3-- Returns:
-