Documentation of 'org.statcato.DatasheetTabbedPane' Java class
DatasheetTabbedPane
org.statcato

Class DatasheetTabbedPane

  • All Implemented Interfaces:
    java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.SwingConstants


    public class DatasheetTabbedPane
    extends javax.swing.JTabbedPane
    implements java.awt.event.MouseListener, java.io.Serializable
    A tabbed pane of SpreadsheetScrollPane objects.
    Since:
    1.0
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.BaselineResizeBehavior
    • Field Summary

      • Fields inherited from class javax.swing.JTabbedPane

        SCROLL_TAB_LAYOUT, WRAP_TAB_LAYOUT
      • Fields inherited from class javax.swing.JComponent

        TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • Fields inherited from class java.awt.Component

        BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface javax.swing.SwingConstants

        BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Constructor Summary

      Constructors 
      Constructor and Description
      DatasheetTabbedPane(Statcato mTab, java.awt.event.MouseListener popupListener)
      Constructor, given the parent frame and popup listener for this object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addDatasheet()
      Adds a blank spreadsheet to this tabbed pane.
      void addDatasheet(Spreadsheet ThisSpreadsheet)
      Adds the given spreadsheet object to this tabbed pane.
      void addDatasheet(java.lang.String contents, java.io.File file)
      Add the given tab-delimited string to a new Datasheet.
      void addDatasheets(DatasheetTabbedPane pane) 
      void addTab(java.lang.String title, java.awt.Component component)
      Adds a tab containing the given component and title to this tabbed pane.
      void addTab(java.lang.String title, java.awt.Component component, javax.swing.Icon extraIcon)
      Adds a tab containing the given component, title, and icon.
      int closeCurrentDatasheet()
      Prompts to save the current Datasheet if it has been changed and then closes it.
      int closePane()
      Checks if there is any changed tab and if so prompts the user to save file.
      boolean getChangedStatus()
      Returns true iff at least one of the datasheets is modified.
      java.lang.String getCurrentTabTitle()
      Returns the title at the selected tab.
      void mouseClicked(java.awt.event.MouseEvent e) 
      void mouseEntered(java.awt.event.MouseEvent e) 
      void mouseExited(java.awt.event.MouseEvent e) 
      void mousePressed(java.awt.event.MouseEvent e) 
      void mouseReleased(java.awt.event.MouseEvent e) 
      void resetTabTitles()
      Resets the tab titles.
      void setChangedStatus()
      Set the modified status of the current datasheet to changed.
      void setCurrentTabTitle(java.lang.String title)
      Sets the title of the selected tab.
      • Methods inherited from class javax.swing.JTabbedPane

        add, add, add, add, add, addChangeListener, addTab, addTab, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabComponentAt, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, indexOfTabComponent, insertTab, isEnabledAt, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabComponentAt, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, setUI, updateUI
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
      • Methods inherited from class java.awt.Container

        addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DatasheetTabbedPane

        public DatasheetTabbedPane(Statcato mTab,
                                   java.awt.event.MouseListener popupListener)
        Constructor, given the parent frame and popup listener for this object.
        Parameters:
        mTab - parent frame
        popupListener - popup mouse listener
    • Method Detail

      • addTab

        public void addTab(java.lang.String title,
                           java.awt.Component component)
        Adds a tab containing the given component and title to this tabbed pane.
        Overrides:
        addTab in class javax.swing.JTabbedPane
        Parameters:
        title - string to be displayed at the top of the tab
        component - component contained in the tab
      • addTab

        public void addTab(java.lang.String title,
                           java.awt.Component component,
                           javax.swing.Icon extraIcon)
        Adds a tab containing the given component, title, and icon.
        Parameters:
        title - string to be displayed at the top of the tab
        component - component to be contained in the tab
        extraIcon - icon to be displayed at the top of the tab
      • addDatasheet

        public void addDatasheet()
        Adds a blank spreadsheet to this tabbed pane.
      • addDatasheet

        public void addDatasheet(java.lang.String contents,
                                 java.io.File file)
        Add the given tab-delimited string to a new Datasheet. If file is not null, the given string represents contents of the given file
        Parameters:
        contents - a tab-delimited string
        file - file containing contents; null if none
      • addDatasheet

        public void addDatasheet(Spreadsheet ThisSpreadsheet)
        Adds the given spreadsheet object to this tabbed pane.
        Parameters:
        ThisSpreadsheet - spreadsheet to be added
      • closeCurrentDatasheet

        public int closeCurrentDatasheet()
        Prompts to save the current Datasheet if it has been changed and then closes it.
        Returns:
        0 if the current Datasheet is closed successfully and -1 if it is not closed
      • closePane

        public int closePane()
        Checks if there is any changed tab and if so prompts the user to save file.
        Returns:
        0 if the pane can be closed and 1 if the pane cannot be closed
      • getChangedStatus

        public boolean getChangedStatus()
        Returns true iff at least one of the datasheets is modified.
        Returns:
        true if at least one of the datasheets is modified or false otherwise.
      • setChangedStatus

        public void setChangedStatus()
        Set the modified status of the current datasheet to changed.
      • setCurrentTabTitle

        public void setCurrentTabTitle(java.lang.String title)
        Sets the title of the selected tab.
        Parameters:
        title - string to be displayed on the selected tab
      • resetTabTitles

        public void resetTabTitles()
        Resets the tab titles.
      • getCurrentTabTitle

        public java.lang.String getCurrentTabTitle()
        Returns the title at the selected tab.
        Returns:
        string displayed as the selected tab title
      • mouseClicked

        public void mouseClicked(java.awt.event.MouseEvent e)
        Specified by:
        mouseClicked in interface java.awt.event.MouseListener
      • mouseEntered

        public void mouseEntered(java.awt.event.MouseEvent e)
        Specified by:
        mouseEntered in interface java.awt.event.MouseListener
      • mouseExited

        public void mouseExited(java.awt.event.MouseEvent e)
        Specified by:
        mouseExited in interface java.awt.event.MouseListener
      • mousePressed

        public void mousePressed(java.awt.event.MouseEvent e)
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
      • mouseReleased

        public void mouseReleased(java.awt.event.MouseEvent e)
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.