| java.lang.Object javax.swing.plaf.ComponentUI org.netbeans.modules.visualweb.text.DesignerPaneBaseUI org.netbeans.modules.visualweb.designer.DesignerPaneUI
DesignerPaneUI | public class DesignerPaneUI extends DesignerPaneBaseUI (Code) | | Same as DesignerPaneUI, but rewritten to deal with Boxes directly.
Provides the look and feel for a DesignerPane.
Based -heavily- on BasicEditorPaneUI in javax.swing.
|
painted | transient boolean painted(Code) | | |
DesignerPaneUI | public DesignerPaneUI()(Code) | | Creates a new UI.
|
createActionMap | ActionMap createActionMap()(Code) | | Create a default action map. This is basically the
set of actions found exported by the component.
|
createKeymap | protected Keymap createKeymap()(Code) | | Creates the keymap to use for the text component, and installs
any necessary bindings into it. By default, the keymap is
shared between all instances of this type of DesignerPaneBaseUI. The
keymap has the name defined by the getKeymapName method. If the
keymap is not found, then DEFAULT_KEYMAP from JTextComponent is used.
The set of bindings used to create the keymap is fetched
from the UIManager using a key formed by combining the
DesignerPaneUI.getPropertyPrefix method
and the string .keyBindings . The type is expected
to be JTextComponent.KeyBinding[] .
the keymap See Also: DesignerPaneUI.getKeymapName See Also: com.sun.rave.text.JTextComponent |
createUI | public static ComponentUI createUI(JComponent c)(Code) | | Creates a UI for the DesignerPane.
Parameters: c - the DesignerPane component the UI |
getActionMap | ActionMap getActionMap()(Code) | | Fetch an action map to use. The map for a JEditorPane
is not shared because it changes with the EditorKit.
|
getComponent | final protected DesignerPaneBase getComponent()(Code) | | Fetches the text component associated with this
UI implementation. This will be null until
the ui has been installed.
the editor component |
getInputMap | InputMap getInputMap()(Code) | | Get the InputMap to use for the UI.
|
getKeymapName | protected String getKeymapName()(Code) | | Fetches the name of the keymap that will be installed/used
by default for this UI. This is implemented to create a
name based upon the classname. The name is the the name
of the class with the package prefix removed.
the name |
getMaximumSize | public Dimension getMaximumSize(JComponent c)(Code) | | Gets the maximum size for the editor component.
Parameters: c - the editor component the size |
getMinimumSize | public Dimension getMinimumSize(JComponent c)(Code) | | Gets the minimum size for the editor component.
Parameters: c - the editor component the size |
getNextVisualPositionFrom | public DomPosition getNextVisualPositionFrom(DesignerPaneBase t, DomPosition pos, int direction)(Code) | | Provides a way to determine the next visually represented model
location that one might place a caret. Some views may not be visible,
they might not be in the same order found in the model, or they just
might not allow access to some of the locations in the model.
Parameters: pos - the position to convert >= 0 Parameters: a - the allocated region to render into Parameters: direction - the direction from the current position that canbe thought of as the arrow keys typically found on a keyboard.This may be SwingConstants.WEST, SwingConstants.EAST,SwingConstants.NORTH, or SwingConstants.SOUTH. the location within the model that best represents the nextlocation visual position. exception: BadLocationException - exception: IllegalArgumentException - for an invalid direction |
getPageBox | public PageBox getPageBox()(Code) | | Return the initial containing block used by the editor
|
getPreferredSize | public Dimension getPreferredSize(JComponent c)(Code) | | Gets the preferred size for the editor component. If the component
has been given a size prior to receiving this request, it will
set the size of the box hierarchy to reflect the size of the component
before requesting the preferred size of the view hierarchy. This
allows formatted views to format to the current component size before
answering the request. Other views don't care about currently formatted
size and give the same answer either way.
Parameters: c - the editor component the size |
getPropertyPrefix | protected String getPropertyPrefix()(Code) | | Fetches the name used as a key to lookup properties through the
UIManager. This is used as a prefix to all the standard
text properties.
the name ("EditorPane") |
installDefaults | protected void installDefaults()(Code) | | 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.
See Also: DesignerPaneUI.uninstallDefaults See Also: DesignerPaneUI.installUI |
installKeyboardActions | protected void installKeyboardActions()(Code) | | |
installListeners | protected void installListeners()(Code) | | Installs listeners for the UI.
|
installUI | public void installUI(JComponent c)(Code) | | Installs the UI for a component. This does the following
things.
-
Set the associated component to opaque (can be changed
easily by a subclass or on JTextComponent directly),
which is the most common case. This will cause the
component's background color to be painted.
-
Install the default caret and highlighter into the
associated component.
-
Attach to the editor and model. If there is no
model, a default one is created.
-
create the the box hierarchy used to represent the model.
Parameters: c - the editor component See Also: ComponentUI.installUI |
paint | final public void paint(Graphics g, JComponent c)(Code) | | Paints the interface. This is routed to the
paintSafely method under the guarantee that
the model won't change from the view of this thread
while it's rendering (if the associated model is
derived from AbstractDocument). This enables the
model to potentially be updated asynchronously.
Parameters: g - the graphics context Parameters: c - the editor component |
paintSafely | protected void paintSafely(Graphics g)(Code) | | Paints the interface safely with a guarantee that
the model won't change from the view of this thread.
This does the following things, rendering from
back to front.
-
If the component is marked as opaque, the background
is painted in the current background color of the
component.
-
The highlights (if any) are painted.
-
The box hierarchy is painted.
-
The caret is painted.
Parameters: g - the graphics context |
resetPageBox | public void resetPageBox()(Code) | | Flags model changes.
This is called whenever the model has changed.
It is implemented to rebuild the view hierarchy
to represent the default root element of the
associated model.
|
setPageBox | final protected void setPageBox(PageBox box)(Code) | | Sets the current root of the view hierarchy and calls invalidate().
If there were any child components, they will be removed (i.e.
there are assumed to have come from components embedded in views).
Parameters: v - the root view |
uninstallKeyboardActions | protected void uninstallKeyboardActions()(Code) | | |
uninstallListeners | protected void uninstallListeners()(Code) | | Uninstalls listeners for the UI.
|
uninstallUI | public void uninstallUI(JComponent c)(Code) | | Deinstalls the UI for a component. This removes the listeners,
uninstalls the highlighter, removes views, and nulls out the keymap.
Parameters: c - the editor component See Also: ComponentUI.uninstallUI |
update | public void update(Graphics g, JComponent c)(Code) | | Superclass paints background in an uncontrollable way
(i.e. one might want an image tiled into the background).
To prevent this from happening twice, this method is
reimplemented to simply paint.
NOTE: Superclass is also not thread-safe in
it's rendering of the background, although that's not
an issue with the default rendering.
|
updateFocusTraversalKeys | void updateFocusTraversalKeys()(Code) | | Invoked when editable property is changed.
removing 'TAB' and 'SHIFT-TAB' from traversalKeysSet in case
editor is editable
adding 'TAB' and 'SHIFT-TAB' to traversalKeysSet in case
editor is non editable
|
updateViewport | void updateViewport()(Code) | | Check the parent and see if we have a view port - if so, notify
the page box.
|
|
|