org.eclipse.gmf.runtime.lite.properties
Class ColorsAndFontsPropertySection

java.lang.Object
  extended by org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
      extended by org.eclipse.gmf.runtime.lite.properties.ColorsAndFontsPropertySection
All Implemented Interfaces:
org.eclipse.ui.views.properties.tabbed.ISection

public class ColorsAndFontsPropertySection
extends org.eclipse.ui.views.properties.tabbed.AbstractPropertySection

Property section that displays properties for views' font and colors.


Nested Class Summary
protected static class ColorsAndFontsPropertySection.ColorOverlayImageDescriptor
          Image descriptor which draws a uniform color underneath the lower portion of the given image.
protected static interface ColorsAndFontsPropertySection.IValueConverter<E>
           
 
Field Summary
protected  org.eclipse.swt.widgets.Button fillColorButton
           
protected  org.eclipse.swt.graphics.RGB fillColorRGB
           
protected  org.eclipse.swt.widgets.Button fontColorButton
           
protected  org.eclipse.swt.graphics.RGB fontColorRGB
           
protected  org.eclipse.swt.custom.CCombo fontFamilyCombo
           
protected  org.eclipse.swt.widgets.Button lineColorButton
           
protected  org.eclipse.swt.graphics.RGB lineColorRGB
           
 
Fields inherited from class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
STANDARD_LABEL_WIDTH
 
Constructor Summary
ColorsAndFontsPropertySection()
           
 
Method Summary
 void aboutToBeHidden()
           
 void aboutToBeShown()
           
protected  void change(org.eclipse.swt.widgets.Button button, org.eclipse.emf.ecore.EStructuralFeature feature, ColorsAndFontsPropertySection.IValueConverter<Boolean> converter, String commandName)
           
protected  void change(org.eclipse.swt.custom.CCombo combo, org.eclipse.emf.ecore.EStructuralFeature feature, ColorsAndFontsPropertySection.IValueConverter<String> converter, String commandName)
           
protected  void changeColor(org.eclipse.swt.widgets.Button button, org.eclipse.swt.graphics.RGB currentRGB, org.eclipse.emf.ecore.EStructuralFeature feature, String commandName)
           
 void createControls(org.eclipse.swt.widgets.Composite parent, org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage tabbedPropertySheetPage)
           
protected  org.eclipse.swt.widgets.Group createFontsAndColorsGroups(org.eclipse.swt.widgets.Composite parent)
          Create fonts and colors group
protected  org.eclipse.swt.widgets.Composite createFontsGroup(org.eclipse.swt.widgets.Composite parent)
          Create font tool bar group
 void dispose()
           
protected  void disposeImageFor(org.eclipse.swt.widgets.Button button, String key)
          Disposes the image associated with the given button iff it is not a standard image.
protected  void executeChange(String commandName, org.eclipse.emf.ecore.EStructuralFeature feature, Object value)
          Creates and executes the command that updates the styles of the given views
protected  org.eclipse.emf.transaction.ResourceSetListener getListener()
           
protected
<E> E
getStructuralFeatureValue(org.eclipse.emf.ecore.EStructuralFeature feature, ColorsAndFontsPropertySection.IValueConverter<E> converter)
           
protected  boolean hasStyles(org.eclipse.emf.ecore.EClass styleClass)
           
 void refresh()
           
protected  void refresh(org.eclipse.swt.widgets.Button button, boolean isReadOnly, org.eclipse.emf.ecore.EStructuralFeature feature)
           
protected  void refresh(org.eclipse.swt.custom.CCombo combo, boolean isReadOnly, org.eclipse.emf.ecore.EStructuralFeature feature, ColorsAndFontsPropertySection.IValueConverter<String> converter)
           
protected  org.eclipse.swt.graphics.RGB refreshColor(org.eclipse.swt.widgets.Button button, boolean isReadOnly, org.eclipse.emf.ecore.EStructuralFeature feature, String baseImageKey)
           
 void setInput(org.eclipse.ui.IWorkbenchPart part, org.eclipse.jface.viewers.ISelection selection)
           
protected  Object transformSelection(Object selected)
          Allows the subclasses to unwrap or otherwise modify the contents of the selection.
 
Methods inherited from class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
getMinimumHeight, getPart, getSelection, getWidgetFactory, shouldUseExtraSpace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fontFamilyCombo

protected org.eclipse.swt.custom.CCombo fontFamilyCombo

fontColorButton

protected org.eclipse.swt.widgets.Button fontColorButton

lineColorButton

protected org.eclipse.swt.widgets.Button lineColorButton

fillColorButton

