org.jhotdraw.gui.plaf.palette
Class PaletteFormattedTextFieldUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.TextUI
          extended by javax.swing.plaf.basic.BasicTextUI
              extended by javax.swing.plaf.basic.BasicTextFieldUI
                  extended by javax.swing.plaf.basic.BasicFormattedTextFieldUI
                      extended by org.jhotdraw.gui.plaf.palette.PaletteFormattedTextFieldUI
All Implemented Interfaces:
javax.swing.text.ViewFactory

public class PaletteFormattedTextFieldUI
extends javax.swing.plaf.basic.BasicFormattedTextFieldUI

PaletteFormattedTextFieldUI.

Author:
Werner Randelshofer  @version $Id: PaletteFormattedTextFieldUI.java 604 2010-01-09 12:00:29Z rawcoder $

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTextUI
javax.swing.plaf.basic.BasicTextUI.BasicCaret, javax.swing.plaf.basic.BasicTextUI.BasicHighlighter
 
Field Summary
private  java.awt.Color errorIndicatorForeground
           
 
Constructor Summary
PaletteFormattedTextFieldUI()
           
 
Method Summary
 javax.swing.text.View create(javax.swing.text.Element elem)
          Creates a view (FieldView) based on an element.
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
          Creates a UI for a JTextField.
protected  void installDefaults()
          Initializes component properties, e.g. font, foreground, background, caret color, selection color, selected text color, disabled text color, and border color.
 void paintBackground(java.awt.Graphics g)
           
protected  void paintSafely(java.awt.Graphics gr)
           
 
Methods inherited from class javax.swing.plaf.basic.BasicFormattedTextFieldUI
getPropertyPrefix
 
Methods inherited from class javax.swing.plaf.basic.BasicTextFieldUI
getBaseline, getBaselineResizeBehavior
 
Methods inherited from class javax.swing.plaf.basic.BasicTextUI
create, createCaret, createHighlighter, createKeymap, damageRange, damageRange, getComponent, getEditorKit, getKeymapName, getMaximumSize, getMinimumSize, getNextVisualPositionFrom, getPreferredSize, getRootView, getToolTipText, getVisibleEditorRect, installKeyboardActions, installListeners, installUI, modelChanged, modelToView, modelToView, paint, propertyChange, setView, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, update, viewToModel, viewToModel
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorIndicatorForeground

private java.awt.Color errorIndicatorForeground
Constructor Detail

PaletteFormattedTextFieldUI

public PaletteFormattedTextFieldUI()
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
Creates a UI for a JTextField.

Parameters:
c - the text field
Returns:
the UI

create

public javax.swing.text.View create(javax.swing.text.Element elem)
Creates a view (FieldView) based on an element.

Specified by:
create in interface javax.swing.text.ViewFactory
Overrides:
create in class javax.swing.plaf.basic.BasicTextFieldUI
Parameters:
elem - the element
Returns:
the view

installDefaults

protected void installDefaults()
Initializes component properties, e.g. font, foreground, background, caret color, selection color, selected text color, disabled text color, and border color. The font, foreground, and background properties are only set if their current value is either null or a UIResource, other properties are set if the current value is null.

Overrides:
installDefaults in class javax.swing.plaf.basic.BasicTextUI
See Also:
BasicTextUI.uninstallDefaults(), BasicTextUI.installUI(javax.swing.JComponent)

paintSafely

protected void paintSafely(java.awt.Graphics gr)
Overrides:
paintSafely in class javax.swing.plaf.basic.BasicTextUI

paintBackground

public void paintBackground(java.awt.Graphics g)
Overrides:
paintBackground in class javax.swing.plaf.basic.BasicTextUI