Package org.lobobrowser.html.renderer
Class InputFileControl
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- org.lobobrowser.html.renderer.InputFileControl
-
- All Implemented Interfaces:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,InputContext
public class InputFileControl extends javax.swing.JComponent
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected HTMLElementImpl
controlElement
protected org.lobobrowser.html.renderer.RUIControl
ruicontrol
protected int
size
protected java.lang.String
value
protected static java.awt.Dimension
ZERO_DIMENSION
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description InputFileControl(HTMLBaseInputElement modelNode)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
blur()
void
click()
void
focus()
java.awt.Color
getBackgroundColor()
boolean
getChecked()
int
getCols()
java.awt.Component
getComponent()
int
getControlSize()
boolean
getDisabled()
java.io.File
getFileValue()
int
getMaxLength()
boolean
getMultiple()
java.awt.Dimension
getPreferredSize()
boolean
getReadOnly()
int
getRows()
int
getSelectedIndex()
int
getTabIndex()
int
getVAlign()
java.lang.String
getValue()
java.lang.String[]
getValues()
Returnsnull
.int
getVisibleSize()
void
invalidate()
protected void
invalidateAndRepaint()
Method invoked when image changes size.void
paint(java.awt.Graphics g)
boolean
paintSelection(java.awt.Graphics g, boolean inSelection, RenderableSpot startPoint, RenderableSpot endPoint)
void
reset(int availWidth, int availHeight)
void
resetInput()
void
select()
void
setBounds(int x, int y, int width, int height)
void
setChecked(boolean checked)
void
setCols(int cols)
void
setControlSize(int size)
void
setDisabled(boolean disabled)
void
setMaxLength(int maxLength)
void
setMultiple(boolean value)
void
setReadOnly(boolean readOnly)
void
setRows(int rows)
void
setRUIControl(org.lobobrowser.html.renderer.RUIControl ruicontrol)
void
setSelectedIndex(int value)
void
setTabIndex(int tabIndex)
void
setValue(java.lang.String value)
void
setVisibleSize(int value)
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.lobobrowser.html.domimpl.InputContext
getName, setName
-
-
-
-
Field Detail
-
value
protected java.lang.String value
-
size
protected int size
-
ZERO_DIMENSION
protected static final java.awt.Dimension ZERO_DIMENSION
-
controlElement
protected final HTMLElementImpl controlElement
-
ruicontrol
protected org.lobobrowser.html.renderer.RUIControl ruicontrol
-
-
Constructor Detail
-
InputFileControl
public InputFileControl(HTMLBaseInputElement modelNode)
-
-
Method Detail
-
getValue
public java.lang.String getValue()
- Specified by:
getValue
in interfaceInputContext
-
setDisabled
public void setDisabled(boolean disabled)
- Specified by:
setDisabled
in interfaceInputContext
-
setValue
public void setValue(java.lang.String value)
- Specified by:
setValue
in interfaceInputContext
-
getFileValue
public java.io.File getFileValue()
- Specified by:
getFileValue
in interfaceInputContext
-
resetInput
public void resetInput()
-
reset
public void reset(int availWidth, int availHeight)
-
getVAlign
public int getVAlign()
-
blur
public void blur()
- Specified by:
blur
in interfaceInputContext
-
click
public void click()
- Specified by:
click
in interfaceInputContext
-
focus
public void focus()
- Specified by:
focus
in interfaceInputContext
-
getChecked
public boolean getChecked()
- Specified by:
getChecked
in interfaceInputContext
-
getDisabled
public boolean getDisabled()
- Specified by:
getDisabled
in interfaceInputContext
-
getMaxLength
public int getMaxLength()
- Specified by:
getMaxLength
in interfaceInputContext
-
getReadOnly
public boolean getReadOnly()
- Specified by:
getReadOnly
in interfaceInputContext
-
getTabIndex
public int getTabIndex()
- Specified by:
getTabIndex
in interfaceInputContext
-
getValues
public java.lang.String[] getValues()
Returnsnull
. It should be overridden by controls that support multiple values.- Specified by:
getValues
in interfaceInputContext
-
select
public void select()
- Specified by:
select
in interfaceInputContext
-
setChecked
public void setChecked(boolean checked)
- Specified by:
setChecked
in interfaceInputContext
-
setMaxLength
public void setMaxLength(int maxLength)
- Specified by:
setMaxLength
in interfaceInputContext
-
setReadOnly
public void setReadOnly(boolean readOnly)
- Specified by:
setReadOnly
in interfaceInputContext
-
setControlSize
public void setControlSize(int size)
- Specified by:
setControlSize
in interfaceInputContext
-
setTabIndex
public void setTabIndex(int tabIndex)
- Specified by:
setTabIndex
in interfaceInputContext
-
getControlSize
public int getControlSize()
- Specified by:
getControlSize
in interfaceInputContext
-
getCols
public int getCols()
- Specified by:
getCols
in interfaceInputContext
-
getRows
public int getRows()
- Specified by:
getRows
in interfaceInputContext
-
setCols
public void setCols(int cols)
- Specified by:
setCols
in interfaceInputContext
-
setRows
public void setRows(int rows)
- Specified by:
setRows
in interfaceInputContext
-
paintSelection
public boolean paintSelection(java.awt.Graphics g, boolean inSelection, RenderableSpot startPoint, RenderableSpot endPoint)
-
getMultiple
public boolean getMultiple()
-
getSelectedIndex
public int getSelectedIndex()
- Specified by:
getSelectedIndex
in interfaceInputContext
-
getVisibleSize
public int getVisibleSize()
- Specified by:
getVisibleSize
in interfaceInputContext
-
setMultiple
public void setMultiple(boolean value)
-
setSelectedIndex
public void setSelectedIndex(int value)
- Specified by:
setSelectedIndex
in interfaceInputContext
-
setVisibleSize
public void setVisibleSize(int value)
- Specified by:
setVisibleSize
in interfaceInputContext
-
getComponent
public java.awt.Component getComponent()
-
setRUIControl
public void setRUIControl(org.lobobrowser.html.renderer.RUIControl ruicontrol)
-
invalidateAndRepaint
protected void invalidateAndRepaint()
Method invoked when image changes size. It's expected to be called outside the GUI thread.
-
getBackgroundColor
public java.awt.Color getBackgroundColor()
-
getPreferredSize
public abstract java.awt.Dimension getPreferredSize()
-
setBounds
public abstract void setBounds(int x, int y, int width, int height)
-
invalidate
public abstract void invalidate()
-
paint
public abstract void paint(java.awt.Graphics g)
-
-