Search in sources :

Example 1 with FlippingSplitPane

use of gmgen.gui.FlippingSplitPane in project pcgen by PCGen.

the class NotesView method initComponents.

/**
	 *  This method is called from within the constructor to initialize the form.
	 *  WARNING: Do NOT modify this code. The content of this method is always
	 *  regenerated by the Form Editor.
	 */
private void initComponents() {
    //GEN-BEGIN:initComponents
    jSplitPane1 = new FlippingSplitPane();
    jScrollPane1 = new JScrollPane();
    notesTree = new JTree();
    jPanel1 = new JPanel();
    jScrollPane2 = new JScrollPane();
    editor = new JTextPane();
    jPanel2 = new JPanel();
    fileBar = new JToolBar();
    newButton = new JButton();
    saveButton = new JButton();
    exportButton = new JButton();
    revertButton = new JButton();
    deleteButton = new JButton();
    clipboardBar = new JToolBar();
    cutButton = new JButton();
    copyButton = new JButton();
    pasteButton = new JButton();
    formatBar = new JToolBar();
    sizeCB = new JComboBox();
    boldButton = new JButton();
    italicButton = new JButton();
    underlineButton = new JButton();
    colorButton = new JButton();
    bulletButton = new JButton();
    enumButton = new JButton();
    imageButton = new JButton();
    alignmentBar = new JToolBar();
    leftJustifyButton = new JButton();
    centerJustifyButton = new JButton();
    rightJustifyButton = new JButton();
    filePane = new JPanel();
    fileLeft = new JButton();
    fileRight = new JButton();
    filesBar = new JToolBar();
    setLayout(new java.awt.BorderLayout());
    jSplitPane1.setDividerLocation(175);
    jSplitPane1.setDividerSize(5);
    jScrollPane1.setViewportView(notesTree);
    jSplitPane1.setLeftComponent(jScrollPane1);
    jPanel1.setLayout(new java.awt.BorderLayout());
    editor.addCaretListener(this::editorCaretUpdate);
    jScrollPane2.setViewportView(editor);
    jPanel1.add(jScrollPane2, java.awt.BorderLayout.CENTER);
    jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 0));
    newButton.setIcon(Icons.stock_new.getImageIcon());
    newButton.setToolTipText("New Node");
    newButton.setBorder(new EtchedBorder());
    newButton.setEnabled(false);
    newButton.addActionListener(new java.awt.event.ActionListener() {

        @Override
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            newButtonActionPerformed();
        }
    });
    fileBar.add(newButton);
    saveButton.setIcon(Icons.stock_save.getImageIcon());
    saveButton.setToolTipText("Save Node");
    saveButton.setBorder(new EtchedBorder());
    saveButton.setEnabled(false);
    saveButton.addActionListener(new java.awt.event.ActionListener() {

        @Override
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveButtonActionPerformed();
        }
    });
    fileBar.add(saveButton);
    exportButton.setIcon(Icons.stock_export.getImageIcon());
    exportButton.setToolTipText("Export");
    exportButton.setBorder(new EtchedBorder());
    exportButton.setEnabled(false);
    exportButton.addActionListener(new java.awt.event.ActionListener() {

        @Override
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            exportButtonActionPerformed();
        }
    });
    fileBar.add(exportButton);
    revertButton.setIcon(Icons.stock_revert.getImageIcon());
    revertButton.setToolTipText("Revert to Saved");
    revertButton.setBorder(new EtchedBorder());
    revertButton.setEnabled(false);
    revertButton.addActionListener(new java.awt.event.ActionListener() {

        @Override
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            revertButtonActionPerformed();
        }
    });
    fileBar.add(revertButton);
    deleteButton.setIcon(Icons.stock_broken_image.getImageIcon());
    deleteButton.setToolTipText("Delete Node");
    deleteButton.setBorder(new EtchedBorder());
    deleteButton.setEnabled(false);
    deleteButton.addActionListener(new java.awt.event.ActionListener() {

        @Override
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            deleteButtonActionPerformed();
        }
    });
    fileBar.add(deleteButton);
    jPanel2.add(fileBar);
    cutButton.setIcon(Icons.stock_cut.getImageIcon());
    cutButton.setToolTipText("Cut");
    cutButton.setBorder(new EtchedBorder());
    cutButton.addActionListener(this::cutButtonActionPerformed);
    clipboardBar.add(cutButton);
    copyButton.setIcon(Icons.stock_copy.getImageIcon());
    copyButton.setToolTipText("Copy");
    copyButton.setBorder(new EtchedBorder());
    copyButton.addActionListener(this::copyButtonActionPerformed);
    clipboardBar.add(copyButton);
    pasteButton.setIcon(Icons.stock_paste.getImageIcon());
    pasteButton.setToolTipText("Paste");
    pasteButton.setBorder(new EtchedBorder());
    pasteButton.addActionListener(this::pasteButtonActionPerformed);
    clipboardBar.add(pasteButton);
    jPanel2.add(clipboardBar);
    sizeCB.setToolTipText("Size");
    sizeCB.setBorder(new EtchedBorder());
    sizeCB.addActionListener(this::sizeCBActionPerformed);
    formatBar.add(sizeCB);
    boldButton.setIcon(Icons.stock_text_bold.getImageIcon());
    boldButton.setToolTipText("Bold");
    boldButton.setBorder(new EtchedBorder());
    boldButton.addActionListener(this::boldButtonActionPerformed);
    formatBar.add(boldButton);
    italicButton.setIcon(Icons.stock_text_italic.getImageIcon());
    italicButton.setToolTipText("Italic");
    italicButton.setBorder(new EtchedBorder());
    italicButton.addActionListener(this::italicButtonActionPerformed);
    formatBar.add(italicButton);
    underlineButton.setIcon(Icons.stock_text_underline.getImageIcon());
    underlineButton.setToolTipText("Underline");
    underlineButton.setBorder(new EtchedBorder());
    underlineButton.addActionListener(this::underlineButtonActionPerformed);
    formatBar.add(underlineButton);
    colorButton.setForeground(new java.awt.Color(0, 0, 0));
    colorButton.setIcon(Icons.createImageIcon("menu-mode-RGB-alt.png"));
    colorButton.setToolTipText("Color");
    colorButton.setBorder(new EtchedBorder());
    colorButton.addActionListener(new java.awt.event.ActionListener() {

        @Override
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            colorButtonActionPerformed();
        }
    });
    formatBar.add(colorButton);
    bulletButton.setIcon(Icons.stock_list_bulet.getImageIcon());
    bulletButton.setToolTipText("Bulleted List");
    bulletButton.setAction(actionListUnordered);
    bulletButton.setBorder(new EtchedBorder());
    formatBar.add(bulletButton);
    enumButton.setIcon(Icons.stock_list_enum.getImageIcon());
    enumButton.setToolTipText("Numbered List");
    enumButton.setAction(actionListOrdered);
    enumButton.setBorder(new EtchedBorder());
    formatBar.add(enumButton);
    imageButton.setIcon(Icons.stock_insert_graphic.getImageIcon());
    imageButton.setBorder(new EtchedBorder());
    imageButton.addActionListener(new java.awt.event.ActionListener() {

        @Override
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            imageButtonActionPerformed();
        }
    });
    formatBar.add(imageButton);
    jPanel2.add(formatBar);
    leftJustifyButton.setIcon(Icons.stock_text_align_left.getImageIcon());
    leftJustifyButton.setToolTipText("Left Justify");
    leftJustifyButton.setBorder(new EtchedBorder());
    leftJustifyButton.addActionListener(this::leftJustifyButtonActionPerformed);
    alignmentBar.add(leftJustifyButton);
    centerJustifyButton.setIcon(Icons.stock_text_align_center.getImageIcon());
    centerJustifyButton.setToolTipText("Center");
    centerJustifyButton.setBorder(new EtchedBorder());
    centerJustifyButton.addActionListener(this::centerJustifyButtonActionPerformed);
    alignmentBar.add(centerJustifyButton);
    rightJustifyButton.setIcon(Icons.stock_text_align_right.getImageIcon());
    rightJustifyButton.setToolTipText("Right Justify");
    rightJustifyButton.setBorder(new EtchedBorder());
    rightJustifyButton.addActionListener(this::rightJustifyButtonActionPerformed);
    alignmentBar.add(rightJustifyButton);
    jPanel2.add(alignmentBar);
    jPanel1.add(jPanel2, java.awt.BorderLayout.NORTH);
    filePane.setLayout(new BoxLayout(filePane, BoxLayout.X_AXIS));
    fileLeft.setText("<");
    fileLeft.setBorder(new EtchedBorder());
    fileLeft.addActionListener(new java.awt.event.ActionListener() {

        @Override
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            fileLeftActionPerformed();
        }
    });
    filePane.add(fileLeft);
    fileRight.setText(">");
    fileRight.setBorder(new EtchedBorder());
    fileRight.addActionListener(new java.awt.event.ActionListener() {

        @Override
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            fileRightActionPerformed();
        }
    });
    filePane.add(fileRight);
    filePane.add(filesBar);
    jPanel1.add(filePane, java.awt.BorderLayout.SOUTH);
    jSplitPane1.setRightComponent(jPanel1);
    add(jSplitPane1, java.awt.BorderLayout.CENTER);
}
Also used : JScrollPane(javax.swing.JScrollPane) Color(java.awt.Color) JPanel(javax.swing.JPanel) ActionListener(java.awt.event.ActionListener) JComboBox(javax.swing.JComboBox) BoxLayout(javax.swing.BoxLayout) JButton(javax.swing.JButton) JToolBar(javax.swing.JToolBar) FlippingSplitPane(gmgen.gui.FlippingSplitPane) ActionEvent(java.awt.event.ActionEvent) JTextPane(javax.swing.JTextPane) JTree(javax.swing.JTree) EtchedBorder(javax.swing.border.EtchedBorder)

