nl.coderight.jazz.form.control
Class RichTextControl

java.lang.Object
  extended by nl.coderight.jazz.form.FormField<V>
      extended by nl.coderight.jazz.form.FormControl<V>
          extended by nl.coderight.jazz.form.field.scrollable.ScrollableField<String>
              extended by nl.coderight.jazz.form.control.RichTextControl
All Implemented Interfaces:
ClipboardSupport, Editable

public class RichTextControl
extends ScrollableField<String>
implements Editable, ClipboardSupport


Nested Class Summary
static class RichTextControl.Align
           
static class RichTextControl.Style
           
 
Nested classes/interfaces inherited from class nl.coderight.jazz.form.field.scrollable.ScrollableField
ScrollableField.ScrollBarCorner, ScrollableField.ScrollBarPolicy
 
Field Summary
protected  JToggleButton bold
           
protected  JToggleButton center
           
protected  nl.coderight.jazz.form.control.RichTextControl.ColorButton color
           
protected  JComboBox fontNames
           
protected  JComboBox fontSizes
           
protected  JToggleButton image
           
protected  JToggleButton italic
           
protected  JToggleButton justify
           
protected  JToggleButton left
           
protected  JToggleButton right
           
protected  JToggleButton underline
           
 
Fields inherited from class nl.coderight.jazz.form.FormField
Config
 
Constructor Summary
RichTextControl(String bindID)
           
 
Method Summary
 void copy()
           
protected  void createButtons()
           
protected  JTextPane createField()
           
protected  JToolBar createToolBar()
           
 void cut()
           
 String[] getAvailableFontFamilyNames()
           
 Point getCaretPosition()
           
protected  JTextPane getField()
           
 String getValue()
          Returns field value.
protected  void highlight(boolean highlight)
           
 void insertImage(Image image)
           
 boolean isEditable()
           
protected  void onFocusGained()
           
protected  void onFocusLost()
           
 void paste()
           
 void print()
           
 void setAlign(RichTextControl.Align align)
           
 void setColor(Color color)
           
 void setCopyAction(Action action)
           
 void setCutAction(Action action)
           
 void setEditable(boolean editable)
           
 void setFontFamily(String fontName)
           
 void setFontSize(int fontSize)
           
 void setPasteAction(Action action)
           
 void setStyle(RichTextControl.Style style, boolean selected)
           
 void setValue(String value)
          Sets field value.
protected  void showAttributes()
           
 
Methods inherited from class nl.coderight.jazz.form.field.scrollable.ScrollableField
getComponent, getFocusComponent, getPreferredSize, getViewportSize, isOpaque, isScrollable, onViewportChanged, setBackground, setBackgroundImage, setBorder, setColumnHeader, setComponent, setCorner, setEnabled, setForeground, setOpaque, setPreferredSize, setRowHeader, setScrollable, setScrollBarPolicy, setTitle
 
Methods inherited from class nl.coderight.jazz.form.FormControl
addField, addField, focus, focusField, focusNextField, focusPreviousField, getBindID, getFields, hasFocus, registerKeyboardAction, setComponent, setLayout
 
Methods inherited from class nl.coderight.jazz.form.FormField
dispatchEvent, dispose, focusNextField, focusPreviousField, getBackground, getBorder, getCursor, getDataBinding, getForeground, getForm, getLabel, getParent, getToolTip, isBindable, isChanged, isEnabled, isFocusable, isReadonly, isShowing, isValueChanged, isVisible, onChange, onClick, onDoubleClick, onMouseEnter, onMouseLeave, onPopup, setBindID, setChanged, setCursor, setDataBinding, setFocusable, setOnFocusGainedEvent, setOnFocusLostEvent, setPopupMenu, setReadonly, setToolTip, setVisible, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fontNames

protected JComboBox fontNames

fontSizes

protected JComboBox fontSizes

color

protected nl.coderight.jazz.form.control.RichTextControl.ColorButton color

bold

protected JToggleButton bold

italic

protected JToggleButton italic

underline

protected JToggleButton underline

left

protected JToggleButton left

center

protected JToggleButton center

right

protected JToggleButton right

justify

protected JToggleButton justify

image

protected JToggleButton image
Constructor Detail

RichTextControl

public RichTextControl(String bindID)
Method Detail

createField

protected JTextPane createField()

getField

protected JTextPane getField()

getValue

public String getValue()
Description copied from class: FormField
Returns field value.

Overrides:
getValue in class FormField<String>

setValue

public void setValue(String value)
Description copied from class: FormField
Sets field value.

Overrides:
setValue in class FormField<String>

print

public void print()
           throws PrinterException
Throws:
PrinterException

cut

public void cut()
Specified by:
cut in interface ClipboardSupport

copy

public void copy()
Specified by:
copy in interface ClipboardSupport

paste

public void paste()
Specified by:
paste in interface ClipboardSupport

setCopyAction

public void setCopyAction(Action action)

setCutAction

public void setCutAction(Action action)

setPasteAction

public void setPasteAction(Action action)

isEditable

public boolean isEditable()
Specified by:
isEditable in interface Editable

setEditable

public void setEditable(boolean editable)
Specified by:
setEditable in interface Editable

getCaretPosition

public Point getCaretPosition()

getAvailableFontFamilyNames

public String[] getAvailableFontFamilyNames()

setFontFamily

public void setFontFamily(String fontName)

setFontSize

public void setFontSize(int fontSize)

setColor

public void setColor(Color color)

setAlign

public void setAlign(RichTextControl.Align align)

setStyle

public void setStyle(RichTextControl.Style style,
                     boolean selected)

insertImage

public void insertImage(Image image)

onFocusGained

protected void onFocusGained()
Overrides:
onFocusGained in class FormField<String>

onFocusLost

protected void onFocusLost()
Overrides:
onFocusLost in class FormField<String>

highlight

protected void highlight(boolean highlight)

showAttributes

protected void showAttributes()

createToolBar

protected JToolBar createToolBar()

createButtons

protected void createButtons()


Copyright 2010 CodeRight, All rights reserved.