ewe.ui
Class FontChooser
java.lang.Object
ewe.data.DataObject
ewe.data.LiveObject
ewe.ui.FontChooser
- All Implemented Interfaces:
- Comparable, Copyable, DataUnit, FieldListener, LiveData
- public class FontChooser
- extends LiveObject
|
Method Summary |
boolean |
_getSetField(String fieldName,
Wrapper wrapper,
boolean isGet)
This is used for data transfer using a ewe.reflect.FieldTransfer object. |
void |
action(String fieldName,
Editor ed)
This gets called by action(FieldTransfer ft,Editor ed) and by fieldChanged(FieldTransfer ft,Editor ed)
if the field changed is a menu item. |
void |
addToPanel(CellPanel cp,
Editor ed,
int which)
Override this to provide the user interface for editing the Object. |
void |
fieldChanged(String fieldName,
Editor ed)
This gets called by fieldChanged(FieldTransfer ft,Editor ed). |
void |
fromFont(Font f)
|
protected ScrollablePanel |
getEditorScroller(CellPanel cp)
This is called by the default getEditor() should return a ScrollBarPanel for the CellPanel that the editor
is being placed in. |
Font |
toFont()
|
| Methods inherited from class ewe.data.LiveObject |
action, addMeToPanel, addObjectToPanel, decode, decoded, decodeFields, enableEditorScrolling, encode, encoded, encodeFields, fieldChanged, fieldEvent, getEditor, getIcon, getName, input, makeNewEditor, runAsApp, textDecode, textEncode |
| Methods inherited from class ewe.data.DataObject |
appendAllFields, compareTo, copied, copyFrom, equals, getCopy, getDeclaredField, getDeclaredFieldValue, getDeclaredFieldValue, getFieldList, getFieldList, getMyFieldList, getNew |
dontShowDifferentFonts
public static boolean dontShowDifferentFonts
- If this is set true, then the text in the drop-down menu for Fonts will
be in the same Font instead of being rendered in their own face.
fonts
public static String[] fonts
fontItems
protected static Vector fontItems
size
public int size
font
public String font
bold
public boolean bold
italic
public boolean italic
underline
public boolean underline
chooseStyle
public boolean chooseStyle
chooseSize
public boolean chooseSize
chooseName
public boolean chooseName
FontChooser
public FontChooser()
FontChooser
public FontChooser(boolean chooseStyle)
_getSetField
public boolean _getSetField(String fieldName,
Wrapper wrapper,
boolean isGet)
- Description copied from class:
DataObject
- This is used for data transfer using a ewe.reflect.FieldTransfer object. It is used
if the programmer requests a field transfer but there is no such field in the object. In
that case the _getSetField() method will be called and the programmer can programatically
get/set the field data.
By default this method calls getProperties() and then calls the _getSetField() method in PropertyList.
- Overrides:
_getSetField in class DataObject
- Parameters:
fieldName - The name of the field.wrapper - A wrapper containing the data to be assigned to the field or the wrapper into
which you should place the field data.isGet - if this is true then it is a get operation (in which case you should set
the wrapper value to be the field value) if it is false it is a set operation and
the wrapper contains the field value to assign to the field.
- Returns:
- the Object should return true if the field data was successfully transfered, false if not.
getEditorScroller
protected ScrollablePanel getEditorScroller(CellPanel cp)
- Description copied from class:
LiveObject
- This is called by the default getEditor() should return a ScrollBarPanel for the CellPanel that the editor
is being placed in. By default, this is a ScrollBarPanel except on a
SmartPhone, where it will be a VerticalScrollPanel.
You may return null from this.
- Overrides:
getEditorScroller in class LiveObject
addToPanel
public void addToPanel(CellPanel cp,
Editor ed,
int which)
- Description copied from class:
LiveObject
- Override this to provide the user interface for editing the Object.
Add all your controls to the CellPanel cp, and your fields to the Editor ed.
The options parameter may be used to specify a different Editor for the
Object for different situations - it is the same parameter that is passed
to the LiveData.getEditor(int options) call.
- Overrides:
addToPanel in class LiveObject
fromFont
public void fromFont(Font f)
toFont
public Font toFont()
action
public void action(String fieldName,
Editor ed)
- Description copied from class:
LiveObject
- This gets called by action(FieldTransfer ft,Editor ed) and by fieldChanged(FieldTransfer ft,Editor ed)
if the field changed is a menu item.
By default it will look for
a method called void _action(Editor ed) and if it finds it, it will be executed.
- Overrides:
action in class LiveObject
fieldChanged
public void fieldChanged(String fieldName,
Editor ed)
- Description copied from class:
LiveObject
- This gets called by fieldChanged(FieldTransfer ft,Editor ed).
By default it will look for
a method called void _changed(Editor ed) and if it finds it, it will be executed.
- Overrides:
fieldChanged in class LiveObject