|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.views.properties.tabbed.AbstractPropertySection
org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractModelerPropertySection
org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractNotationPropertiesSection
org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ColorsAndFontsPropertySection
public class ColorsAndFontsPropertySection
Colors section to represent line and font properties of a shape or connection
Nested Class Summary | |
---|---|
protected static class |
ColorsAndFontsPropertySection.ColorOverlayImageDescriptor
|
Field Summary | |
---|---|
protected Group |
colorsAndFontsGroup
|
protected static RGB |
DEFAULT_PREF_COLOR
the default preference color |
protected static java.lang.String |
FILL_COLOR_COMMAND_NAME
|
protected RGB |
fillColor
|
protected Button |
fillColorButton
|
protected static java.lang.String |
FONT_COLOR_COMMAND_NAME
|
protected static java.lang.String |
FONT_COMMAND_NAME
|
protected RGB |
fontColor
|
protected Button |
fontColorButton
|
protected CCombo |
fontFamilyCombo
|
protected static java.lang.String |
FONTS_AND_COLORS_LABEL
|
protected static java.lang.String |
LINE_COLOR_COMMAND_NAME
|
protected RGB |
lineColor
|
protected Button |
lineColorButton
|
protected int |
previousColor
|
Fields inherited from class org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractNotationPropertiesSection |
---|
button_margin, composite, standardLabelWidth, vertical_offset |
Fields inherited from class org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractModelerPropertySection |
---|
disposed, eObject, eventListener, input, propertiesProvider, VALUE_CHANGED_STRING |
Fields inherited from class org.eclipse.ui.views.properties.tabbed.AbstractPropertySection |
---|
STANDARD_LABEL_WIDTH |
Constructor Summary | |
---|---|
ColorsAndFontsPropertySection()
|
Method Summary | |
---|---|
protected RGB |
changeColor(SelectionEvent event,
Button button,
java.lang.String propertyId,
java.lang.String commandName,
ImageDescriptor imageDescriptor)
|
protected RGB |
changeColor(SelectionEvent event,
Button button,
java.lang.String preferenceId,
java.lang.String propertyId,
java.lang.String commandName,
ImageDescriptor imageDescriptor)
Deprecated. The preference is not being retrieved from the correct preference store so it is not needed, use the other changeColor method. |
protected void |
changeFontColor(SelectionEvent event)
Apply font color change |
protected void |
changeLineColor(SelectionEvent event)
Apply line color change |
protected Group |
createFontsAndColorsGroups(Composite parent)
Create fonts and colors group |
protected Composite |
createFontsGroup(Composite parent)
Create font tool bar group |
protected boolean |
digIntoGroups()
Override to return true to have this property section work on the shapes in a GroupEditPart as if the shapes were multi-selected. |
void |
dispose()
|
protected void |
disposeImage(Image image)
Dispose the image if it was created locally to avoid a leak. |
protected java.util.Iterator |
getInputIterator()
|
protected void |
initializeControls(Composite parent)
Provides a level of indirection for subclasses which want 'jump' over some control creation/initilialization steps and/or chnage thier order |
void |
refresh()
|
void |
setInput(IWorkbenchPart part,
ISelection selection)
|
void |
update(org.eclipse.emf.common.notify.Notification notification,
org.eclipse.emf.ecore.EObject element)
Update if nessesary, upon receiving the model event. |
protected void |
updateColorCache()
react to selection or model change - updatye local cache |
protected void |
updateFontBold()
Update font property |
protected void |
updateFontFamily()
Update font family property |
protected void |
updateFontItalic()
Update font property |
protected void |
updateFontSize()
Update font size property |
Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractNotationPropertiesSection |
---|
adapt, createControls, getAllNameLabels, getLabelProvider, getSingleInput, getStandardLabelWidth, isCurrentSelection, unwrap |
Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractModelerPropertySection |
---|
aboutToBeHidden, aboutToBeShown, addToEObjectList, createCommand, createCommand, executeAsCompositeCommand, executeAsReadAction, getEditingDomain, getEObject, getEObjectList, getEventListener, getFilter, getInput, getPrimarySelection, getStandardLabelWidth, getUpdateRequestCollapser, handleElementModifiedEvent, isDisposed, isNotifierDeleted, isReadOnly, postUpdateRequest, setEditingDomain, setEObject, update |
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 |
---|
protected static final java.lang.String FONT_COLOR_COMMAND_NAME
protected static final java.lang.String LINE_COLOR_COMMAND_NAME
protected static final java.lang.String FONT_COMMAND_NAME
protected static final java.lang.String FILL_COLOR_COMMAND_NAME
protected static final java.lang.String FONTS_AND_COLORS_LABEL
protected Button fillColorButton
protected RGB fillColor
protected CCombo fontFamilyCombo
protected static final RGB DEFAULT_PREF_COLOR
protected Button fontColorButton
protected Button lineColorButton
protected RGB fontColor
protected RGB lineColor
protected Group colorsAndFontsGroup
protected int previousColor
Constructor Detail |
---|
public ColorsAndFontsPropertySection()
Method Detail |
---|
protected void initializeControls(Composite parent)
AbstractNotationPropertiesSection
initializeControls
in class AbstractNotationPropertiesSection
parent
- - parent compositeprotected Group createFontsAndColorsGroups(Composite parent)
parent
- - parent compositeprotected Composite createFontsGroup(Composite parent)
parent
- - parent composite
protected java.util.Iterator getInputIterator()
protected void changeLineColor(SelectionEvent event)
event
- -
line color button selection eventprotected void changeFontColor(SelectionEvent event)
event
- -
font button selection eventprotected RGB changeColor(SelectionEvent event, Button button, java.lang.String preferenceId, java.lang.String propertyId, java.lang.String commandName, ImageDescriptor imageDescriptor)
changeColor
method.
event
- -
selection eventbutton
- -
event sourcepreferenceId
- -
id of the preference of the default color value for that
propertypropertyId
- -
id of the propertycommandName
- -
name of the commandimageDescriptor
- -
the image to draw overlay on the button after the new color is
set
protected RGB changeColor(SelectionEvent event, Button button, java.lang.String propertyId, java.lang.String commandName, ImageDescriptor imageDescriptor)
event
- -
selection eventbutton
- -
event sourcepropertyId
- -
id of the propertycommandName
- -
name of the commandimageDescriptor
- -
the image to draw overlay on the button after the new color is
set
protected void updateFontBold()
protected void updateFontItalic()
protected void updateFontFamily()
protected void updateFontSize()
public void refresh()
refresh
in interface ISection
refresh
in class AbstractPropertySection
public void update(org.eclipse.emf.common.notify.Notification notification, org.eclipse.emf.ecore.EObject element)
update
in class AbstractModelerPropertySection
notification
- notification objectelement
- element that has changedAbstractModelerPropertySection.aboutToBeShown()
,
AbstractModelerPropertySection.aboutToBeHidden()
protected void updateColorCache()
public void setInput(IWorkbenchPart part, ISelection selection)
setInput
in interface ISection
setInput
in class AbstractModelerPropertySection
protected void disposeImage(Image image)
image
- public void dispose()
dispose
in interface ISection
dispose
in class AbstractModelerPropertySection
protected boolean digIntoGroups()
AbstractModelerPropertySection
GroupEditPart
as if the shapes were multi-selected.
digIntoGroups
in class AbstractModelerPropertySection
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.