Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.scopemvc.view.swing: Javadoc index of package org.scopemvc.view.swing.


Package Samples:

org.scopemvc.view.swing

Classes:

SComboBox: A JComboBox that uses a SComboBoxModel to bind to model properties for the list of items and to bind the selected item to a property. Uses a SListCellRenderer to draw items in the list. Uses a SComboBoxEditor if editable. SComboBox can issue Controls on selection changes. SList doesn't itself bind to a model: it delegates all binding to its SComboBoxModel. Examples for SComboBox use can be found in samples.swing.combodemo package, and see SComboBoxModel and SAbstractListModel . Elements (rows) in the data model can be arbitrary class (e.g. Person, Employee etc.). Scope's combobox renderer can have ...
SAbstractListModel: A javax.swing.AbstractListModel bound to a property of a model used by SList , SComboBox , STable . The property should have elements accessible using IntIndexedSelectors and needs to fulfill one of the following criteria: be a java.util.List be an Object[] optional: have an accessible 'size' property in the parent view model (see below) Unfortunately this means that JavaBeans indexed properties cannot be bound directly to an SAbstractListModel because there is no way to discover the size of such a list, unless a separate property can be accessed to provide the size of the list using setSizeSelector(org.scopemvc.core.Selector) ...
STable: A JTable bound to a list property of a model. The table shows a list of rows from the bound property (see setSelector(org.scopemvc.core.Selector) 55 ). If the rows are model objects, the properties shown for each column are set using setColumnSelectors(org.scopemvc.core.Selector[]) 55 . See also setColumnNames(java.lang.String[]) 55 . STable uses STableModel and so the contents can be sorted using setSorted(boolean) 55 or setSorted(Comparator) 55 . STable uses a standard (non-bound) Swing ListSelectionModel unless a selection Selector is set using setSelectionSelector(org.scopemvc.core.Selector) ...
SPanel: A JPanel implementation of View for use in Swing-based user interfaces. org.scopemvc.controller.swing.SwingContext uses the following methods from the SwingView base class that should be overridden in subclasses that can be shown as top-level views in a Window: SwingView.getTitle() 55 SwingView.getDisplayMode() 55 SwingView.getCloseControl() 55 SwingView.isResizable() 55 SPanel can be bound either to an entire model object, or to a property of a model. In either case it binds child components to the model it shows (either the entire model or a property of it, assumed to be a submodel). Note: See ...
SUnboundPanel: A JPanel implementation of View that is not bound to a model object for use in Swing-based user interfaces. This can be used as a simple View that is never bound to a model and which can contain subviews bound to their own completely independent models (rather than being bound to submodels of a common parent model that is bound to a parent SwingView). org.scopemvc.controller.swing.SwingContext uses the following methods from the SwingView base class that can be overridden in subclasses that can be shown as Window-level views: SwingView.getTitle() 55 SwingView.getDisplayMode() 55 SwingView.getCloseControl() ...
SwingView: An abstract base JPanel implementation of View for use in Swing-based user interfaces. org.scopemvc.controller.swing.SwingContext assumes the use of SwingView subclasses, for which the following methods should be overridden: getTitle() 55 getDisplayMode() 55 getCloseControl() 55 isResizable() 55 Binding to the model object should be implemented in subclasses appropriately -- see SPanel for an example. This split in functionality is to support splitting Scope into a Controller/View subsystem and an independent model subsystem. SwingView subclasses must issue a CHANGE_MODEL_CONTROL_ID Control when ...
STextField: A JTextField linked to a property of a bound model object. The property must have a StringConvertor to handle conversion to and from a String representation that will be edited in the textfield. Updates to the textfield result in changes to the model property when focus is lost. STextField responds to the bound model or the particular bound property becoming read-only by disabling itself. An STextField is also disabled if it has no bound model or property. STextField can issue a Control when the user hits the Enter key. Null properties are handled in one of two ways: The field is disabled to prevent ...
STextArea: A JTextArea linked to a property of a bound model object. The property must have a StringConvertor to handle conversion to and from a String representation that will be edited in the textarea. Updates to the textarea result in changes to the model property when focus is lost. STextArea responds to the bound model object or the particular bound property becoming read-only by disabling itself. An STextArea is also disabled if it has no bound model or property. Null properties are handled in one of two ways: The textarea is disabled to prevent editing. The textarea is populated with an empty String. ...
STextCellEditor: Base class for cell editors based on Swing's JTextComponent . It is validating editor - it means, that stopCellEditing 55 can return false . Difference between a Swing's and this cell editor is that Swing always returns String value, whereas STextCellEditor uses StringConvertor to return object of desired type. Note: This editor fixes in unbelievable simple way Sun's editor unpleasant bug - when You start cell editing with keyboard, not mouse, the text field has no cursor (in 1.3.1 and 1.4 beta)
SList: A JList that uses a SListModel to bind to model properties, and a SListSelectionModel to bind the selected item to a property. Uses a SListCellRenderer to draw items in the list. SList can issue Controls on selection changes and on double-click. SList doesn't itself bind to a model: it delegates all binding to its SListModel and SListSelectionModel.
ValidationHelper: Handles ModelBindable.validationFailed(java.lang.Exception) > ModelBindable.validationFailed(java.lang.Exception) 55 and ModelBindable.validationSuccess() > ModelBindable.validationSuccess() 55 by setting the background colour of the parent component to a new colour and being able to generate an "error tooltip" that is coloured and contains the localized error message from the validation failure.
SRadioButton: A JRadioButton linked to a Boolean or boolean property of a bound model object. Updates to the radiobutton result in changes to the model property immediately. Note that the Selector specified for a SRadioButton must select a single Boolean or boolean property. SRadioButton responds to the bound model or the particular bound property becoming read-only by disabling itself. A SRadioButton is also disabled if it has no bound model or property, or the property is a null Boolean. SRadioButton can issue a Control when it changes state.
SCheckBox: A JCheckbox linked to a Boolean or boolean property of a bound model object. Updates to the checkbox result in changes to the model property immediately. Note that the Selector specified for a SCheckbox must select a single Boolean or boolean property. Checkbox responds to the bound model or the particular bound property becoming read-only by disabling itself. A SCheckbox is also disabled if it has no bound model or property, or the property is a null Boolean. SCheckbox can issue a Control when the checkbox changes state.
SActionListener: Connects component action event to a method in a model. Let's have button Save and method void saveData() in model object, which should be called, when button is pressed. The connection can be done in following way: JButton button = new JButton("Save"); SActionListener action = new SActionListener(); action.setModelActionString("saveData"); button.addActionListener(action); ... action.setBoundModel(myModel);
SListSelectionModel: A ListSelectionModel bound to a model property that will contain a reference to the current selection. This implementation allows read-only properties to disable the parent JList or JTable. SINGLE_SELECTION and SINGLE_INTERVAL_SELECTION are supported. The bound property can be an Object of the type being selected in which case the topmost single selection is updated. If the property is a HashSet then it is updated with all selections.
SComboBoxEditor: Default combobox editor for SComboBox. It can be used for any value class for which a StringConvertor exists. The editor is created in SComboBox constructor, so it can be safely obtained with call getEditor . The StringConvertor is obtained from StringConvertors to match the type of object being edited.
SSlider: A JSlider whose value is bound to an int property of a model object. Note that the Selector specified for a SCheckbox must select a single Integer or int property. SSlider responds to the bound model or the particular bound property becoming read-only by disabling itself. A SSlider is also disabled if it has no bound model or property, or the property is a null Integer.
SPasswordField: A JPasswordField that works the same way as STextField . Note this is a copy/paste from STextField because no multiple inheritance and JPasswordField plaf objects depend on instanceof JPasswordField (which isn't an interface... doh!).
SListCellRenderer: A javax.swing.DefaultListCellRenderer that tries to draw model objects as text with an icon, both from properties on the displayed model object identified by Selectors. If both Selectors don't work then same behaviour as DefaultListCellRenderer. If string convertor is not set then default one is used.
STableTextCellEditor: Cell editor for STable or JTable using JTextField .
SMenuItem: A JMenuItem that can be owned by a SwingView using org.scopemvc.controller.swing.SwingContext , and which causes its owning view to issue a Control when selected.
SwingBoundModel: An ActiveBoundModel that forces updates to the parent View onto the AWTEvent thread because Swing isn't thread-safe.
SListModel: A concrete SAbstractListModel for SList to use. ***** This implementation makes no provisions for thread-safety.
Refreshable: For Swing widgets that can be manually forced to update themselves with the current state of their bound model.
SButton: A JButton that issues a Control when pressed. The button label comes from UIStrings keyed against the Control ID.

Home | Contact Us | Privacy Policy | Terms of Service