protected org.eclipse.swt.widgets.Button fillColorButton

fontColorRGB

protected org.eclipse.swt.graphics.RGB fontColorRGB

lineColorRGB

protected org.eclipse.swt.graphics.RGB lineColorRGB

fillColorRGB

protected org.eclipse.swt.graphics.RGB fillColorRGB
Constructor Detail

ColorsAndFontsPropertySection

public ColorsAndFontsPropertySection()
Method Detail

setInput

public void setInput(org.eclipse.ui.IWorkbenchPart part,
                     org.eclipse.jface.viewers.ISelection selection)
Specified by:
setInput in interface org.eclipse.ui.views.properties.tabbed.ISection
Overrides:
setInput in class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection

transformSelection

protected Object transformSelection(Object selected)
Allows the subclasses to unwrap or otherwise modify the contents of the selection. The null result may be returned, in this case it will be ignored.

By default, the passed object is returned untouched.


aboutToBeShown

public void aboutToBeShown()
Specified by:
aboutToBeShown in interface org.eclipse.ui.views.properties.tabbed.ISection
Overrides:
aboutToBeShown in class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection

aboutToBeHidden

public void aboutToBeHidden()
Specified by:
aboutToBeHidden in interface org.eclipse.ui.views.properties.tabbed.ISection
Overrides:
aboutToBeHidden in class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection

getListener

protected final org.eclipse.emf.transaction.ResourceSetListener getListener()

dispose

public void dispose()
Specified by:
dispose in interface org.eclipse.ui.views.properties.tabbed.ISection
Overrides:
dispose in class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection

disposeImageFor

protected final void disposeImageFor(org.eclipse.swt.widgets.Button button,
                                     String key)
Disposes the image associated with the given button iff it is not a standard image.

Parameters:
button -
key -

refresh

public void refresh()
Specified by:
refresh in interface org.eclipse.ui.views.properties.tabbed.ISection
Overrides:
refresh in class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection

refresh

protected void refresh(org.eclipse.swt.custom.CCombo combo,
                       boolean isReadOnly,
                       org.eclipse.emf.ecore.EStructuralFeature feature,
                       ColorsAndFontsPropertySection.IValueConverter<String> converter)

refresh

protected void refresh(org.eclipse.swt.widgets.Button button,
                       boolean isReadOnly,
                       org.eclipse.emf.ecore.EStructuralFeature feature)

refreshColor

protected org.eclipse.swt.graphics.RGB refreshColor(org.eclipse.swt.widgets.Button button,
                                                    boolean isReadOnly,
                                                    org.eclipse.emf.ecore.EStructuralFeature feature,
                                                    String baseImageKey)

hasStyles

protected final boolean hasStyles(org.eclipse.emf.ecore.EClass styleClass)

getStructuralFeatureValue

protected <E> E getStructuralFeatureValue(org.eclipse.emf.ecore.EStructuralFeature feature,
                                          ColorsAndFontsPropertySection.IValueConverter<E> converter)

createControls

public void createControls(org.eclipse.swt.widgets.Composite parent,
                           org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage tabbedPropertySheetPage)
Specified by:
createControls in interface org.eclipse.ui.views.properties.tabbed.ISection
Overrides:
createControls in class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection

createFontsAndColorsGroups

protected org.eclipse.swt.widgets.Group createFontsAndColorsGroups(org.eclipse.swt.widgets.Composite parent)
Create fonts and colors group

Parameters:
parent - - parent composite

createFontsGroup

protected org.eclipse.swt.widgets.Composite createFontsGroup(org.eclipse.swt.widgets.Composite parent)
Create font tool bar group

Parameters:
parent - - parent composite
Returns:
- font tool bar

change

protected void change(org.eclipse.swt.custom.CCombo combo,
                      org.eclipse.emf.ecore.EStructuralFeature feature,
                      ColorsAndFontsPropertySection.IValueConverter<String> converter,
                      String commandName)

change

protected void change(org.eclipse.swt.widgets.Button button,
                      org.eclipse.emf.ecore.EStructuralFeature feature,
                      ColorsAndFontsPropertySection.IValueConverter<Boolean> converter,
                      String commandName)

changeColor

protected void changeColor(org.eclipse.swt.widgets.Button button,
                           org.eclipse.swt.graphics.RGB currentRGB,
                           org.eclipse.emf.ecore.EStructuralFeature feature,
                           String commandName)

executeChange

protected void executeChange(String commandName,
                             org.eclipse.emf.ecore.EStructuralFeature feature,
                             Object value)
Creates and executes the command that updates the styles of the given views



Copyright © 2012. All Rights Reserved.