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 HTMLElementImplcontrolElementprotected org.lobobrowser.html.renderer.RUIControlruicontrolprotected intsizeprotected java.lang.Stringvalueprotected static java.awt.DimensionZERO_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 voidblur()voidclick()voidfocus()java.awt.ColorgetBackgroundColor()booleangetChecked()intgetCols()java.awt.ComponentgetComponent()intgetControlSize()booleangetDisabled()java.io.FilegetFileValue()intgetMaxLength()booleangetMultiple()java.awt.DimensiongetPreferredSize()booleangetReadOnly()intgetRows()intgetSelectedIndex()intgetTabIndex()intgetVAlign()java.lang.StringgetValue()java.lang.String[]getValues()Returnsnull.intgetVisibleSize()voidinvalidate()protected voidinvalidateAndRepaint()Method invoked when image changes size.voidpaint(java.awt.Graphics g)booleanpaintSelection(java.awt.Graphics g, boolean inSelection, RenderableSpot startPoint, RenderableSpot endPoint)voidreset(int availWidth, int availHeight)voidresetInput()voidselect()voidsetBounds(int x, int y, int width, int height)voidsetChecked(boolean checked)voidsetCols(int cols)voidsetControlSize(int size)voidsetDisabled(boolean disabled)voidsetMaxLength(int maxLength)voidsetMultiple(boolean value)voidsetReadOnly(boolean readOnly)voidsetRows(int rows)voidsetRUIControl(org.lobobrowser.html.renderer.RUIControl ruicontrol)voidsetSelectedIndex(int value)voidsetTabIndex(int tabIndex)voidsetValue(java.lang.String value)voidsetVisibleSize(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:
getValuein interfaceInputContext
-
setDisabled
public void setDisabled(boolean disabled)
- Specified by:
setDisabledin interfaceInputContext
-
setValue
public void setValue(java.lang.String value)
- Specified by:
setValuein interfaceInputContext
-
getFileValue
public java.io.File getFileValue()
- Specified by:
getFileValuein interfaceInputContext
-
resetInput
public void resetInput()
-
reset
public void reset(int availWidth, int availHeight)
-
getVAlign
public int getVAlign()
-
blur
public void blur()
- Specified by:
blurin interfaceInputContext
-
click
public void click()
- Specified by:
clickin interfaceInputContext
-
focus
public void focus()
- Specified by:
focusin interfaceInputContext
-
getChecked
public boolean getChecked()
- Specified by:
getCheckedin interfaceInputContext
-
getDisabled
public boolean getDisabled()
- Specified by:
getDisabledin interfaceInputContext
-
getMaxLength
public int getMaxLength()
- Specified by:
getMaxLengthin interfaceInputContext
-
getReadOnly
public boolean getReadOnly()
- Specified by:
getReadOnlyin interfaceInputContext
-
getTabIndex
public int getTabIndex()
- Specified by:
getTabIndexin interfaceInputContext
-
getValues
public java.lang.String[] getValues()
Returnsnull. It should be overridden by controls that support multiple values.- Specified by:
getValuesin interfaceInputContext
-
select
public void select()
- Specified by:
selectin interfaceInputContext
-
setChecked
public void setChecked(boolean checked)
- Specified by:
setCheckedin interfaceInputContext
-
setMaxLength
public void setMaxLength(int maxLength)
- Specified by:
setMaxLengthin interfaceInputContext
-
setReadOnly
public void setReadOnly(boolean readOnly)
- Specified by:
setReadOnlyin interfaceInputContext
-
setControlSize
public void setControlSize(int size)
- Specified by:
setControlSizein interfaceInputContext
-
setTabIndex
public void setTabIndex(int tabIndex)
- Specified by:
setTabIndexin interfaceInputContext
-
getControlSize
public int getControlSize()
- Specified by:
getControlSizein interfaceInputContext
-
getCols
public int getCols()
- Specified by:
getColsin interfaceInputContext
-
getRows
public int getRows()
- Specified by:
getRowsin interfaceInputContext
-
setCols
public void setCols(int cols)
- Specified by:
setColsin interfaceInputContext
-
setRows
public void setRows(int rows)
- Specified by:
setRowsin 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:
getSelectedIndexin interfaceInputContext
-
getVisibleSize
public int getVisibleSize()
- Specified by:
getVisibleSizein interfaceInputContext
-
setMultiple
public void setMultiple(boolean value)
-
setSelectedIndex
public void setSelectedIndex(int value)
- Specified by:
setSelectedIndexin interfaceInputContext
-
setVisibleSize
public void setVisibleSize(int value)
- Specified by:
setVisibleSizein 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)
-
-