Java Code Examples for javax.swing.JSplitPane#setOpaque()

The following examples show how to use javax.swing.JSplitPane#setOpaque() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OverviewPanelProvider.java    From lucene-solr with Apache License 2.0 6 votes vote down vote up
private JPanel initLowerPanel() {
  JPanel panel = new JPanel(new BorderLayout());
  panel.setOpaque(false);

  JLabel label = new JLabel(MessageUtils.getLocalizedMessage("overview.label.select_fields"));
  label.setBorder(BorderFactory.createEmptyBorder(5, 10, 5, 10));
  panel.add(label, BorderLayout.PAGE_START);

  JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, initTermCountsPanel(), initTopTermsPanel());
  splitPane.setOpaque(false);
  splitPane.setDividerLocation(320);
  splitPane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
  panel.add(splitPane, BorderLayout.CENTER);

  return panel;
}
 
Example 2
Source File: ClassesControllerUI.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
Example 3
Source File: DeckEditorSplitPanel.java    From magarena with GNU General Public License v3.0 5 votes vote down vote up
private Container getMainContentContainer() {

        // card pool
        cardPoolDefs = filterPanel.getFilteredCards();

        cardPoolTable = new CardTablePanelB(cardPoolDefs, generatePoolTitle(), false);
        cardPoolTable.addMouseListener(new CardPoolMouseListener());
        cardPoolTable.addCardSelectionListener(this);

        cardPoolTable.setDeckEditorSelectionMode();

        deckDefs = this.deck;
        deckTable = new CardTablePanelB(deckDefs, generateDeckTitle(deckDefs), true);
        deckTable.addMouseListener(new DeckMouseListener());
        deckTable.addCardSelectionListener(this);
        deckTable.setDeckEditorSelectionMode();
        deckTable.showCardCount(true);

        final JPanel deckPanel = new JPanel();
        deckPanel.setOpaque(false);
        deckPanel.setLayout(new MigLayout("insets 0, gap 0, flowy"));
        deckPanel.add(buttonsPanel, "w 100%, h 40!");
        deckPanel.add(deckTable, "w 100%, h 100%");

        cardsSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
        cardsSplitPane.setOneTouchExpandable(false);
        cardsSplitPane.setLeftComponent(cardPoolTable);
        cardsSplitPane.setRightComponent(deckPanel);
        cardsSplitPane.setResizeWeight(0.5);
        cardsSplitPane.setDividerSize(14);
        cardsSplitPane.setBorder(null);
        cardsSplitPane.setOpaque(false);
        cardsSplitPane.setDividerLocation(getDividerPosition());

        // update deck stats
        sideBarPanel.setDeck(this.deck);

        return cardsSplitPane;

    }
 
Example 4
Source File: OverviewPanelProvider.java    From lucene-solr with Apache License 2.0 5 votes vote down vote up
public JPanel get() {
  panel.setOpaque(false);
  panel.setLayout(new GridLayout(1, 1));
  panel.setBorder(BorderFactory.createLineBorder(Color.gray));

  JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, initUpperPanel(), initLowerPanel());
  splitPane.setDividerLocation(0.4);
  splitPane.setOpaque(false);
  panel.add(splitPane);

  setUpTopTermsContextMenu();

  return panel;
}
 
Example 5
Source File: AnalysisPanelProvider.java    From lucene-solr with Apache License 2.0 5 votes vote down vote up
public JPanel get() {
  JPanel panel = new JPanel(new GridLayout(1, 1));
  panel.setOpaque(false);
  panel.setBorder(BorderFactory.createLineBorder(Color.gray));

  JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, initUpperPanel(), initLowerPanel());
  splitPane.setOpaque(false);
  splitPane.setDividerLocation(320);
  panel.add(splitPane);

  return panel;
}
 
Example 6
Source File: SearchPanelProvider.java    From lucene-solr with Apache License 2.0 5 votes vote down vote up
public JPanel get() {
  JPanel panel = new JPanel(new GridLayout(1, 1));
  panel.setOpaque(false);
  panel.setBorder(BorderFactory.createLineBorder(Color.gray));

  JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, initUpperPanel(), initLowerPanel());
  splitPane.setOpaque(false);
  splitPane.setDividerLocation(350);
  panel.add(splitPane);

  return panel;
}
 
Example 7
Source File: CommitsPanelProvider.java    From lucene-solr with Apache License 2.0 5 votes vote down vote up
private JPanel initLowerPanel() {
  JPanel panel = new JPanel(new GridLayout(1, 1));
  panel.setOpaque(false);
  panel.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));

  JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, initFilesPanel(), initSegmentsPanel());
  splitPane.setOpaque(false);
  splitPane.setBorder(BorderFactory.createEmptyBorder());
  splitPane.setDividerLocation(300);
  panel.add(splitPane);
  return panel;
}
 
