Java Doc for SelectionManager.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
   org.netbeans.modules.visualweb.designer.SelectionManager

SelectionManager
public class SelectionManager (Code)
This class is the central point for handling selections, mouse interactions, keyboard interactions, etc., with the page editor / the WYSIWYG designer. It for example listens to mouse events and decides whether this translates into a change in selected components, or a drag of a component, etc.

This class manages selections in the page designer.


author:
   Tor Norbye



Field Summary
final static  booleanPAINT_SELECTION_HIERARCHY
    
 intselectionViewPos
    

Constructor Summary
 SelectionManager(WebForm webform)
    

Method Summary
public  voidaddSelected(Element componentRootElement, boolean update)
     Add the given view/component to the selection.
Parameters:
  update - If true, update property sheets etc.
public  voidclearSelection(boolean update)
     Clear out the selection - after this has run, no components are selected
Parameters:
  update - If true, update property sheets etc.
public  voidclearSelectionImmediate()
     XXX Altered copy of clear selection, to immediatelly update the nodes. FIXME Get rid of the delayed node updates.
public  voidenlarge(Rectangle r)
     Increase the size of the given rectangle to accomodate the selection handles.
public  booleanfocusDefaultProperty(ActionEvent event)
     Focus the default property.
public  intgetNumSelected()
     Report the number of selected items.
 ElementgetPositionElement()
     Returned the first positioned element in the selection.
public  ElementgetPrimary()
     Return the primary selection, if any.
public  CssBoxgetSelectedAncestor(CssBox box)
     Check to see if any ancestors of the given view (or the view itself) is in the selection set, and if so, return it.
public  Element[]getSelectedComponentRootElements()
    
public  ElementgetSelectedContainer()
     Return the first container component found in the selection.
public  intgetSelectionHandleDir(int x, int y, int maxWidth, int maxHeight)
     Determine if the given point overlaps a selection handle.
public  ElementgetSelectionHandleView(int x, int y, int maxWidth, int maxHeight)
     Similar to getSelectionHandleDir, but returns the selected object whose selection handles are pointed at, rather than the selection handle direction.
public  booleanisBelowSelected(CssBox box)
     Return true iff the given view is in the set of selected views or is a child of a selected view.
Parameters:
  box - The box to check.
public  booleanisNodeUpdatePending()
    
public  booleanisSelected(Element componentRootElement)
     Return true iff the given view is in the set of selected views.
Parameters:
  component - The view to check.
public  booleanisSelectionEmpty()
    
public  voidnotifyScrolled()
    
 voidpaintInlineEditorBox(Graphics2D g2d, Rectangle rect)
     Draw selection for the given view.
public  voidpaintSelHierarchy(Graphics2D g2d)
    
public  voidpaintSelection(Graphics2D g2d)
    
public  voidpickPrimary()
     XXX Bad architecture.
public  voidremoveSelected(Element componentRootElement, boolean update)
     Remove the given view/component from the selection.
Parameters:
  update - If true, update property sheets etc.
