Servoy 5.x Public API

com.servoy.j2db.dataprocessing
Interface IDisplay

All Known Subinterfaces:
IServoyAwareBean, IServoyAwareVisibilityBean

public interface IDisplay

Interface for components that have some additional functionality.
It is meant for components that are linked to dataProviders.


Method Summary
 boolean isEnabled()
          Enabled displays are displays the user can interact with and are an active part of the UI.
 boolean isReadOnly()
          Read-only displays are displays that do not let the user alter their displayed value.
 void setValidationEnabled(boolean mode)
          Displays usually have special behavior in find mode - most of the times disabling validation & becoming editable.
This is called when entering/exiting find mode.
 boolean stopUIEditing(boolean looseFocus)
          The method gets called when Servoy wants the contents of an display to be committed to it's model and make sure it is not editing content (can be record change, active form change, save, ...).
 

Method Detail

isEnabled

boolean isEnabled()
Enabled displays are displays the user can interact with and are an active part of the UI. Disabled displays are generally grayed-out and the user does not interact with them.

Returns:
the enabled state of this display.

isReadOnly

boolean isReadOnly()
Read-only displays are displays that do not let the user alter their displayed value.

Returns:
the read-only state of this display.

setValidationEnabled

void setValidationEnabled(boolean mode)
Displays usually have special behavior in find mode - most of the times disabling validation & becoming editable.
This is called when entering/exiting find mode.

Parameters:
mode - true if not in find mode (so normal mode) and false if in find mode.

stopUIEditing

boolean stopUIEditing(boolean looseFocus)
The method gets called when Servoy wants the contents of an display to be committed to it's model and make sure it is not editing content (can be record change, active form change, save, ...). You can use the method for validation purposes too.
For example you could have a text field in which the user typed something, and when a method executes you would want that content to be available to the script although you did not press enter/tab out of that field.

Parameters:
looseFocus - if true perform any special action needed for the display to loose focus. Most of the times this is not used. Example - a table like display might need to do some "cell editing stop" related tasks.
Returns:
false means the bean refuses to exit edit mode - and the operation that triggered this request will most likely be canceled (depending on what triggered it). For example this can deny save, triggering of events...
true means the bean is no longer in "edit" state and Servoy can continue with the operation that triggered it.

Copyright © 2010 Servoy B.V.