use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class PeriodBoxExam method start.
/* (non-Javadoc)
* @see javafx.application.Application#start(javafx.stage.Stage)
*/
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane pane = new BorderPane();
PeriodBoxComposite value = new PeriodBoxComposite();
JFXDateTimePicker timePicker = new JFXDateTimePicker();
Button btnGet = new Button("Get");
pane.setBottom(btnGet);
pane.setCenter(value);
pane.setTop(timePicker);
primaryStage.setScene(new Scene(pane));
primaryStage.show();
btnGet.setOnAction(ev -> {
System.out.println(value.getStartDay());
System.out.println(value.getStartDate());
System.out.println(value.getStartTime());
});
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class VelocityDocumentExam method start.
/* (non-Javadoc)
* @see javafx.application.Application#start(javafx.stage.Stage)
*/
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane pane = new BorderPane();
TextArea root = new TextArea();
TextArea btm = new TextArea();
SplitPane splitPane = new SplitPane(root, btm);
splitPane.setDividerPosition(0, 0.6d);
splitPane.setOrientation(Orientation.VERTICAL);
pane.setCenter(splitPane);
Button value = new Button("Excute");
pane.setBottom(value);
value.setOnAction(ev -> {
String velocityToText = ValueUtil.getVelocityToText(root.getText(), new HashMap<String, Object>(), false);
btm.setText(velocityToText);
});
primaryStage.setScene(new Scene(pane));
primaryStage.show();
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class SqlTabPanExample method start.
@Override
public void start(Stage primaryStage) throws NotYetSupportException, GargoyleConnectionFailException, InstantiationException, IllegalAccessException, ClassNotFoundException {
primaryStage.setTitle("Database Exam");
CommonsSqllPan sqlPane = CommonsSqllPan.getSqlPane();
sqlPane.getStylesheets().add(SkinManager.getInstance().getSkin());
BorderPane root = new BorderPane(sqlPane);
Menu menu = new Menu("Exam");
MenuItem e = new MenuItem("exam");
e.setOnAction(System.out::println);
e.setAccelerator(new KeyCodeCombination(KeyCode.E, KeyCombination.CONTROL_DOWN));
menu.getItems().add(e);
root.setTop(new MenuBar(menu));
primaryStage.setScene(new Scene(root, 1100, 700));
primaryStage.show();
// Application.setUserAgentStylesheet(Application.STYLESHEET_MODENA);
// DockPane.initializeDefaultUserAgentStylesheet();
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class JavaCodeAreaHelper method doPmd.
/**
* PMD 처리
* @작성자 : KYJ
* @작성일 : 2016. 10. 12.
*/
private void doPmd() {
PMDCheckedListComposite pmdCheckedListComposite = new PMDCheckedListComposite(null) {
@Override
public void run() {
simpleFilePmd(null);
}
@Override
protected void simpleFilePmd(File file) {
try {
GargoylePMDParameters params = new GargoylePMDParameters();
String sourceCode = codeArea.getText();
params.setSourceFileName("Java");
params.setSourceText(sourceCode);
// if (!FileUtil.isJavaFile(file)) {
// String fileExtension = FileUtil.getFileExtension(file);
// try {
// Field declaredField = PMDParameters.class.getDeclaredField("language");
// if (declaredField != null) {
// declaredField.setAccessible(true);
// declaredField.set(params, fileExtension);
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
// transformParametersIntoConfiguration(params);
long start = System.nanoTime();
doPMD.doPMD(transformParametersIntoConfiguration(params), reportListenerPropertyProperty().get(), violationCountingListenerProperty().get());
long end = System.nanoTime();
Benchmarker.mark(Benchmark.TotalPMD, end - start, 0);
TextReport report = new TextReport();
try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
report.generate(Benchmarker.values(), new PrintStream(out));
out.flush();
LOGGER.debug(out.toString("UTF-8"));
}
updateStatus(sourceCode);
} catch (IOException e) {
LOGGER.error(ValueUtil.toString(e));
}
}
};
pmdCheckedListComposite.run();
CloseableParent<BorderPane> closa = pmdCheckedListComposite;
Consumer<Stage> option = stage -> {
stage.setTitle("PMD Check.");
stage.initOwner(SharedMemory.getPrimaryStage());
stage.setWidth(1200d);
stage.setHeight(800d);
};
FxUtil.createStageAndShow(closa, option);
}
use of javafx.scene.layout.BorderPane in project Gargoyle by callakrsos.
the class NrchRealtimeSrchFlowComposite method init.
protected void init() {
lblRequestTime.setMaxHeight(Double.MAX_VALUE);
choWaitItems = new ChoiceBox<>(FXCollections.observableArrayList("", "5", "10", "15", "20", "25", "30"));
Button btnReload = new Button("Reload");
HBox hboxItems = new HBox(5, /* choWaitItems, new Label("단위 (초)"), chkTimer, */
btnReload, lblRequestTime);
hboxItems.setAlignment(Pos.CENTER_LEFT);
hboxItems.setPadding(new Insets(5));
BorderPane borTop = new BorderPane();
Button btnStart = new Button("시작");
Button btnStop = new Button("중지");
btnStart.setDisable(true);
btnStop.setDisable(true);
borTop.setTop(new TitledPane("Timer", new HBox(5, choWaitItems, btnStart, btnStop)));
borTop.setCenter(hboxItems);
this.getParent().setTop(borTop);
btnReload.setOnAction(ev -> {
reload();
});
choWaitItems.valueProperty().addListener((oba, o, n) -> {
if (ValueUtil.isNotEmpty(n) && !isRecycle.get()) {
btnStart.setDisable(false);
} else {
btnStart.setDisable(true);
}
});
btnStart.setOnAction(e -> {
isRecycle.set(true);
service.restart();
btnStart.setDisable(true);
btnStop.setDisable(false);
});
btnStop.setOnAction(e -> {
isRecycle.set(false);
service.cancel();
btnStart.setDisable(false);
btnStop.setDisable(true);
});
isRecycle.addListener((oba, o, n) -> {
if (n) {
choWaitItems.setDisable(true);
} else {
choWaitItems.setDisable(false);
}
});
defineService();
try {
service.setExecutor(gargoyleThreadExecutors);
service.start();
} catch (RejectedExecutionException e) {
if (gargoyleThreadExecutors.isShutdown() || gargoyleThreadExecutors.isTerminated()) {
gargoyleThreadExecutors = ExecutorDemons.newFixedThreadExecutor(REALTIME_SRCH_THREAD_POOL_NAME, 1);
service.setExecutor(gargoyleThreadExecutors);
}
LOGGER.error(ValueUtil.toString(e));
// One more time.
defineService();
service.start();
}
// reload();
}
Aggregations