Documentation of 'jv.loader.PjImportModel' Java class
PjImportModel ("JavaView Reference Manual")
"JavaView? v5.03.003"
jv.loader

Class PjImportModel

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PsTimeListenerIf, PsUpdateIf, PvPickListenerIf


    public class PjImportModel
    extends PjProject
    Load geometry models from file or via http connections into JavaView. Different panels support the loading from collections of files.

    A tutorial applet on different ways to import models in JavaView is found in vgp.tutor.model.PjModel.

    See Also:
    PjImportModel_InfoBox, PjImportModel_IP, PjImportModel_IPmed, Serialized Form
    Author:
    Konrad Polthier
    Version:
    24.02.05, 3.10 revised (kp) Default value of confirm button is cancel.
    05.06.04, 3.00 revised (kp) Several new methods during implementation of PjImportModel_IPmed added.
    24.01.02, 2.20 revised (ep) New method fireAction added. No longer creates PsActionSupport in constructor.
    22.10.01, 2.10 revised (ep) Support for action listeners added.
    17.04.00, 2.00 revised (kp) Handle array of geometries.
    15.01.00, 1.20 revised (kp) Slight changes in the confirmation handling.
    01.08.99, 1.10 revised (kp) Naming of models and model directories changed. Directories are now lowercase, first char of models is uppercase.
    01.08.99, 1.00 created (kp)
    • Field Detail

      • JVD_INFO

        public static final boolean JVD_INFO
        Enable display of JVD author and abstract information in list panel.
        See Also:
        Constant Field Values
      • FULL_INFO_PANEL

        public static final int FULL_INFO_PANEL
        Identifies the full import inspector panel with selection from categories. Each category may contain a list if geometry files.
        See Also:
        Constant Field Values
      • SMALL_INFO_PANEL

        public static final int SMALL_INFO_PANEL
        Identifies a tiny import inspector panel with textfield for typing a URL and with a button for opening a file browser.
        See Also:
        Constant Field Values
      • MEDIUM_INFO_PANEL

        public static final int MEDIUM_INFO_PANEL
        Identifies the medium sized import inspector panel with selection from a list of geometry files. No categories exist in this panel.
        See Also:
        Constant Field Values
      • CONFIRM_OK

        public static final int CONFIRM_OK
        Confirmation id determines return status of an import model dialog. User returned by accepting the current selection.
        See Also:
        getConfirm(), Constant Field Values
      • CONFIRM_CANCEL

        public static final int CONFIRM_CANCEL
        Confirmation id determines return status of an import model dialog. User returned by canceling the current selection.
        See Also:
        getConfirm(), Constant Field Values
      • CONFIRM_CLICKED

        public static final int CONFIRM_CLICKED
        Confirmation id determines return status of an import model dialog. User made a new current selection.
        See Also:
        getConfirm(), Constant Field Values
      • DIR_LIST

        public static java.lang.String DIR_LIST
        Name of file containing list of model files in each directory.
    • Constructor Detail

      • PjImportModel

        public PjImportModel()
        Constructor with default full info panel.
    • Method Detail

      • init

        public void init()
        Description copied from class: PjProject
        Initialize and reset project, stops the running animation if any. Does not reset any registered display nor geometry. They must be reset individually in each subclass.
        Overrides:
        init in class PjProject
      • setDisplay

        public void setDisplay(PvDisplayIf disp)
        Register display in this project, add all geometries of project to the display, and register this project as pick listener in the display. The selected geometry of project will become the selected geometry in the display.

        Note, the automatic registrations can be avoided using alternatively the method addDisplay(PvDisplayIf) be called.

        Overrides:
        setDisplay in class PjProject
        See Also:
        PjProject.addDisplay(PvDisplayIf)
      • getNumRows

        public int getNumRows()
        Get number of rows of model list on info panel.
        Since:
        JavaView 3.60.001
        Version:
        21.10.04, 1.00 created (kp)
      • setNumRows

        public void setNumRows(int numRows)
        Set number of rows of model list on info panel. Number must be assigned before project inspector is created. Default number is 6.
        Since:
        JavaView 3.60.001
        Version:
        21.10.04, 1.00 created (kp)
      • getTitle

        public java.lang.String getTitle()
        Get title displayed on info panel.
      • setTitle

        public void setTitle(java.lang.String title)
        Set title displayed on info panel.
      • getNotice

        public java.lang.String getNotice()
        Get notice displayed on info panel.
        Since:
        JavaView 3.25.000
        Version:
        05.06.04, 1.00 created (kp)
      • setNotice

        public void setNotice(java.lang.String notice)
        Set notice displayed on info panel.
        Since:
        JavaView 3.25.000
        Version:
        05.06.04, 1.00 created (kp)
      • getInfo

        public java.lang.String getInfo()
        Get information of geometry to be displayed on info panel.
        Since:
        JavaView 3.25.000
        Version:
        05.06.04, 1.00 created (kp)
      • setInfo

        public void setInfo(java.lang.String info)
        Set information of geometry to be displayed on info panel.
        Since:
        JavaView 3.25.000
        Version:
        05.06.04, 1.00 created (kp)
      • getAuthor

        public java.lang.String getAuthor()
        Get author information of geometry to be displayed on info panel.
        Since:
        JavaView 3.25.000
        Version:
        05.06.04, 1.00 created (kp)
      • setAuthor

        public void setAuthor(java.lang.String author)
        Set author information of geometry to be displayed on info panel.
        Since:
        JavaView 3.25.000
        Version:
        05.06.04, 1.00 created (kp)
      • isVisibleReplaceChoice

        public boolean isVisibleReplaceChoice()
        Determine if two choices in info panel are shown which allow adding or replacing existing geometry.
        Since:
        JavaView 3.53.002
        Version:
        17.08.04, 1.00 created (kp)
      • setVisibleReplaceChoice

        public void setVisibleReplaceChoice(boolean bReplaceChoice)
        Show two choices in info panel which allow adding or replacing existing geometry.
        Since:
        JavaView 3.53.002
        Version:
        17.08.04, 1.00 created (kp)
      • isEnabledRemoveGeometry

        public boolean isEnabledRemoveGeometry()
        Check if removal of geometries during reload is enabled.
        Since:
        JavaView 3.25.000
        Version:
        05.06.04, 1.00 created (kp)
      • setEnabledRemoveGeometry

        public void setEnabledRemoveGeometry(boolean bRemoveGeometry)
        Enable removal of previous geometries in display.
        Since:
        JavaView 3.25.000
        Version:
        05.06.04, 1.00 created (kp)
      • isEnabledLoadCamera

        public boolean isEnabledLoadCamera()
        Check if automatic loading of camera settings is enabled.
        Since:
        JavaView 3.24.003
        Version:
        01.06.04, 1.00 created (kp)
      • setEnabledLoadCamera

        public void setEnabledLoadCamera(boolean bLoadCamera)
        Enable automatic loading of camera settings.
        Since:
        JavaView 3.24.003
        Version:
        01.06.04, 1.00 created (kp)
      • getSelectedFileName

        public java.lang.String getSelectedFileName()
        Get selected file name. Currently only used as hint for medium info panel.
        Since:
        JavaView 3.24.003
        Version:
        01.06.04, 1.00 created (kp)
      • setSelectedFileName

        public void setSelectedFileName(java.lang.String fileName)
        Set selected file name. Currently only used as hint for medium info panel.
        Since:
        JavaView 3.24.003
        Version:
        01.06.04, 1.00 created (kp)
      • getModelNames

        public java.lang.String[] getModelNames()
        Get names of model files to be displayed in list menu.
        Since:
        JavaView 3.24.003
        Version:
        01.06.04, 1.00 created (kp)
      • setModelNames

        public void setModelNames(java.lang.String[] name)
        Set names of model files to be displayed in list menu.
        Since:
        JavaView 3.24.003
        Version:
        01.06.04, 1.00 created (kp)
      • isAnimated

        public boolean isAnimated()
        Flag whether currently loaded data is interpreted an animation.
        Since:
        JavaView 2.49.002
        Version:
        10.01.03, 1.00 created (kp)
      • setAnimated

        public void setAnimated(boolean flag)
        Set flag whether currently loaded data should be interpreted an animation.
        Since:
        JavaView 2.49.002
        Version:
        10.01.03, 1.00 created (kp)
      • isModal

        public boolean isModal()
        Indicates whether the import dialog is modal. A modal dialog grabs all input from the user.
        Since:
        JavaView 3.01.001
        Version:
        25.11.03, 1.00 created (kp)
      • setModal

        public void setModal(boolean modal)
        Specifies whether the import dialog is modal. A modal dialog grabs all the input to the parent frame from the user.
        Since:
        JavaView 3.01.001
        Version:
        25.11.03, 1.00 created (kp)
      • getBaseDir

        public java.lang.String getBaseDir()
        Get full path to base directory of model collection.
      • setBase

        public void setBase(java.lang.String baseDir)
        Set full path to base directory of model collection.
      • getCategory

        public java.lang.String getCategory()
        Get currently selected category.
      • setCategory

        public void setCategory(java.lang.String category)
        Set currently selected category.
      • getFileName

        public java.lang.String getFileName()
        Get filename including full path of a geometry file.
      • setFileName

        public void setFileName(java.lang.String fullFileName)
        Set filename including full path of a geometry file.
      • setTypeOfInfoPanel

        public void setTypeOfInfoPanel(int infoType)
        Set type of info panel. Method must be called before info panel has been created.
        Parameters:
        infoType - type of info panel, e.g. PjImportModel.FULL_INFO_PANEL
      • getConfirm

        public int getConfirm()
        Allow world to check whether user has chosen OK or Cancel, when existing the import dialog. For example, used by other projects to restore a backup geometry if user cancels dialog.
        Returns:
        Confirmation id such as PjImportModel#CONFIRM_OK
      • setParentProject

        public void setParentProject(PjProject project)
        Register parent project to which the model will be loaded. When parent project is registered then a model container will be immediately added to parent project. If user selects a model from file then container model is filled or replaced if model in file has different type.

        If user cancels the loading process then the container model is removed from parent project. If user accepts the loaded model then it is selected in the parent project.

        Author:
        Konrad Polthier
        Version:
        15.01.00, 1.10 revised (kp) Chosen model is now selected.
        01.08.99, 1.00 created (kp)
      • load

        public boolean load(java.lang.String fullFileName)
        Load geometry model from file or URL and add it as selected geometry to this project.

        Use getGeometry() to get a reference to the loaded model. Use getConfirm() to check whether user has accepted or canceled an interactive loading process.

        Parameters:
        fullFileName - fully specified file name including code base, or URL.
        Returns:
        true if model has been successfully loaded.
        Author:
        Konrad Polthier
        Version:
        26.11.06, 1.20 revised (kp) Bug in ADD mode corrected where too many intermediate geometries were kept.
        15.01.00, 1.10 revised (kp) Accepted model is now selected.
        01.08.99, 1.00 created (kp)
      • getDisplayOption

        public PvDisplayOption[] getDisplayOption()
        Get display options which some parsers fill out.
      • addActionListener

        public void addActionListener(java.awt.event.ActionListener listener)
        Action events are sent when a user clicks on Ok or Cancel button, doubleclicks on a model in the model dialog or presses <return> in the textfield of the small info panel. The event is sent after the model is loaded. You can check the type of the action via getConfirm().
      • removeActionListener

        public void removeActionListener(java.awt.event.ActionListener listener)
        Remove a previously added action listener.
      • fireAction

        public void fireAction(int actionId,
                               java.lang.String actionCommand)
        Fires an action event with source=this, id=actionId and command=actionCommand.
        Version:
        18.05.13, 1.10 revised (kp) Method made public to support other derived import projects.
      • fireAction

        public void fireAction(int actionId,
                               java.lang.String actionCommand,
                               int actionModifiers)
        Fires an action event with source=this, id=actionId, command=actionCommand and modifiers=actionModifiers.
        Version:
        18.05.13, 1.10 revised (kp) Method made public to support other derived import projects.
"JavaView? v5.03.003"

"

The software JavaView? is copyright protected. All Rights Reserved.
"

You see the box below because you did not login.