本文整理了Java中javafx.event.Event.fireEvent()
方法的一些代码示例,展示了Event.fireEvent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.fireEvent()
方法的具体详情如下:
包路径:javafx.event.Event
类名称:Event
方法名:fireEvent
暂无
代码示例来源: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
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: 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: jfoenixadmin/JFoenix
Event.fireEvent(JFXDialog.this, new JFXDialogEvent(JFXDialogEvent.OPENED)));
代码示例来源:origin: torakiki/pdfsam
@Override
public void commitEdit(String item) {
// This block is necessary to support commit on losing focus, because the baked-in mechanism
// sets our editing state to false before we can intercept the loss of focus.
// The default commitEdit(...) method simply bails if we are not editing...
if (!isEditing() && !item.equals(getItem())) {
TableView<SelectionTableRowData> table = getTableView();
if (table != null) {
TableColumn<SelectionTableRowData, String> column = getTableColumn();
CellEditEvent<SelectionTableRowData, String> event = new CellEditEvent<>(table,
new TablePosition<>(table, getIndex(), column), TableColumn.editCommitEvent(), item);
Event.fireEvent(column, event);
}
}
super.commitEdit(item);
setContentDisplay(ContentDisplay.TEXT_ONLY);
}
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
private void onMouseExited(MouseEvent event) {
Event.fireEvent(this.control, new TextHoverEvent(event, -1, -1, -1, "")); //$NON-NLS-1$
this.lastHover = null;
this.curHover = null;
}
代码示例来源:origin: org.controlsfx/controlsfx
private void onSuggestionChoosen(T suggestion){
if(suggestion != null) {
Event.fireEvent(control, new AutoCompletePopup.SuggestionEvent<>(suggestion));
}
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
private void onMousePressed(MouseEvent event) {
if (this.lastHover != null) {
Event.fireEvent(this.control, new TextHoverEvent(event, -1, -1, -1, "")); //$NON-NLS-1$
this.lastHover = null;
curHover = null;
}
}
代码示例来源:origin: org.controlsfx/controlsfx
protected void fireAutoCompletion(T completion){
Event.fireEvent(this, new AutoCompletionEvent<>(completion));
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
private void onMouseEvent(MouseEvent event) {
Event.fireEvent(this.textArea, new TextPositionEvent(event, computeCursorOffset(event)));
}
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
/**
* Invoke an action
*
* @param action
* the action
*/
protected void invokeAction(ActionType action) {
ActionEvent evt = new ActionEvent(getControl(), getControl(), action);
Event.fireEvent(getControl(), evt);
}
代码示例来源:origin: org.controlsfx/controlsfx
/**
* Occurs when a bread crumb gets the action event
*
* @param crumbModel The crumb which received the action event
*/
protected void onBreadCrumbAction(final TreeItem<T> crumbModel){
final BreadCrumbBar<T> breadCrumbBar = getSkinnable();
// fire the composite event in the breadCrumbBar
Event.fireEvent(breadCrumbBar, new BreadCrumbActionEvent<>(crumbModel));
// navigate to the clicked crumb
if(breadCrumbBar.isAutoNavigationEnabled()){
breadCrumbBar.setSelectedCrumb(crumbModel);
}
}
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
/**
*
*/
public void fireAction() {
Event.fireEvent(this, new MouseEvent(MouseEvent.MOUSE_CLICKED, this.getLayoutX(), this.getLayoutY(), this.getLayoutX(), this.getLayoutY(), MouseButton.PRIMARY, 1, true, true, true, true, true,
true, true, true, true, true, null));
}
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
private void openSelectedResources() {
Event.fireEvent(getSkinnable(), ResourceEvent.createOpenResource(
getSkinnable(), getSkinnable().getSelectedItems()));
}
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
private void openSelectedResources() {
Event.fireEvent(getSkinnable(), ResourceEvent.createOpenResource(
getSkinnable(), getSkinnable().getSelectedItems()));
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
private void openSelectedResources() {
Event.fireEvent(getSkinnable(), ResourceEvent.createOpenResource(
getSkinnable(), getSkinnable().getSelectedItems()));
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
private void openSelectedResources() {
Event.fireEvent(getSkinnable(), ResourceEvent.createOpenResource(
getSkinnable(), getSkinnable().getSelectedItems()));
}
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
private void openSelectedResources() {
Event.fireEvent(getSkinnable(), ResourceEvent.createOpenResource(getSkinnable(), getSkinnable().getSelectedItems()));
}
代码示例来源:origin: com.jfoenix/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: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
void handle_mouseDragged(MouseEvent e) {
if( DRAGGED_TAB == null ) {
return;
}
Node node = Util.findNode((Window)null, e.getScreenX(), e.getScreenY());
if (node != null) {
((Stage)node.getScene().getWindow()).toFront();
Event.fireEvent(node, new EFXDragEvent(this, node, EFXDragEvent.DRAG_OVER, e.getScreenX(),
e.getScreenY(), false));
} else {
EFXDragEvent.updateFeedbackLocation(e.getScreenX(), e.getScreenY());
}
}
内容来源于网络,如有侵权,请联系作者删除!