Skip to content

Commit

Permalink
few more spacing and sizing adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
olbris committed May 6, 2024
1 parent b64bb12 commit 68179be
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private void setupUI() {

mainPanel.setLayout(new GridBagLayout());

// ----- workspace information; show name, whatever attributes
// ----- WORKSPACE information; show name, whatever attributes
workspaceInfoPanel = new WorkspaceInfoPanel();
GridBagConstraints cTop = new GridBagConstraints();
cTop.gridx = 0;
Expand Down Expand Up @@ -291,6 +291,7 @@ public void itemStateChanged(ItemEvent itemEvent) {
workspaceToolButton.setIcon(gearIcon);
workspaceToolButton.setHideActionText(true);
workspaceToolButton.setMinimumSize(workspaceButtonsPanel.getPreferredSize());
workspaceButtonsPanel.add(Box.createRigidArea(new Dimension(5, 0)));
workspaceButtonsPanel.add(workspaceToolButton);
workspaceToolButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ev) {
Expand All @@ -300,10 +301,11 @@ public void actionPerformed(ActionEvent ev) {
}
});

// VIEWS area
// ----- VIEWS area
JLabel viewLabel = new JLabel("VIEWS", JLabel.LEADING);
Font font = viewLabel.getFont();
viewLabel.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
viewLabel.setFont(new Font(font.getName(), Font.BOLD, font.getSize() + 2));
mainPanel.add(Box.createRigidArea(new Dimension(0, 30)), cVert);
mainPanel.add(viewLabel, cVert);
JPanel viewButtonsPanel = new JPanel();
viewButtonsPanel.setLayout(new BoxLayout(viewButtonsPanel, BoxLayout.LINE_AXIS));
Expand Down Expand Up @@ -368,7 +370,8 @@ public void actionPerformed(ActionEvent e) {
locationPanel.add(gotoLocationButton);


// list of neurons in workspace
// ----- list of NEURONS in workspace
mainPanel.add(Box.createRigidArea(new Dimension(0, 20)), cVert);
workspaceNeuronList = new WorkspaceNeuronList(width);
mainPanel.add(workspaceNeuronList, cVert);

Expand Down Expand Up @@ -507,6 +510,7 @@ public void actionPerformed(ActionEvent actionEvent) {
createNeuronButtonPlus.setAction(createNeuronAction);

JButton deleteNeuronButton = new JButton("Remove");
neuronButtonsPanel.add(Box.createRigidArea(new Dimension(5, 0)));
neuronButtonsPanel.add(deleteNeuronButton);
deleteNeuronAction.putValue(Action.NAME, "Remove");
deleteNeuronAction.putValue(Action.SHORT_DESCRIPTION, "Remove current neuron");
Expand All @@ -520,6 +524,7 @@ public void actionPerformed(ActionEvent actionEvent) {
neuronToolButton.setIcon(gearIcon);
neuronToolButton.setHideActionText(true);
neuronToolButton.setMinimumSize(neuronButtonsPanel.getPreferredSize());
neuronButtonsPanel.add(Box.createRigidArea(new Dimension(5, 0)));
neuronButtonsPanel.add(neuronToolButton);
neuronToolButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ev) {
Expand All @@ -530,7 +535,7 @@ public void actionPerformed(ActionEvent ev) {
});


// ----- interesting annotations
// ----- interesting ANNOTATIONS
mainPanel.add(Box.createRigidArea(new Dimension(0, 20)), cVert);
filteredList = FilteredAnnotationList.createInstance(neuronManager, width);
mainPanel.add(filteredList, cVert);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,7 @@
import org.janelia.workstation.controller.model.annotations.neuron.InterestingAnnotation;
import org.janelia.workstation.controller.model.annotations.neuron.PredefinedNote;

import javax.swing.AbstractAction;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.RowFilter;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.table.DefaultTableCellRenderer;
Expand Down Expand Up @@ -349,10 +340,9 @@ private void setupUI() {
c.insets = new Insets(10, 0, 0, 0);
c.weightx = 1.0;
c.weighty = 0.0;
//mainLabel = new JLabel("Annotations", JLabel.LEADING);
mainLabel = new JLabel("ANNOTATIONS", JLabel.LEADING);
Font font = mainLabel.getFont();
mainLabel.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
mainLabel.setFont(new Font(font.getName(), Font.BOLD, font.getSize() + 2));
add(mainLabel, c);

// table
Expand Down Expand Up @@ -460,10 +450,15 @@ public void actionPerformed(ActionEvent e) {
JButton reviewButton = new JButton();
JButton unique1Button = new JButton();
JButton unique2Button = new JButton();
filterButtons.add(Box.createRigidArea(new Dimension(5, 0)));
filterButtons.add(endsButton);
filterButtons.add(Box.createRigidArea(new Dimension(5, 0)));
filterButtons.add(branchButton);
filterButtons.add(Box.createRigidArea(new Dimension(5, 0)));
filterButtons.add(reviewButton);
filterButtons.add(Box.createRigidArea(new Dimension(5, 0)));
filterButtons.add(unique1Button);
filterButtons.add(Box.createRigidArea(new Dimension(5, 0)));
filterButtons.add(unique2Button);

GridBagConstraints c4 = new GridBagConstraints();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ private void setupUI() {

titleLabel = new JLabel("WORKSPACE", JLabel.LEADING);
Font font = titleLabel.getFont();
titleLabel.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
titleLabel.setFont(new Font(font.getName(), Font.BOLD, font.getSize() + 2));


// workspace information; show name, whatever attributes
add(titleLabel);
add(Box.createRigidArea(new Dimension(0, 10)));

workspaceNameLabel = new JLabel("", JLabel.LEADING);
add(workspaceNameLabel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.table.AbstractTableModel;
Expand Down Expand Up @@ -122,7 +123,7 @@ private void setupUI() {
c.insets = new Insets(10, 0, 0, 0);
neuronLabel =new JLabel("NEURON THINGS", JLabel.LEADING);
Font font = neuronLabel.getFont();
neuronLabel.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
neuronLabel.setFont(new Font(font.getName(), Font.BOLD, font.getSize() + 2));
add(neuronLabel, c);


Expand Down Expand Up @@ -357,6 +358,7 @@ protected void doubleLeftClicked(MouseEvent me) {
// in here from AnnotationPanel
buttonPanel = new JPanel();
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
buttonPanel.setBorder(new EmptyBorder(10, 10, 10, 10));
add(buttonPanel, c3);

// text field for filter
Expand Down

0 comments on commit 68179be

Please sign in to comment.