org.openswing.swing.client
Interface DataController

All Known Implementing Classes:
Form, Grids, PivotTable, PropertyGridControl

public interface DataController

Title: OpenSwing Framework

Description: Interface used by Form and Grid to manage the following operations: insert, edit, delete, reload/cancel, save, copy. It also defines the functionId identifier (optional).

Copyright: Copyright (C) 2006 Mauro Carniel

This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it


Method Summary
 void copy()
          Method called when used has clicked on copy button.
 void delete()
          Method called when used has clicked on delete button.
 void edit()
          Method called when used has clicked on edit button.
 void export()
          Method called when used has clicked on export button.
 void filterSort()
          Method called when the user has clicked on filter button.
 java.util.HashSet getBindedButtons()
           
 boolean getCurrentValue(GenericButton button)
           
 java.lang.String getFunctionId()
           
 void importData()
          Method called when used has clicked on import button.
 void insert()
          Method called when used has clicked on insert button.
 boolean isButtonDisabled(GenericButton button)
           
 void reload()
          Method called when used has clicked on reload/cancel button.
 boolean save()
          Method called when used has clicked on save button.
 void setCurrentValue(GenericButton button, boolean currentValue)
          Set current enabled value of button.
 

Method Detail

reload

public void reload()
Method called when used has clicked on reload/cancel button.


insert

public void insert()
Method called when used has clicked on insert button.


copy

public void copy()
Method called when used has clicked on copy button.


edit

public void edit()
Method called when used has clicked on edit button.


delete

public void delete()
Method called when used has clicked on delete button.


save

public boolean save()
Method called when used has clicked on save button.


export

public void export()
Method called when used has clicked on export button.


getFunctionId

public java.lang.String getFunctionId()
Returns:
identifier (functionId) associated to the container

isButtonDisabled

public boolean isButtonDisabled(GenericButton button)
Parameters:
button - button whose abilitation must be checked
Returns:
true if no policy is defined in the form/grid for the specified button, false if there exists a disabilitation policy for the specified button (through addButtonsNotEnabledOnState form/grid method)

filterSort

public void filterSort()
Method called when the user has clicked on filter button.


importData

public void importData()
Method called when used has clicked on import button.


setCurrentValue

public void setCurrentValue(GenericButton button,
                            boolean currentValue)
Set current enabled value of button.

Parameters:
button - generic button that fires this event.
currentValue - current enabled value

getCurrentValue

public boolean getCurrentValue(GenericButton button)
Parameters:
button - generic button that fires this event
Returns:
current enabled value

getBindedButtons

public java.util.HashSet getBindedButtons()
Returns:
collection of buttons binded to grid (InsertButton, EditButton, etc)