Home » openjdk-7 » javax » swing » plaf » basic » [javadoc | source]
javax.swing.plaf.basic
class: BasicTextUI.UpdateHandler [javadoc | source]
java.lang.Object
   javax.swing.plaf.basic.BasicTextUI$UpdateHandler

All Implemented Interfaces:
    LayoutManager2, DocumentListener, UIResource, PropertyChangeListener

Handles updates from various places. If the model is changed, this class unregisters as a listener to the old model and registers with the new model. If the document model changes, the change is forwarded to the root view. If the focus accelerator changes, a new keystroke is registered to request focus.
Method from javax.swing.plaf.basic.BasicTextUI$UpdateHandler Summary:
addLayoutComponent,   addLayoutComponent,   calculateViewPosition,   changedUpdate,   getLayoutAlignmentX,   getLayoutAlignmentY,   insertUpdate,   invalidateLayout,   layoutContainer,   maximumLayoutSize,   minimumLayoutSize,   preferredLayoutSize,   propertyChange,   removeLayoutComponent,   removeUpdate
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.plaf.basic.BasicTextUI$UpdateHandler Detail:
 public  void addLayoutComponent(String name,
    Component comp) 
    Adds the specified component with the specified name to the layout.
 public  void addLayoutComponent(Component comp,
    Object constraint) 
    Adds the specified component to the layout, using the specified constraint object. We only store those components that were added with a constraint that is of type View.
 Shape calculateViewPosition(Shape alloc,
    View v) 
    Find the Shape representing the given view.
 public final  void changedUpdate(DocumentEvent e) 
    The change notification. Gets sent to the root of the view structure that represents the portion of the model being represented by the editor. The factory is added as an argument to the update so that the views can update themselves in a dynamic (not hardcoded) way.
 public float getLayoutAlignmentX(Container target) 
    Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
 public float getLayoutAlignmentY(Container target) 
    Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
 public final  void insertUpdate(DocumentEvent e) 
    The insert notification. Gets sent to the root of the view structure that represents the portion of the model being represented by the editor. The factory is added as an argument to the update so that the views can update themselves in a dynamic (not hardcoded) way.
 public  void invalidateLayout(Container target) 
    Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
 public  void layoutContainer(Container parent) 
    Lays out the container in the specified panel. This is implemented to position all components that were added with a View object as a constraint. The current allocation of the associated View is used as the location of the component.

    A read-lock is acquired on the document to prevent the view tree from being modified while the layout process is active.

 public Dimension maximumLayoutSize(Container target) 
    Returns the maximum size of this component.
 public Dimension minimumLayoutSize(Container parent) 
    Calculates the minimum size dimensions for the specified panel given the components in the specified parent container.
 public Dimension preferredLayoutSize(Container parent) 
    Calculates the preferred size dimensions for the specified panel given the components in the specified parent container.
 public final  void propertyChange(PropertyChangeEvent evt) 
    This method gets called when a bound property is changed. We are looking for document changes on the editor.
 public  void removeLayoutComponent(Component comp) 
    Removes the specified component from the layout.
 public final  void removeUpdate(DocumentEvent e) 
    The remove notification. Gets sent to the root of the view structure that represents the portion of the model being represented by the editor. The factory is added as an argument to the update so that the views can update themselves in a dynamic (not hardcoded) way.