Logo Search packages:      
Sourcecode: pauker version File versions  Download package

void pauker::program::gui::swing::EditCardPanel::setSplitOrientation ( int  orientation  )  [inline]

sets the split orientation between the card sides

Parameters:
orientation the split orientation between the card sides

Definition at line 489 of file EditCardPanel.java.

References pauker::program::gui::swing::PaukerFrame::setSplitOrientation().

Referenced by pauker::program::gui::swing::NewCardDialog::NewCardDialog(), and pauker::program::gui::swing::NewCardDialog::setOrientation().

                                                     {
        // change global setting in case of "internal" call
        if (paukerFrame != null) {
            paukerFrame.setSplitOrientation(orientation);
        }

        // change orientation
        splitPane.setOrientation(orientation);

        // update sizes
        int lines = frontSideTextArea.getLineCount();
        frontSideTextArea.setRows(lines < 5 ? 5 : lines);
        lines = reverseSideTextArea.getLineCount();
        reverseSideTextArea.setRows(lines < 5 ? 5 : lines);
        splitPane.resetToPreferredSizes();

        // update orientation button
        ResourceBundle strings = ResourceBundle.getBundle("pauker/Strings");
        if (orientation == JSplitPane.HORIZONTAL_SPLIT) {
            switchLayoutButton.setIcon(new ImageIcon(getClass().getResource(
                    "/pauker/icons/view_top_bottom.png")));
            switchLayoutButton.setToolTipText(
                    strings.getString("Cardsides_Top_Down"));
        } else {
            switchLayoutButton.setIcon(new ImageIcon(getClass().getResource(
                    "/pauker/icons/view_left_right.png")));
            switchLayoutButton.setToolTipText(
                    strings.getString("Cardsides_Left_Right"));
        }
    }


Generated by  Doxygen 1.6.0   Back to index