public ViewBar(String bannerText, Color bannerColor) { setLayout(new BorderLayout(2, 2)); viewBanner = new ViewBanner(bannerText, bannerColor); add(viewBanner, BorderLayout.NORTH); JPanel southPanel = new JPanel(new BorderLayout(7, 7)); toolBar = new JToolBar(); southPanel.add(toolBar, BorderLayout.WEST); add(southPanel, BorderLayout.SOUTH); toolBar.setOpaque(false); toolBar.setFloatable(false); toolBar.setBorderPainted(false); toolBar.setBorder(null); viewModeComboBox = new JComboBox<>(); viewModeComboBox.addActionListener(e -> fireViewModeChanged()); viewModeComboBox.setVisible(false); southPanel.add(viewModeComboBox, BorderLayout.EAST); }
public void addAction(Action action) { viewBar.addAction(action); }
public void hideViewBar() { viewBarComponent.getViewBar().setVisible(false); }
public ViewBar(String bannerText, Color bannerColor) { setLayout(new BorderLayout(2, 2)); viewBanner = new ViewBanner(bannerText, bannerColor); add(viewBanner, BorderLayout.NORTH); toolBar = new JToolBar(); add(toolBar, BorderLayout.SOUTH); toolBar.setOpaque(false); toolBar.setFloatable(false); toolBar.setBorderPainted(false); toolBar.setBorder(null); }
/** * Sets the text on the view header. This can be used to * override the label that is specified in the plugin.xml * file. * @param text The header text. */ public void setHeaderText(String text) { viewBarComponent.getViewBar().getViewBanner().setText(text); }
if (lastGroup != null) { if (!plugin.getGroup().equals(lastGroup)) { viewBarComponent.getViewBar().addSeparator(); action.putValue(AbstractAction.SHORT_DESCRIPTION, action.getValue(AbstractAction.NAME)); viewBarComponent.getViewBar().addAction(action);
public ViewBarComponent(String bannerText, Color bannerColor, JComponent component) { setLayout(new BorderLayout(3, 3)); viewBar = new ViewBar(bannerText, bannerColor); add(viewBar, BorderLayout.NORTH); add(component); BorderFactory.createEmptyBorder(2, 2, 2, 2); }
if (lastGroup != null) { if (!plugin.getGroup().equals(lastGroup)) { viewBarComponent.getViewBar().addSeparator();
/** * Sets the text on the view header. This can be used to * override the label that is specified in the plugin.xml * file. * @param text The header text. */ public void setHeaderText(String text) { viewBarComponent.getViewBar().getViewBanner().setText(text); }
public ViewBar(String bannerText, Color bannerColor) { setLayout(new BorderLayout(2, 2)); viewBanner = new ViewBanner(bannerText, bannerColor); add(viewBanner, BorderLayout.NORTH); toolBar = new JToolBar(); add(toolBar, BorderLayout.SOUTH); toolBar.setOpaque(false); toolBar.setFloatable(false); toolBar.setBorderPainted(false); toolBar.setBorder(null); }
if (lastGroup != null) { if (!plugin.getGroup().equals(lastGroup)) { viewBarComponent.getViewBar().addSeparator(); action.putValue(AbstractAction.SHORT_DESCRIPTION, action.getValue(AbstractAction.NAME)); viewBarComponent.getViewBar().addAction(action);
public ViewBarComponent(String bannerText, Color bannerColor, JComponent component) { setLayout(new BorderLayout(3, 3)); viewBar = new ViewBar(bannerText, bannerColor); add(viewBar, BorderLayout.NORTH); add(component); BorderFactory.createEmptyBorder(2, 2, 2, 2); }
public void setPinned(boolean pinned) { this.pinned = pinned; // We could update the header here to reflect the fact that the // view is pinned. May be an icon? if (viewBarComponent != null) { viewBarComponent.getViewBar().getViewBanner().setPinned(pinned); } }
public void hideViewBar() { viewBarComponent.getViewBar().setVisible(false); }
public ViewBarComponent(String bannerText, Color bannerColor, JComponent component) { setLayout(new BorderLayout(3, 3)); viewBar = new ViewBar(bannerText, bannerColor); add(viewBar, BorderLayout.NORTH); add(component); BorderFactory.createEmptyBorder(2, 2, 2, 2); }
public void addAction(Action action) { viewBar.addAction(action); } }
public void setPinned(boolean pinned) { this.pinned = pinned; // We could update the header here to reflect the fact that the // view is pinned. May be an icon? if (viewBarComponent != null) { viewBarComponent.getViewBar().getViewBanner().setPinned(pinned); } }
public void setShowViewBar(boolean b) { viewBarComponent.getViewBar().setVisible(b); }
public void addAction(Action action) { viewBar.addAction(action); } }
/** * Sets the text on the view header. This can be used to * override the label that is specified in the plugin.xml * file. * @param text The header text. */ public void setHeaderText(String text) { viewBarComponent.getViewBar().getViewBanner().setText(text); }