org.eclipse.uml2.uml.editor.dialogs
Class AbstractChoicesDialogDelegate<T>

java.lang.Object
  extended by org.eclipse.uml2.uml.editor.dialogs.AbstractChoicesDialogDelegate<T>
All Implemented Interfaces:
IChoicesDialogDelegate<T>

public abstract class AbstractChoicesDialogDelegate<T>
extends java.lang.Object
implements IChoicesDialogDelegate<T>

A partial implementation of the IChoicesDialogDelegate protocol, useful for subclassing.

Since:
5.0

Constructor Summary
AbstractChoicesDialogDelegate(java.lang.Class<T> elementType)
           
 
Method Summary
 boolean allowsReordering()
           
 boolean canAdd(org.eclipse.jface.viewers.IStructuredSelection selection, java.util.Collection<T> values)
           
 boolean canRemove(org.eclipse.jface.viewers.IStructuredSelection selection, java.util.Collection<T> choices)
           
 void createAdditionalControls(org.eclipse.swt.widgets.Composite parent)
           
 org.eclipse.jface.viewers.ILabelProvider createLabelProvider(org.eclipse.jface.viewers.Viewer viewer)
           
 java.lang.String getAddButtonText()
           
 java.lang.String getChoicesLabelText()
           
protected  ChoicesDialog<T> getDialog()
           
 java.lang.Class<T> getElementType()
           
 java.lang.String getRemoveButtonText()
           
 java.lang.String getValuesLabelText()
           
 boolean hasAdditionalControls()
           
 boolean okPressed(java.util.Collection<T> values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.uml2.uml.editor.dialogs.IChoicesDialogDelegate
getChoiceOfValues, getLabelProvider
 

Constructor Detail

AbstractChoicesDialogDelegate

public AbstractChoicesDialogDelegate(java.lang.Class<T> elementType)
Method Detail

getElementType

public final java.lang.Class<T> getElementType()
Specified by:
getElementType in interface IChoicesDialogDelegate<T>

getDialog

protected ChoicesDialog<T> getDialog()

getChoicesLabelText

public java.lang.String getChoicesLabelText()
Specified by:
getChoicesLabelText in interface IChoicesDialogDelegate<T>

getValuesLabelText

public java.lang.String getValuesLabelText()
Specified by:
getValuesLabelText in interface IChoicesDialogDelegate<T>

getAddButtonText

public java.lang.String getAddButtonText()
Specified by:
getAddButtonText in interface IChoicesDialogDelegate<T>

getRemoveButtonText

public java.lang.String getRemoveButtonText()
Specified by:
getRemoveButtonText in interface IChoicesDialogDelegate<T>

createLabelProvider

public org.eclipse.jface.viewers.ILabelProvider createLabelProvider(org.eclipse.jface.viewers.Viewer viewer)
Specified by:
createLabelProvider in interface IChoicesDialogDelegate<T>

canAdd

public boolean canAdd(org.eclipse.jface.viewers.IStructuredSelection selection,
                      java.util.Collection<T> values)
Specified by:
canAdd in interface IChoicesDialogDelegate<T>

canRemove

public boolean canRemove(org.eclipse.jface.viewers.IStructuredSelection selection,
                         java.util.Collection<T> choices)
Specified by:
canRemove in interface IChoicesDialogDelegate<T>

allowsReordering

public boolean allowsReordering()
Specified by:
allowsReordering in interface IChoicesDialogDelegate<T>

hasAdditionalControls

public boolean hasAdditionalControls()
Specified by:
hasAdditionalControls in interface IChoicesDialogDelegate<T>

createAdditionalControls

public void createAdditionalControls(org.eclipse.swt.widgets.Composite parent)
Specified by:
createAdditionalControls in interface IChoicesDialogDelegate<T>

okPressed

public boolean okPressed(java.util.Collection<T> values)
Specified by:
okPressed in interface IChoicesDialogDelegate<T>

Copyright 2003, 2014 IBM Corporation, CEA, and others.
All Rights Reserved.