y.option
Class FileOptionItem

java.lang.Object
  |
  +--y.option.OptionItem
        |
        +--y.option.FileOptionItem

public class FileOptionItem
extends OptionItem

An option item for file name values.

Provides an editor based on a button that displays the current file name value. If the button gets pressed a default FileChoser component will be launched to pick a new file name.


Field Summary
 
Fields inherited from class y.option.OptionItem
COLOR_UNDEFINED, name, UNDEFINED
 
Constructor Summary
FileOptionItem(String name, String value)
          Creates a new instance of FileOptionItem
 
Method Summary
 boolean adoptEditorValue()
          Adopts the value from the editor component to the item.
 JComponent getEditor()
          Returns the editor component for the this option item.
 String getType()
          Returns "File"
 Object getValue()
          Returns the value of this option item
 void resetValue()
          Resets the value of this item to its initial value.
 void setValue(Object v)
          Sets the value of this option item
 
Methods inherited from class y.option.OptionItem
checkEditorValue, getClassType, getEditor, getName, getStringValue, getTipText, isValueUndefined, setClassType, setStringValue, setTipText, setValueUndefined, wantsVisibleName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileOptionItem

public FileOptionItem(String name,
                      String value)
Creates a new instance of FileOptionItem

Parameters:
name - the name of this item
value - the initial file name
Method Detail

getType

public String getType()
Returns "File"

Specified by:
getType in class OptionItem

getValue

public Object getValue()
Description copied from class: OptionItem
Returns the value of this option item

Specified by:
getValue in class OptionItem

setValue

public void setValue(Object v)
Description copied from class: OptionItem
Sets the value of this option item

Specified by:
setValue in class OptionItem

adoptEditorValue

public boolean adoptEditorValue()
Description copied from class: OptionItem
Adopts the value from the editor component to the item.

Specified by:
adoptEditorValue in class OptionItem

resetValue

public void resetValue()
Description copied from class: OptionItem
Resets the value of this item to its initial value.

Specified by:
resetValue in class OptionItem

getEditor

public JComponent getEditor()
Description copied from class: OptionItem
Returns the editor component for the this option item. Note: Use the getEditor(GuiFactory,String) variant instead.

Specified by:
getEditor in class OptionItem

© Copyright 2000-2003,
yWorks GmbH.
All rights reserved.

2003