org.openpermis.editor.policy.presenter
Class RecentFilesPresenter

java.lang.Object
  extended by org.openpermis.editor.policy.presenter.Presenter<ApplicationState>
      extended by org.openpermis.editor.policy.presenter.RecentFilesPresenter

public class RecentFilesPresenter
extends Presenter<ApplicationState>

Presenter class for the application recent files list.

Since:
0.1.0

Field Summary
private  String active
          The currently active file.
private  PropertyChangeDispatcher changeDispatcher
          The property change dispatcher for the model.
private  org.jdesktop.observablecollections.ObservableList<String> recentFiles
          The recent files list as observable list.
 
Constructor Summary
RecentFilesPresenter(ApplicationState applicationState)
          Creates a recent files presenter that uses the global application state.
 
Method Summary
 void activeToFront()
          Moves the active element to the front of the list.
 void clearRecentFiles()
          Clears the list of recent files.
 void dispose()
          Disposes this presenter.
 String getActive()
          Returns the currently active file.
 org.jdesktop.observablecollections.ObservableList<String> getRecentFiles()
          Returns the recent files list as observable list.
 void recentFilesChanged()
          Called whenever the recent files list of the application state model changes.
 void removeActive()
          Removes the active file.
 void setActive(String active)
          Sets the currently active file.
 
Methods inherited from class org.openpermis.editor.policy.presenter.Presenter
addPropertyChangeListener, firePropertyChange, getModel, getTitleParameters, removePropertyChangeListener, setTitleParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

changeDispatcher

private final PropertyChangeDispatcher changeDispatcher
The property change dispatcher for the model.

Since:
0.1.0

recentFiles

private final org.jdesktop.observablecollections.ObservableList<String> recentFiles
The recent files list as observable list.

Since:
0.1.0

active

private String active
The currently active file.

Since:
0.1.0
Constructor Detail

RecentFilesPresenter

public RecentFilesPresenter(ApplicationState applicationState)
Creates a recent files presenter that uses the global application state.

See Also:
Application.getApplicationState()
Since:
0.1.0
Method Detail

getRecentFiles

public org.jdesktop.observablecollections.ObservableList<String> getRecentFiles()
Returns the recent files list as observable list.

Returns:
the recent files list as observable list.
Since:
0.1.0

activeToFront

public void activeToFront()
Moves the active element to the front of the list.

Since:
0.1.0

removeActive

public void removeActive()
Removes the active file.

Since:
0.1.0

clearRecentFiles

public void clearRecentFiles()
Clears the list of recent files.

Since:
0.1.0

getActive

public String getActive()
Returns the currently active file.

Returns:
the currently active file, may be null.
Since:
0.1.0

setActive

public void setActive(String active)
Sets the currently active file.

Parameters:
active - the file to set active.
Since:
0.1.0

dispose

public void dispose()
Description copied from class: Presenter
Disposes this presenter.

The presenter has to remove all listeners registered.

Specified by:
dispose in class Presenter<ApplicationState>
Since:
0.1.0

recentFilesChanged

public void recentFilesChanged()
Called whenever the recent files list of the application state model changes.

Since:
0.1.0


PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:15:22
Copyright (c) 2002-2007 Ergon Informatik AG