Package javax.swing

Examples of javax.swing.JComponent$AccessibleJComponent


     */
    public void removeAllComponents() { 
        if (((JSynopticPanels)JSynoptic.gui).closeAll()){
            Object[] components = _components.toArray()
            for (int i = 0; i < components.length; i++){
                JComponent d = (JComponent) components[i];
                int index = indexOfComponent(d);
                super.removeComponent(d);
                files.remove(index);
            }
            repaint();
View Full Code Here


    setCellRenderer(createRenderer());

    MouseListener ml = new MouseAdapter() {
      public void mousePressed(MouseEvent e) {
        JComponent c = (JComponent)e.getSource();
        if (c != SourceTree.this) return;
        TreePath path = getPathForLocation(e.getX(), e.getY());
        if ((e.getModifiers() & MouseEvent.BUTTON3_MASK) == MouseEvent.BUTTON3_MASK) {
          if (path!=null) setSelectionPath(path);
          boolean locked = false;
          if (getSelectionPath()!=null) {
            Object node = getSelectionPath().getLastPathComponent();
            if (node instanceof SourceNode) {
              if (((SourceNode)node).isLocked()) {
                locked = true;
              }
            }
          }
          if (!locked) doPopup(e.getX(), e.getY());
          return;
        }
      }

      public void mouseExited(MouseEvent e) {
        setCursor(Cursor.getDefaultCursor());
      }
    };
   
    addMouseListener(ml);

    MouseMotionListener mml = new MouseMotionAdapter() {
      public void mouseMoved(MouseEvent e) {
        JComponent c = (JComponent)e.getSource();
        if (c != SourceTree.this) return;
        TreePath path = getPathForLocation(e.getX(), e.getY());
        if (path!=null) {
          Object node = path.getLastPathComponent();
          if (node instanceof SourceNode) {
View Full Code Here

    /**
     * get current selected page
     * @return current selected page, or null if no page selected.
     */
    public JComponent getSelectedPage(){
        JComponent res = null;
        PageModel pm = model.getSelectedPage();
        if (pm != null){
            res = pm.getPageContent();
        }
        return res;
View Full Code Here

              if (filter.equals(fft[j]))
                plugin = p;
            }
          }
          if (plugin!=null){
            JComponent accessory = plugin.getOptionPanelForFilter(filter);
            if (accessory != null) {
              fileChooser.setAccessory(accessory);
            }
          }
        }
View Full Code Here

        //
        // PropertyChangeListener interface
        //
        public void propertyChange(java.beans.PropertyChangeEvent e) {
            ComponentFrame f = (ComponentFrame) e.getSource();
            JComponent d = f.getComponent();
            if (e.getPropertyName().equals(JInternalFrame.IS_MAXIMUM_PROPERTY)) {
                Boolean b = (Boolean) e.getNewValue();
                if (b.equals(Boolean.TRUE)) {
                    _desktopCardPanel.setMode(DesktopCardPanel.CARD_MODE);
                    selectComponent(d);
View Full Code Here

                filter =  exportFileChooser.getFileFilter();
            }

            Plugin p = getPluginForFilter(action, filter);
            if (p != null) {
                JComponent j = p.getOptionPanelForFilter(filter);
                if (j != null) {
                    add(j);
                    j.setVisible(true);
                }
            }
            revalidate();
        }
View Full Code Here

    public ShapesContainer.ShapesComponent getActiveComponent() {
        return (ShapesContainer.ShapesComponent) desktopCardPanel.getSelectedComponent();
    }

    public DiagramComponent getActiveDiagram() {
        JComponent jc = desktopCardPanel.getSelectedComponent();
        if (!(jc instanceof DiagramComponent)) {
            return null;
        }
        return (DiagramComponent) jc;
    }
View Full Code Here

        }
        return (DiagramComponent) jc;
    }

    public ShapesContainer getActiveContainer() {
        JComponent jc = desktopCardPanel.getSelectedComponent();
        if (!(jc instanceof ShapesContainer.ShapesComponent)) {
            return null;
        }
        return (ShapesContainer) ((ShapesContainer.ShapesComponent) jc).getContainer();
    }
View Full Code Here

    protected void refreshAllSheets(){
        // Wipe-off all shape resources
        Iterator it = desktopCardPanel.getComponentIterator();
        while (it.hasNext()) {
            JComponent comp = (JComponent) it.next();
            if (comp instanceof ShapesContainer.ShapesComponent) {
                ShapesContainer sheet = (ShapesContainer) ((ShapesContainer.ShapesComponent) comp).getContainer();
                for (int i = 0; i < sheet.size(); i++) {
                    Object o = sheet.get(i);
                    if (o instanceof AbstractShape) {
                        ((AbstractShape) o).wipeOff();
                    }
                }
            }
        }
        // Refresh all shapes
        it = desktopCardPanel.getComponentIterator();
        while (it.hasNext()) {
            JComponent comp = (JComponent) it.next();
            if (comp instanceof ShapesContainer.ShapesComponent) {
                ShapesContainer sheet = (ShapesContainer) ((ShapesContainer.ShapesComponent) comp).getContainer();
                for (int i = 0; i < sheet.size(); i++) {
                    Object o = sheet.get(i);
                    if (o instanceof AbstractShape) {
View Full Code Here

                return; // In fact, should not happen at this point
            }
            open();
            return;
        } else if (e.getSource() == miClose) {
            JComponent jc = desktopCardPanel.getSelectedComponent();
            if (jc == null) {
                return;
            }
            desktopCardPanel.removeComponent(jc);
        } else if (e.getSource() == miCloseAll) {
View Full Code Here

TOP

Related Classes of javax.swing.JComponent$AccessibleJComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.