Skip to content

Commit

Permalink
Fixed issue when setting look and feel
Browse files Browse the repository at this point in the history
Fixed issue where board spec had zero height
Fixed issue where wrong control point was selected from control point info
Cleanup
  • Loading branch information
HavardNJ committed Jan 3, 2022
1 parent c2b0818 commit 23ff0ce
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 131 deletions.
19 changes: 0 additions & 19 deletions src/boardcad/ToDo

This file was deleted.

32 changes: 14 additions & 18 deletions src/boardcad/gui/jdk/BoardCAD.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public String getQuadViewActiveName() {

private BoardSpec mBoardSpec;

private JPanel panel;
private JPanel mBoardSpecPanel;

private ControlPointInfo mControlPointInfo;

Expand Down Expand Up @@ -2064,32 +2064,28 @@ public void onNewPluginComponent(JComponent component) {
mMenuBar.add(pluginMenu);
}

mTabbedPane2 = new JTabbedPane(SwingConstants.BOTTOM);

panel = new JPanel();

panel.setLayout(new BorderLayout());

panel.add(mStatusPanel, BorderLayout.NORTH);
mBoardSpecPanel = new JPanel();
mBoardSpecPanel.setLayout(new BorderLayout());
mBoardSpecPanel.add(mStatusPanel, BorderLayout.NORTH);

mControlPointInfo = new ControlPointInfo();
panel.add(mControlPointInfo, BorderLayout.EAST);
mBoardSpecPanel.add(mControlPointInfo, BorderLayout.EAST);

mBoardSpec = new BoardSpec();
panel.add(mBoardSpec, BorderLayout.WEST);
mBoardSpecPanel.add(mBoardSpec, BorderLayout.WEST);

mTabbedPane2 = new JTabbedPane(SwingConstants.BOTTOM);
mTabbedPane2.addTab("Board specification", panel);
mTabbedPane2 = new JTabbedPane(SwingConstants.BOTTOM){
public Dimension getPreferredSize() {
return new Dimension(600, 230);
}
};
mTabbedPane2.addTab("Board specification", mBoardSpecPanel);

mSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, mTabbedPane, mTabbedPane2);
mSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true, mTabbedPane, mTabbedPane2);
mSplitPane.setResizeWeight(1.0);
mSplitPane.setOneTouchExpandable(true);
mSplitPane.setDividerLocation(0.7);
mFrame.getContentPane().add(mSplitPane, BorderLayout.CENTER);
Dimension mindim = new Dimension(0, 0);
mTabbedPane.setMinimumSize(mindim);
mTabbedPane2.setMinimumSize(mindim);
mTabbedPane.setPreferredSize(new Dimension(600, 230));
mTabbedPane2.setPreferredSize(new Dimension(600, 230));

KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);

Expand Down
Loading

0 comments on commit 23ff0ce

Please sign in to comment.