Search in sources :

Example 56 with EtchedBorder

use of javax.swing.border.EtchedBorder in project vcell by virtualcell.

the class FRAPDiffTwoParamPanel method showParameterEvaluation.

public void showParameterEvaluation() {
    AsynchClientTask evaluateTask = new AsynchClientTask("Prepare to evaluate parameters ...", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {

        public void run(Hashtable<String, Object> hashTable) throws Exception {
            String errorStr = checkParameters();
            if (!errorStr.equals("")) {
                throw new IllegalArgumentException(errorStr);
            }
        }
    };
    AsynchClientTask showResultTask = new AsynchClientTask("Showing profile likelihood and confidence intervals ...", AsynchClientTask.TASKTYPE_SWING_BLOCKING) {

        public void run(Hashtable<String, Object> hashTable) throws Exception {
            ProfileData[] profileData = frapOptData.getExpFrapStudy().getProfileData_twoDiffComponents();
            if (profileData != null && profileData.length > 0) {
                JPanel basePanel = new JPanel();
                // put plotpanes of different parameters' profile likelihoods into a base panel
                basePanel.setLayout(new BoxLayout(basePanel, BoxLayout.Y_AXIS));
                for (int i = 0; i < profileData.length; i++) {
                    ConfidenceIntervalPlotPanel plotPanel = new ConfidenceIntervalPlotPanel();
                    plotPanel.setProfileSummaryData(FRAPOptimizationUtils.getSummaryFromProfileData(profileData[i]));
                    plotPanel.setBorder(new EtchedBorder());
                    String paramName = "";
                    if (profileData[i].getProfileDataElements().size() > 0) {
                        paramName = profileData[i].getProfileDataElements().get(0).getParamName();
                    }
                    ProfileDataPanel profileDataPanel = new ProfileDataPanel(plotPanel, paramName);
                    basePanel.add(profileDataPanel);
                }
                JScrollPane scrollPane = new JScrollPane(basePanel);
                scrollPane.setAutoscrolls(true);
                scrollPane.setPreferredSize(new Dimension(620, 600));
                scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
                scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
                // show plots in a dialog
                DialogUtils.showComponentCloseDialog(FRAPDiffTwoParamPanel.this, scrollPane, "Profile Likelihood of Parameters");
            }
        }
    };
    // dispatch
    ClientTaskDispatcher.dispatch(FRAPDiffTwoParamPanel.this, new Hashtable<String, Object>(), new AsynchClientTask[] { evaluateTask, showResultTask }, false, true, null, true);
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) AsynchClientTask(cbit.vcell.client.task.AsynchClientTask) Hashtable(java.util.Hashtable) BoxLayout(javax.swing.BoxLayout) ProfileData(org.vcell.optimization.ProfileData) Dimension(java.awt.Dimension) EtchedBorder(javax.swing.border.EtchedBorder) ConfidenceIntervalPlotPanel(org.vcell.optimization.gui.ConfidenceIntervalPlotPanel) ProfileDataPanel(org.vcell.optimization.gui.ProfileDataPanel)

Example 57 with EtchedBorder

use of javax.swing.border.EtchedBorder in project vcell by virtualcell.

the class VFrap_OverlayEditorPanelJAI method getROIAssistBasePanel.

public JPanel getROIAssistBasePanel() {
    if (roiAssistBasePanel == null) {
        roiAssistBasePanel = new JPanel(new BorderLayout());
        JPanel buttonPanel = new JPanel(new BorderLayout());
        buttonPanel.add(getRoiAssistButton(), BorderLayout.WEST);
        roiAssistBasePanel.add(buttonPanel, BorderLayout.NORTH);
        roiAssistBasePanel.add(getROIAssistPanel(), BorderLayout.CENTER);
        // set border
        TitledBorder tb = new TitledBorder(new EtchedBorder(), "");
        roiAssistBasePanel.setBorder(tb);
    }
    return roiAssistBasePanel;
}
Also used : JPanel(javax.swing.JPanel) EtchedBorder(javax.swing.border.EtchedBorder) BorderLayout(java.awt.BorderLayout) TitledBorder(javax.swing.border.TitledBorder)

Example 58 with EtchedBorder

use of javax.swing.border.EtchedBorder in project vcell by virtualcell.

the class FRAPReacOffRateParametersPanel method showParameterEvaluation.

public void showParameterEvaluation() {
    AsynchClientTask evaluateTask = new AsynchClientTask("Prepare to evaluate parameters ...", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {

        public void run(Hashtable<String, Object> hashTable) throws Exception {
            String errorStr = checkParameters();
            if (!errorStr.equals("")) {
                throw new IllegalArgumentException(errorStr);
            }
        }
    };
    AsynchClientTask showResultTask = new AsynchClientTask("Showing profile likelihood and confidence intervals ...", AsynchClientTask.TASKTYPE_SWING_BLOCKING) {

        public void run(Hashtable<String, Object> hashTable) throws Exception {
            ProfileData[] profileData = frapWorkspace.getWorkingFrapStudy().getProfileData_reactionOffRate();
            if (profileData != null && profileData.length > 0) {
                // put plotpanes of different parameters' profile likelihoods into a base panel
                JPanel basePanel = new JPanel();
                basePanel.setLayout(new BoxLayout(basePanel, BoxLayout.Y_AXIS));
                for (int i = 0; i < profileData.length; i++) {
                    ConfidenceIntervalPlotPanel plotPanel = new ConfidenceIntervalPlotPanel();
                    plotPanel.setProfileSummaryData(FRAPOptimizationUtils.getSummaryFromProfileData(profileData[i]));
                    plotPanel.setBorder(new EtchedBorder());
                    String paramName = "";
                    if (profileData[i].getProfileDataElements().size() > 0) {
                        paramName = profileData[i].getProfileDataElements().get(0).getParamName();
                    }
                    ProfileDataPanel profileDataPanel = new ProfileDataPanel(plotPanel, paramName);
                    basePanel.add(profileDataPanel);
                }
                JScrollPane scrollPane = new JScrollPane(basePanel);
                scrollPane.setAutoscrolls(true);
                scrollPane.setPreferredSize(new Dimension(620, 600));
                scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
                scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
                // show plots in a dialog
                DialogUtils.showComponentCloseDialog(FRAPReacOffRateParametersPanel.this, scrollPane, "Profile Likelihood of Parameters");
            }
        }
    };
    // dispatch
    ClientTaskDispatcher.dispatch(FRAPReacOffRateParametersPanel.this, new Hashtable<String, Object>(), new AsynchClientTask[] { evaluateTask, showResultTask }, false, true, null, true);
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) AsynchClientTask(cbit.vcell.client.task.AsynchClientTask) Hashtable(java.util.Hashtable) BoxLayout(javax.swing.BoxLayout) ProfileData(org.vcell.optimization.ProfileData) Dimension(java.awt.Dimension) EtchedBorder(javax.swing.border.EtchedBorder) ConfidenceIntervalPlotPanel(org.vcell.optimization.gui.ConfidenceIntervalPlotPanel) ProfileDataPanel(org.vcell.optimization.gui.ProfileDataPanel)

Example 59 with EtchedBorder

use of javax.swing.border.EtchedBorder in project mondrian by pentaho.

the class SchemaExplorer method initComponents.

/**
 * Called from within the constructor to initialize the form.
 */
private void initComponents() {
    jPanelXML = new JPanel();
    jScrollPaneXML = new JScrollPane();
    footer = new JPanel();
    databaseLabel = new javax.swing.JLabel();
    jSeparator1 = new JSeparator();
    jSeparator2 = new JSeparator();
    jSplitPane1 = new JSplitPane();
    jPanel1 = new JPanel();
    jScrollPane2 = new JScrollPane();
    // propertyTable includes changeSelection and processKeyEvent
    // processing for keyboard navigation
    propertyTable = new JTable() {

        public void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend) {
            if (columnIndex == 0) {
                AWTEvent currentEvent = EventQueue.getCurrentEvent();
                if (currentEvent instanceof KeyEvent) {
                    KeyEvent ke = (KeyEvent) currentEvent;
                    int kcode = ke.getKeyCode();
                    if (kcode == KeyEvent.VK_TAB) {
                        if ((ke.getModifiersEx() & InputEvent.SHIFT_DOWN_MASK) == InputEvent.SHIFT_DOWN_MASK) {
                            rowIndex -= 1;
                            if (rowIndex < 0) {
                                rowIndex = propertyTable.getRowCount() - 1;
                            }
                        }
                        setTableCellFocus(rowIndex);
                        return;
                    }
                }
            }
            super.changeSelection(rowIndex, columnIndex, toggle, extend);
        }

        public void processKeyEvent(KeyEvent e) {
            int kcode = e.getKeyCode();
            if (kcode == KeyEvent.VK_UP || kcode == KeyEvent.VK_DOWN) {
                int row = propertyTable.getSelectedRow();
                setTableCellFocus(row);
                return;
            }
            super.processKeyEvent(e);
        }
    };
    targetLabel = new javax.swing.JLabel();
    validStatusLabel = new javax.swing.JLabel();
    targetLabel2 = new javax.swing.JLabel();
    validStatusLabel2 = new javax.swing.JLabel();
    jPanel2 = new JPanel();
    jScrollPane1 = new JScrollPane();
    tree = new JTree();
    tree.getSelectionModel().setSelectionMode(DefaultTreeSelectionModel.SINGLE_TREE_SELECTION);
    ToolTipManager.sharedInstance().registerComponent(tree);
    jToolBar1 = new JToolBar();
    addCubeButton = new JButton();
    addDimensionButton = new JButton();
    addDimensionUsageButton = new JButton();
    addHierarchyButton = new JButton();
    addNamedSetButton = new JButton();
    addUserDefinedFunctionButton = new JButton();
    addRoleButton = new JButton();
    addMeasureButton = new JButton();
    addCalculatedMemberButton = new JButton();
    addLevelButton = new JButton();
    addPropertyButton = new JButton();
    addCalculatedMemberPropertyButton = new JButton();
    addVirtualCubeButton = new JButton();
    addVirtualCubeDimensionButton = new JButton();
    addVirtualCubeMeasureButton = new JButton();
    cutButton = new JButton(new DefaultEditorKit.CutAction());
    copyButton = new JButton(new DefaultEditorKit.CopyAction());
    pasteButton = new JButton(new DefaultEditorKit.PasteAction());
    deleteButton = new JButton();
    editModeButton = new JToggleButton();
    setLayout(new BorderLayout());
    jSplitPane1.setDividerLocation(200);
    jPanel1.setLayout(new BorderLayout());
    propertyTable.setModel(new DefaultTableModel(new Object[][] {}, new String[] { getResourceConverter().getString("schemaExplorer.propertyTable.attribute", "Attribute"), getResourceConverter().getString("schemaExplorer.propertyTable.value", "Value") }) {

        Class[] types = { String.class, Object.class };

        boolean[] canEdit = { false, true };

        public Class getColumnClass(int columnIndex) {
            return types[columnIndex];
        }

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
        }
    });
    // Set property table column headers to bold.
    propertyTable.getTableHeader().setFont(new Font("Dialog", Font.BOLD, 12));
    jScrollPane2.setViewportView(propertyTable);
    jPanel1.add(jScrollPane2, java.awt.BorderLayout.CENTER);
    targetLabel.setFont(new Font("Dialog", 1, 14));
    targetLabel.setForeground((Color) UIManager.getDefaults().get("CheckBoxMenuItem.acceleratorForeground"));
    targetLabel.setHorizontalAlignment(SwingConstants.CENTER);
    targetLabel.setText(getResourceConverter().getString("schemaExplorer.targetLabel.title", "Schema"));
    targetLabel.setBorder(new EtchedBorder());
    // up arrow button for property table heading
    jPanel3 = new JPanel();
    jPanel3.setLayout(new BorderLayout());
    BasicArrowButton arrowButtonUp = new BasicArrowButton(SwingConstants.NORTH);
    BasicArrowButton arrowButtonDown = new BasicArrowButton(SwingConstants.SOUTH);
    arrowButtonUp.setToolTipText(getResourceConverter().getString("schemaExplorer.arrowButtonUp.toolTip", "move to parent element"));
    arrowButtonDown.setToolTipText(getResourceConverter().getString("schemaExplorer.arrowButtonDown.toolTip", "move to child element"));
    arrowButtonUpAction = new AbstractAction(getResourceConverter().getString("schemaExplorer.arrowButtonUp.title", "Arrow button up")) {

        public void actionPerformed(ActionEvent e) {
            arrowButtonUpAction(e);
        }
    };
    arrowButtonDownAction = new AbstractAction(getResourceConverter().getString("schemaExplorer.arrowButtonDown.title", "Arrow button down")) {

        public void actionPerformed(ActionEvent e) {
            arrowButtonDownAction(e);
        }
    };
    arrowButtonUp.addActionListener(arrowButtonUpAction);
    arrowButtonDown.addActionListener(arrowButtonDownAction);
    jPanel3.add(arrowButtonDown, java.awt.BorderLayout.EAST);
    jPanel3.add(arrowButtonUp, java.awt.BorderLayout.WEST);
    jPanel3.add(targetLabel, java.awt.BorderLayout.CENTER);
    jPanel1.add(jPanel3, java.awt.BorderLayout.NORTH);
    validStatusLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
    validStatusLabel.setForeground(Color.RED);
    validStatusLabel.setHorizontalAlignment(SwingConstants.CENTER);
    jPanel1.add(validStatusLabel, java.awt.BorderLayout.SOUTH);
    // for XML viewing
    targetLabel2.setFont(new Font("Dialog", 1, 14));
    targetLabel2.setForeground((Color) UIManager.getDefaults().get("CheckBoxMenuItem.acceleratorForeground"));
    targetLabel2.setHorizontalAlignment(SwingConstants.CENTER);
    targetLabel2.setText(getResourceConverter().getString("schemaExplorer.targetLabel.title", "Schema"));
    targetLabel2.setBorder(new EtchedBorder());
    validStatusLabel2.setFont(new Font("Dialog", Font.PLAIN, 12));
    validStatusLabel2.setForeground(Color.RED);
    validStatusLabel2.setHorizontalAlignment(SwingConstants.CENTER);
    jSplitPane1.setRightComponent(jPanel1);
    jPanel2.setLayout(new java.awt.BorderLayout());
    jScrollPane1.setViewportView(tree);
    jPanel2.add(jScrollPane1, java.awt.BorderLayout.CENTER);
    jSplitPane1.setLeftComponent(jPanel2);
    // ========================================================
    // actions
    // ========================================================
    addCube = new AbstractAction(getResourceConverter().getString("schemaExplorer.addCube.title", "Add Cube")) {

        public void actionPerformed(ActionEvent e) {
            addCube(e);
        }
    };
    addParameter = new AbstractAction(getResourceConverter().getString("schemaExplorer.addParameter.title", "Add Parameter")) {

        public void actionPerformed(ActionEvent e) {
            addParameter(e);
        }
    };
    addDimension = new AbstractAction(getResourceConverter().getString("schemaExplorer.addDimension.title", "Add Dimension")) {

        public void actionPerformed(ActionEvent e) {
            addDimension(e);
        }
    };
    addDimensionUsage = new AbstractAction(getResourceConverter().getString("schemaExplorer.addDimensionUsage.title", "Add Dimension Usage")) {

        public void actionPerformed(ActionEvent e) {
            addDimensionUsage(e);
        }
    };
    addHierarchy = new AbstractAction(getResourceConverter().getString("schemaExplorer.addHierarchy.title", "Add Hierarchy")) {

        public void actionPerformed(ActionEvent e) {
            addHierarchy(e);
        }
    };
    addNamedSet = new AbstractAction(getResourceConverter().getString("schemaExplorer.addNamedSet.title", "Add Named Set")) {

        public void actionPerformed(ActionEvent e) {
            addNamedSet(e);
        }
    };
    addMeasure = new AbstractAction(getResourceConverter().getString("schemaExplorer.addMeasure.title", "Add Measure")) {

        public void actionPerformed(ActionEvent e) {
            addMeasure(e);
        }
    };
    addCalculatedMember = new AbstractAction(getResourceConverter().getString("schemaExplorer.addCalculatedMember.title", "Add Calculated Member")) {

        public void actionPerformed(ActionEvent e) {
            addCalculatedMember(e);
        }
    };
    addUserDefinedFunction = new AbstractAction(getResourceConverter().getString("schemaExplorer.addUserDefinedFunction.title", "Add User Defined Function")) {

        public void actionPerformed(ActionEvent e) {
            addUserDefinedFunction(e);
        }
    };
    addScript = new AbstractAction(getResourceConverter().getString("schemaExplorer.addScript.title", "Add Script")) {

        public void actionPerformed(ActionEvent e) {
            addScript(e);
        }
    };
    addCellFormatter = new AbstractAction(getResourceConverter().getString("schemaExplorer.addCellFormatter.title", "Add Cell Formatter")) {

        public void actionPerformed(ActionEvent e) {
            addCellFormatter(e);
        }
    };
    addPropertyFormatter = new AbstractAction(getResourceConverter().getString("schemaExplorer.addPropertyFormatter.title", "Add Property Formatter")) {

        public void actionPerformed(ActionEvent e) {
            addPropertyFormatter(e);
        }
    };
    addMemberFormatter = new AbstractAction(getResourceConverter().getString("schemaExplorer.addMemberFormatter.title", "Add Member Formatter")) {

        public void actionPerformed(ActionEvent e) {
            addMemberFormatter(e);
        }
    };
    addRole = new AbstractAction(getResourceConverter().getString("schemaExplorer.addRole.title", "Add Role")) {

        public void actionPerformed(ActionEvent e) {
            addRole(e);
        }
    };
    addSchemaGrant = new AbstractAction(getResourceConverter().getString("schemaExplorer.addSchemaGrant.title", "Add Schema Grant")) {

        public void actionPerformed(ActionEvent e) {
            addSchemaGrant(e);
        }
    };
    addCubeGrant = new AbstractAction(getResourceConverter().getString("schemaExplorer.addCubeGrant.title", "Add Cube Grant")) {

        public void actionPerformed(ActionEvent e) {
            addCubeGrant(e);
        }
    };
    addDimensionGrant = new AbstractAction(getResourceConverter().getString("schemaExplorer.addDimensionGrant.title", "Add Dimension Grant")) {

        public void actionPerformed(ActionEvent e) {
            addDimensionGrant(e);
        }
    };
    addHierarchyGrant = new AbstractAction(getResourceConverter().getString("schemaExplorer.addHierarchyGrant.title", "Add Hierarchy Grant")) {

        public void actionPerformed(ActionEvent e) {
            addHierarchyGrant(e);
        }
    };
    addMemberGrant = new AbstractAction(getResourceConverter().getString("schemaExplorer.addMemberGrant.title", "Add Member Grant")) {

        public void actionPerformed(ActionEvent e) {
            addMemberGrant(e);
        }
    };
    addAnnotations = new AbstractAction(getResourceConverter().getString("schemaExplorer.addAnnotations.title", "Add Annotations")) {

        public void actionPerformed(ActionEvent e) {
            addAnnotations(e);
        }
    };
    addAnnotation = new AbstractAction(getResourceConverter().getString("schemaExplorer.addAnnotation.title", "Add Annotation")) {

        public void actionPerformed(ActionEvent e) {
            addAnnotation(e);
        }
    };
    addLevel = new AbstractAction(getResourceConverter().getString("schemaExplorer.addLevel.title", "Add Level")) {

        public void actionPerformed(ActionEvent e) {
            addLevel(e);
        }
    };
    addClosure = new AbstractAction(getResourceConverter().getString("schemaExplorer.addClosure.title", "Add Closure")) {

        public void actionPerformed(ActionEvent e) {
            addClosure(e);
        }
    };
    addKeyExp = new AbstractAction(getResourceConverter().getString("schemaExplorer.addKeyExpression.title", "Add Key Expression")) {

        public void actionPerformed(ActionEvent e) {
            addKeyExp(e);
        }
    };
    addNameExp = new AbstractAction(getResourceConverter().getString("schemaExplorer.addNameExpression.title", "Add Name Expression")) {

        public void actionPerformed(ActionEvent e) {
            addNameExp(e);
        }
    };
    addOrdinalExp = new AbstractAction(getResourceConverter().getString("schemaExplorer.addOrdinalExpression.title", "Add Ordinal Expression")) {

        public void actionPerformed(ActionEvent e) {
            addOrdinalExp(e);
        }
    };
    addCaptionExp = new AbstractAction(getResourceConverter().getString("schemaExplorer.addCaptionExpression.title", "Add Caption Expression")) {

        public void actionPerformed(ActionEvent e) {
            addCaptionExp(e);
        }
    };
    addParentExp = new AbstractAction(getResourceConverter().getString("schemaExplorer.addParentExpression.title", "Add Parent Expression")) {

        public void actionPerformed(ActionEvent e) {
            addParentExp(e);
        }
    };
    addMeasureExp = new AbstractAction(getResourceConverter().getString("schemaExplorer.addMeasureExpression.title", "Add Measure Expression")) {

        public void actionPerformed(ActionEvent e) {
            addMeasureExp(e);
        }
    };
    addFormula = new AbstractAction(getResourceConverter().getString("schemaExplorer.addFormula.title", "Add Formula")) {

        public void actionPerformed(ActionEvent e) {
            addFormula(e);
        }
    };
    addSQL = new AbstractAction(getResourceConverter().getString("schemaExplorer.addSQL.title", "Add SQL")) {

        public void actionPerformed(ActionEvent e) {
            addSQL(e);
        }
    };
    addTable = new AbstractAction(getResourceConverter().getString("schemaExplorer.addTable.title", "Add Table")) {

        public void actionPerformed(ActionEvent e) {
            addTable(e);
        }
    };
    addJoin = new AbstractAction(getResourceConverter().getString("schemaExplorer.addJoin.title", "Add Join")) {

        public void actionPerformed(ActionEvent e) {
            addJoin(e);
        }
    };
    addView = new AbstractAction(getResourceConverter().getString("schemaExplorer.addView.title", "Add View")) {

        public void actionPerformed(ActionEvent e) {
            addView(e);
        }
    };
    addInlineTable = new AbstractAction(getResourceConverter().getString("schemaExplorer.addInlineTable.title", "Add Inline Table")) {

        public void actionPerformed(ActionEvent e) {
            addInlineTable(e);
        }
    };
    moveLevelUp = new AbstractAction(getResourceConverter().getString("schemaExplorer.moveLevelUp.title", "Move Up")) {

        public void actionPerformed(ActionEvent e) {
            moveLevelUp(e);
        }
    };
    moveLevelDown = new AbstractAction(getResourceConverter().getString("schemaExplorer.moveLevelDown.title", "Move Down")) {

        public void actionPerformed(ActionEvent e) {
            moveLevelDown(e);
        }
    };
    addProperty = new AbstractAction(getResourceConverter().getString("schemaExplorer.addProperty.title", "Add Property")) {

        public void actionPerformed(ActionEvent e) {
            addProperty(e);
        }
    };
    addCalculatedMemberProperty = new AbstractAction(getResourceConverter().getString("schemaExplorer.addCalculatedMemberProperty.title", "Add Calculated Member Property")) {

        public void actionPerformed(ActionEvent e) {
            addCalculatedMemberProperty(e);
        }
    };
    addVirtualCube = new AbstractAction(getResourceConverter().getString("schemaExplorer.addVirtualCube.title", "Add Virtual Cube")) {

        public void actionPerformed(ActionEvent e) {
            addVirtualCube(e);
        }
    };
    addVirtualCubeDimension = new AbstractAction(getResourceConverter().getString("schemaExplorer.addVirtualCubeDimension.title", "Add Virtual Cube Dimension")) {

        public void actionPerformed(ActionEvent e) {
            addVirtualCubeDimension(e);
        }
    };
    addVirtualCubeMeasure = new AbstractAction(getResourceConverter().getString("schemaExplorer.addVirtualCubeMeasure.title", "Add Virtual Cube Measure")) {

        public void actionPerformed(ActionEvent e) {
            addVirtualCubeMeasure(e);
        }
    };
    addAggPattern = new AbstractAction(getResourceConverter().getString("schemaExplorer.addAggregatePattern.title", "Add Aggregate Pattern")) {

        public void actionPerformed(ActionEvent e) {
            addAggPattern(e);
        }
    };
    addAggExclude = new AbstractAction(getResourceConverter().getString("schemaExplorer.addAggregateExcludeTable.title", "Add Aggregate Exclude Table")) {

        public void actionPerformed(ActionEvent e) {
            addAggExclude(e);
        }
    };
    addAggName = new AbstractAction(getResourceConverter().getString("schemaExplorer.addAggregateName.title", "Add Aggregate Name")) {

        public void actionPerformed(ActionEvent e) {
            addAggName(e);
        }
    };
    addAggIgnoreColumn = new AbstractAction(getResourceConverter().getString("schemaExplorer.addAggregateIgnoreColumn.title", "Add Aggregate Ignore Column")) {

        public void actionPerformed(ActionEvent e) {
            addAggIgnoreColumn(e);
        }
    };
    addAggForeignKey = new AbstractAction(getResourceConverter().getString("schemaExplorer.addAggregateForeignKey.title", "Add Aggregate Foreign Key")) {

        public void actionPerformed(ActionEvent e) {
            addAggForeignKey(e);
        }
    };
    addAggMeasure = new AbstractAction(getResourceConverter().getString("schemaExplorer.addAggregateMeasure.title", "Add Aggregate Measure")) {

        public void actionPerformed(ActionEvent e) {
            addAggMeasure(e);
        }
    };
    addAggLevel = new AbstractAction(getResourceConverter().getString("schemaExplorer.addAggregateLevel.title", "Add Aggregate Level")) {

        public void actionPerformed(ActionEvent e) {
            addAggLevel(e);
        }
    };
    addAggLevelProperty = new AbstractAction(getResourceConverter().getString("schemaExplorer.addAggregateLevelProperty.title", "Add Aggregate Level Property")) {

        public void actionPerformed(ActionEvent e) {
            addAggLevelProperty(e);
        }
    };
    addAggFactCount = new AbstractAction(getResourceConverter().getString("schemaExplorer.addAggregateFactCount.title", "Add Aggregate Fact Count")) {

        public void actionPerformed(ActionEvent e) {
            addAggFactCount(e);
        }
    };
    addAggMeasureFactCount = new AbstractAction(getResourceConverter().getString("schemaExplorer.addAggregateMeasureFactCount.title", "Add Aggregate Measure Fact Count")) {

        public void actionPerformed(ActionEvent e) {
            addAggMeasureFactCount(e);
        }
    };
    delete = new AbstractAction(getResourceConverter().getString("schemaExplorer.actionDelete.title", "Delete")) {

        public void actionPerformed(ActionEvent e) {
            delete(e);
        }
    };
    editMode = new AbstractAction(getResourceConverter().getString("schemaExplorer.actionEdit.title", "EditMode")) {

        public void actionPerformed(ActionEvent e) {
            editMode(e);
        }
    };
    // ========================================================
    // toolbar buttons
    // ========================================================
    addCubeButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addCube"))));
    addCubeButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addCube.title", "Add cube"));
    addCubeButton.addActionListener(addCube);
    addDimensionButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addDimension"))));
    addDimensionButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addDimension.title", "Add Dimension"));
    addDimensionButton.addActionListener(addDimension);
    addDimensionUsageButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addDimensionUsage"))));
    addDimensionUsageButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addDimensionUsage.title", "Add Dimension Usage"));
    addDimensionUsageButton.addActionListener(addDimensionUsage);
    addHierarchyButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addHierarchy"))));
    addHierarchyButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addHierarchy.title", "Add Hierarchy"));
    addHierarchyButton.addActionListener(addHierarchy);
    addNamedSetButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addNamedSet"))));
    addNamedSetButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addNamedSet.title", "Add Named Set"));
    addNamedSetButton.addActionListener(addNamedSet);
    addUserDefinedFunctionButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addUserDefinedFunction"))));
    addUserDefinedFunctionButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addUserDefinedFunction.title", "Add User defined Function"));
    addUserDefinedFunctionButton.addActionListener(addUserDefinedFunction);
    addCalculatedMemberButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addCalculatedMember"))));
    addCalculatedMemberButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addCalculatedMember.title", "Add Calculated Member"));
    addCalculatedMemberButton.addActionListener(addCalculatedMember);
    addMeasureButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addMeasure"))));
    addMeasureButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addMeasure.title", "Add Measure"));
    addMeasureButton.addActionListener(addMeasure);
    addLevelButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addLevel"))));
    addLevelButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addLevel.title", "Add Level"));
    addLevelButton.addActionListener(addLevel);
    addPropertyButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addProperty"))));
    addPropertyButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addProperty.title", "Add Property"));
    addPropertyButton.addActionListener(addProperty);
    addCalculatedMemberPropertyButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addCalculatedMemberProperty"))));
    addCalculatedMemberPropertyButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addCalculatedMemberProperty.title", "Add Calculated Member Property"));
    addCalculatedMemberPropertyButton.addActionListener(addCalculatedMemberProperty);
    addVirtualCubeButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addVirtualCube"))));
    addVirtualCubeButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addVirtualCube.title", "Add Virtual Cube"));
    addVirtualCubeButton.addActionListener(addVirtualCube);
    addVirtualCubeDimensionButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addVirtualCubeDimension"))));
    addVirtualCubeDimensionButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addVirtualCubeDimension.title", "Add Virtual Dimension"));
    addVirtualCubeDimensionButton.addActionListener(addVirtualCubeDimension);
    addVirtualCubeMeasureButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addVirtualCubeMeasure"))));
    addVirtualCubeMeasureButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addVirtualCubeMeasure.title", "Add Virtual Measure"));
    addVirtualCubeMeasureButton.addActionListener(addVirtualCubeMeasure);
    addRoleButton.setIcon(new ImageIcon(myClassLoader.getResource(getResourceConverter().getGUIReference("addRole"))));
    addRoleButton.setToolTipText(getResourceConverter().getString("schemaExplorer.addRole.title", "Add Role"));
    addRoleButton.addActionListener(addRole);
    cutButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(getResourceConverter().getGUIReference("cut"))));
    cutButton.setText("");
    cutButton.setToolTipText(getResourceConverter().getString("schemaExplorer.actionCut.title", "Cut"));
    copyButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(getResourceConverter().getGUIReference("copy"))));
    copyButton.setText("");
    copyButton.setToolTipText(getResourceConverter().getString("schemaExplorer.actionCopy.title", "Copy"));
    pasteButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(getResourceConverter().getGUIReference("paste"))));
    pasteButton.setText("");
    pasteButton.setToolTipText(getResourceConverter().getString("schemaExplorer.actionPaste.title", "Paste"));
    deleteButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(getResourceConverter().getGUIReference("delete"))));
    deleteButton.setToolTipText(getResourceConverter().getString("schemaExplorer.actionDelete.title", "Delete"));
    deleteButton.addActionListener(delete);
    editModeButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(getResourceConverter().getGUIReference("edit"))));
    editModeButton.setToolTipText(getResourceConverter().getString("schemaExplorer.actionEdit.title", "Edit Mode"));
    editModeButton.addActionListener(editMode);
    databaseLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource(getResourceConverter().getGUIReference("database"))));
    jToolBar1.add(addCubeButton);
    jToolBar1.add(addDimensionButton);
    jToolBar1.add(addDimensionUsageButton);
    jToolBar1.add(addHierarchyButton);
    jToolBar1.add(addNamedSetButton);
    jToolBar1.add(addUserDefinedFunctionButton);
    jToolBar1.add(addCalculatedMemberButton);
    jToolBar1.add(addMeasureButton);
    jToolBar1.add(addLevelButton);
    jToolBar1.add(addPropertyButton);
    jToolBar1.add(addCalculatedMemberPropertyButton);
    jToolBar1.addSeparator();
    jToolBar1.add(addVirtualCubeButton);
    jToolBar1.add(addVirtualCubeDimensionButton);
    jToolBar1.add(addVirtualCubeMeasureButton);
    jToolBar1.addSeparator();
    jToolBar1.add(addRoleButton);
    jToolBar1.addSeparator();
    jToolBar1.add(cutButton);
    jToolBar1.add(copyButton);
    jToolBar1.add(pasteButton);
    jToolBar1.addSeparator();
    jToolBar1.add(deleteButton);
    jToolBar1.addSeparator();
    jToolBar1.add(editModeButton);
    // ========================================================
    // popup menu
    // ========================================================
    jPopupMenu = new CustomJPopupMenu();
    // ========================================================
    // tree mouse listener
    // ========================================================
    tree.addMouseListener(new PopupTrigger());
    tree.addKeyListener(new KeyAdapter() {

        public void keyPressed(KeyEvent e) {
            // keytext=Delete
            // keycode=127
            // keytext=NumPad .
            // keycode=110
            int kcode = e.getKeyCode();
            if (kcode == 127 || kcode == 110) {
                delete(e);
            }
        }
    });
    // add footer for connected database
    footer.setLayout(new java.awt.BorderLayout());
    footer.add(databaseLabel, java.awt.BorderLayout.CENTER);
    // ========================================================
    // jpanel
    // ========================================================
    this.add(jSplitPane1, java.awt.BorderLayout.CENTER);
    this.add(jToolBar1, java.awt.BorderLayout.NORTH);
    this.add(footer, java.awt.BorderLayout.SOUTH);
    updater = new JTreeUpdater(tree);
}
Also used : BasicArrowButton(javax.swing.plaf.basic.BasicArrowButton) javax.swing(javax.swing) EtchedBorder(javax.swing.border.EtchedBorder) java.awt(java.awt)