Example 8
Source File: CommitsPanelProvider.java    From lucene-solr with Apache License 2.0 5 votes vote down vote up
public JPanel get() {
  JPanel panel = new JPanel(new GridLayout(1, 1));
  panel.setOpaque(false);
  panel.setBorder(BorderFactory.createLineBorder(Color.gray));

  JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, initUpperPanel(), initLowerPanel());
  splitPane.setOpaque(false);
  splitPane.setBorder(BorderFactory.createEmptyBorder());
  splitPane.setDividerLocation(120);
  panel.add(splitPane);

  return panel;
}
 
Example 9
Source File: DocumentsPanelProvider.java    From lucene-solr with Apache License 2.0 5 votes vote down vote up
public JPanel get() {
  JPanel panel = new JPanel(new GridLayout(1, 1));
  panel.setOpaque(false);
  panel.setBorder(BorderFactory.createLineBorder(Color.gray));

  JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, initUpperPanel(), initLowerPanel());
  splitPane.setOpaque(false);
  splitPane.setDividerLocation(0.4);
  panel.add(splitPane);

  setUpDocumentContextMenu();

  return panel;
}
 
Example 10
Source File: OQLControllerUI.java    From visualvm with GNU General Public License v2.0 5 votes vote down vote up
private static void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
Example 11
Source File: SummaryControllerUI.java    From visualvm with GNU General Public License v2.0 5 votes vote down vote up
private void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
Example 12
Source File: InstancesControllerUI.java    From visualvm with GNU General Public License v2.0 5 votes vote down vote up
private void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
Example 13
Source File: ClassesControllerUI.java    From visualvm with GNU General Public License v2.0 5 votes vote down vote up
private void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
Example 14
Source File: OQLControllerUI.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private static void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
Example 15
Source File: SummaryControllerUI.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
Example 16
Source File: InstancesControllerUI.java    From netbeans with Apache License 2.0 5 votes vote down vote up
private void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
Example 17
Source File: SplitPaneOption.java    From JPPF with Apache License 2.0 5 votes vote down vote up
@Override
public void createUI() {
  final JSplitPane pane = new JSplitPane();
  pane.setOrientation(orientation == HORIZONTAL ? JSplitPane.HORIZONTAL_SPLIT : JSplitPane.VERTICAL_SPLIT);
  UIComponent = pane;
  children.add(FILLER1);
  children.add(FILLER2);
  pane.setLeftComponent(FILLER1.getUIComponent());
  pane.setRightComponent(FILLER2.getUIComponent());
  pane.setDividerSize(dividerWidth);
  pane.setResizeWeight(resizeWeight);
  pane.setOpaque(false);
}
 
Example 18
Source File: SearchPanelProvider.java    From lucene-solr with Apache License 2.0 4 votes vote down vote up
private JSplitPane initUpperPanel() {
  JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, initQuerySettingsPane(), initQueryPane());
  splitPane.setOpaque(false);
  splitPane.setDividerLocation(570);
  return splitPane;
}
 
