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, accessibleParent
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
-
Constructor Summary
ConstructorDescriptionAccessibleField
(Field field, JComponent parent, int indexInParent, Rectangle bounds) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
getAccessibleChild
(int i) int
int
getAfterIndex
(int part, int index) getAtIndex
(int part, int index) getBeforeIndex
(int part, int index) int
getCharacterAttribute
(int i) getCharacterBounds
(int i) int
getField()
Returns the field associated with this AccessibleField.getFont()
int
int
int
getSize()
getText()
Returns the text of the fieldint
getTextOffset
(int row, int col) Converts a row,col position to an text offset in the fieldboolean
boolean
boolean
Returns true if the field is currently part of a selection.boolean
boolean
void
void
void
void
void
setCaretPos
(int caretPos) Sets the position of the cursor relative to the text in this field.void
void
setEnabled
(boolean b) void
void
void
setLocation
(Point p) void
setSelected
(boolean selected) Sets that this field is part of the overall selection.void
void
setVisible
(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:
getAccessibleContext
in interfaceAccessible
-
getAccessibleText
- Overrides:
getAccessibleText
in classAccessibleContext
-
getAccessibleComponent
- Overrides:
getAccessibleComponent
in classAccessibleContext
-
getAccessibleRole
- Specified by:
getAccessibleRole
in classAccessibleContext
-
getAccessibleStateSet
- Specified by:
getAccessibleStateSet
in classAccessibleContext
-
getAccessibleIndexInParent
public int getAccessibleIndexInParent()- Specified by:
getAccessibleIndexInParent
in classAccessibleContext
-
getAccessibleChildrenCount
public int getAccessibleChildrenCount()- Specified by:
getAccessibleChildrenCount
in classAccessibleContext
-
getAccessibleChild
- Specified by:
getAccessibleChild
in classAccessibleContext
-
getLocale
- Specified by:
getLocale
in classAccessibleContext
- Throws:
IllegalComponentStateException
-
getIndexAtPoint
- Specified by:
getIndexAtPoint
in interfaceAccessibleText
-
getCharacterBounds
- Specified by:
getCharacterBounds
in interfaceAccessibleText
-
getCharCount
public int getCharCount()- Specified by:
getCharCount
in interfaceAccessibleText
-
getAtIndex
- Specified by:
getAtIndex
in interfaceAccessibleText
-
getAfterIndex
- Specified by:
getAfterIndex
in interfaceAccessibleText
-
getBeforeIndex
- Specified by:
getBeforeIndex
in interfaceAccessibleText
-
getCaretPosition
public int getCaretPosition()- Specified by:
getCaretPosition
in interfaceAccessibleText
-
getCharacterAttribute
- Specified by:
getCharacterAttribute
in interfaceAccessibleText
-
getSelectionStart
public int getSelectionStart()- Specified by:
getSelectionStart
in interfaceAccessibleText
-
getSelectionEnd
public int getSelectionEnd()- Specified by:
getSelectionEnd
in interfaceAccessibleText
-
getSelectedText
- Specified by:
getSelectedText
in interfaceAccessibleText
-
getBackground
- Specified by:
getBackground
in interfaceAccessibleComponent
-
setBackground
- Specified by:
setBackground
in interfaceAccessibleComponent
-
getForeground
- Specified by:
getForeground
in interfaceAccessibleComponent
-
setForeground
- Specified by:
setForeground
in interfaceAccessibleComponent
-
getCursor
- Specified by:
getCursor
in interfaceAccessibleComponent
-
setCursor
- Specified by:
setCursor
in interfaceAccessibleComponent
-
getFont
- Specified by:
getFont
in interfaceAccessibleComponent
-
setFont
- Specified by:
setFont
in interfaceAccessibleComponent
-
getFontMetrics
- Specified by:
getFontMetrics
in interfaceAccessibleComponent
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceAccessibleComponent
-
setEnabled
public void setEnabled(boolean b) - Specified by:
setEnabled
in interfaceAccessibleComponent
-
isVisible
public boolean isVisible()- Specified by:
isVisible
in interfaceAccessibleComponent
-
setVisible
public void setVisible(boolean b) - Specified by:
setVisible
in interfaceAccessibleComponent
-
isShowing
public boolean isShowing()- Specified by:
isShowing
in interfaceAccessibleComponent
-
contains
- Specified by:
contains
in interfaceAccessibleComponent
-
getLocationOnScreen
- Specified by:
getLocationOnScreen
in interfaceAccessibleComponent
-
getLocation
- Specified by:
getLocation
in interfaceAccessibleComponent
-
setLocation
- Specified by:
setLocation
in interfaceAccessibleComponent
-
getBounds
- Specified by:
getBounds
in interfaceAccessibleComponent
-
setBounds
- Specified by:
setBounds
in interfaceAccessibleComponent
-
getSize
- Specified by:
getSize
in interfaceAccessibleComponent
-
setSize
- Specified by:
setSize
in interfaceAccessibleComponent
-
getAccessibleAt
- Specified by:
getAccessibleAt
in interfaceAccessibleComponent
-
isFocusTraversable
public boolean isFocusTraversable()- Specified by:
isFocusTraversable
in interfaceAccessibleComponent
-
requestFocus
public void requestFocus()- Specified by:
requestFocus
in interfaceAccessibleComponent
-
addFocusListener
- Specified by:
addFocusListener
in interfaceAccessibleComponent
-
removeFocusListener
- Specified by:
removeFocusListener
in interfaceAccessibleComponent
-