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

Quick Search    Search Deep

org.scopemvc.application.* (34)org.scopemvc.controller.* (9)org.scopemvc.core.* (17)
org.scopemvc.model.* (19)org.scopemvc.util.* (29)org.scopemvc.view.* (45)

Package Samples:

org.scopemvc.view.servlet.xml: Contains ServletView     , a "container" used to hold a set of Page     s that a Controller in a web application manages.  
org.scopemvc.util.convertor: Utility classes that include two main areas of interest to application developers: ScopeConfig for configuring the Scope framework, and UIStrings used to look up user-readable Strings from localised resources.  
org.scopemvc.controller.servlet.xml: A servlet implementation that provides a simple implementation of the HMVC pattern for HTTP request handling.  
org.scopemvc.controller.basic
org.scopemvc.controller.servlet.jsp
org.scopemvc.controller.servlet
org.scopemvc.controller.swing
org.scopemvc.core
org.scopemvc.model.basic
org.scopemvc.model.beans
org.scopemvc.model.collection
org.scopemvc.model.util
org.scopemvc.util
org.scopemvc.view.awt
org.scopemvc.view.servlet.jsp
org.scopemvc.view.servlet
org.scopemvc.view.swing
org.scopemvc.view.util
org.scopemvc.application.timewarp.fieldtype
org.scopemvc.application.timewarp.source

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 ...
BasicController: Full implementation of Controller that adds: support for a View to notify its parent Controller when its bound model object is replaced with another (implemented completely in SwingView) via the CHANGE_MODEL_CONTROL_ID ControlID. Note that the PropertyView that a top-level Controller owns must not have a Selector set: this is only allowed for child Controllers that are delegated by a parent to handle a subview and associated submodel that is part of the parent model: the binding will be handled by the parent in this case. ControlException handling by using ViewContext.showError(java.lang.String, ...
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 ...
BasicModel: A simple implementation of ModelChangeEventSource for use as a base class. An alternative (JavaBeans style) is to use ModelChangeEventSupport as a delegate in all models. To implement a BasicModel: extend BasicModel , Notify interested listeners of changes in Model state at the end of set methods by: fireModelChange(...) Register as a ModelChangeListener with submodels in the appropriate set methods to ensure event propogation up the tree of models. For example: public final static Selector NAME = Selector.fromString("name"); public final static Selector ADDRESS = Selector.fromString("address"); ...
Controller: Controllers arranged in a hierarchy of chains of command provide the structure of an application's logic, mirroring independent contexts of discrete View s and their bound model objects. Each context can be treated as an independent component. Application logic invoked by sending Control s into the chain executes in the context of a Controller that specifically recognises and responds to the Control by its ID. For example, a Controller might manage a search panel (eg CustomerSearchView and bound CustomerSearchModel) that can be embedded within other arbitrary views. The search panel context has ...
ServletView: A container View to aggregate a set of Page s the allows the currently visible Page to be set. In a servlet application, a Controller's View must 'contain' all the possible pages that the user could be interacting with because the user is free to hit the browser's forward and back buttons, use history or bookmarks etc. This "View" therefore acts as a simple container for other Views ( Page s) that represent the actual interfaces that the user interacts with. It forwards any setController(org.scopemvc.core.Controller) 55 and setBoundModel(java.lang.Object) 55 calls to all children. A Controller ...
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() ...
ScopeServlet: Base class for a web app's servlet dispatcher: subclass this to implement application startup and initialisation (use a static initializer). This class accepts incoming requests, collects the parameters into a mutable HashMap, parses them to create a Control and to find a ViewID to identify the View the user interacted with. The request parameters are then passed to the View to populate its Model, before the View issues the Control for the owning Controller to handle. A configurable number of Application Controllers (and sub-Controllers and their Views and Models) are created on the first request. ...
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 ...
DateStringConvertor: String convertor for type java.util.Date . The Time part of Date instances are ignored. See DateTimeStringConvertor and TimeStringConvertor . It uses one java.text.DateFormat for converting into String and set of DateFormat s for parsing. Parsing formats are successively used to try to parse until one is successful. Formats are picked up from config (see org.scopemvc.util.DefaultScopeConfig for details) or if none in config, the default formatter is: DateFormat.getDateInstance(DateFormat.MEDIUM) and default parsers are: DateFormat.getDateInstance(DateFormat.FULL); DateFormat.getDateInstance(DateFormat.LONG); ...
Page: Base class for views used by servlet implementation. Pages in a browser do not communicate with the web server, so this class does not implement ModelChangeListener. Model objects in a web application shouldn't bother to implement ModelChangeEventSource unless change notification is used for some purpose other than updating Views. In a servlet application, a Controller must use a ServletView that contains all possible Page s that the Controller can show. Pages must be created with unique View IDs to allow incoming requests to be linked to the correct parent View instance in ScopeServlet. eg http://localhost/scope/servlet/Test?view=TestView&action=TestControl ...
ServletContext: A ViewContext that handles showView(), hideView() and showError() for servlet implementations. The showView() expects a ServletView that is asked to stream the currently visible Page to the HTTP Response's OutputStream. Two interesting behaviours can be customized with a ServletContext subclass: To handle errors with a global error page override showError(java.lang.String, java.lang.String) 55 to implement the required behaviour. Custom ServletContexts can be used for requests by overriding ScopeServlet.createServletContext(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, ...
ListModelAdaptor: Used to present a list of ListModelSource s as an active BasicModel. Useful when initialising org.scopemvc.view.swing.SComboBox or org.scopemvc.view.swing.SList with a static list of data. This will propogate ModelChangeEvents from sublists that are ModelChangeEventSources. Note that this adaptor registers as a listener with such sublists: it may be necessary to manually unregister with removeModelChangeListeners() 55 if an adaptor is no longer needed. The adaptor can present its ListModelSources as a sorted list if a Comparator is passed to setComparator(java.util.Comparator) 55 or all list elements ...
Control: A token passed up the chain of Controllers to invoke a piece of presentation logic. Controllers match against the ID of a Control passed into handleControl 55 If the ID is recognised then the Controller can execute some presentation logic. If the Control ID is not recognised, the Control should be sent back on its journey up the chain of responsibility by passing it to the parent Controller. See org.scopemvc.controller.basic.BasicController#passControlToParent . Controls are received by a Controller from either a View or a child Controller. Controls can optionally contain an Object parameter: see ...
ModelChangeEventSource: Implemented by model objects that fire ModelChangeEvent s when their state changes: an implementation of the Observer Pattern. The Swing components in org.scopemvc.view.swing are aware to ModelChangeEvents: model objects that implement this interface are able to automatically refresh any View s bound to them. If a submodel of a model changes, the parent must also fire a ModelChangeEvent to notify of the change in state of one of its properties. For example, if a Person has a Pet as a property, then when the Pet changes its age it fires an event to notify of a change to the "age" property. The Person ...
TimeStringConvertor: String convertor for type org.scopemvc.util.Time or java.util.Date . Date part of Date instances are ignored. It uses one java.text.DateFormat DateFormat for converting into String and an array of DateFormat s for parsing. Parsing formats are successively used to try to parse until one is successful. Formats are picked up from config (see org.scopemvc.util.DefaultScopeConfig for details) or if none in config, the default formatter is: DateFormat.getTimeInstance(DateFormat.MEDIUM) and default parsers are: DateFormat.getTimeInstance(DateFormat.FULL); DateFormat.getTimeInstance(DateFormat.LONG); DateFormat.getTimeInstance(DateFormat.MEDIUM); ...
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 ...
DateTimeStringConvertor: String convertor for type org.scopemvc.util.DateTime or java.util.Date . Both date and time parts of Date instances are used. It uses one java.text.DateFormat DateFormat for converting into String and an array of DateFormat s for parsing. Parsing formats are successively used to try to parse until one is successful. Formats are picked up from config (see org.scopemvc.util.DefaultScopeConfig for details) or if none in config, the default formatter is: DateFormat.getDateTimeInstance() and default parsers are: DateFormat.getDateTimeInstance((FULL|LONG|MEDIUM|SHORT), (FULL|LONG|MEDIUM|SHORT)); Note: ...
ModelChangeListener: Implemented by objects that can receive notification when a model object implementing ModelChangeEventSource changes state. To use: Implement this interface, responding to the change in Model state in modelChanged(org.scopemvc.core.ModelChangeEvent) 55 , Register as a listener to a Model using ModelChangeEventSource.addModelChangeListener(org.scopemvc.core.ModelChangeListener) 55 , Deregister as a listener when no longer interested in receiving notification of changes using ModelChangeEventSource.removeModelChangeListener(org.scopemvc.core.ModelChangeListener) 55 .
View: A View implements the presentation of a model object to the user and allows interaction with the model object. Implementations can be bound to a model and change the state of the model as the user interacts with the View. If the View implements ModelChangeListener then it can also update in response to changes in the state of bound models that implement ModelChangeEventSource. A View can also issue Controls to its parent Controller in response to user interaction that influences with application logic. A View is bound to a single model object, i.e. it presents some or all of the data in the bound ...
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. ...
ScopeConfig: Loads the Scope config in such a way that custom properties can be set from the Java command line (-D switch) or from a custom ResourceBundle. Any properties not supplied are loaded with the default settings in DefaultScopeConfig . A custom ResourceBundle name can be specified with setPropertiesName(java.lang.String) 55 during application initialisation, although the default "scope.config" resource is always loaded if it can be found. Property definitions have the following priority (from highest to lowest): System properties setPropertiesName() properties scope.properties DefaultScopeConfig
Selector: An identifier for model properties. Selectors are created by the factory methods fromString(java.lang.String) 55 and fromInt(int) 55 . Properties can be identified by a String name (eg the "address" property of a Customer) or an integer index (eg element 1 of a List). Selectors can be assembled in a list to identify a property in a model contained within another model. For example, the name of the pet of a Person . This Selector would be created by Selector.fromString("pet.name") and applied to a Person model object. Similarly, the name of a Person's first pet could be identified using Selector.fromString("pets.0.name") ...

Home | Contact Us | Privacy Policy | Terms of Service