Documentation of 'org.jhotdraw.app.AbstractApplication' Java class
AbstractApplication
org.jhotdraw.app

Class AbstractApplication

    • Field Detail

      • VIEW_COUNT_PROPERTY

        public static final java.lang.String VIEW_COUNT_PROPERTY
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractApplication

        public AbstractApplication()
        Creates a new instance.
    • Method Detail

      • init

        public void init()
        Description copied from interface: Application
        Initializes the application. configure() should have been invoked before the application is inited. Alternatively an application can be configured using setter methods.
        Specified by:
        init in interface Application
      • start

        public void start(java.util.List<java.net.URI> uris)
        Description copied from interface: Application
        Starts the application. This usually creates at least one view, and adds it to the application. init() must have been invoked before the application is started.
        Specified by:
        start in interface Application
        Parameters:
        uris - Upon launch, the application may be requested to open views for a given list of URI's.
      • setActiveView

        public void setActiveView(@Nullable
                                  View newValue)
        Sets the active view. Calls deactivate on the previously active view, and then calls activate on the given view.
        Parameters:
        newValue - Active view, can be null.
      • getName

        public java.lang.String getName()
        Description copied from interface: Application
        Returns the name of the application.
        Specified by:
        getName in interface Application
      • getVersion

        public java.lang.String getVersion()
        Description copied from interface: Application
        Returns the version of the application.
        Specified by:
        getVersion in interface Application
      • getCopyright

        public java.lang.String getCopyright()
        Description copied from interface: Application
        Returns the copyright of the application.
        Specified by:
        getCopyright in interface Application
      • stop

        public void stop()
        Description copied from interface: Application
        Stops the application without saving any unsaved views. init() must have been invoked before the application is stopped.
        Specified by:
        stop in interface Application
      • destroy

        public void destroy()
        Description copied from interface: Application
        Destroys the application and calls System.exit(0).
        Specified by:
        destroy in interface Application
      • remove

        public void remove(View v)
        Description copied from interface: Application
        Removes a view from this application and removes it from the users view. Fires a "documentCount" property change event. Invokes method setApplication(null) on the view object.
        Specified by:
        remove in interface Application
      • add

        public void add(View v)
        Description copied from interface: Application
        Adds a view to this application. Fires a "documentCount" property change event. Invokes method setApplication(this) on the view object.
        Specified by:
        add in interface Application
      • dispose

        public void dispose(View view)
        Description copied from interface: Application
        This is a convenience method for removing a view and disposing it.
        Specified by:
        dispose in interface Application
      • views

        public java.util.Collection<View> views()
        Description copied from interface: Application
        Returns a read only collection view of the views of this application.
        Specified by:
        views in interface Application
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: Application
        Returns the enabled state of the application.
        Specified by:
        isEnabled in interface Application
      • setEnabled

        public void setEnabled(boolean newValue)
        Description copied from interface: Application
        Sets the enabled state of the application. The enabled state is used to prevent parallel invocation of actions on the application. If an action consists of a sequential part and a concurrent part, it must disable the application only for the sequential part. Actions that act on the application must check in their actionPerformed method whether the application is enabled. If the application is disabled, they must do nothing. If the application is enabled, they must disable the application, perform the action and then enable the application again. This is a bound property.
        Specified by:
        setEnabled in interface Application
      • createContainer

        public java.awt.Container createContainer()
      • launch

        public void launch(java.lang.String[] args)
        Launches the application.
        Specified by:
        launch in interface Application
        Parameters:
        args - This implementation supports the command-line parameter "-open" which can be followed by one or more filenames or URI's.
      • configure

        public void configure(java.lang.String[] args)
        Description copied from interface: Application
        Configures the application using the provided arguments array.
        Specified by:
        configure in interface Application
      • removePalette

        public void removePalette(java.awt.Window palette)
        Description copied from interface: Application
        Removes a palette window from the application.
        Specified by:
        removePalette in interface Application
      • addPalette

        public void addPalette(java.awt.Window palette)
        Description copied from interface: Application
        Adds a palette window to the application.
        Specified by:
        addPalette in interface Application
      • removeWindow

        public void removeWindow(java.awt.Window window)
        Description copied from interface: Application
        Removes a (non-palette) window from the application.
        Specified by:
        removeWindow in interface Application
      • addWindow

        public void addWindow(java.awt.Window window,
                              @Nullable
                              View p)
        Description copied from interface: Application
        Adds a (non-palette) window to the application.
        Specified by:
        addWindow in interface Application
        Parameters:
        window - The window.
        p - The View to which this window is associated, or null if the window is associated to the application.
      • getRecentURIs

        public java.util.List<java.net.URI> getRecentURIs()
        Description copied from interface: Application
        Returns the recently opened URIs. By convention, this is an immutable list.
        Specified by:
        getRecentURIs in interface Application
      • clearRecentURIs

        public void clearRecentURIs()
        Description copied from interface: Application
        Clears the list of recent URIs. This fires a property change event for the property "recentURIs".
        Specified by:
        clearRecentURIs in interface Application
      • addRecentURI

        public void addRecentURI(java.net.URI uri)
        Description copied from interface: Application
        Appends a URI to the list of recent URIs. This fires a property change event for the property "recentURIs".
        Specified by:
        addRecentURI in interface Application
      • getOpenChooser

        public URIChooser getOpenChooser(View v)
        Description copied from interface: Application
        Gets an open chooser for the specified view or for the entire application.
        Specified by:
        getOpenChooser in interface Application
        Parameters:
        v - A view or null.
        Returns:
        A chooser.
      • getSaveChooser

        public URIChooser getSaveChooser(View v)
        Description copied from interface: Application
        Gets a save chooser for the specified view or for the entire application.
        Specified by:
        getSaveChooser in interface Application
        Parameters:
        v - A view or null.
        Returns:
        A chooser.
      • getImportChooser

        public URIChooser getImportChooser(View v)
        Description copied from interface: Application
        Gets an import chooser for the specified view or for the entire application.
        Specified by:
        getImportChooser in interface Application
        Parameters:
        v - A view or null.
        Returns:
        A chooser.
      • getExportChooser

        public URIChooser getExportChooser(View v)
        Description copied from interface: Application
        Gets an export chooser for the specified view or for the entire application.
        Specified by:
        getExportChooser in interface Application
        Parameters:
        v - A view or null.
        Returns:
        A chooser.
      • setActionMap

        public void setActionMap(javax.swing.ActionMap m)
        Sets the application-wide action map.
      • getActionMap

        public javax.swing.ActionMap getActionMap(@Nullable
                                                  View v)
        Gets the action map.
        Specified by:
        getActionMap in interface Application
        Parameters:
        v - A view or null

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.