Example 2 with FlippingSplitPane

use of gmgen.gui.FlippingSplitPane in project pcgen by PCGen.

the class Initiative method initComponents.

/**
	 *  This method is called from within the constructor to initialize the form.
	 *  WARNING: Do NOT modify this code. The content of this method is always
	 *  regenerated by the Form Editor.
	 */
private void initComponents() {
    //GEN-BEGIN:initComponents
    tablePopup = new javax.swing.JPopupMenu();
    tablePopupCBNumber = new javax.swing.JCheckBoxMenuItem();
    tablePopupCBName = new javax.swing.JCheckBoxMenuItem();
    tablePopupCBPlayer = new javax.swing.JCheckBoxMenuItem();
    tablePopupCBStatus = new javax.swing.JCheckBoxMenuItem();
    tablePopupCBPlus = new javax.swing.JCheckBoxMenuItem();
    tablePopupCBInitiative = new javax.swing.JCheckBoxMenuItem();
    tablePopupCBDuration = new javax.swing.JCheckBoxMenuItem();
    tablePopupCBHP = new javax.swing.JCheckBoxMenuItem();
    tablePopupCBHPMax = new javax.swing.JCheckBoxMenuItem();
    tablePopupCBType = new javax.swing.JCheckBoxMenuItem();
    final javax.swing.JToolBar topToolbar = new javax.swing.JToolBar();
    final javax.swing.JPanel buttonPanelTop = new javax.swing.JPanel();
    bRoll = new javax.swing.JButton();
    final JButton bAddCombatant = new JButton();
    bNextInit = new javax.swing.JButton();
    final JButton bRefocus = new JButton();
    bCombatantReRoll = new javax.swing.JButton();
    bDelete = new javax.swing.JButton();
    final javax.swing.JPanel jPanel2 = new javax.swing.JPanel();
    lCounter = new javax.swing.JLabel();
    jSplitPane1 = new FlippingSplitPane();
    final javax.swing.JScrollPane jScrollPane1 = new javax.swing.JScrollPane();
    final javax.swing.JScrollPane jScrollEvents = new javax.swing.JScrollPane();
    combatantTable = new javax.swing.JTable();
    tpaneInfo = new javax.swing.JTabbedPane();
    tpCombatInfo = new javax.swing.JTextArea();
    tpCombatInfo.setName("Events");
    bottomToolbar = new javax.swing.JToolBar();
    tablePopupCBNumber.setText("#");
    tablePopupCBNumber.addActionListener(this::TablePopupActionPerformed);
    tablePopup.add(tablePopupCBNumber);
    tablePopupCBName.setText("Name");
    tablePopupCBName.addActionListener(this::TablePopupActionPerformed);
    tablePopup.add(tablePopupCBName);
    tablePopupCBPlayer.setText("Player");
    tablePopupCBPlayer.addActionListener(this::TablePopupActionPerformed);
    tablePopup.add(tablePopupCBPlayer);
    tablePopupCBStatus.setText("Status");
    tablePopupCBStatus.addActionListener(this::TablePopupActionPerformed);
    tablePopup.add(tablePopupCBStatus);
    tablePopupCBPlus.setText("Plus");
    tablePopupCBPlus.addActionListener(this::TablePopupActionPerformed);
    tablePopup.add(tablePopupCBPlus);
    tablePopupCBInitiative.setText("Initiative");
    tablePopupCBInitiative.addActionListener(this::TablePopupActionPerformed);
    tablePopup.add(tablePopupCBInitiative);
    tablePopupCBDuration.setText("Duration");
    tablePopupCBDuration.addActionListener(this::TablePopupActionPerformed);
    tablePopup.add(tablePopupCBDuration);
    tablePopupCBHP.setText("HP");
    tablePopupCBHP.setEnabled(false);
    tablePopupCBHP.addActionListener(this::TablePopupActionPerformed);
    tablePopup.add(tablePopupCBHP);
    tablePopupCBHPMax.setText("HP Max");
    tablePopupCBHPMax.setEnabled(false);
    tablePopupCBHPMax.addActionListener(this::TablePopupActionPerformed);
    tablePopup.add(tablePopupCBHPMax);
    tablePopupCBType.setText("Type");
    tablePopupCBType.addActionListener(this::TablePopupActionPerformed);
    tablePopup.add(tablePopupCBType);
    setLayout(new java.awt.BorderLayout());
    setPreferredSize(new java.awt.Dimension(700, 600));
    buttonPanelTop.setLayout(new javax.swing.BoxLayout(buttonPanelTop, javax.swing.BoxLayout.X_AXIS));
    bAddCombatant.setText("Add Combatant");
    bAddCombatant.addActionListener(this::bAddCombatantActionPerformed);
    buttonPanelTop.add(bAddCombatant);
    bDuplicateCombatant.setText("Duplicate");
    bDuplicateCombatant.setEnabled(false);
    bDuplicateCombatant.addActionListener(this::bDuplicateCombatantActionPerformed);
    bDelete.setText("Delete");
    bDelete.addActionListener(this::bDeleteActionPerformed);
    buttonPanelTop.add(bDelete);
    buttonPanelTop.add(bDuplicateCombatant);
    buttonPanelTop.add(new JSeparator());
    bRoll.setText("Start Combat");
    bRoll.addActionListener(this::bRollActionPerformed);
    buttonPanelTop.add(bRoll);
    bCombatantReRoll.setText("Roll");
    bCombatantReRoll.addActionListener(this::bCombatantReRollActionPerformed);
    buttonPanelTop.add(bCombatantReRoll);
    bNextInit.setText("Next Initiative");
    bNextInit.addActionListener(this::bNextInitActionPerformed);
    buttonPanelTop.add(bNextInit);
    buttonPanelTop.add(new JSeparator());
    bRefocus.setText("Refocus");
    bRefocus.addActionListener(this::bRefocusActionPerformed);
    buttonPanelTop.add(bRefocus);
    buttonPanelTop.add(new JSeparator());
    bRefresh.setText("Refresh Tabs");
    bRefresh.addActionListener(evt -> {
        refreshTable();
        refreshTabs();
    });
    buttonPanelTop.add(bRefresh);
    topToolbar.add(buttonPanelTop);
    topToolbar.add(jPanel2);
    topToolbar.add(lCounter);
    add(topToolbar, java.awt.BorderLayout.NORTH);
    jSplitPane1.setDividerLocation(400);
    jSplitPane1.setOneTouchExpandable(true);
    jSplitPane1.setPreferredSize(new java.awt.Dimension(800, 405));
    combatantTable.addMouseListener(new java.awt.event.MouseAdapter() {

        @Override
        public void mousePressed(java.awt.event.MouseEvent e) {
            combatantTableMousePressed(e);
        }

        @Override
        public void mouseReleased(java.awt.event.MouseEvent e) {
            combatantTableMouseReleased(e);
        }
    });
    combatantTable.addPropertyChangeListener(this::combatantTablePropertyChange);
    combatantTable.getSelectionModel().addListSelectionListener(e -> {
        boolean hasSelection = combatantTable.getSelectedRow() > -1;
        bDuplicateCombatant.setEnabled(hasSelection);
        bDelete.setEnabled(hasSelection);
        bCombatantReRoll.setEnabled(hasSelection);
    });
    jScrollPane1.setViewportView(combatantTable);
    jScrollEvents.setViewportView(tpCombatInfo);
    jSplitPane1.setLeftComponent(jScrollPane1);
    tpaneInfo.addTab("Events", jScrollEvents);
    jSplitPane1.setRightComponent(tpaneInfo);
    add(jSplitPane1, java.awt.BorderLayout.CENTER);
    add(bottomToolbar, java.awt.BorderLayout.SOUTH);
    bottomToolbar.add(bOpposedSkill);
}
Also used : JButton(javax.swing.JButton) JSeparator(javax.swing.JSeparator) JButton(javax.swing.JButton) FlippingSplitPane(gmgen.gui.FlippingSplitPane) JTable(javax.swing.JTable)

Aggregations

FlippingSplitPane (gmgen.gui.FlippingSplitPane)2 JButton (javax.swing.JButton)2 Color (java.awt.Color)1 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 BoxLayout (javax.swing.BoxLayout)1 JComboBox (javax.swing.JComboBox)1 JPanel (javax.swing.JPanel)1 JScrollPane (javax.swing.JScrollPane)1 JSeparator (javax.swing.JSeparator)1 JTable (javax.swing.JTable)1 JTextPane (javax.swing.JTextPane)1 JToolBar (javax.swing.JToolBar)1 JTree (javax.swing.JTree)1 EtchedBorder (javax.swing.border.EtchedBorder)1