UI
Interface GEVADirtyListener

All Known Implementing Classes:
GEVAConfigGUI, GEVAPropertiesGUI

public interface GEVADirtyListener

Allow a GUI to listen to all its properties when they are modified and become dirty allowing the GUI to enable a save button or whatnot

Author:
eliott bartley

Method Summary
 boolean canDirty()
          Get whether calling setDirty() will actually set the state as dirty (true) or not (false)
 void setDirty()
          Called when modifications were made that need to be saved
 void setDirtyable(boolean dirtyable)
          Called when modifications will be made, but will or will not need to be saved.
 

Method Detail

setDirty

void setDirty()
Called when modifications were made that need to be saved


setDirtyable

void setDirtyable(boolean dirtyable)
Called when modifications will be made, but will or will not need to be saved. Although, just not calling setDirty is a solution to prevent a change needing saving, this is more general, saying that not only are future changes by the caller not be saved, but also, all other controls that can make modifications as a reaction to the caller changing. setDirtyable(false/true) calls should wrap as small a section of code as possible, as everything that can make modifications will lose their ability to flag that they need to save. e.g.
setDirtyable(false);
// Making a change that doesn't alter the meaning is a good time
// to disable flagging a change that needs to save.
formatValue();
setDirtyable(true);

Parameters:
dirtyable - pass true if future calls to setDirty are because of a modification that needs to be saved. pass false if future calls to setDirty are because of a modification that doesn't need to be saved

canDirty

boolean canDirty()
Get whether calling setDirty() will actually set the state as dirty (true) or not (false)

Returns:
whether calling setDirty() will actually set the state as dirty