Package docking.widgets.fieldpanel
Class AccessibleField
java.lang.Object
javax.accessibility.AccessibleContext
docking.widgets.fieldpanel.AccessibleField
- All Implemented Interfaces:
Accessible,AccessibleComponent,AccessibleText
public class AccessibleField
extends AccessibleContext
implements Accessible, AccessibleComponent, AccessibleText
Implements Accessible interfaces for individual fields in the field panel
-
Field Summary
Fields inherited from class javax.accessibility.AccessibleContext
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_COMPONENT_BOUNDS_CHANGED, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_HYPERTEXT_OFFSET, ACCESSIBLE_INVALIDATE_CHILDREN, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParentFields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD -
Constructor Summary
ConstructorsConstructorDescriptionAccessibleField(Field field, JComponent parent, int indexInParent, Rectangle bounds) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleangetAccessibleChild(int i) intintgetAfterIndex(int part, int index) getAtIndex(int part, int index) getBeforeIndex(int part, int index) intgetCharacterAttribute(int i) getCharacterBounds(int i) intgetField()Returns the field associated with this AccessibleField.getFont()intintintgetSize()getText()Returns the text of the fieldintgetTextOffset(int row, int col) Converts a row,col position to an text offset in the fieldbooleanbooleanbooleanReturns true if the field is currently part of a selection.booleanbooleanvoidvoidvoidvoidvoidsetCaretPos(int caretPos) Sets the position of the cursor relative to the text in this field.voidvoidsetEnabled(boolean b) voidvoidvoidsetLocation(Point p) voidsetSelected(boolean selected) Sets that this field is part of the overall selection.voidvoidsetVisible(boolean b) Methods inherited from class javax.accessibility.AccessibleContext
addPropertyChangeListener, firePropertyChange, getAccessibleAction, getAccessibleDescription, getAccessibleEditableText, getAccessibleIcon, getAccessibleName, getAccessibleParent, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, removePropertyChangeListener, setAccessibleDescription, setAccessibleName, setAccessibleParent
-
Constructor Details
-
AccessibleField
Constructor- Parameters:
field- the field this is providing accessible access toparent- the component containing the field (FieldPanel)indexInParent- the number of this field relative to the visible fields on the screen.bounds- the bounds of the field relative to the field panel.
-
-
Method Details
-
setCaretPos
public void setCaretPos(int caretPos) Sets the position of the cursor relative to the text in this field. It is only meaningful when the corresponding field is the field containing the field panel's actual cursor.- Parameters:
caretPos- the offset into the text of the field of where the cursor is being displayed by the field panel.
-
setSelected
public void setSelected(boolean selected) Sets that this field is part of the overall selection.- Parameters:
selected- true if the field is part of the selection; false otherwise
-
isSelected
public boolean isSelected()Returns true if the field is currently part of a selection.- Returns:
- true if the field is currently part of a selection.
-
getText
Returns the text of the field- Returns:
- the text of the field
-
getTextOffset
public int getTextOffset(int row, int col) Converts a row,col position to an text offset in the field- Parameters:
row- the rowcol- the col- Returns:
- an offset into the text that represents the row,col position
-
getField
Returns the field associated with this AccessibleField.- Returns:
- the field associated with this AccessibleField
-
getAccessibleContext
- Specified by:
getAccessibleContextin interfaceAccessible
-
getAccessibleText
- Overrides:
getAccessibleTextin classAccessibleContext
-
getAccessibleComponent
- Overrides:
getAccessibleComponentin classAccessibleContext
-
getAccessibleRole
- Specified by:
getAccessibleRolein classAccessibleContext
-
getAccessibleStateSet
- Specified by:
getAccessibleStateSetin classAccessibleContext
-
getAccessibleIndexInParent
public int getAccessibleIndexInParent()- Specified by:
getAccessibleIndexInParentin classAccessibleContext
-
getAccessibleChildrenCount
public int getAccessibleChildrenCount()- Specified by:
getAccessibleChildrenCountin classAccessibleContext
-
getAccessibleChild
- Specified by:
getAccessibleChildin classAccessibleContext
-
getLocale
- Specified by:
getLocalein classAccessibleContext- Throws:
IllegalComponentStateException
-
getIndexAtPoint
- Specified by:
getIndexAtPointin interfaceAccessibleText
-
getCharacterBounds
- Specified by:
getCharacterBoundsin interfaceAccessibleText
-
getCharCount
public int getCharCount()- Specified by:
getCharCountin interfaceAccessibleText
-
getAtIndex
- Specified by:
getAtIndexin interfaceAccessibleText
-
getAfterIndex
- Specified by:
getAfterIndexin interfaceAccessibleText
-
getBeforeIndex
- Specified by:
getBeforeIndexin interfaceAccessibleText
-
getCaretPosition
public int getCaretPosition()- Specified by:
getCaretPositionin interfaceAccessibleText
-
getCharacterAttribute
- Specified by:
getCharacterAttributein interfaceAccessibleText
-
getSelectionStart
public int getSelectionStart()- Specified by:
getSelectionStartin interfaceAccessibleText
-
getSelectionEnd
public int getSelectionEnd()- Specified by:
getSelectionEndin interfaceAccessibleText
-
getSelectedText
- Specified by:
getSelectedTextin interfaceAccessibleText
-
getBackground
- Specified by:
getBackgroundin interfaceAccessibleComponent
-
setBackground
- Specified by:
setBackgroundin interfaceAccessibleComponent
-
getForeground
- Specified by:
getForegroundin interfaceAccessibleComponent
-
setForeground
- Specified by:
setForegroundin interfaceAccessibleComponent
-
getCursor
- Specified by:
getCursorin interfaceAccessibleComponent
-
setCursor
- Specified by:
setCursorin interfaceAccessibleComponent
-
getFont
- Specified by:
getFontin interfaceAccessibleComponent
-
setFont
- Specified by:
setFontin interfaceAccessibleComponent
-
getFontMetrics
- Specified by:
getFontMetricsin interfaceAccessibleComponent
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceAccessibleComponent
-
setEnabled
public void setEnabled(boolean b) - Specified by:
setEnabledin interfaceAccessibleComponent
-
isVisible
public boolean isVisible()- Specified by:
isVisiblein interfaceAccessibleComponent
-
setVisible
public void setVisible(boolean b) - Specified by:
setVisiblein interfaceAccessibleComponent
-
isShowing
public boolean isShowing()- Specified by:
isShowingin interfaceAccessibleComponent
-
contains
- Specified by:
containsin interfaceAccessibleComponent
-
getLocationOnScreen
- Specified by:
getLocationOnScreenin interfaceAccessibleComponent
-
getLocation
- Specified by:
getLocationin interfaceAccessibleComponent
-
setLocation
- Specified by:
setLocationin interfaceAccessibleComponent
-
getBounds
- Specified by:
getBoundsin interfaceAccessibleComponent
-
setBounds
- Specified by:
setBoundsin interfaceAccessibleComponent
-
getSize
- Specified by:
getSizein interfaceAccessibleComponent
-
setSize
- Specified by:
setSizein interfaceAccessibleComponent
-
getAccessibleAt
- Specified by:
getAccessibleAtin interfaceAccessibleComponent
-
isFocusTraversable
public boolean isFocusTraversable()- Specified by:
isFocusTraversablein interfaceAccessibleComponent
-
requestFocus
public void requestFocus()- Specified by:
requestFocusin interfaceAccessibleComponent
-
addFocusListener
- Specified by:
addFocusListenerin interfaceAccessibleComponent
-
removeFocusListener
- Specified by:
removeFocusListenerin interfaceAccessibleComponent
-