Java Doc for StyleView.java in  » GIS » udig-1.1 » net » refractions » udig » style » ui » 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 » GIS » udig 1.1 » net.refractions.udig.style.ui 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


net.refractions.udig.style.ui.StyleView

StyleView
public class StyleView extends ViewPart implements StyleManager(Code)
Style Editing View.

StyleView is responsible for allowing the user to choose between applicable StyleConfigurators for the current blackboard.

What does this mean?

  • Listens to any workbench selection and will engage when a Layer is selected
  • Will use both the Layer.getResource and StyleBlackboard when figuring out which StyleConfigurators are applicable
  • Will display a select control in the viewpart toolbar if their is more then one to choose from, if there is only one a Label showing the StyleConfigurator name will be shown.
  • The StyleConfigurator will be supplied with the Layer & Blackboard to edit, note this is not* the same black board as used by the Layer for live rendering!
  • Is responsible for applying any changes to the Blackboard, this is done using an apply button on the viewpart toolbar. Changes will also be applied when the workbench looses focus on the layer.

TODO: Clone the blackboard and give that to the configurator
author:
   jdeolive
since:
   0.5

Inner Class :class StyleViewSite implements IViewSite

Field Summary
final public static  StringVIEW_ID
    
 PageBookbook
    
 SelectionListenerchooserListener
    
 ComboconfigChooser
     Choose which styleConfigurator to use.
 ILayerListenerlayerListener
    
 LabelpleaseSelectLayer
    
 List<StyleViewSite>sites
     List of StyleViewSites each one manages a IStyleConfigurator.

Constructor Summary
public  StyleView()
     Construct StyleView.

Method Summary
 voidapply()
    
public  voidcreatePartControl(Composite parent)
     Creates the style editor layout, and uses a PageBook placeholder for ui widgets to be placed into as Styles are selected.
public  voiddispose()
    
 voidfocusConfigurator(IStyleConfigurator config)
     Focuses the style configurator.
public  LayergetCurrentLayer()
    
public  IStyleConfiguratorgetStyleConfigurator()
     This *is* the current styleConfigurator used by this style view.
public  Set<IStyleConfigurator>getStyleConfigurators()
     Acquire configurators for the current layer.

  • WARNING: this method is only valid to call *after* init has been called.
  • ARNING: these IStyleConfigurators will only have their ui available after createPartControl has completed.
public  voidinit(IViewSite site, IMemento memento)
     Called before createPartControl to give us chance to organize ourselves.
public  voidrefresh()
     Refresh all the viewsites, aka force stylecon figurators to reset.
 voidrevert()
    
public  voidsetCurrentLayer(Layer layer)
     New layer, or null if there is no selected layer.
public  voidsetFocus()
     Set focus to the chooser if available.
public  voidsetStyleConfigurator(IStyleConfigurator config)
     Set the current StyleConfigurator used by this StyleView to the provided config.
 voidupdateChooser()
     Update chooser to reflect getStyleConfigurators list and currentConfig.

Field Detail
VIEW_ID
final public static String VIEW_ID(Code)
ID used in the extention point to identify this view



book
PageBook book(Code)
Page book used to switch between available StyleConfigurators



chooserListener
SelectionListener chooserListener(Code)



configChooser
Combo configChooser(Code)
Choose which styleConfigurator to use.

This is contributed to the toolbar via an IContributionItem.




layerListener
ILayerListener layerListener(Code)



pleaseSelectLayer
Label pleaseSelectLayer(Code)



sites
List<StyleViewSite> sites(Code)
List of StyleViewSites each one manages a IStyleConfigurator.

Note: This list should be accessed via getStyleConfigurators, that method will only show you sites that are applicable to the curernt layer.





Constructor Detail
StyleView
public StyleView()(Code)
Construct StyleView.

Note since we are a view - nothing much happens here.

  • init will be called allowing us to grab our prefs
  • createPartControl control will be called allowing us to set up before display
  • dispose will be called when we are closed





Method Detail
apply
void apply()(Code)



createPartControl
public void createPartControl(Composite parent)(Code)
Creates the style editor layout, and uses a PageBook placeholder for ui widgets to be placed into as Styles are selected.
See Also:   org.eclipse.ui.IWorkbenchPart.createPartControl(org.eclipse.swt.widgets.Composite)
Parameters:
  parent -



dispose
public void dispose()(Code)
Note: createPartControl may not even of been called
See Also:   org.eclipse.ui.part.WorkbenchPart.dispose



focusConfigurator
void focusConfigurator(IStyleConfigurator config)(Code)
Focuses the style configurator.



getCurrentLayer
public Layer getCurrentLayer()(Code)



getStyleConfigurator
public IStyleConfigurator getStyleConfigurator()(Code)
This *is* the current styleConfigurator used by this style view.

The following controls need to be kept in sync:

  • configChooser (if it exists yet) needs to use getStyleConfigurator().getLabel as its text
  • book needs to use StyleViewSite page associated with this StyleConfigurator
  • the toolbar from the StyleViewSite also needs to be displayed
IStyleConfigurator currently being displayed



getStyleConfigurators
public Set<IStyleConfigurator> getStyleConfigurators()(Code)
Acquire configurators for the current layer.

  • WARNING: this method is only valid to call *after* init has been called.
  • ARNING: these IStyleConfigurators will only have their ui available after createPartControl has completed. Please don't call setFocus( IStyleConfigurator ) before hand.

This means you should *not* assume these IStyleConfigurators are totally happy and ready to work. They will only listen to events when they are the current page for example.

Set of configurators for the current layer, may be empty



init
public void init(IViewSite site, IMemento memento) throws PartInitException(Code)
Called before createPartControl to give us chance to organize ourselves.

We used this to latch onto the defined StyleConfigurators.


See Also:   org.eclipse.ui.part.ViewPart.init(org.eclipse.ui.IViewSiteorg.eclipse.ui.IMemento)



refresh
public void refresh()(Code)
Refresh all the viewsites, aka force stylecon figurators to reset.



revert
void revert()(Code)



setCurrentLayer
public void setCurrentLayer(Layer layer)(Code)
New layer, or null if there is no selected layer.



setFocus
public void setFocus()(Code)
Set focus to the chooser if available.

TODO: Should set the focus to the current StyleView being displayed.




setStyleConfigurator
public void setStyleConfigurator(IStyleConfigurator config)(Code)
Set the current StyleConfigurator used by this StyleView to the provided config.

Note if there is only one chooser, we should set the focus to the styleConfigurator.

Responsibilities:

  • set the chooser text to the config.getLabel!
  • call site.focus() for the config - so the page gets show, and the toolbar gets shown

Parameters:
  config - IStyleConfigurator to be displayed by StyleView
See Also:   org.eclipse.ui.IWorkbenchPart.setFocus



updateChooser
void updateChooser()(Code)
Update chooser to reflect getStyleConfigurators list and currentConfig.



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