Example 60 with EtchedBorder

use of javax.swing.border.EtchedBorder in project intellij-community by JetBrains.

the class AsmCodeGeneratorTest method testBorder.

public void testBorder() throws Exception {
    JPanel panel = (JPanel) getInstrumentedRootComponent("TestBorder.form", "BindingTest");
    assertTrue(panel.getBorder() instanceof TitledBorder);
    TitledBorder border = (TitledBorder) panel.getBorder();
    assertEquals("BorderTitle", border.getTitle());
    assertTrue(border.getBorder().toString(), border.getBorder() instanceof EtchedBorder);
}
Also used : EtchedBorder(javax.swing.border.EtchedBorder) TitledBorder(javax.swing.border.TitledBorder)

Aggregations

EtchedBorder (javax.swing.border.EtchedBorder)116 JPanel (javax.swing.JPanel)92 JButton (javax.swing.JButton)74 JLabel (javax.swing.JLabel)74 ActionEvent (java.awt.event.ActionEvent)73 BorderLayout (java.awt.BorderLayout)72 ActionListener (java.awt.event.ActionListener)70 EmptyBorder (javax.swing.border.EmptyBorder)63 CompoundBorder (javax.swing.border.CompoundBorder)62 AbstractAction (javax.swing.AbstractAction)58 WindowAdapter (java.awt.event.WindowAdapter)55 WindowEvent (java.awt.event.WindowEvent)55 Insets (java.awt.Insets)46 GridBagConstraints (java.awt.GridBagConstraints)43 GridBagLayout (java.awt.GridBagLayout)43 JTextField (javax.swing.JTextField)40 Dimension (java.awt.Dimension)24 TitledBorder (javax.swing.border.TitledBorder)22 FlowLayout (java.awt.FlowLayout)18 JScrollPane (javax.swing.JScrollPane)17