Java Doc for DesignerPaneUI.java in  » IDE-Netbeans » visualweb.api.designer » org » netbeans » modules » visualweb » designer » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » visualweb.api.designer » org.netbeans.modules.visualweb.designer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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.

Inner Class :class FocusAction extends AbstractAction
Inner Class :static class TextDragGestureRecognizer extends BasicDragGestureRecognizer
Inner Class :static class TextDropTargetListener extends BasicDropTargetListener

Field Summary
transient  DesignerPaneeditor
    
transient  PageBoxpageBox
    
transient  booleanpainted
    

Constructor Summary
public  DesignerPaneUI()
     Creates a new UI.

Method Summary
 voidaddActions(ActionMap map, Action[] actions)
    
 ActionMapcreateActionMap()
     Create a default action map.
protected  KeymapcreateKeymap()
     Creates the keymap to use for the text component, and installs any necessary bindings into it.
public static  ComponentUIcreateUI(JComponent c)
     Creates a UI for the DesignerPane.
 ActionMapgetActionMap()
     Fetch an action map to use.
final protected  DesignerPaneBasegetComponent()
     Fetches the text component associated with this UI implementation.
 InputMapgetInputMap()
     Get the InputMap to use for the UI.
protected  StringgetKeymapName()
     Fetches the name of the keymap that will be installed/used by default for this UI.
public  DimensiongetMaximumSize(JComponent c)
     Gets the maximum size for the editor component.
public  DimensiongetMinimumSize(JComponent c)
     Gets the minimum size for the editor component.
public  DomPositiongetNextVisualPositionFrom(DesignerPaneBase t, DomPosition pos, int direction)
     Provides a way to determine the next visually represented model location that one might place a caret.
public  PageBoxgetPageBox()
    
public  DimensiongetPreferredSize(JComponent c)
     Gets the preferred size for the editor component.
protected  StringgetPropertyPrefix()
     Fetches the name used as a key to lookup properties through the UIManager.
protected  voidinstallDefaults()
     Initializes component properties, e.g.
protected  voidinstallKeyboardActions()
    
protected  voidinstallListeners()
     Installs listeners for the UI.
public  voidinstallUI(JComponent c)
     Installs the UI for a component.
final public  voidpaint(Graphics g, JComponent c)
     Paints the interface.
protected  voidpaintSafely(Graphics g)
     Paints the interface safely with a guarantee that the model won't change from the view of this thread.
 voidremoveActions(ActionMap map, Action[] actions)
    
public  voidresetPageBox()
     Flags model changes.
final protected  voidsetPageBox(PageBox box)
     Sets the current root of the view hierarchy and calls invalidate().
protected  voiduninstallDefaults()
     Sets the component properties that haven't been explicitly overridden to null.
protected  voiduninstallKeyboardActions()
    
protected  voiduninstallListeners()
     Uninstalls listeners for the UI.
public  voiduninstallUI(JComponent c)
     Deinstalls the UI for a component.
public  voidupdate(Graphics g, JComponent c)
     Superclass paints background in an uncontrollable way (i.e.
 voidupdateFocusTraversalKeys()
     Invoked when editable property is changed.
 voidupdateViewport()
     Check the parent and see if we have a view port - if so, notify the page box.

Field Detail
editor
transient DesignerPane editor(Code)



pageBox
transient PageBox pageBox(Code)



painted
transient boolean painted(Code)




Constructor Detail
DesignerPaneUI
public DesignerPaneUI()(Code)
Creates a new UI.




Method Detail
addActions
void addActions(ActionMap map, Action[] actions)(Code)



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.
  1. 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.
  2. Install the default caret and highlighter into the associated component.
  3. Attach to the editor and model. If there is no model, a default one is created.
  4. 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.
  1. If the component is marked as opaque, the background is painted in the current background color of the component.
  2. The highlights (if any) are painted.
  3. The box hierarchy is painted.
  4. The caret is painted.

Parameters:
  g - the graphics context



removeActions
void removeActions(ActionMap map, Action[] actions)(Code)



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



uninstallDefaults
protected void uninstallDefaults()(Code)
Sets the component properties that haven't been explicitly overridden to null. A property is considered overridden if its current value is not a UIResource.
See Also:   DesignerPaneUI.installDefaults
See Also:   DesignerPaneUI.uninstallUI



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.



Methods inherited from org.netbeans.modules.visualweb.text.DesignerPaneBaseUI
protected DesignerCaret createCaret()(Code)(Java Doc)
abstract public DomPosition getNextVisualPositionFrom(DesignerPaneBase t, DomPosition pos, int direction)(Code)(Java Doc)
abstract protected String getPropertyPrefix()(Code)(Java Doc)

Methods inherited from javax.swing.plaf.ComponentUI
public boolean contains(JComponent c, int x, int y)(Code)(Java Doc)
public static ComponentUI createUI(JComponent c)(Code)(Java Doc)
public Accessible getAccessibleChild(JComponent c, int i)(Code)(Java Doc)
public int getAccessibleChildrenCount(JComponent c)(Code)(Java Doc)
public int getBaseline(JComponent c, int width, int height)(Code)(Java Doc)
public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)(Code)(Java Doc)
public Dimension getMaximumSize(JComponent c)(Code)(Java Doc)
public Dimension getMinimumSize(JComponent c)(Code)(Java Doc)
public Dimension getPreferredSize(JComponent c)(Code)(Java Doc)
public void installUI(JComponent c)(Code)(Java Doc)
public void paint(Graphics g, JComponent c)(Code)(Java Doc)
public void uninstallUI(JComponent c)(Code)(Java Doc)
public void update(Graphics g, JComponent c)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.