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_AXIS
Fields inherited from interface com.swabunga.spell.swing.autospell.AutoSpellConstants
wordMisspelled, wordMisspelledTrue
Fields 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 TypeMethodDescriptionvoid
breakView
(int arg0, int arg1, float arg2, float arg3) void
changedUpdate
(DocumentEvent arg0, Shape arg1, ViewFactory arg2) createFragment
(int arg0, int arg1) boolean
float
getAlignment
(int arg0) int
getBreakWeight
(int arg0, float arg1, float arg2) getChildAllocation
(int arg0, Shape arg1) int
float
getMaximumSpan
(int arg0) float
getMinimumSpan
(int arg0) int
getNextVisualPositionFrom
(int arg0, Position.Bias arg1, Shape arg2, int arg3, Position.Bias[] arg4) float
getPreferredSpan
(int arg0) int
getResizeWeight
(int arg0) int
getToolTipText
(float arg0, float arg1, Shape arg2) getView
(int arg0) int
int
getViewIndex
(float arg0, float arg1, Shape arg2) int
getViewIndex
(int arg0, Position.Bias arg1) void
void
insertUpdate
(DocumentEvent arg0, Shape arg1, ViewFactory arg2) boolean
modelToView
(int arg0, Shape arg1, Position.Bias arg2) modelToView
(int arg0, Position.Bias arg1, int arg2, Position.Bias arg3, Shape arg4) void
void
preferenceChanged
(View arg0, boolean arg1, boolean arg2) void
remove
(int arg0) void
void
removeUpdate
(DocumentEvent arg0, Shape arg1, ViewFactory arg2) void
void
void
setSize
(float arg0, float arg1) int
viewToModel
(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:
changedUpdate
in classView
-
createFragment
- Overrides:
createFragment
in classView
-
equals
-
getAlignment
public float getAlignment(int arg0) - Overrides:
getAlignment
in classView
-
getAttributes
- Overrides:
getAttributes
in classView
-
getBreakWeight
public int getBreakWeight(int arg0, float arg1, float arg2) - Overrides:
getBreakWeight
in classView
-
getChildAllocation
- Overrides:
getChildAllocation
in classView
-
getContainer
- Overrides:
getContainer
in classView
-
getDocument
- Overrides:
getDocument
in classView
-
getElement
- Overrides:
getElement
in classView
-
getEndOffset
public int getEndOffset()- Overrides:
getEndOffset
in classView
-
getGraphics
- Overrides:
getGraphics
in classView
-
getMaximumSpan
public float getMaximumSpan(int arg0) - Overrides:
getMaximumSpan
in classView
-
getMinimumSpan
public float getMinimumSpan(int arg0) - Overrides:
getMinimumSpan
in classView
-
getNextVisualPositionFrom
public int getNextVisualPositionFrom(int arg0, Position.Bias arg1, Shape arg2, int arg3, Position.Bias[] arg4) throws BadLocationException - Overrides:
getNextVisualPositionFrom
in classView
- Throws:
BadLocationException
-
getParent
-
getPreferredSpan
public float getPreferredSpan(int arg0) - Specified by:
getPreferredSpan
in classView
- Parameters:
arg0
-- Returns:
-
getResizeWeight
public int getResizeWeight(int arg0) - Overrides:
getResizeWeight
in classView
-
getStartOffset
public int getStartOffset()- Overrides:
getStartOffset
in classView
-
getToolTipText
- Overrides:
getToolTipText
in classView
-
getView
-
getViewCount
public int getViewCount()- Overrides:
getViewCount
in classView
-
getViewFactory
- Overrides:
getViewFactory
in classView
-
getViewIndex
- Overrides:
getViewIndex
in classView
-
getViewIndex
- Overrides:
getViewIndex
in classView
-
insert
-
insertUpdate
- Overrides:
insertUpdate
in classView
-
isVisible
public boolean isVisible() -
modelToView
- Specified by:
modelToView
in 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:
modelToView
in classView
- Throws:
BadLocationException
-
paint
-
preferenceChanged
- Overrides:
preferenceChanged
in classView
-
remove
public void remove(int arg0) -
removeAll
public void removeAll() -
removeUpdate
- Overrides:
removeUpdate
in classView
-
replace
-
setParent
-
setSize
public void setSize(float arg0, float arg1) -
viewToModel
- Specified by:
viewToModel
in classView
- Parameters:
arg0
-arg1
-arg2
-arg3
-- Returns:
-