com.tekann.codegen.pda
Class FilterForm

java.lang.Object
  extended by totalcross.ui.gfx.GfxSurface
      extended by totalcross.ui.Control
          extended by totalcross.ui.Container
              extended by com.tekann.codegen.pda.FilterForm
All Implemented Interfaces:
IFilterForm, IForm, Internacionalizable

public abstract class FilterForm
extends totalcross.ui.Container
implements IFilterForm

This class is used to make possible the use of a filter in the TKN Mobile Studio. Therefore you can create a Filter in the create form option on the tool.

Author:
Guilherme Frantz

Field Summary
static java.lang.String CONTAINS
           
static java.lang.String ENDS_WITH
           
static java.lang.String STARTS_WITH
           
 
Fields inherited from class totalcross.ui.Container
alwaysEraseBackground, BORDER_LOWERED, BORDER_NONE, BORDER_RAISED, BORDER_SIMPLE, nextTransitionEffect, tabOrder, TRANSITION_CLOSE, TRANSITION_NONE, TRANSITION_OPEN, transitionEffect
 
Fields inherited from class totalcross.ui.Control
AFTER, appId, appObj, BEFORE, BOTTOM, BOTTOM_OF, CENTER, CENTER_OF, clearValueInt, clearValueStr, enableUpdateScreen, FILL, FIT, fm, focusOnPenDown, focusTraversable, KEEP, LEFT, PREFERRED, RANGE, RIGHT, RIGHT_OF, SAME, TOP, transparentBackground, WILL_RESIZE
 
Constructor Summary
FilterForm()
          Default constructor.
 
Method Summary
 void changeStateFields(boolean arg0)
           
 void clear()
          Clear the fields.
static void filterTableExists(java.lang.String creatorID, java.lang.String filterTable, IFilter tableGrid, java.lang.Object[] fieldColumns, int[] types)
          if the Filter_Table doesn't exists the the filter button is set as disabled.
 java.lang.Object getMenuBar()
          Gets the Menu Bar button A filter doesn't have one by default.
 java.lang.String getTitle()
          Gets the title.
 java.lang.String getWhere()
          Gets the where search of a prepared statement.
 java.lang.String getWhereClause()
          Gets the where clause
 void initFilterForm(IFilter tableGrid, java.lang.String gridTableName, java.lang.String tableName, java.lang.String creatorId, java.lang.Object[] fields, java.lang.Object[] gridColumns, int[] dataTyppes)
          Initializes the FilterForm by the passed arguments.
 void loadFilterTable()
          Loads the Filter Table.
 void loadForm()
          Loads the form.
 void onEvent(totalcross.ui.event.Event e)
          Handle the events.
 void onSwap(totalcross.ui.Container container)
          Optional implementation while swapping
 void setTableGrid(IFilter tableGrid)
          Sets the table grid.
 void setTitle(java.lang.String arg0)
          Sets the form title.
 void showMessage(java.lang.String arg0, java.lang.String arg1)
          Shows a message to the user.
 
Methods inherited from class totalcross.ui.Container
add, add, add, add, add, broadcastEvent, findChild, findNearestChild, findNextFocusControl, getBorderStyle, getChildren, getClientRect, getFocusableControls, getInsets, incLastX, incLastY, initUI, onPaint, paintChildren, remove, removeAll, resize, resizeHeight, resizeWidth, setBorderStyle, setEnabled, setHighlighting, setInsets, swapToTopmostWindow
 
Methods inherited from class totalcross.ui.Control
_onEvent, addFocusListener, addGridListener, addHighlightListener, addKeyListener, addPenListener, addPressListener, addTimer, addTimer, addTimerListener, addWindowListener, changeHighlighted, contains, getAbsoluteRect, getBackColor, getEventListeners, getFont, getForeColor, getGraphics, getHeight, getNext, getParent, getParentWindow, getPos, getPreferredHeight, getPreferredWidth, getPrev, getRect, getSize, getWidth, getX, getX2, getY, getY2, handleGeographicalFocusChangeKeys, isDisplayed, isEnabled, isInsideOrNear, isVisible, isVisibleAndInside, postEvent, postPressedEvent, removeFocusListener, removeGridListener, removeHighlightListener, removeKeyListener, removePenListener, removePressListener, removeTimer, removeTimerListener, removeWindowListener, repaint, repaintNow, reposition, requestFocus, resetSetPositions, setBackColor, setBackForeColors, setFocusLess, setFont, setForeColor, setRect, setRect, setRect, setRect, setVisible, translateFromOrigin, uiStyleChanged, updateScreen
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tekann.codegen.pda.IForm
getFont, loadMenuBar
 
Methods inherited from interface com.tekann.i18n.Internacionalizable
getID, getResourceDir, getResourcePrefix
 

Field Detail

CONTAINS

public static final java.lang.String CONTAINS
See Also:
Constant Field Values

ENDS_WITH

public static final java.lang.String ENDS_WITH
See Also:
Constant Field Values

STARTS_WITH

public static final java.lang.String STARTS_WITH
See Also:
Constant Field Values
Constructor Detail

FilterForm

public FilterForm()
Default constructor.

Method Detail

filterTableExists

public static void filterTableExists(java.lang.String creatorID,
                                     java.lang.String filterTable,
                                     IFilter tableGrid,
                                     java.lang.Object[] fieldColumns,
                                     int[] types)
                              throws java.lang.Exception
if the Filter_Table doesn't exists the the filter button is set as disabled.

Throws:
java.lang.Exception

changeStateFields

public void changeStateFields(boolean arg0)

clear

public void clear()
Clear the fields.

Overrides:
clear in class totalcross.ui.Container

getMenuBar

public java.lang.Object getMenuBar()
Gets the Menu Bar button A filter doesn't have one by default.

Specified by:
getMenuBar in interface IForm
Returns:
An Object

onSwap

public void onSwap(totalcross.ui.Container container)
Description copied from interface: IForm
Optional implementation while swapping

Specified by:
onSwap in interface IForm

getTitle

public java.lang.String getTitle()
Gets the title. By default a FitlerForm doesn't have one.

Specified by:
getTitle in interface IForm
Returns:
A String

getWhere

public java.lang.String getWhere()
Gets the where search of a prepared statement.

Returns:
The where filter

getWhereClause

public java.lang.String getWhereClause()
Gets the where clause

Returns:
The where clause

initFilterForm

public void initFilterForm(IFilter tableGrid,
                           java.lang.String gridTableName,
                           java.lang.String tableName,
                           java.lang.String creatorId,
                           java.lang.Object[] fields,
                           java.lang.Object[] gridColumns,
                           int[] dataTyppes)
Initializes the FilterForm by the passed arguments.

Parameters:
tableGrid -
gridTableName -
tableName -
creatorId -
fields -
gridColumns -
dataTyppes -

loadFilterTable

public void loadFilterTable()
Loads the Filter Table.


loadForm

public void loadForm()
              throws java.lang.Exception
Description copied from interface: IForm
Loads the form.

Specified by:
loadForm in interface IForm
Throws:
java.lang.Exception

onEvent

public void onEvent(totalcross.ui.event.Event e)
Handle the events.

Overrides:
onEvent in class totalcross.ui.Control

setTableGrid

public void setTableGrid(IFilter tableGrid)
Sets the table grid.

Parameters:
tableGrid -

setTitle

public void setTitle(java.lang.String arg0)
Description copied from interface: IForm
Sets the form title.

Specified by:
setTitle in interface IForm

showMessage

public void showMessage(java.lang.String arg0,
                        java.lang.String arg1)
Description copied from interface: IForm
Shows a message to the user.

Specified by:
showMessage in interface IForm