Examples of JPropertiesPanel


Examples of simtools.ui.JPropertiesPanel

        //TODO make those actions undoable
       
        if (action.equals(resources.getString("Properties..."))) {
            new LongAction(LongAction.LONG_ACTION_SHAPE, null, this) {
                protected void doAction() {
                    JPropertiesPanel panel = createPanel();

                    /**
                     * Only one shape properties dialog box can be displayed at
                     * once When user opens a dialog box properties while
                     * another one is still displayed: this last dislaog box is
                     * closed
                     */
                    Point oldLocation = null;
                    if (currentDialogBox != null) {
                        oldLocation = currentDialogBox.getBounds().getLocation();
                        currentDialogBox.dispose();
                    }
                    ArrayList shapes = new ArrayList();
                    shapes.add(TextArrayShape.this);
                   
                    AbstractShapePropertiesDialogBox optionDialog = new AbstractShapePropertiesDialogBox(JSynoptic.gui
                            .getOwner(), panel, panel.getShapeName() + resources.getString("propertiesTitle"),
                            shapes , JSynoptic.gui.getActiveComponent());
                    if (oldLocation != null) {
                        optionDialog.setLocation(oldLocation);
                    }
                    currentDialogBox = optionDialog;
View Full Code Here

Examples of simtools.ui.JPropertiesPanel

                List properties = AbstractShape.getCommonProperties(shapes);

                SourceTree.getFromPool("PropertiesPanel0").removeAllTreeSelectionListeners();
               
                // Get the panel related to this set of properties
                JPropertiesPanel panel = getPanel(properties);
                if (panel != null){

                    /*
                     * Only one shape properties dialog box can be displayed at
                     * once When user opens a dialog box properties while
                     * another one is still displayed: this last dislaog box is
                     * closed
                     */
                    Point oldLocation = null;
                    if (currentDialogBox != null) {
                        oldLocation = currentDialogBox.getBounds().getLocation();
                        currentDialogBox.dispose();
                    }

                    // Create properties dialog
                    AbstractShapePropertiesDialogBox optionDialog = new AbstractShapePropertiesDialogBox(
                            JSynoptic.gui.getOwner(),
                            panel,
                            panel.getShapeName() + resources.getString("propertiesTitle"),
                            shapes,
                            JSynoptic.gui.getActiveComponent()
                            );
                   
                   
View Full Code Here

Examples of simtools.ui.JPropertiesPanel

        }
       
        if (action.equals(resources.getStringValue("properties"))) {    
            new LongAction(LongAction.LONG_ACTION_SHAPE, null, this) {
                protected void doAction() {
                    JPropertiesPanel panel=createPanel();

                    /** Only one shape properties dialog box can be displayed at once
                     * When user opens a dialog box properties while another one is still displayed: this last dislaog box is closed
                     */
                    Point oldLocation=null;
                    if (currentDialogBox!=null){
                        oldLocation= currentDialogBox.getBounds().getLocation();
                        currentDialogBox.dispose();
                    }
                    ArrayList shapes = new ArrayList();
                    shapes.add(Plot.this);
                    PlotPropertiesDialogBox optionDialog = new PlotPropertiesDialogBox(JSynoptic.gui.getOwner(), panel, panel.getShapeName(), shapes);

                    if (oldLocation!=null)
                        optionDialog.setLocation(oldLocation);

                    currentDialogBox = optionDialog;
View Full Code Here

Examples of simtools.ui.JPropertiesPanel

                ((CardLayout) (cards.getLayout())).show(cards, Integer.toString(index));
            }
        });
        bcelladd.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JPropertiesPanel textPanel = createTextPropertiesPanel(false,Builtin.resources.getString("TextArray") );
                // New cell has same properties as the last cell created
                JPropertiesPanel textPanelModel = (JPropertiesPanel) textPanels.get(textPanels.size() - 1);
                String[] props = textPanelModel.getPropertyNames();
                if (props != null) {
                    for (int j = 0; j < props.length; j++) {
                        String pname = props[j];
                        textPanel.setPropertyValue(pname, textPanelModel.getPropertyValue(pname));
                    }
                }
                // fin test
                // Set new panel owner
                textPanel.setOwner(TextArrayPropertiesPanel.this.getOwner());
                // Add to the list of text cells panels
                textPanels.add(textPanel);
                // Disable delete button in case there is only one cell.
                bcelldelete.setEnabled(textPanels.size() > 1);
                updateCells();
                int index = textPanels.size() - 1;
                cbx.setSelectedIndex(index);
                TextPropertiesPanel tpp = (TextPropertiesPanel) TextArrayPropertiesPanel.this.textPanels.get(index);
                tpp.updateSourceTree();
                ((CardLayout) (cards.getLayout())).show(cards, Integer.toString(index));
                enableFontChoosers(!cbSameFont.isSelected());
            }
        });
        cards = new JPanel();
        cards.setLayout(new CardLayout());
        cbSameFont = new ActionCheckBox(resources.getString("UseAUniqueFontForTheWholeArray"), true) {
            public void actionPerformed(ActionEvent e) {
                if (cbSameFont.isSelected()) {
                    JPropertiesPanel jp = (JPropertiesPanel) TextArrayPropertiesPanel.this.textPanels.get(cbx
                            .getSelectedIndex());
                    for (int i = 0; i < TextArrayPropertiesPanel.this.textPanels.size(); i++) {
                        JPropertiesPanel jpi = (JPropertiesPanel) TextArrayPropertiesPanel.this.textPanels.get(i);
                        if (jpi != jp) {
                            jpi.setPropertyValue("FONT", jp.getPropertyValue("FONT"));
                        }
                    }
                }
                enableFontChoosers(!cbSameFont.isSelected());
            }
View Full Code Here

Examples of simtools.ui.JPropertiesPanel

                textPanels.clear();
                // Build textPanels with cells properties
                Vector cellsProperties = (Vector) value;
                for (int i = 0; i < cellsProperties.size(); i++) {
                    Vector cellProperties = (Vector) cellsProperties.get(i);
                    JPropertiesPanel textPanel = createTextPropertiesPanel(false, Builtin.resources.getString("TextArray") );
                    for (int j = 0; j < cellProperties.size(); j++) {
                        Object[] property = (Object[]) cellProperties.get(j);
                        String pname = (String) property[0];
                        Object pvalue = property[1];
                        textPanel.setPropertyValue(pname, pvalue);
                    }
                    textPanels.add(textPanel);
                }
                if (comboIsVisible) {
                    updateCells();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.