one pass on layout

build.xml exclude javafx ( remark lost with doit.sh ant ).
This commit is contained in:
philippe lhardy
2017-11-18 18:33:19 +01:00
parent e429919005
commit 8f234bb41b
3 changed files with 38 additions and 23 deletions

View File

@@ -17,7 +17,9 @@
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}"/>
<javac srcdir="${src}" destdir="${build}" includeantruntime="false">
<exclude name="org/artisanlogiciel/games/javafx/*"/>
</javac>
</target>
<target name="dist" depends="compile"
@@ -25,8 +27,8 @@
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
<!-- Put everything in ${build} into the artloglaby-0.0.1.jar file ( ${DSTAMP} not used yet )-->
<jar jarfile="${dist}/lib/artloglaby-0.0.1.jar" basedir="${build}">
<!-- Put everything in ${build} into the artloglaby-0.1.jar file ( ${DSTAMP} not used yet )-->
<jar jarfile="${dist}/lib/artloglaby-0.1.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="org.artisanlogiciel.games.Display"/>
</manifest>

View File

@@ -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;

View File

@@ -3,5 +3,5 @@ project_default=dist
project_basedir=$(pwd)
project_mainpackage=org.artisanlogiciel.games
project_mainclass=$project_mainpackage.Display
project_version=0.0.1
project_version=0.1
default_args='lab/lab30x30.raw'