com.im.ijc.widgets/1 5.9.1

com.im.ijc.widgets.abstractwidget
Class AbstractSingleFieldWidget<CS extends CommonWidgetSettings>

java.lang.Object
  extended by com.im.ijc.widgets.abstractwidget.AbstractWidget<CS>
      extended by com.im.ijc.widgets.abstractwidget.AbstractBindingWidget<CS>
          extended by com.im.ijc.widgets.abstractwidget.AbstractSingleFieldWidget<CS>
All Implemented Interfaces:
IJCWidget, IJCWidget.Customizable<CS>, IJCWidget.DesignerHandle, IJCWidget.Popupable, IJCWidget.Releaseable, IJCWidget.Updateable, IJCWidget.Viewable, com.im.ijc.jrprinting.JRPrintable

public abstract class AbstractSingleFieldWidget<CS extends CommonWidgetSettings>
extends AbstractBindingWidget<CS>
implements IJCWidget, IJCWidget.Popupable, com.im.ijc.jrprinting.JRPrintable, IJCWidget.Viewable


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.im.ijc.core.api.views.IJCWidget
IJCWidget.Breakable, IJCWidget.Cacheable, IJCWidget.Configurable, IJCWidget.Customizable<S>, IJCWidget.DesignerHandle, IJCWidget.Editable, IJCWidget.GroupCustomizable<N extends Node>, IJCWidget.HyperlinkAble, IJCWidget.Popupable, IJCWidget.Queryable, IJCWidget.Releaseable, IJCWidget.RendererCallback, IJCWidget.RendererProvider, IJCWidget.Updateable, IJCWidget.Viewable, IJCWidget.WidgetContainerHandle<S>
 
Field Summary
protected  boolean editStarted
           
protected  boolean suppressFocusLostCommit
           
 
Fields inherited from class com.im.ijc.widgets.abstractwidget.AbstractBindingWidget
borderSupport
 
Fields inherited from interface com.im.ijc.core.api.views.IJCWidget
PROP_BOUND_FIELDS, PROP_SELECTED_FIELDS, PROP_VERTEX_STATE, PROP_VIEW, PROP_VIEW_MODE
 
Fields inherited from interface com.im.ijc.core.api.views.IJCWidget.Customizable
PROP_SETTINGS
 
Constructor Summary
AbstractSingleFieldWidget(String factoryId, DFView view, JComponent buildModeRenderer)
           
AbstractSingleFieldWidget(String factoryId, DFView view, JComponent buildModeRenderer, CS settings)
           
 
Method Summary
protected static void addActionToMenu(JPopupMenu menu, Class<? extends SystemAction> actionClass)
           
protected  Object askSaveChanges()
           
 void bind(List<? extends DFField> fields)
           
protected  void browseModeRendererChanged()
           
protected  void changingSelection(SelectionDescription from, SelectionDescription to)
           Notifies about change in selection from from selection to to selection.
 void cleanUp()
           
protected  JPopupMenu createBrowsePopup()
          Used also in createBrowsePopupListener(...).
protected  MouseListener createBrowsePopupListener(JComponent component)
           
protected abstract  Iterable<Object> customizableBeans()
          Defines set of beans used to customize widget.
 void customizeUISettings()
           
 boolean doBind(DFDataTree dataTree)
           
protected  void finalize()
           
 List<DFField> getBoundFields()
           
 JComponent getBuildModeRenderer()
           
protected  Object getCurrentValue()
           
protected  DFField getField()
           
 JPopupMenu getPopup()
           
protected abstract  JComponent getQueryEditComponent()
           
protected  JPanel getQueryModePanel()
           
 void getTemplate(com.im.ijc.jrprinting.JRXMLTemplateBuilder builder, Rectangle2D printPosition, boolean scaledDown)
           
protected static String getWidgetTypeDisplayName(String factoryId)
           
protected  boolean isBeingEdited()
           
protected  boolean isEditable()
           
 boolean isMultipleRow()
           
 boolean isSelectionViewable()
           
protected  void setEditHighlight(boolean _editStarted)
           
 void showViewer()
           
protected  boolean storeValue(Object newValue)
           
protected  boolean storeValue(Object newValue, SelectionDescription selection)
           
protected  boolean supportQueryable()
           
 void updateValue()
           
protected  void updateValue(Object value)
           
protected  void updateValues()
           
 
Methods inherited from class com.im.ijc.widgets.abstractwidget.AbstractBindingWidget
adjustPreferredSizeForTitledBorder, confirmSuitableWidgetUsed, createBindAcceptor, doBind, doBindSingleField, getBorder, getBrowseModeComponent, getBrowseModePanel, getBrowseModeRenderer, getFirstField, getInappropriateRelationships, getSelectedFields, getTitle, getTitleFields, getTitleFont, getTitlePair, getTitleSeparator, getUseMoreSuitableWidgetMessage, getVertexState, ignoreQueryUpdateFromRS, isConsistentVertexState, isConsistentVertexState, isFocusable, isRebindable, keepFormSpaceWhenBorderChanges, lastExecQueryUpdateWidgetFromRS, modeChanged, queryUpdateWidgetFromRS, releaseWidget, setSettings, setVertexState, setVertexState, showSortDirectiveInBorder, updateBorders, updatePanelBorder
 
Methods inherited from class com.im.ijc.widgets.abstractwidget.AbstractWidget
addPropertyChangeListener, firePropertyChange, getFactoryId, getForm, getFormData, getLookup, getView, getViewMode, getWidgetSettings, instanceContent, putUniquelyIntoLookup, removePropertyChangeListener, setViewMode
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.im.ijc.core.api.views.IJCWidget
addPropertyChangeListener, getForm, getLookup, getSelectedFields, getVertexState, getView, getViewMode, removePropertyChangeListener
 

Field Detail

editStarted

protected boolean editStarted

suppressFocusLostCommit

protected boolean suppressFocusLostCommit
Constructor Detail

AbstractSingleFieldWidget

public AbstractSingleFieldWidget(String factoryId,
                                 DFView view,
                                 JComponent buildModeRenderer)

AbstractSingleFieldWidget

public AbstractSingleFieldWidget(String factoryId,
                                 DFView view,
                                 JComponent buildModeRenderer,
                                 CS settings)
Method Detail

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

getQueryModePanel

protected JPanel getQueryModePanel()
Overrides:
getQueryModePanel in class AbstractBindingWidget<CS extends CommonWidgetSettings>

getQueryEditComponent

protected abstract JComponent getQueryEditComponent()

getBuildModeRenderer

public JComponent getBuildModeRenderer()
Specified by:
getBuildModeRenderer in interface IJCWidget.DesignerHandle

browseModeRendererChanged

protected void browseModeRendererChanged()

setEditHighlight

protected void setEditHighlight(boolean _editStarted)

bind

public void bind(List<? extends DFField> fields)
Specified by:
bind in interface IJCWidget.DesignerHandle

getBoundFields

public final List<DFField> getBoundFields()
Specified by:
getBoundFields in interface IJCWidget

getField

protected final DFField getField()

getWidgetTypeDisplayName

protected static String getWidgetTypeDisplayName(String factoryId)

doBind

public boolean doBind(DFDataTree dataTree)
Specified by:
doBind in interface IJCWidget.DesignerHandle

isEditable

protected boolean isEditable()

getCurrentValue

protected Object getCurrentValue()

storeValue

protected boolean storeValue(Object newValue)

storeValue

protected boolean storeValue(Object newValue,
                             SelectionDescription selection)

updateValue

public final void updateValue()
Specified by:
updateValue in interface IJCWidget.Updateable
Overrides:
updateValue in class AbstractBindingWidget<CS extends CommonWidgetSettings>

updateValue

protected void updateValue(Object value)

customizeUISettings

public final void customizeUISettings()
Specified by:
customizeUISettings in interface IJCWidget.Customizable<CS extends CommonWidgetSettings>

customizableBeans

protected abstract Iterable<Object> customizableBeans()
Defines set of beans used to customize widget.

Returns:
non-empty set of beans. Typically contains widget settings and its renderer.

askSaveChanges

protected Object askSaveChanges()

changingSelection

protected void changingSelection(SelectionDescription from,
                                 SelectionDescription to)
Description copied from class: AbstractBindingWidget

Notifies about change in selection from from selection to to selection. Widget is supposed to react accordingly to the change.

The method might be called from any thread.

Specified by:
changingSelection in class AbstractBindingWidget<CS extends CommonWidgetSettings>
Parameters:
from - old selection
to - new selection

cleanUp

public void cleanUp()

createBrowsePopupListener

protected MouseListener createBrowsePopupListener(JComponent component)

getPopup

public JPopupMenu getPopup()
Specified by:
getPopup in interface IJCWidget.Popupable

createBrowsePopup

protected JPopupMenu createBrowsePopup()
Used also in createBrowsePopupListener(...). To change default browse popup override this method.


addActionToMenu

protected static void addActionToMenu(JPopupMenu menu,
                                      Class<? extends SystemAction> actionClass)

isSelectionViewable

public boolean isSelectionViewable()
Specified by:
isSelectionViewable in interface IJCWidget.Viewable

showViewer

public void showViewer()
Specified by:
showViewer in interface IJCWidget.Viewable

getTemplate

public void getTemplate(com.im.ijc.jrprinting.JRXMLTemplateBuilder builder,
                        Rectangle2D printPosition,
                        boolean scaledDown)
                 throws net.sf.jasperreports.engine.JRException
Specified by:
getTemplate in interface com.im.ijc.jrprinting.JRPrintable
Throws:
net.sf.jasperreports.engine.JRException

isMultipleRow

public boolean isMultipleRow()
Specified by:
isMultipleRow in interface IJCWidget

updateValues

protected void updateValues()
Specified by:
updateValues in class AbstractBindingWidget<CS extends CommonWidgetSettings>

isBeingEdited

protected boolean isBeingEdited()
Specified by:
isBeingEdited in class AbstractBindingWidget<CS extends CommonWidgetSettings>

supportQueryable

protected boolean supportQueryable()

com.im.ijc.widgets/1 5.9.1