public  voidselectAll()
     Select all components on the designer surface (except components that are children of other components, and except components that are "special", such as Form/Body/Head/Html, etc.
 voidselectAncestor(int targetx, int targety)
    
 voidselectBean(Element componentRootElement)
    
 voidselectComponent(Element componentRootElement)
    
public  voidselectComponentRectangle(Rectangle bounds, boolean contained)
     Select all views that intersect the given bound rectangle.
Parameters:
  pane - Pane to look for selection in
Parameters:
  bounds - Bounds to scan within
Parameters:
  exclusive - If true, only include components that are fullycontained within the bounds.
public  voidselectComponents(Element[] componentRootElements, boolean update)
    
public  voidsetPrimary(Element primary)
    
public  voidsetSelected(Element componentRootElement, boolean update)
     Set the selection to the given component.
public  voidsyncSelection(boolean update)
     Synchronize the selection with the model.
public  voidupdateNodes()
     Set the activated nodes for the top component bound to this selection manager to match the current component.
public  voidupdateNodesImmediate()
    
public  voidupdateSelectionImmediate()
    

Field Detail
PAINT_SELECTION_HIERARCHY
final static boolean PAINT_SELECTION_HIERARCHY(Code)



selectionViewPos
int selectionViewPos(Code)




Constructor Detail
SelectionManager
SelectionManager(WebForm webform)(Code)




Method Detail
addSelected
public void addSelected(Element componentRootElement, boolean update)(Code)
Add the given view/component to the selection.
Parameters:
  update - If true, update property sheets etc. to reflectthe new selection.



clearSelection
public void clearSelection(boolean update)(Code)
Clear out the selection - after this has run, no components are selected
Parameters:
  update - If true, update property sheets etc. to reflectthe new selection.



clearSelectionImmediate
public void clearSelectionImmediate()(Code)
XXX Altered copy of clear selection, to immediatelly update the nodes. FIXME Get rid of the delayed node updates.



enlarge
public void enlarge(Rectangle r)(Code)
Increase the size of the given rectangle to accomodate the selection handles. Typically used when computing dirty/repaint rectangles



focusDefaultProperty
public boolean focusDefaultProperty(ActionEvent event)(Code)
Focus the default property. Return false if no default property was found, or if the property is read only, if no component is selected, etc.



getNumSelected
public int getNumSelected()(Code)
Report the number of selected items. the number of selected items in the designer



getPositionElement
Element getPositionElement()(Code)
Returned the first positioned element in the selection. Gets the component root element (rendered element).



getPrimary
public Element getPrimary()(Code)
Return the primary selection, if any. The primary is the most recently "touched" DesignBean in the selection. For example, if you swipe select a set of 10 components and then right click on one of them, all are selected but the clicked-on component is primary. Similarly, if you shift-click toggle components in the selection, the most recently clicked component is primary. This component is highlighted using a different color than the rest.



getSelectedAncestor
public CssBox getSelectedAncestor(CssBox box)(Code)
Check to see if any ancestors of the given view (or the view itself) is in the selection set, and if so, return it. This will return the closest (e.g. furthest down the element tree) match.
Parameters:
  box - The box to check. May not be null. The selected view or ancestor of the box



getSelectedComponentRootElements
public Element[] getSelectedComponentRootElements()(Code)



getSelectedContainer
public Element getSelectedContainer()(Code)
Return the first container component found in the selection. If no direct selected component is a container, return the first container ancestor for the first selected item.



getSelectionHandleDir
public int getSelectionHandleDir(int x, int y, int maxWidth, int maxHeight)(Code)
Determine if the given point overlaps a selection handle.
Parameters:
  editor - The editor whose selection we're checking
Parameters:
  x - The x coordinate of the position we want to check
Parameters:
  y - The y coordinate of the position we want to check Cursor.DEFAULT_CURSOR if the given point (x,y) is notover any of the selection handles drawn for the current selection.If it is, return the right edge direction for the overlap.If there are multiple overlapping selection handles, it's arbitrarywhich one is chosen.
See Also:   overSelection



getSelectionHandleView
public Element getSelectionHandleView(int x, int y, int maxWidth, int maxHeight)(Code)
Similar to getSelectionHandleDir, but returns the selected object whose selection handles are pointed at, rather than the selection handle direction.



isBelowSelected
public boolean isBelowSelected(CssBox box)(Code)
Return true iff the given view is in the set of selected views or is a child of a selected view.
Parameters:
  box - The box to check. May not be null. true iff the box or one of its ancestors is currently selected.



isNodeUpdatePending
public boolean isNodeUpdatePending()(Code)
Return true iff there is a pending node update scheduled



isSelected
public boolean isSelected(Element componentRootElement)(Code)
Return true iff the given view is in the set of selected views.
Parameters:
  component - The view to check. May not be null. true iff the component is currently selected.



isSelectionEmpty
public boolean isSelectionEmpty()(Code)
Return true iff no components are selected



notifyScrolled
public void notifyScrolled()(Code)



paintInlineEditorBox
void paintInlineEditorBox(Graphics2D g2d, Rectangle rect)(Code)
Draw selection for the given view.
Parameters:
  g - The graphics to draw with
Parameters:
  insertMode - If true, draw a thick insert-mode rectanglearound the selection
Parameters:
  rect - The selection rectangle
Parameters:
  constraints - Which sides are resizable



paintSelHierarchy
public void paintSelHierarchy(Graphics2D g2d)(Code)



paintSelection
public void paintSelection(Graphics2D g2d)(Code)
Draw selection rectangles around the currently selected views



pickPrimary
public void pickPrimary()(Code)
XXX Bad architecture. TODO Get rid of this, and update the primary as selection changes. Ask the selection manager to pick a primary selection object, if it has one or more selection objects but none designated as primary. If one is already primary, it is kept as the primary.



removeSelected
public void removeSelected(Element componentRootElement, boolean update)(Code)
Remove the given view/component from the selection.
Parameters:
  update - If true, update property sheets etc. to reflectthe new selection.



selectAll
public void selectAll()(Code)
Select all components on the designer surface (except components that are children of other components, and except components that are "special", such as Form/Body/Head/Html, etc.



selectAncestor
void selectAncestor(int targetx, int targety)(Code)



selectBean
void selectBean(Element componentRootElement)(Code)



selectComponent
void selectComponent(Element componentRootElement)(Code)



selectComponentRectangle
public void selectComponentRectangle(Rectangle bounds, boolean contained)(Code)
Select all views that intersect the given bound rectangle.
Parameters:
  pane - Pane to look for selection in
Parameters:
  bounds - Bounds to scan within
Parameters:
  exclusive - If true, only include components that are fullycontained within the bounds. If false, include anycomponent that touches the bounds.



selectComponents
public void selectComponents(Element[] componentRootElements, boolean update)(Code)
Make a particular element selected



setPrimary
public void setPrimary(Element primary)(Code)
Choose a bean as the primary selection bean



setSelected
public void setSelected(Element componentRootElement, boolean update)(Code)
Set the selection to the given component. Attempt to preserve the current component as a leaf, provided the new component to be selected is an ancestor of the current leaf.



syncSelection
public void syncSelection(boolean update)(Code)
Synchronize the selection with the model. This should be called when DesignBeans may have changed underneath us, for example because the user modified the backing file, and it's reparsed by insync. At this point the DesignBeans we're pointing to in our selection set may be stale, so for each selected bean check if it's still live and if not, find its new representative if any.
Parameters:
  update - If true, update property sheets etc. to reflectthe new selection.



updateNodes
public void updateNodes()(Code)
Set the activated nodes for the top component bound to this selection manager to match the current component. If there is a component (or multiple components) selected, the nodes will reflect these components, otherwise a document node is chosen.



updateNodesImmediate
public void updateNodesImmediate()(Code)
Same as updateNodes but this request is processed immediately/synchronously



updateSelectionImmediate
public void updateSelectionImmediate()(Code)



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.