Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
123e9751c9 | |||
e1886e850b | |||
088578d34c |
@ -69,7 +69,7 @@
|
|||||||
<!-- Default configuration for running with: mvn clean javafx:run -->
|
<!-- Default configuration for running with: mvn clean javafx:run -->
|
||||||
<id>default-cli</id>
|
<id>default-cli</id>
|
||||||
<configuration>
|
<configuration>
|
||||||
<mainClass>com.example.doubledeckerbus/com.example.doubledeckerbus.FormBus
|
<mainClass>com.example.doubledeckerbus/com.example.doubledeckerbus.Form
|
||||||
</mainClass>
|
</mainClass>
|
||||||
<launcher>app</launcher>
|
<launcher>app</launcher>
|
||||||
<jlinkZipName>app</jlinkZipName>
|
<jlinkZipName>app</jlinkZipName>
|
||||||
|
@ -28,6 +28,8 @@ public class DrawingBus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void SetPosition(int x, int y, int width, int height) {
|
public void SetPosition(int x, int y, int width, int height) {
|
||||||
|
if (x < 0 || y < 0) return;
|
||||||
|
|
||||||
if (_pictureWidth <= _busWidth || _pictureHeight <= _busHeight) {
|
if (_pictureWidth <= _busWidth || _pictureHeight <= _busHeight) {
|
||||||
_pictureWidth = _null;
|
_pictureWidth = _null;
|
||||||
_pictureHeight = _null;
|
_pictureHeight = _null;
|
||||||
|
@ -7,10 +7,10 @@ import javafx.stage.Stage;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class FormBus extends Application {
|
public class Form extends Application {
|
||||||
@Override
|
@Override
|
||||||
public void start(Stage stage) throws IOException {
|
public void start(Stage stage) throws IOException {
|
||||||
FXMLLoader fxmlLoader = new FXMLLoader(FormBus.class.getResource("hello-view.fxml"));
|
FXMLLoader fxmlLoader = new FXMLLoader(Form.class.getResource("hello-view.fxml"));
|
||||||
Scene scene = new Scene(fxmlLoader.load());
|
Scene scene = new Scene(fxmlLoader.load());
|
||||||
stage.setTitle("DoubleDeckerBus");
|
stage.setTitle("DoubleDeckerBus");
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
Loading…
Reference in New Issue
Block a user