org.eclipse.gmf.runtime.diagram.ui.properties.sections
Class DiagramGeneralSection
java.lang.Object
org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractModelerPropertySection
org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractBasicTextPropertySection
org.eclipse.gmf.runtime.diagram.ui.properties.sections.DiagramGeneralSection
-
All Implemented Interfaces:
-
ISection
-
public class DiagramGeneralSection
- extends
AbstractBasicTextPropertySection
The general section displayed for diagrams in the properties view
Field Summary
|
protected static java.lang.String
|
DESCRIPTION
Description label. |
protected static java.lang.String
|
DESCRIPTION_LABEL
Description label. |
protected static java.lang.String
|
DIAGRAM_TYPE_LABEL
Type label. |
static java.lang.String[]
|
GENERAL_DIAGRAM_LABELS
The labels used by the General Diagram section |
protected static java.lang.String
|
NAME
Name label. |
protected static java.lang.String
|
NAME_LABEL
Name label for diagram general section. |
Method Summary
|
protected org.eclipse.emf.ecore.EObject
|
adapt
(java.lang.Object object)
Adapt the object to an EObject - if possible |
void
|
dispose
()
|
void
|
doCreateControls
(
Composite parent,
TabbedPropertySheetPage aTabbedPropertySheetPage)
Creates the GUI Control for this text property section |
protected java.lang.String
|
getDiagramType
(
Diagram diagram)
Gets the string to be displayed in the diagram type field. |
protected java.lang.String
|
getPropertyChangeCommandName
()
|
protected java.lang.String
|
getPropertyNameLabel
()
|
protected java.lang.String[]
|
getPropertyNameStringsArray
()
returns as an array the property name |
protected java.lang.String
|
getPropertyValueString
()
|
protected boolean
|
isCurrentSelection
(org.eclipse.emf.common.notify.Notification notification,
org.eclipse.emf.ecore.EObject element)
Determines if the page is displaying properties for this element |
protected void
|
refreshUI
()
Refresh UI body - referesh will surround this with read action block |
protected void
|
setDescription
()
User pressed Enter key after editing name field - update the model |
protected void
|
setPropertyValue
(
Control control)
User pressed Enter key after editing text field - update the model |
protected void
|
setPropertyValue
(org.eclipse.emf.ecore.EObject object,
java.lang.Object value)
Set property value for the given object |
protected org.eclipse.emf.ecore.EObject
|
unwrap
(java.lang.Object object)
Enforce the correct type selection - we are only intersted in Diagram
objects |
Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.properties.sections.
AbstractBasicTextPropertySection
|
computeNewPropertyValue,
createControls,
createLabelWidget,
createTextWidget,
getListener,
getPropertyNameLabelWidget,
getSectionComposite,
getTextWidget,
refresh,
startTextWidgetEventListener,
stopTextWidgetEventListener
|
Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.properties.sections.
AbstractModelerPropertySection
|
aboutToBeHidden,
aboutToBeShown,
addToEObjectList,
createCommand,
createCommand,
digIntoGroups,
executeAsCompositeCommand,
executeAsReadAction,
getEditingDomain,
getEObject,
getEObjectList,
getEventListener,
getFilter,
getInput,
getPrimarySelection,
getStandardLabelWidth,
getUpdateRequestCollapser,
handleElementModifiedEvent,
isDisposed,
isNotifierDeleted,
isReadOnly,
postUpdateRequest,
setEditingDomain,
setEObject,
setInput,
update,
update
|
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
NAME_LABEL
protected static final java.lang.String NAME_LABEL
- Name label for diagram general section.
DIAGRAM_TYPE_LABEL
protected static final java.lang.String DIAGRAM_TYPE_LABEL
- Type label.
DESCRIPTION_LABEL
protected static final java.lang.String DESCRIPTION_LABEL
- Description label.
GENERAL_DIAGRAM_LABELS
public static final java.lang.String[] GENERAL_DIAGRAM_LABELS
- The labels used by the General Diagram section
NAME
protected static final java.lang.String NAME
- Name label.
DESCRIPTION
protected static final java.lang.String DESCRIPTION
- Description label.
DiagramGeneralSection
public DiagramGeneralSection()
setDescription
protected void setDescription()
- User pressed Enter key after editing name field - update the model
-
dispose
public void dispose()
-
-
Specified by:
-
dispose
in interface
ISection
-
Overrides:
-
dispose
in class
AbstractBasicTextPropertySection
-
refreshUI
protected void refreshUI()
-
Description copied from class:
AbstractBasicTextPropertySection
- Refresh UI body - referesh will surround this with read action block
-
-
Overrides:
-
refreshUI
in class
AbstractBasicTextPropertySection
-
getDiagramType
protected java.lang.String getDiagramType(
Diagram diagram)
- Gets the string to be displayed in the diagram type field.
-
-
Parameters:
-
diagram
- the diagram in question
-
Returns:
- the string to be displayed
unwrap
protected org.eclipse.emf.ecore.EObject unwrap(java.lang.Object object)
- Enforce the correct type selection - we are only intersted in Diagram
objects
-
-
Overrides:
-
unwrap
in class
AbstractModelerPropertySection
-
-
Parameters:
-
object
- -
object from a diagram or ME
-
Returns:
- - underlaying UML element
adapt
protected org.eclipse.emf.ecore.EObject adapt(java.lang.Object object)
- Adapt the object to an EObject - if possible
-
-
Overrides:
-
adapt
in class
AbstractModelerPropertySection
-
-
Parameters:
-
object
- object from a diagram or ME
-
Returns:
- EObject
isCurrentSelection
protected boolean isCurrentSelection(org.eclipse.emf.common.notify.Notification notification,
org.eclipse.emf.ecore.EObject element)
-
Description copied from class:
AbstractModelerPropertySection
- Determines if the page is displaying properties for this element
-
-
Overrides:
-
isCurrentSelection
in class
AbstractModelerPropertySection
-
-
Parameters:
-
notification
- The notification -
element
- The element to be tested
-
Returns:
- 'true' if the page is displaying properties for this element
getPropertyNameLabel
protected java.lang.String getPropertyNameLabel()
-
-
Specified by:
-
getPropertyNameLabel
in class
AbstractBasicTextPropertySection
-
-
Returns:
- - name of the property to place in the label widget
setPropertyValue
protected void setPropertyValue(
Control control)
-
Description copied from class:
AbstractBasicTextPropertySection
- User pressed Enter key after editing text field - update the model
-
-
Overrides:
-
setPropertyValue
in class
AbstractBasicTextPropertySection
-
-
Parameters:
-
control
- Control
setPropertyValue
protected void setPropertyValue(org.eclipse.emf.ecore.EObject object,
java.lang.Object value)
-
Description copied from class:
AbstractBasicTextPropertySection
- Set property value for the given object
-
-
Specified by:
-
setPropertyValue
in class
AbstractBasicTextPropertySection
-
-
Parameters:
-
object
- -
owner of the property -
value
- -
new value
getPropertyValueString
protected java.lang.String getPropertyValueString()
-
-
Specified by:
-
getPropertyValueString
in class
AbstractBasicTextPropertySection
-
-
Returns:
- - string representation of the property value
getPropertyChangeCommandName
protected java.lang.String getPropertyChangeCommandName()
-
-
Specified by:
-
getPropertyChangeCommandName
in class
AbstractBasicTextPropertySection
-
-
Returns:
- - title of the command which will be executed to set the property
getPropertyNameStringsArray
protected java.lang.String[] getPropertyNameStringsArray()
-
Description copied from class:
AbstractBasicTextPropertySection
- returns as an array the property name
-
-
Overrides:
-
getPropertyNameStringsArray
in class
AbstractBasicTextPropertySection
-
-
Returns:
- - array of strings where each describes a property name one per
property. The strings will be used to calculate common indent
from the left
doCreateControls
public void doCreateControls(
Composite parent,
TabbedPropertySheetPage aTabbedPropertySheetPage)
-
Description copied from class:
AbstractBasicTextPropertySection
- Creates the GUI
Control
for this text property section
-
-
Overrides:
-
doCreateControls
in class
AbstractBasicTextPropertySection
-
-
Parameters:
-
parent
- parent Composite
-
aTabbedPropertySheetPage
- TabbedPropertySheetPage
-
See Also:
-
org.eclipse.gmf.runtime.common.ui.properties.ISection#createControls(org.eclipse.swt.widgets.Composite,
org.eclipse.gmf.runtime.common.ui.properties.TabbedPropertySheetPage)
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.