Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.diagram.ui.properties.sections
Class DiagramGeneralSection

java.lang.Object
  extended by 

org.eclipse.ui.views.properties.tabbed.AbstractPropertySection
      extended by 

org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractModelerPropertySection
          extended by 

org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractBasicTextPropertySection
              extended by 
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.
 
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
DiagramGeneralSection ()
           
 
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 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

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.

Constructor Detail

DiagramGeneralSection

public DiagramGeneralSection()
Method Detail

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)

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire