org.xulux.guilayer.swing.widgets
Class Table

java.lang.Object
  extended by org.xulux.gui.XuluxWidget
      extended by org.xulux.gui.ContainerWidget
          extended by org.xulux.guilayer.swing.widgets.Table
All Implemented Interfaces:
java.io.Serializable, org.xulux.api.gui.IContainerWidgetHandler, org.xulux.api.gui.IContentWidget, org.xulux.api.gui.IWidget

public class Table
extends org.xulux.gui.ContainerWidget
implements org.xulux.api.gui.IContentWidget

A nyx table.. A nyx table can do without a popupmenu field and can add a menuitem directly to its table.

Version:
$Id: Table.java,v 1.1 2005/12/18 12:58:18 mvdb Exp $
Author:
Martin van den Bemt
See Also:
Serialized Form

Field Summary
protected  NyxTableColumnModel columnModel
          The columnModel
protected  java.lang.Object content
          The content of the table
protected  boolean contentChanged
          has the contentchanged ?
protected  NyxTableCellEditor editor
          the celleditor
protected  boolean hasChildPopups
          does the table have childpopups
protected  NyxJTable lockedTable
          The native locked table
protected  org.xulux.api.gui.IWidget menu
          The table context menu
protected  NyxTableModel model
          The tablemodel
protected  NewSelectionListener newSelectionListener
          the new selection listener
protected  javax.swing.JScrollPane scrollPane
          This is the native widget
protected  NyxJTable table
          The native swing table
 
Fields inherited from class org.xulux.gui.ContainerWidget
widgets
 
Fields inherited from class org.xulux.gui.XuluxWidget
initialized, initializing, isRefreshing, log, previousValue, properties, value, visible
 
Constructor Summary
Table(java.lang.String name)
           
 
Method Summary
 void addToParent(org.xulux.api.gui.IWidget widget)
           
 void addXuluxListener(org.xulux.api.gui.IXuluxListener listener)
           
 boolean canContainValue()
           
 void contentChanged()
           
 void destroy()
           
 void destroyTable()
          Destroys the current table
 void focus()
           
 java.lang.Object getContent()
           
 java.lang.Object getGuiValue()
           
 javax.swing.JTable getJTable()
          Remove this one..
 javax.swing.JTable getLockedJTable()
           
 java.lang.Object getMouseOverValue()
           
 java.lang.Object getNativeWidget()
           
 java.lang.Object getValue()
           
 void initialize()
           
protected  void initializeContent()
          Initializes the content when the property content and content.type is present
protected  boolean initializeUpdateButtons()
          Initializes the popupmenus of the table.
 boolean isValueEmpty()
           
 void refresh()
           
 void refreshUpdateButtons()
          Refreshes the update buttons.
 void setContent(java.lang.Object object)
          Set the content of the table
 void setValue(java.lang.Object value)
          Sets the current selected value in the table.
 void stopEditing()
          Stop editing the table if currently editing.
 
Methods inherited from class org.xulux.gui.ContainerWidget
addChildWidget, canBeRootWidget, canContainChildren, destroyChildren, getChildWidgets, getWidgetInitializer, initializeChildren
 
Methods inherited from class org.xulux.gui.XuluxWidget
addDependency, addPropertyHandler, addPropertyHandler, clear, equals, getDependencies, getField, getName, getParent, getPart, getPrefix, getPreviousValue, getProperties, getProperty, getPropertyHandler, getPropertyHandlers, getProvider, getRealProperty, getRealValue, getRectangle, getRules, getWidgetType, handleProperties, handleProperty, hasDependencies, ignoreLayout, ignoreUse, isEnabled, isImmidiate, isInitializing, isRefreshing, isRequired, isRootWidget, isSkip, isUseIgnored, isValidValue, isVisible, notifyListeners, processDestroy, processInit, processNativeWidget, registerRule, removeAllRules, setAutoRefresh, setContainerWidgetHandler, setEnabled, setField, setImmidiate, setLazyProperty, setName, setParent, setPart, setPosition, setPrefix, setProperty, setProvider, setRequired, setRootWidget, setSize, setSkip, setValidValue, setVisible, setWidgetInitializer, setWidgetType, toString, updateWidget
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

table

protected NyxJTable table
The native swing table


lockedTable

protected NyxJTable lockedTable
The native locked table


scrollPane

protected javax.swing.JScrollPane scrollPane
This is the native widget


menu

protected org.xulux.api.gui.IWidget menu
The table context menu


hasChildPopups

protected boolean hasChildPopups
does the table have childpopups


content

protected java.lang.Object content
The content of the table


contentChanged

protected boolean contentChanged
has the contentchanged ?


columnModel

protected NyxTableColumnModel columnModel
The columnModel


model

protected NyxTableModel model
The tablemodel


editor

protected NyxTableCellEditor editor
the celleditor


newSelectionListener

protected NewSelectionListener newSelectionListener
the new selection listener

Constructor Detail

Table

public Table(java.lang.String name)
Parameters:
name - the name of the table
Method Detail

destroyTable

public void destroyTable()
Destroys the current table


destroy

public void destroy()
Specified by:
destroy in interface org.xulux.api.gui.IContainerWidgetHandler
Specified by:
destroy in interface org.xulux.api.gui.IWidget
Overrides:
destroy in class org.xulux.gui.ContainerWidget
See Also:
IWidget.destroy()

getNativeWidget

public java.lang.Object getNativeWidget()
Specified by:
getNativeWidget in interface org.xulux.api.gui.IWidget
See Also:
org.xulux.nyx.gui.XuluxWidget#getNativeWidget()

initialize

public void initialize()
Specified by:
initialize in interface org.xulux.api.gui.IWidget
See Also:
org.xulux.nyx.gui.XuluxWidget#initialize()

refresh

public void refresh()
Specified by:
refresh in interface org.xulux.api.gui.IWidget
Overrides:
refresh in class org.xulux.gui.XuluxWidget
See Also:
org.xulux.nyx.gui.XuluxWidget#refresh()

getGuiValue

public java.lang.Object getGuiValue()
Specified by:
getGuiValue in interface org.xulux.api.gui.IWidget
See Also:
org.xulux.nyx.gui.XuluxWidget#getGuiValue()

getMouseOverValue

public java.lang.Object getMouseOverValue()

focus

public void focus()
Specified by:
focus in interface org.xulux.api.gui.IWidget
See Also:
org.xulux.nyx.gui.XuluxWidget#focus()

addToParent

public void addToParent(org.xulux.api.gui.IWidget widget)
Specified by:
addToParent in interface org.xulux.api.gui.IContainerWidgetHandler
See Also:
org.xulux.nyx.gui.ContainerWidget#addToParent(org.xulux.nyx.gui.XuluxWidget)

canContainValue

public boolean canContainValue()
Specified by:
canContainValue in interface org.xulux.api.gui.IWidget
See Also:
org.xulux.nyx.gui.XuluxWidget#canContainValue()

isValueEmpty

public boolean isValueEmpty()
Specified by:
isValueEmpty in interface org.xulux.api.gui.IWidget
See Also:
org.xulux.nyx.gui.XuluxWidget#isValueEmpty()

initializeContent

protected void initializeContent()
Initializes the content when the property content and content.type is present


refreshUpdateButtons

public void refreshUpdateButtons()
Refreshes the update buttons. The buttons update and delete are disabled when no row is selected.


initializeUpdateButtons

protected boolean initializeUpdateButtons()
Initializes the popupmenus of the table.

Returns:
if initialize update did some work

getContent

public java.lang.Object getContent()
Specified by:
getContent in interface org.xulux.api.gui.IContentWidget
Returns:
the content of the table or null when no content is present

setContent

public void setContent(java.lang.Object object)
Set the content of the table

Specified by:
setContent in interface org.xulux.api.gui.IContentWidget
Parameters:
object - the content

getJTable

public javax.swing.JTable getJTable()
Remove this one..

Returns:
the native JTable

getLockedJTable

public javax.swing.JTable getLockedJTable()
Returns:
the native locked JTable.

addXuluxListener

public void addXuluxListener(org.xulux.api.gui.IXuluxListener listener)
Specified by:
addXuluxListener in interface org.xulux.api.gui.IWidget
Overrides:
addXuluxListener in class org.xulux.gui.XuluxWidget
See Also:
org.xulux.nyx.gui.XuluxWidget#addXuluxListener(org.xulux.nyx.gui.XuluxListener)

setValue

public void setValue(java.lang.Object value)
Sets the current selected value in the table.

Specified by:
setValue in interface org.xulux.api.gui.IWidget
Overrides:
setValue in class org.xulux.gui.XuluxWidget
See Also:
org.xulux.nyx.gui.XuluxWidget#setValue(java.lang.Object)

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface org.xulux.api.gui.IWidget
Overrides:
getValue in class org.xulux.gui.XuluxWidget
See Also:
org.xulux.nyx.gui.XuluxWidget#getValue()

stopEditing

public void stopEditing()
Stop editing the table if currently editing.


contentChanged

public void contentChanged()
Specified by:
contentChanged in interface org.xulux.api.gui.IContentWidget
See Also:
org.xulux.nyx.gui.IContentWidget#contentChanged()


Copyright © 2002-2007 Martin van den Bemt. All Rights Reserved.