one pass on layout
build.xml exclude javafx ( remark lost with doit.sh ant ).
This commit is contained in:
@@ -190,18 +190,21 @@ public class Display extends JFrame
|
||||
}
|
||||
});
|
||||
add(buttonCreate);
|
||||
JLabel widthLabel = new JLabel("width");
|
||||
textWidth = new JTextField("0" + params.getWidth());
|
||||
add(widthLabel);
|
||||
add(textWidth);
|
||||
JLabel heightLabel = new JLabel("height");
|
||||
textHeight = new JTextField("0" + params.getHeight());
|
||||
add(heightLabel);
|
||||
add(textHeight);
|
||||
JLabel depthLabel = new JLabel("depth");
|
||||
textDepth = new JTextField("0" + params.getMaxDepth());
|
||||
add(depthLabel);
|
||||
add(textDepth);
|
||||
if ( params != null )
|
||||
{
|
||||
JLabel widthLabel = new JLabel("width");
|
||||
textWidth = new JTextField("0" + params.getWidth());
|
||||
add(widthLabel);
|
||||
add(textWidth);
|
||||
JLabel heightLabel = new JLabel("height");
|
||||
textHeight = new JTextField("0" + params.getHeight());
|
||||
add(heightLabel);
|
||||
add(textHeight);
|
||||
JLabel depthLabel = new JLabel("depth");
|
||||
textDepth = new JTextField("0" + params.getMaxDepth());
|
||||
add(depthLabel);
|
||||
add(textDepth);
|
||||
}
|
||||
}
|
||||
|
||||
public MazeParams getParams()
|
||||
@@ -284,11 +287,13 @@ public class Display extends JFrame
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private MazeSettings settings = null;
|
||||
|
||||
|
||||
private JPanel resizecontrol = null;
|
||||
|
||||
public MazeControler(MazeParams params)
|
||||
{
|
||||
controlPanel = new JPanel();
|
||||
super(new BorderLayout());
|
||||
controlPanel = new JPanel(new BorderLayout());
|
||||
settings = new MazeSettings(params);
|
||||
JButton button = new JButton("Resolve");
|
||||
button.addActionListener(new ActionListener()
|
||||
@@ -350,7 +355,7 @@ public class Display extends JFrame
|
||||
};
|
||||
JButton south = addDirection(this, "South", "DOWN", goSouth);
|
||||
|
||||
add(button, BorderLayout.CENTER);
|
||||
controlPanel.add(button, BorderLayout.CENTER);
|
||||
controlPanel.add(north, BorderLayout.NORTH);
|
||||
controlPanel.add(west, BorderLayout.WEST);
|
||||
controlPanel.add(east, BorderLayout.EAST);
|
||||
@@ -359,7 +364,7 @@ public class Display extends JFrame
|
||||
|
||||
// control display panel contains controls for display
|
||||
// zoom , autozoom.
|
||||
final JPanel controlDisplayPanel = new JPanel();
|
||||
final JPanel controlDisplayPanel = new JPanel(new BorderLayout());
|
||||
final JSlider slider = new JSlider(2, 40);
|
||||
slider.addChangeListener(new ChangeListener()
|
||||
{
|
||||
@@ -386,11 +391,14 @@ public class Display extends JFrame
|
||||
}
|
||||
};
|
||||
savePngButton.addActionListener(savePngAction);
|
||||
controlDisplayPanel.add(slider, BorderLayout.WEST);
|
||||
controlDisplayPanel.add(autoSlide, BorderLayout.EAST);
|
||||
controlDisplayPanel.add(savePngButton, BorderLayout.SOUTH);
|
||||
|
||||
resizecontrol = new JPanel();
|
||||
resizecontrol.add(slider, BorderLayout.WEST);
|
||||
resizecontrol.add(autoSlide, BorderLayout.EAST);
|
||||
resizecontrol.add(savePngButton, BorderLayout.SOUTH);
|
||||
|
||||
add(controlDisplayPanel, BorderLayout.SOUTH);
|
||||
add(resizecontrol,BorderLayout.WEST);
|
||||
add(settings,BorderLayout.EAST);
|
||||
}
|
||||
|
||||
@@ -399,6 +407,11 @@ public class Display extends JFrame
|
||||
return this;
|
||||
}
|
||||
|
||||
private JPanel getResizeControl()
|
||||
{
|
||||
return resizecontrol;
|
||||
}
|
||||
|
||||
private JPanel getGenerationControl()
|
||||
{
|
||||
return settings;
|
||||
|
||||
Reference in New Issue
Block a user