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 AbstractBasicTextPropertySection

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
All Implemented Interfaces:
ISection
Direct Known Subclasses:
DiagramGeneralSection

public abstract class AbstractBasicTextPropertySection
extends AbstractModelerPropertySection

A generic class to edit a property via text field. This class supports multi-select behavior


Field Summary
 
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
AbstractBasicTextPropertySection ()
           
 
Method Summary
protected  java.lang.Object computeNewPropertyValue ()
           
 void createControls ( Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage)
           
protected   CLabel createLabelWidget ( Composite parent)
          Create a label for property name
protected   Text createTextWidget ( Composite parent)
          Instantiate a text widget
 void dispose ()
           
 void doCreateControls ( Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage)
          Creates the GUI Control for this text property section
protected   TextChangeHelper getListener ()
           
protected abstract  java.lang.String getPropertyChangeCommandName ()
           
protected abstract  java.lang.String getPropertyNameLabel ()
           
  CLabel getPropertyNameLabelWidget ()
           
protected  java.lang.String[] getPropertyNameStringsArray ()
          returns as an array the property name
protected abstract  java.lang.String getPropertyValueString ()
           
  Composite getSectionComposite ()
           
protected   Text getTextWidget ()
           
 void refresh ()
           
protected  void refreshUI ()
          Refresh UI body - referesh will surround this with read action block
protected  void setPropertyValue ( Control control)
          User pressed Enter key after editing text field - update the model
protected abstract  void setPropertyValue (org.eclipse.emf.ecore.EObject object, java.lang.Object value)
          Set property value for the given object
protected  void startTextWidgetEventListener ()
          Start listening to the text widget events
protected  void stopTextWidgetEventListener ()
          Stop listening to text widget events
 
Methods inherited from class org.eclipse.gmf.runtime.diagram.ui.properties.sections. AbstractModelerPropertySection
aboutToBeHidden, aboutToBeShown, adapt, addToEObjectList, createCommand, createCommand, digIntoGroups, executeAsCompositeCommand, executeAsReadAction, getEditingDomain, getEObject, getEObjectList, getEventListener, getFilter, getInput, getPrimarySelection, getStandardLabelWidth, getUpdateRequestCollapser, handleElementModifiedEvent, isCurrentSelection, isDisposed, isNotifierDeleted, isReadOnly, postUpdateRequest, setEditingDomain, setEObject, setInput, unwrap, 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
 

Constructor Detail

AbstractBasicTextPropertySection

public AbstractBasicTextPropertySection()
Method Detail

getPropertyNameLabel

protected abstract java.lang.String getPropertyNameLabel()
Returns:
- name of the property to place in the label widget

setPropertyValue

protected abstract void setPropertyValue(org.eclipse.emf.ecore.EObject object,
                                         java.lang.Object value)
Set property value for the given object

Parameters:
object - - owner of the property
value - - new value

getPropertyValueString

protected abstract java.lang.String getPropertyValueString()
Returns:
- string representation of the property value

getPropertyChangeCommandName

protected abstract java.lang.String getPropertyChangeCommandName()
Returns:
- title of the command which will be executed to set the property

createControls

public void createControls(
Composite parent,
                           
TabbedPropertySheetPage aTabbedPropertySheetPage)
Specified by:
createControls in interface ISection
Overrides:
createControls in class AbstractModelerPropertySection

doCreateControls

public void doCreateControls(
Composite parent,
                             
TabbedPropertySheetPage aTabbedPropertySheetPage)
Creates the GUI Control for this text property section

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)

startTextWidgetEventListener

protected void startTextWidgetEventListener()
Start listening to the text widget events


stopTextWidgetEventListener

protected void stopTextWidgetEventListener()
Stop listening to text widget events


createTextWidget

protected 
Text createTextWidget(
Composite parent)
Instantiate a text widget

Parameters:
parent - - parent composite
Returns:
- a text widget to display and edit the property

getPropertyNameStringsArray

protected java.lang.String[] getPropertyNameStringsArray()
returns as an array the property name

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

createLabelWidget

protected 
CLabel createLabelWidget(
Composite parent)
Create a label for property name

Parameters:
parent - - parent composite
Returns:
- label to show property name

setPropertyValue

protected void setPropertyValue(
Control control)
User pressed Enter key after editing text field - update the model

Parameters:
control - Control

computeNewPropertyValue

protected java.lang.Object computeNewPropertyValue()
Returns:
- a default implementation returns contents of the text widget as a new value for the property. Subclasses can override.

dispose

public void dispose()
Specified by:
dispose in interface ISection
Overrides:
dispose in class AbstractModelerPropertySection

refresh

public void refresh()
Specified by:
refresh in interface ISection
Overrides:
refresh in class AbstractPropertySection

refreshUI

protected void refreshUI()
Refresh UI body - referesh will surround this with read action block


getListener

protected 
TextChangeHelper getListener()
Returns:
Returns the listener.

getTextWidget

protected 
Text getTextWidget()
Returns:
Returns the textWidget.

getPropertyNameLabelWidget

public 
CLabel getPropertyNameLabelWidget()
Returns:
Returns the propertyNameLabelWidget.

getSectionComposite

public 
Composite getSectionComposite()
Returns:
Returns the sectionComposite.

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