org.lobobrowser.html.renderer
Class InputFileControl

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
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
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
InputFileControl(HTMLBaseInputElement modelNode)
           
 
Method Summary
 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()
          Returns null.
 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)
          Called as the control is layed out, either the first time HTML layout occurs or when the DOM changes.
 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, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, 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, transferFocusBackward, 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, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, 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 interface InputContext

setDisabled

public void setDisabled(boolean disabled)
Specified by:
setDisabled in interface InputContext

setValue

public void setValue(java.lang.String value)
Specified by:
setValue in interface InputContext

getFileValue

public java.io.File getFileValue()
Specified by:
getFileValue in interface InputContext

resetInput

public void resetInput()

reset

public void reset(int availWidth,
                  int availHeight)
Called as the control is layed out, either the first time HTML layout occurs or when the DOM changes. This method should reset its state assuming the element has changed, and change its preferred size if appropriate.


getVAlign

public int getVAlign()

blur

public void blur()
Specified by:
blur in interface InputContext

click

public void click()
Specified by:
click in interface InputContext

focus

public void focus()
Specified by:
focus in interface InputContext

getChecked

public boolean getChecked()
Specified by:
getChecked in interface InputContext

getDisabled

public boolean getDisabled()
Specified by:
getDisabled in interface InputContext

getMaxLength

public int getMaxLength()
Specified by:
getMaxLength in interface InputContext

getReadOnly

public boolean getReadOnly()
Specified by:
getReadOnly in interface InputContext

getTabIndex

public int getTabIndex()
Specified by:
getTabIndex in interface InputContext

getValues

public java.lang.String[] getValues()
Returns null. It should be overridden by controls that support multiple values.

Specified by:
getValues in interface InputContext

select

public void select()
Specified by:
select in interface InputContext

setChecked

public void setChecked(boolean checked)
Specified by:
setChecked in interface InputContext

setMaxLength

public void setMaxLength(int maxLength)
Specified by:
setMaxLength in interface InputContext

setReadOnly

public void setReadOnly(boolean readOnly)
Specified by:
setReadOnly in interface InputContext

setControlSize

public void setControlSize(int size)
Specified by:
setControlSize in interface InputContext

setTabIndex

public void setTabIndex(int tabIndex)
Specified by:
setTabIndex in interface InputContext

getControlSize

public int getControlSize()
Specified by:
getControlSize in interface InputContext

getCols

public int getCols()
Specified by:
getCols in interface InputContext

getRows

public int getRows()
Specified by:
getRows in interface InputContext

setCols

public void setCols(int cols)
Specified by:
setCols in interface InputContext

setRows

public void setRows(int rows)
Specified by:
setRows in interface InputContext

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 interface InputContext

getVisibleSize

public int getVisibleSize()
Specified by:
getVisibleSize in interface InputContext

setMultiple

public void setMultiple(boolean value)

setSelectedIndex

public void setSelectedIndex(int value)
Specified by:
setSelectedIndex in interface InputContext

setVisibleSize

public void setVisibleSize(int value)
Specified by:
setVisibleSize in interface InputContext

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 java.awt.Dimension getPreferredSize()

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)

invalidate

public void invalidate()

paint

public void paint(java.awt.Graphics g)


SourceForge.net LogoCopyright © 2005, 2006, 2007 The Lobo Project. All Rights Reserved.
[Cobra Project Home]