@Override
public Event dispatchEvent(Event event, EventDispatchChain tail) {
KeyEvent keyE = (KeyEvent) event;
// 저장키를 누른경우 * 탭명에 *을 지우기 위한 작업처리
String text2 = getText();
if (keyE != null) {
if (KeyCode.O == keyE.getCode() && keyE.isControlDown() && !keyE.isAltDown() && !keyE.isShiftDown()) {
miOenOnAction(new ActionEvent());
keyE.consume();
} else if (KeyCode.S == keyE.getCode() && keyE.isControlDown() && !keyE.isAltDown() && !keyE.isShiftDown()) {
muSaveOnAction(new ActionEvent());
keyE.consume();
}
}
if (!text2.contains("*"))
setText(text2 + "*");
// }
return event;
}
java类javafx.event.EventDispatchChain的实例源码
SqlTab.java 文件源码
项目:Gargoyle
阅读 25
收藏 0
点赞 0
评论 0
Calendar.java 文件源码
项目:CalendarFX
阅读 25
收藏 0
点赞 0
评论 0
@Override
public final EventDispatchChain buildEventDispatchChain(EventDispatchChain givenTail) {
return givenTail.append((event, tail) -> {
if (event instanceof CalendarEvent) {
for (EventHandler<CalendarEvent> handler : eventHandlers) {
handler.handle((CalendarEvent) event);
}
}
return event;
});
}
GoogleMapScene.java 文件源码
项目:travelimg
阅读 16
收藏 0
点赞 0
评论 0
@Override
public Event dispatchEvent(Event event, EventDispatchChain tail) {
if (event instanceof MouseEvent) {
MouseEvent mouseEvent = (MouseEvent) event;
//workaround to deny doubleclicks. this is
// a jdk related bug: https://bugs.openjdk.java.net/browse/JDK-8092649
if(mouseEvent.getClickCount()>=2){
mouseEvent.consume();
}
}
return originalDispatcher.dispatchEvent(event, tail);
}
WebEventDispatcher.java 文件源码
项目:mars-sim
阅读 20
收藏 0
点赞 0
评论 0
@Override
public Event dispatchEvent(Event event, EventDispatchChain tail) {
if (event instanceof MouseEvent){
MouseEvent m = (MouseEvent)event;
if (event.getEventType().equals(MouseEvent.MOUSE_CLICKED) ||
event.getEventType().equals(MouseEvent.MOUSE_PRESSED)) {
Point2D origin = new Point2D(m.getX(),m.getY());
if (limit != null)
allowDrag = !(origin.getX() < limit.getX() && origin.getY() < limit.getY());
}
// avoid selection with mouse dragging, allowing dragging the scrollbars
if (event.getEventType().equals(MouseEvent.MOUSE_DRAGGED)) {
if(!allowDrag){
event.consume();
}
}
// Avoid selection of word, line, paragraph with mouse click
if(m.getClickCount() > 1){
event.consume();
}
}
if (event instanceof KeyEvent && event.getEventType().equals(KeyEvent.KEY_PRESSED)){
KeyEvent k = (KeyEvent)event;
// Avoid copy with Ctrl+C or Ctrl+Insert
if((k.getCode().equals(KeyCode.C) || k.getCode().equals(KeyCode.INSERT)) && k.isControlDown()){
event.consume();
}
// Avoid selection with shift+Arrow
if(k.isShiftDown() && (k.getCode().equals(KeyCode.RIGHT) || k.getCode().equals(KeyCode.LEFT) ||
k.getCode().equals(KeyCode.UP) || k.getCode().equals(KeyCode.DOWN))){
event.consume();
}
}
return oldDispatcher.dispatchEvent(event, tail);
}
GoogleMapView.java 文件源码
项目:GMapsFX
阅读 18
收藏 0
点赞 0
评论 0
@Override
public Event dispatchEvent(Event event, EventDispatchChain tail) {
if (event instanceof MouseEvent) {
MouseEvent mouseEvent = (MouseEvent) event;
if (mouseEvent.getClickCount() > 1) {
if (disableDoubleClick) {
mouseEvent.consume();
}
}
}
return originalDispatcher.dispatchEvent(event, tail);
}
LocalGame.java 文件源码
项目:Suji
阅读 17
收藏 0
点赞 0
评论 0
@Override
public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail) {
return publisher.buildEventDispatchChain(tail);
}
SpectatorGameHandler.java 文件源码
项目:Suji
阅读 20
收藏 0
点赞 0
评论 0
@Override
public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail) {
return publisher.buildEventDispatchChain(tail);
}
AbstractFxVoAutoCompletionBinding.java 文件源码
项目:Gargoyle
阅读 19
收藏 0
点赞 0
评论 0
/** {@inheritDoc} */
@Override
public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail) {
return tail.prepend(eventHandlerManager);
}
DockTab.java 文件源码
项目:Gargoyle
阅读 20
收藏 0
点赞 0
评论 0
/**
* @treatAsPrivate implementation detail
* @deprecated This is an internal API that is not intended for use and will be removed in the next version
*/
@Override
public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail) {
return tail.prepend(eventHandlerManager);
}
GitDialog.java 文件源码
项目:JGitFX
阅读 16
收藏 0
点赞 0
评论 0
@Override
public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail) {
return dialog.buildEventDispatchChain(tail);
}
CustomEventDispatcher.java 文件源码
项目:Gamma-Music-Manager
阅读 18
收藏 0
点赞 0
评论 0
/**
* Override the default collapse/expand behaviour of TreeViewItems, only show content in center panel
* @param event
* @param tail
* @return dispatch event
*/
@Override
public Event dispatchEvent(Event event, EventDispatchChain tail) {
if (event instanceof MouseEvent) {
MouseEvent mouseEvent = (MouseEvent) event;
boolean isPrimaryMouseButton = mouseEvent.getButton() == MouseButton.PRIMARY;
boolean isDoubleClick = mouseEvent.getClickCount() == 2;
if (isPrimaryMouseButton && isDoubleClick) {
if (!event.isConsumed()) {
if (m_selectedItem != null) {
boolean isFolder = m_selectedItem.getFile().isDirectory();
//Only notify center panel if this is a left panel and if this is a directory
if (m_isLeftPane && isFolder) {
System.out.println("Selected Item: " + m_selectedItem);
m_model.setM_selectedCenterFolder(m_selectedItem.getFile());
m_model.notifyCenterFolderObservers();
} else if (!isFolder) {
Song songToPlay = (Song) m_selectedItem;
if (!songToPlay.equals(m_musicPlayerManager.getCurrentSongPlaying())) {
m_musicPlayerManager.playSongRightNow(songToPlay);
}
}
}
}
event.consume();
} /*else if (mouseEvent.isControlDown() && mouseEvent.isPrimaryButtonDown()) {
if (!event.isConsumed()) {
if (m_selectedItem instanceof Song) {
Song songSelected = (Song) m_selectedItem;
if (m_playbackContextMenuInstance != null) {
m_playbackContextMenuInstance.hide();
}
m_playbackContextMenuInstance = MusicPlayerHistoryUI.createSubmenu(m_musicPlayerManager, songSelected);
m_playbackContextMenuInstance.show(m_tree, mouseEvent.getScreenX(), mouseEvent.getScreenY());
}
}
event.consume();
}*/
}
return m_originalDispatcher.dispatchEvent(event, tail);
}
JFXAlert.java 文件源码
项目:JFoenix
阅读 79
收藏 0
点赞 0
评论 0
/**
* {@inheritDoc}
*/
@Override
public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail) {
return super.buildEventDispatchChain(tail).prepend(eventHandlerManager);
}
AutoCompletePopup.java 文件源码
项目:javafx-widgets
阅读 18
收藏 0
点赞 0
评论 0
@Override
public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail) {
return super.buildEventDispatchChain(tail).append(eventHandlerManager);
}
AutoCompletionBinding.java 文件源码
项目:javafx-widgets
阅读 30
收藏 0
点赞 0
评论 0
@Override
public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail) {
return tail.prepend(eventHandlerManager);
}
InputFieldSkin.java 文件源码
项目:botcoin
阅读 17
收藏 0
点赞 0
评论 0
@Override public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail) {
EventDispatchChain chain = new EventDispatchChainImpl();
chain.append(textField.getEventDispatcher());
return chain;
}