pl.edu.agh.cast.ui.dialogs.property
Class PropertiesEditorDialog

java.lang.Object
  extended by org.eclipse.swt.widgets.Dialog
      extended by pl.edu.agh.cast.ui.dialogs.property.PropertiesEditorDialog
All Implemented Interfaces:
IPropertiesEditorView

public class PropertiesEditorDialog
extends org.eclipse.swt.widgets.Dialog
implements IPropertiesEditorView

SWT implementation of IPropertiesEditorView.

Author:
AGH CAST Team

Constructor Summary
PropertiesEditorDialog(org.eclipse.swt.widgets.Shell parent)
          Constructor.
 
Method Summary
 void dispose()
          Disposes view.
 void initialize(PropertiesEditorPresenter presenter)
          Initializes view.
 void open()
          Opens view.
 void refresh()
          Refreshes the view after model changes.
 void setInput(PropertyTreeEntry input)
          Sets input for the view.
 void showAtLeastOneLabelMustBeMarkedMessage()
          Shows message: 'At least one property must be marked as label'.
 void showCannotRemoveBuiltinPropertyMessage(String name)
          Shows message: 'Cannot remove built-in property'.
 void showCannotRemoveCategoryMessage()
          Shows message: 'Cannot remove category'.
 void showPropertyAlreadyExistsMessage(String name)
          Shows message: 'Property already exists'.
 boolean showRemovePropertyQuestion(String name)
          Shows question: 'Do you want to remove property?'.
 
Methods inherited from class org.eclipse.swt.widgets.Dialog
checkSubclass, getParent, getStyle, getText, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesEditorDialog

public PropertiesEditorDialog(org.eclipse.swt.widgets.Shell parent)
Constructor.

Parameters:
parent - parent shell
Method Detail

initialize

public void initialize(PropertiesEditorPresenter presenter)
Initializes view.

Specified by:
initialize in interface IPropertiesEditorView
Parameters:
presenter - presenter for this view view
See Also:
#initialize(pl.edu.agh.cast.ui.dialogs.property.PropertiesEditorPresenter)

dispose

public void dispose()
Disposes view.

Specified by:
dispose in interface IPropertiesEditorView
See Also:
IPropertiesEditorView.dispose()

refresh

public void refresh()
Refreshes the view after model changes.

Specified by:
refresh in interface IPropertiesEditorView
See Also:
IPropertiesEditorView.refresh()

setInput

public void setInput(PropertyTreeEntry input)
Sets input for the view.

Specified by:
setInput in interface IPropertiesEditorView
Parameters:
input - model for this view
See Also:
#setInput(pl.edu.agh.cast.ui.dialogs.property.PropertyTreeEntry)

open

public void open()
Opens view.

Specified by:
open in interface IPropertiesEditorView
See Also:
IPropertiesEditorView.open()

showCannotRemoveCategoryMessage

public void showCannotRemoveCategoryMessage()
Shows message: 'Cannot remove category'.

Specified by:
showCannotRemoveCategoryMessage in interface IPropertiesEditorView
See Also:
IPropertiesEditorView.showCannotRemoveCategoryMessage()

showCannotRemoveBuiltinPropertyMessage

public void showCannotRemoveBuiltinPropertyMessage(String name)
Shows message: 'Cannot remove built-in property'.

Specified by:
showCannotRemoveBuiltinPropertyMessage in interface IPropertiesEditorView
Parameters:
name - property name
See Also:
pl.edu.agh.cast.ui.dialogs.property.IPropertiesEditorView#showCannotRemoveBuiltinPropertyMessage()

showRemovePropertyQuestion

public boolean showRemovePropertyQuestion(String name)
Shows question: 'Do you want to remove property?'.

Specified by:
showRemovePropertyQuestion in interface IPropertiesEditorView
Parameters:
name - property name
Returns:
true if end-user agrees
See Also:
pl.edu.agh.cast.ui.dialogs.property.IPropertiesEditorView#showRemovePropertyQuestion()

showPropertyAlreadyExistsMessage

public void showPropertyAlreadyExistsMessage(String name)
Shows message: 'Property already exists'.

Specified by:
showPropertyAlreadyExistsMessage in interface IPropertiesEditorView
Parameters:
name - property name
See Also:
#showPropertyAlreadyExistsMessage(java.lang.String)

showAtLeastOneLabelMustBeMarkedMessage

public void showAtLeastOneLabelMustBeMarkedMessage()
Shows message: 'At least one property must be marked as label'.

Specified by:
showAtLeastOneLabelMustBeMarkedMessage in interface IPropertiesEditorView
See Also:
IPropertiesEditorView.showAtLeastOneLabelMustBeMarkedMessage()


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.