JCheckBox pointCheckButton;
public Component getGUI() {
if (panel == null) {
panel = new JPanel();
GridBagLayout gridbag = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
panel.setLayout(gridbag);
c.gridx = GridBagConstraints.REMAINDER;
c.weightx = 1.0;
c.insets = new Insets(1, 5, 1, 5);
c.fill = GridBagConstraints.HORIZONTAL;
JPanel daPanel1 = PaletteHelper.createHorizontalPanel("Paint Settings for Shapes");
daPanel1.add(shapeDA.getGUI());
JPanel daPanel2 = PaletteHelper.createHorizontalPanel("Paint Settings for Intersected Shapes");
daPanel2.add(shapeDASelected.getGUI());
gridbag.setConstraints(daPanel1, c);
gridbag.setConstraints(daPanel2, c);
panel.add(daPanel1);
panel.add(daPanel2);
c.weighty = 1.0;
c.fill = GridBagConstraints.BOTH;
JPanel tablePanel = getFileListControl();
gridbag.setConstraints(tablePanel, c);
panel.add(tablePanel);
JPanel checkPanel = new JPanel();
GridBagLayout gb = new GridBagLayout();
checkPanel.setLayout(gb);
GridBagConstraints c2 = new GridBagConstraints();
c2.anchor = GridBagConstraints.WEST;
c2.gridx = GridBagConstraints.REMAINDER;
showCrossingsButton = new JCheckBox("Show Crossing Points", showCrossingPoints);
showCrossingsButton.setToolTipText("<html>Show ordered points where drawn lines cross Shapes.");
showCrossingsButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
setShowCrossingPoints(((JCheckBox) ae.getSource()).isSelected());
doPrepare();
}
});
gb.setConstraints(showCrossingsButton, c2);
checkPanel.add(showCrossingsButton);
pointCheckButton = new JCheckBox("Click Creates Image Mask", showCrossingPoints);
pointCheckButton.setToolTipText("<html>When clicking on Shape, create image mask that shows Geo point<br>intersection vs. Java 2D. Green is good.");
pointCheckButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
setCreatePointCheck(((JCheckBox) ae.getSource()).isSelected());
doPrepare();
}
});
gb.setConstraints(pointCheckButton, c2);
checkPanel.add(pointCheckButton);
c.weightx = 0;
c.weighty = 0;
c.fill = GridBagConstraints.NONE;