use of javax.swing.JToolBar in project lotro-companion by dmorcellet.
the class AccountsManagementController method buildPanel.
private JPanel buildPanel() {
JPanel ret = GuiFactory.buildBackgroundPanel(new BorderLayout());
_toolbar = buildToolBar();
JToolBar toolbar = _toolbar.getToolBar();
ret.add(toolbar, BorderLayout.NORTH);
_accountsTable = buildToonsTable();
JTable table = _accountsTable.getTable();
JScrollPane scroll = GuiFactory.buildScrollPane(table);
ret.add(scroll, BorderLayout.CENTER);
return ret;
}
use of javax.swing.JToolBar in project cytoscape-impl by cytoscape.
the class TableBrowserToolBar method getToolBar.
private JToolBar getToolBar() {
if (toolBar == null) {
toolBar = new JToolBar();
toolBar.setFloatable(false);
toolBar.setOrientation(JToolBar.HORIZONTAL);
toolBar.setOpaque(!isAquaLAF());
final GroupLayout layout = new GroupLayout(toolBar);
toolBar.setLayout(layout);
hToolBarGroup = layout.createSequentialGroup();
vToolBarGroup = layout.createParallelGroup(Alignment.CENTER, false);
// Layout information.
layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(hToolBarGroup));
layout.setVerticalGroup(vToolBarGroup);
}
return toolBar;
}
use of javax.swing.JToolBar in project WorldPainter by Captain-Chaos.
the class AKDockLayout method flipSeparators.
private void flipSeparators(Component c, int orientn) {
if (c != null && c instanceof JToolBar && UIManager.getLookAndFeel().getName().toLowerCase().indexOf("windows") != -1) {
JToolBar jtb = (JToolBar) c;
Component[] comps = jtb.getComponents();
if (comps != null && comps.length > 0) {
for (int i = 0; i < comps.length; i++) {
try {
Component component = comps[i];
if (component != null) {
if (component instanceof JSeparator) {
jtb.remove(component);
JSeparator separ = new JSeparator();
if (orientn == SwingConstants.VERTICAL) {
separ.setOrientation(SwingConstants.VERTICAL);
separ.setMinimumSize(new Dimension(2, 6));
separ.setPreferredSize(new Dimension(2, 6));
separ.setMaximumSize(new Dimension(2, 100));
} else {
separ.setOrientation(SwingConstants.HORIZONTAL);
separ.setMinimumSize(new Dimension(6, 2));
separ.setPreferredSize(new Dimension(6, 2));
separ.setMaximumSize(new Dimension(100, 2));
}
jtb.add(separ, i);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
}
use of javax.swing.JToolBar in project gephi by gephi.
the class RendererManager method refresh.
private void refresh() {
panel.removeAll();
loadModelManagedRenderers();
// Show renderers in inverse execution order to make it intuitive for users (last executed renderers remain on top of the image)
for (int i = renderersList.size() - 1; i >= 0; i--) {
JToolBar bar = new JToolBar();
bar.setFloatable(false);
if (UIUtils.isAquaLookAndFeel()) {
bar.setBackground(UIManager.getColor("NbExplorerView.background"));
}
bar.add(new MoveRendererButton(i, true));
bar.add(new MoveRendererButton(i, false));
bar.add(renderersList.get(i));
panel.add(bar, "wrap");
}
panel.updateUI();
}
use of javax.swing.JToolBar in project activityinfo by bedatadriven.
the class AdminListWindow method addToolBar.
private void addToolBar() {
final JButton exportButton = new JButton("Export");
exportButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
TableExporter.export(tableModel, exportButton);
}
});
JToolBar toolBar = new JToolBar();
toolBar.setFloatable(false);
toolBar.add(exportButton);
toolBar.addSeparator();
getContentPane().add(toolBar, BorderLayout.PAGE_START);
}
Aggregations