org.formaria.editor.eclipse.project.pages
Class StylePalette

java.lang.Object
  extended by ViewPart
      extended by org.formaria.editor.eclipse.project.pages.StylePalette
All Implemented Interfaces:
ComponentSelectListener, IStylePalette, StyleListener

public class StylePalette
extends ViewPart
implements IStylePalette


Constructor Summary
StylePalette()
           
 
Method Summary
 void addStyleListener(StyleListener l)
          Set a listener for style changes
 void createPartControl(Composite parent)
           
 void dispose()
           
static IStylePalette getDefault()
           
 void setFocus()
           
 void setSelectedComponents(IPagePanel currentPagePanel, java.util.Vector selectedComponents, boolean contentsChanged)
          Called when a component has been selected
 void setVisible(boolean state)
           
 void styleChanged(java.lang.String styleName, Style newStyle)
          Called when a style is changed.
 void update()
          Force the editor to refresh itself.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StylePalette

public StylePalette()
Method Detail

createPartControl

public void createPartControl(Composite parent)

setFocus

public void setFocus()
Specified by:
setFocus in interface IStylePalette

dispose

public void dispose()
Specified by:
dispose in interface IStylePalette

getDefault

public static IStylePalette getDefault()

setSelectedComponents

public void setSelectedComponents(IPagePanel currentPagePanel,
                                  java.util.Vector selectedComponents,
                                  boolean contentsChanged)
Called when a component has been selected

Specified by:
setSelectedComponents in interface ComponentSelectListener
Specified by:
setSelectedComponents in interface IStylePalette
Parameters:
selectedComponents -

addStyleListener

public void addStyleListener(StyleListener l)
Set a listener for style changes

Specified by:
addStyleListener in interface IStylePalette
Parameters:
listener - the new listener

styleChanged

public void styleChanged(java.lang.String styleName,
                         Style newStyle)
Called when a style is changed. This allows the editor to reset the components visually.

Specified by:
styleChanged in interface IStylePalette
Specified by:
styleChanged in interface StyleListener
Parameters:
styleName - the name of the style which has been changed
newStyle - The new XStyle

update

public void update()
Force the editor to refresh itself.

Specified by:
update in interface IStylePalette

setVisible

public void setVisible(boolean state)