本文整理了Java中javafx.event.Event
类的一些代码示例,展示了Event
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event
类的具体详情如下:
包路径:javafx.event.Event
类名称:Event
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
private void closeDialog() {
resetProperties();
Event.fireEvent(JFXDialog.this, new JFXDialogEvent(JFXDialogEvent.CLOSED));
if (tempContent == null) {
dialogContainer.getChildren().remove(this);
} else {
dialogContainer.getChildren().setAll(tempContent);
}
}
代码示例来源:origin: jfoenixadmin/JFoenix
@Override
public EventType<? extends SnackbarEvent> getEventType() {
return (EventType<? extends SnackbarEvent>) super.getEventType();
}
代码示例来源:origin: com.gluonhq/connect
@Override
public GluonObservable getSource() {
return (GluonObservable) super.getSource();
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
* One click select, 2 clicks other.
*
* @param event
*/
public void handleRowSelection(Event event) {
if (checkBox.isVisible()) {
if (((MouseEvent) event).getClickCount() == 1 && !event.isConsumed()) {
final boolean selected = !checkBox.isSelected();
checkBox.setSelected(selected);
event.consume();
}
}
}
代码示例来源:origin: org.fxmisc.wellbehaved/wellbehavedfx
@Override
default void handle(T event) {
switch(process(event)) {
case CONSUME: event.consume(); break;
case PROCEED: /* do nothing */ break;
case IGNORE: /* do nothing */ break;
}
}
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.text
@Override
public LinkActionEvent copyFor(Object newSource, EventTarget newTarget) {
return (LinkActionEvent) super.copyFor(newSource, newTarget);
}
代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX
/**
* Loop over all event handlers and delegate the event to each one of them.
* If the event is consumed by one eventhandler the loop is broken.
* @param t event.
*/
@Override
public void handle(T t) {
for (EventHandler<T> eventHandler : eventHandlers) {
if (!t.isConsumed()) {
eventHandler.handle(t);
} else {
break;
}
}
}
}
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
public void handle(Event event) {
if (((Tab)event.getSource()).isSelected()){
form.show();
}
}
});
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
@Override
protected Void call() throws Exception {
boolean consumed = ev.isConsumed();
ev.consume();
String actionName = actionComponent.getPropertyValue("action");
String args = actionComponent.getPropertyValue("args");
代码示例来源:origin: org.drombler.commons/drombler-commons-docking-fx
public EventHandler<Event> createOnCloseRequestHandler(Tab tab, FXDockableEntry dockableEntry, DockingAreaPane dockingAreaPane) {
return event -> {
final FXDockableData dockableData = dockableEntry.getDockableData();
LOG.debug("Closing tab: {} ...", dockableData.getTitle());
closeRequest = new CloseRequest();
DockableCloseRequestEvent dockableCloseRequestEvent = new DockableCloseRequestEvent(dockableEntry, dockingAreaPane, dockingAreaPane);
dockingAreaPane.fireEvent(dockableCloseRequestEvent);
if (closeRequest.isStopClosingTab()) {
event.consume();
LOG.debug("onCloseRequest event consumed for: {}", dockableData.getTitle());
}
closeRequest = null;
};
}
代码示例来源:origin: org.drombler.commons/drombler-commons-docking-fx
@Override
public DockableCloseRequestEvent copyFor(Object newSource, EventTarget newTarget) {
DockableCloseRequestEvent event = (DockableCloseRequestEvent) super.copyFor(newSource, newTarget);
LOG.debug("DockableCloseRequestEvent copied for {} and {}", newSource, newTarget);
return event;
}
代码示例来源:origin: jfoenixadmin/JFoenix
private void showDialog() {
if (dialogContainer == null) {
throw new RuntimeException("ERROR: JFXDialog container is not set!");
}
if (isCacheContainer()) {
tempContent = new ArrayList<>(dialogContainer.getChildren());
SnapshotParameters snapShotparams = new SnapshotParameters();
snapShotparams.setFill(Color.TRANSPARENT);
WritableImage temp = dialogContainer.snapshot(snapShotparams,
new WritableImage((int) dialogContainer.getWidth(),
(int) dialogContainer.getHeight()));
ImageView tempImage = new ImageView(temp);
tempImage.setCache(true);
tempImage.setCacheHint(CacheHint.SPEED);
dialogContainer.getChildren().setAll(tempImage, this);
} else {
//prevent error if opening an already opened dialog
dialogContainer.getChildren().remove(this);
tempContent = null;
dialogContainer.getChildren().add(this);
}
if (animation != null) {
animation.play();
} else {
setVisible(true);
setOpacity(1);
Event.fireEvent(JFXDialog.this, new JFXDialogEvent(JFXDialogEvent.OPENED));
}
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.text
@Override
public EventType<? extends LinkActionEvent> getEventType() {
return (EventType<? extends LinkActionEvent>) super.getEventType();
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
controller = (FullTableViewController) actionRequest.getController();
Event event = (Event) actionRequest.getProperty("sourceEvent");
Node source = (Node) event.getSource();
OperationData roleB = (OperationData) actionRequest.getProperty("sourceData");
代码示例来源:origin: PhoenicisOrg/phoenicis
protected void setNextButtonAction(EventHandler<MouseEvent> nextButtonAction) {
nextButton.setOnMouseClicked(event -> {
nextButton.setDisable(true);
nextButtonAction.handle(event);
});
this.getParent().setOnCloseRequest(event -> {
if (this.messageWaitingForResponse != null) {
this.messageWaitingForResponse.sendCancelSignal();
}
event.consume();
});
}
代码示例来源:origin: jfoenixadmin/JFoenix
colorPicker.getCustomColors().add(customColor);
updateSelection(customColor);
Event.fireEvent(colorPicker, new ActionEvent());
colorPicker.hide();
});
colorPicker.getCustomColors().add(customColor);
updateSelection(customColor);
Event.fireEvent(colorPicker, new ActionEvent());
colorPicker.hide();
});
代码示例来源:origin: com.jfoenix/jfoenix
@Override
public EventType<? extends SnackbarEvent> getEventType() {
return (EventType<? extends SnackbarEvent>) super.getEventType();
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
protected void processDeletion(IActionRequest actionRequest, Optional<IActionResult> previousActionResult) {
OperationData roleB = (OperationData) actionRequest.getProperty("sourceData");
Event event = (Event) actionRequest.getProperty("sourceEvent");
Node source = (Node) event.getSource();
AbstractTableStructure table = (AbstractTableStructure) controller.processedElement();
代码示例来源:origin: jfoenixadmin/JFoenix
Event.fireEvent(JFXDialog.this, new JFXDialogEvent(JFXDialogEvent.OPENED)));
代码示例来源:origin: org.drombler.commons/drombler-commons-docking-fx
@Override
public EventType<? extends DockableCloseRequestEvent> getEventType() {
return (EventType<? extends DockableCloseRequestEvent>) super.getEventType();
}
内容来源于网络,如有侵权,请联系作者删除!