Example 19
Source File: OverviewPanelProvider.java    From lucene-solr with Apache License 2.0 4 votes vote down vote up
private JPanel initTopTermsPanel() {
  JPanel panel = new JPanel(new GridLayout(1, 1));
  panel.setOpaque(false);

  JPanel selectedPanel = new JPanel(new BorderLayout());
  selectedPanel.setOpaque(false);
  JPanel innerPanel = new JPanel();
  innerPanel.setOpaque(false);
  innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.PAGE_AXIS));
  innerPanel.setBorder(BorderFactory.createEmptyBorder(20, 0, 0, 0));
  selectedPanel.add(innerPanel, BorderLayout.PAGE_START);

  JPanel innerPanel1 = new JPanel(new FlowLayout(FlowLayout.LEADING));
  innerPanel1.setOpaque(false);
  innerPanel1.add(new JLabel(MessageUtils.getLocalizedMessage("overview.label.selected_field")));
  innerPanel.add(innerPanel1);

  selectedField.setColumns(20);
  selectedField.setPreferredSize(new Dimension(100, 30));
  selectedField.setFont(StyleConstants.FONT_MONOSPACE_LARGE);
  selectedField.setEditable(false);
  selectedField.setBackground(Color.white);
  JPanel innerPanel2 = new JPanel(new FlowLayout(FlowLayout.LEADING));
  innerPanel2.setOpaque(false);
  innerPanel2.add(selectedField);
  innerPanel.add(innerPanel2);

  showTopTermsBtn.setText(MessageUtils.getLocalizedMessage("overview.button.show_terms"));
  showTopTermsBtn.setPreferredSize(new Dimension(170, 40));
  showTopTermsBtn.setFont(StyleConstants.FONT_BUTTON_LARGE);
  showTopTermsBtn.addActionListener(listeners::showTopTerms);
  showTopTermsBtn.setEnabled(false);
  JPanel innerPanel3 = new JPanel(new FlowLayout(FlowLayout.LEADING));
  innerPanel3.setOpaque(false);
  innerPanel3.add(showTopTermsBtn);
  innerPanel.add(innerPanel3);

  JPanel innerPanel4 = new JPanel(new FlowLayout(FlowLayout.LEADING));
  innerPanel4.setOpaque(false);
  innerPanel4.add(new JLabel(MessageUtils.getLocalizedMessage("overview.label.num_top_terms")));
  innerPanel.add(innerPanel4);

  SpinnerNumberModel numberModel = new SpinnerNumberModel(50, 0, 1000, 1);
  numTopTermsSpnr.setPreferredSize(new Dimension(80, 30));
  numTopTermsSpnr.setModel(numberModel);
  JPanel innerPanel5 = new JPanel(new FlowLayout(FlowLayout.LEADING));
  innerPanel5.setOpaque(false);
  innerPanel5.add(numTopTermsSpnr);
  innerPanel.add(innerPanel5);

  JPanel termsPanel = new JPanel(new BorderLayout());
  termsPanel.setOpaque(false);
  JLabel label = new JLabel(MessageUtils.getLocalizedMessage("overview.label.top_terms"));
  label.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
  termsPanel.add(label, BorderLayout.PAGE_START);

  TableUtils.setupTable(topTermsTable, ListSelectionModel.SINGLE_SELECTION, new TopTermsTableModel(),
      new MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent e) {
          listeners.showTopTermsContextMenu(e);
        }
      }, TopTermsTableModel.Column.RANK.getColumnWidth(), TopTermsTableModel.Column.FREQ.getColumnWidth());
  JScrollPane scrollPane = new JScrollPane(topTermsTable);
  termsPanel.add(scrollPane, BorderLayout.CENTER);

  JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, selectedPanel, termsPanel);
  splitPane.setOpaque(false);
  splitPane.setDividerLocation(180);
  splitPane.setBorder(BorderFactory.createEmptyBorder());
  panel.add(splitPane);

  return panel;
}
 
Example 20
Source File: Scatterplot3D.java    From chipster with MIT License 4 votes vote down vote up
@Override
public JComponent getVisualisation(DataBean data) throws Exception {

	this.data = data;

	refreshAxisBoxes(data);

	List<Variable> vars = getFrame().getVariables();
	if (vars == null || vars.size() < 4) {
		if (xBox.getItemCount() >= 1) {
			xBox.setSelectedIndex(0);
		}
		if (yBox.getItemCount() >= 2) {
			yBox.setSelectedIndex(1);
		}
		if (zBox.getItemCount() >= 3) {
			zBox.setSelectedIndex(2);
		}

		if (colorBox.getItemCount() >= 4) {
			colorBox.setSelectedIndex(3);
		}
	} else {
		xBox.setSelectedItem(vars.get(0));
		yBox.setSelectedItem(vars.get(1));
		zBox.setSelectedItem(vars.get(2));
		colorBox.setSelectedItem(vars.get(3));
	}

	List<Variable> variables = new LinkedList<Variable>();
	variables.add((Variable) xBox.getSelectedItem());
	variables.add((Variable) yBox.getSelectedItem());
	variables.add((Variable) zBox.getSelectedItem());
	variables.add((Variable) colorBox.getSelectedItem());

	if (variables.size() >= 4 && variables.get(0) != null && variables.get(1) != null && variables.get(2) != null && variables.get(3) != null) {

		retrieveData(variables);
		

		JPanel panel = new JPanel();
		panel.setLayout(new BorderLayout());

		coordinateArea = new CoordinateArea(this);
		coordinateArea.addKeyListener(this);
		coordinateArea.requestFocus();
		
		if (getDataModel().getDataArray().length > DEFAULT_TO_DOT_PAINT_MODE) {
			paintModeBox.setSelectedItem(PaintMode.RECT);
		}

		JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
		split.setDividerSize(3);
		split.setOpaque(true);
		split.setRightComponent(coordinateArea);
		scalePanel = null;
		split.setLeftComponent(getColorScalePanel());
		split.setContinuousLayout(true);
		split.setDividerLocation(150);

		panel.add(split, BorderLayout.CENTER);

		coordinateArea.setCursor(ROTATE_CURSOR);
		this.setToolsEnabled(true);
		
		updateBackgroundColor();

		return panel;
	}
	return this.getDefaultVisualisation();
}