Java Doc for PaletteController.java in  » IDE-Netbeans » spi » org » netbeans » spi » palette » 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 » spi » org.netbeans.spi.palette 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.spi.palette.PaletteController

PaletteController
final public class PaletteController (Code)

PaletteController provides access to data in the palette. If an instance of this class is in the Lookup of any TopComponent then the palette window opens and displays a new content when that TopComponent opens/activates.
Use PaletteFactory to construct a new instance of this class.

There's a number of attributes that can override the default palette behavior. If the palette data are defined in the layers then the palette looks for attributes of the folders and files (FileObject.getAttribute). If the palette data are defined as Nodes then the attributes are extracted using Node.getValue.

User can override attribute values in palette's user interface. Attribute values are persisted and restored after IDE restarts.


author:
   S. Aubrecht


Field Summary
final public static  StringATTR_HELP_ID
     Use this attribut for palette's root, category or item to specify its help id.
final public static  StringATTR_ICON_SIZE
     Item icon size.
final public static  StringATTR_IS_EXPANDED
     "true" if palette category is expanded, "false" if category is collapsed.
final public static  StringATTR_IS_READONLY
     "true" if the category or item cannot be removed, "false" otherwise.
final public static  StringATTR_IS_VISIBLE
     "true" if palette category or item is visible in the palette, "false" if the category or item is visible in palette customizer only.
final public static  StringATTR_ITEM_WIDTH
     The width of palette items in pixels, if this attribute is set to -1 or is missing then the item width will be calculated dynamically depending on the length of item display names and may differ for each category (therefore each category may have a different number of columns).
final public static  StringATTR_SHOW_ITEM_NAMES
     "true" to show item names in the palette panel, "false" to show item icons only.
final public static  DataFlavorITEM_DATA_FLAVOR
     DataFlavor of palette items dragged from palette to editor.
final public static  StringPROP_SELECTED_ITEM
     Palette clients should listen to changes of this property if they want to notified when the selected item in palette has changed.

Constructor Summary
 PaletteController(Model model, Settings settings)
    

Method Summary
public  voidaddPropertyChangeListener(PropertyChangeListener listener)
    
public  voidclearSelection()
     Clear selection in palette (i.e.
 ModelgetModel()
    
public  LookupgetRoot()
    
public  LookupgetSelectedCategory()
     Lookup representing the category of currently selected item.
public  LookupgetSelectedItem()
     Lookup representing the item currently selected in the palette.
 SettingsgetSettings()
    
public  voidrefresh()
     Refresh the list of categories and items, e.g.
public  voidremovePropertyChangeListener(PropertyChangeListener listener)
    
 voidsetModel(Model model)
     For unit-testing only.
public  voidsetSelectedItem(Lookup category, Lookup item)
     Select a new item in the palette window.
public  voidshowCustomizer()
     Open the default Palette Manager window to allow user to customize palette's contents, especially add/import new items to palette.

Field Detail
ATTR_HELP_ID
final public static String ATTR_HELP_ID(Code)
Use this attribut for palette's root, category or item to specify its help id. Default value is "CommonPalette".



ATTR_ICON_SIZE
final public static String ATTR_ICON_SIZE(Code)
Item icon size. This attribute applies to palette's root only. Default value is java.beans.BeanInfo.ICON_COLOR_16x16
See Also:   java.beans.BeanInfo



ATTR_IS_EXPANDED
final public static String ATTR_IS_EXPANDED(Code)
"true" if palette category is expanded, "false" if category is collapsed. Default value is "false".



ATTR_IS_READONLY
final public static String ATTR_IS_READONLY(Code)
"true" if the category or item cannot be removed, "false" otherwise. Users cannot override this attribute's value. Default value is "false".



ATTR_IS_VISIBLE
final public static String ATTR_IS_VISIBLE(Code)
"true" if palette category or item is visible in the palette, "false" if the category or item is visible in palette customizer only. Default value is "true".



ATTR_ITEM_WIDTH
final public static String ATTR_ITEM_WIDTH(Code)
The width of palette items in pixels, if this attribute is set to -1 or is missing then the item width will be calculated dynamically depending on the length of item display names and may differ for each category (therefore each category may have a different number of columns). This attribute applies to palette's root only and is read-only. Default value is "-1".



ATTR_SHOW_ITEM_NAMES
final public static String ATTR_SHOW_ITEM_NAMES(Code)
"true" to show item names in the palette panel, "false" to show item icons only. This attribute applies to palette's root only. Default value is "true".



ITEM_DATA_FLAVOR
final public static DataFlavor ITEM_DATA_FLAVOR(Code)
DataFlavor of palette items dragged from palette to editor. The trasfer data returned from Transferable for this DataFlavor is the Lookup of the Node representing the palette item being dragged.



PROP_SELECTED_ITEM
final public static String PROP_SELECTED_ITEM(Code)
Palette clients should listen to changes of this property if they want to notified when the selected item in palette has changed.




Constructor Detail
PaletteController
PaletteController(Model model, Settings settings)(Code)
Create new instance of PaletteController




Method Detail
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)(Code)



clearSelection
public void clearSelection()(Code)
Clear selection in palette (i.e. no item is selected)



getModel
Model getModel()(Code)



getRoot
public Lookup getRoot()(Code)
Lookup representing palette's root folder.



getSelectedCategory
public Lookup getSelectedCategory()(Code)
Lookup representing the category of currently selected item. The lookup is empty if no item is currently selected.



getSelectedItem
public Lookup getSelectedItem()(Code)
Lookup representing the item currently selected in the palette. The lookup is empty if no item is currently selected.



getSettings
Settings getSettings()(Code)



refresh
public void refresh()(Code)
Refresh the list of categories and items, e.g. when PaletteFilter conditions have changed.



removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)(Code)



setModel
void setModel(Model model)(Code)
For unit-testing only.



setSelectedItem
public void setSelectedItem(Lookup category, Lookup item)(Code)
Select a new item in the palette window.
Parameters:
  category - Lookup of the category that contains the item to be selected.
Parameters:
  item - Item's lookup.



showCustomizer
public void showCustomizer()(Code)
Open the default Palette Manager window to allow user to customize palette's contents, especially add/import new items to palette.



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.