- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试为我们的项目创建一个状态栏。我想要发生的是每当主阶段被模式阶段(例如对话框)禁用时更改状态栏消息。
它目前是通过在显示模态阶段之前和之后手动更改状态消息来实现的。有一个更好的方法吗?
最佳答案
有一种非常简单的方法可以做到这一点,假设您只有一个对话框:
statusLabel.textProperty().bind(Bindings.when(dialog.showingProperty())
.then("Modal Dialog is showing").otherwise("Main window is showing"));
List<Stage> dialogs = ...
statusLabel.textProperty().bind(new StringBinding() {
{
for (Stage dialog : dialogs)
bind(dialog.showingProperty());
}
protected String computeValue() {
for (Stage dialog : dialogs)
if (dialog.isShowing())
return "A modal dialog is showing";
return "Main window is showing";
}
});
FileChooser
或
DirectoryChooser
,上述方法完全失效。
WINDOW_MODAL
和
APPLICATION_MODAL
视窗。使用风险自负!开始:
public class Test extends Application {
public static final StringProperty readyLabelProperty = new SimpleStringProperty("Ready");
public static final StringProperty blockedLabelProperty = new SimpleStringProperty("Blocked");
public static void main(String[] args) {
Tk.register();
Application.launch(args);
}
private static StringBinding statusBinding(Window window) {
return Bindings.when(Tk.blockedProperty(window)).then(blockedLabelProperty).otherwise(readyLabelProperty);
}
@Override
public void start(Stage s) throws Exception {
s.show();
s.titleProperty().bind(statusBinding(s));
Stage stage = new Stage();
stage.initOwner(s);
stage.initModality(Modality.WINDOW_MODAL);
stage.titleProperty().bind(statusBinding(stage));
stage.show();
new FileChooser().showOpenDialog(stage);
}
}
public class Tk extends Toolkit {
public static final BooleanBinding blockedProperty(final Window window) {
Objects.requireNonNull(window);
return new BooleanBinding() {
{
bind(stageImpls, owners);
}
@Override
protected boolean computeValue() {
try {
return StageImpl.get(window).isBlocked();
} catch (NullPointerException e) {
return false;
}
}
};
}
private static final Field TOOLKIT = getField(Toolkit.class, "TOOLKIT");
private static Field getField(Class<?> clazz, String name) {
try {
Field f = clazz.getDeclaredField(name);
f.setAccessible(true);
return f;
} catch (NoSuchFieldException e) {
return getField(clazz.getSuperclass(), name);
}
}
private static Method getMethod(Class<?> clazz, String name, Class<?>...parameterTypes) {
try {
Method m = clazz.getDeclaredMethod(name, parameterTypes);
m.setAccessible(true);
return m;
} catch (NoSuchMethodException e) {
return getMethod(clazz.getSuperclass(), name);
}
}
private static final Object invoke(Method method, Object obj, Object...args) {
try {
return method.invoke(obj, args);
} catch (IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}
private final Toolkit qt = Toolkit.getToolkit();
private static Tk current;
public static void register() {
current = new Tk();
rewrap();
}
private static void unwrap() {
current = (Tk)Toolkit.getToolkit();
try {
TOOLKIT.set(null, current.qt);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
private static void rewrap() {
try {
TOOLKIT.set(null, Objects.requireNonNull(current));
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
private static final ObservableList<StageImpl> owners = FXCollections.observableArrayList();
private static final ObservableList<StageImpl> stageImpls = new ModifiableObservableListBase<StageImpl>() {
final ArrayList<StageImpl> list = new ArrayList<>();
final InvalidationListener l = new InvalidationListener() {
public void invalidated(Observable obs) {
beginChange();
nextUpdate(indexOf(StageImpl.get((Window)((ReadOnlyBooleanProperty)obs).getBean())));
endChange();
}
};
public StageImpl get(int index) {
return list.get(index);
}
public int size() {
return list.size();
}
protected void doAdd(int index, StageImpl element) {
list.add(index, element);
element.peer.showingProperty().addListener(l);
}
protected StageImpl doSet(int index, StageImpl element) {
StageImpl replaced = list.set(index, element);
replaced.peer.showingProperty().removeListener(l);
element.peer.showingProperty().addListener(l);
return replaced;
}
protected StageImpl doRemove(int index) {
StageImpl removed = list.remove(index);
removed.peer.showingProperty().removeListener(l);
return removed;
}
};
public TKStage createTKStage(Window w, StageStyle s, boolean primary, Modality m, TKStage owner, boolean rtl, AccessControlContext acc) {
return new StageImpl(qt.createTKStage(w, s, primary, m, owner == null ? null : StageImpl.get(owner).qs, rtl, acc), w, owner, m);
}
public FileChooserResult showFileChooser(TKStage owner, String title, File dir, String name, FileChooserType type,
List<ExtensionFilter> filters, ExtensionFilter selected) {
if (owner == null)
return qt.showFileChooser(null, title, dir, name, type, filters, selected);
StageImpl ownerImpl = StageImpl.get(owner);
owners.add(ownerImpl);
FileChooserResult result = qt.showFileChooser(ownerImpl.qs, title, dir, name, type, filters, selected);
owners.remove(ownerImpl);
return result;
}
public File showDirectoryChooser(TKStage owner, String title, File dir) {
if (owner == null)
return qt.showDirectoryChooser(null, title, dir);
StageImpl ownerImpl = StageImpl.get(owner);
owners.add(ownerImpl);
File file = qt.showDirectoryChooser(ownerImpl.qs, title, dir);
owners.remove(ownerImpl);
return file;
}
public boolean init() {
return qt.init();
}
public void startup(Runnable userStartupRunnable) {
qt.startup(userStartupRunnable);
}
public void checkFxUserThread() {
qt.checkFxUserThread();
}
public Future<?> addRenderJob(RenderJob r) {
return qt.addRenderJob(r);
}
public AppletWindow createAppletWindow(long parent, String serverName) {
return qt.createAppletWindow(parent, serverName);
}
public void closeAppletWindow() {
qt.closeAppletWindow();
}
public Object enterNestedEventLoop(Object key) {
return qt.enterNestedEventLoop(key);
}
public void exitNestedEventLoop(Object key, Object rval) {
qt.exitNestedEventLoop(key, rval);
}
public TKStage createTKPopupStage(Window peerWindow, StageStyle popupStyle,
TKStage owner, AccessControlContext acc) {
return qt.createTKPopupStage(peerWindow, popupStyle, owner, acc);
}
public TKStage createTKEmbeddedStage(HostInterface host,
AccessControlContext acc) {
return qt.createTKEmbeddedStage(host, acc);
}
public ScreenConfigurationAccessor setScreenConfigurationListener(
TKScreenConfigurationListener listener) {
return qt.setScreenConfigurationListener(listener);
}
public Object getPrimaryScreen() {
return qt.getPrimaryScreen();
}
public List<?> getScreens() {
return qt.getScreens();
}
public PerformanceTracker getPerformanceTracker() {
return qt.getPerformanceTracker();
}
public PerformanceTracker createPerformanceTracker() {
return qt.createPerformanceTracker();
}
public ImageLoader loadImage(String url, int width, int height,
boolean preserveRatio, boolean smooth) {
return qt.loadImage(url, width, height, preserveRatio, smooth);
}
public ImageLoader loadImage(InputStream stream, int width, int height,
boolean preserveRatio, boolean smooth) {
return qt.loadImage(stream, width, height, preserveRatio, smooth);
}
public AbstractRemoteResource loadImageAsync(
AsyncOperationListener l, String url, int width, int height,
boolean preserveRatio, boolean smooth) {
return (AbstractRemoteResource) qt.loadImageAsync(l, url, width, height,
preserveRatio, smooth);
}
public void defer(Runnable runnable) {
qt.defer(runnable);
}
public void exit() {
qt.exit();
}
public boolean isForwardTraversalKey(KeyEvent e) {
return qt.isForwardTraversalKey(e);
}
public boolean isBackwardTraversalKey(KeyEvent e) {
return qt.isBackwardTraversalKey(e);
}
public Map<Object, Object> getContextMap() {
return qt.getContextMap();
}
public int getRefreshRate() {
return qt.getRefreshRate();
}
public void setAnimationRunnable(DelayedRunnable animationRunnable) {
qt.setAnimationRunnable(animationRunnable);
}
public void requestNextPulse() {
qt.requestNextPulse();
}
public void waitFor(Task t) {
qt.waitFor(t);
}
public void accumulateStrokeBounds(Shape s, float[] b, StrokeType t, double w, StrokeLineCap c, StrokeLineJoin j, float m, BaseTransform tx) {
qt.accumulateStrokeBounds(s, b, t, w, c, j, m, tx);
}
public boolean strokeContains(Shape s, double x, double y, StrokeType t, double w, StrokeLineCap c, StrokeLineJoin j, float m) {
return qt.strokeContains(s, x, y, t, w, c, j, m);
}
public Shape createStrokedShape(Shape s, StrokeType p, double w, StrokeLineCap c, StrokeLineJoin j, float l, float[] d, float o) {
return qt.createStrokedShape(s, p, w, c, j, l, d, o);
}
public Dimension2D getBestCursorSize(int w, int h) {
return qt.getBestCursorSize(w, h);
}
public int getMaximumCursorColors() {
return qt.getMaximumCursorColors();
}
public int getKeyCodeForChar(String c) {
return qt.getKeyCodeForChar(c);
}
public PathElement[] convertShapeToFXPath(Object s) {
return qt.convertShapeToFXPath(s);
}
public HitInfo convertHitInfoToFX(Object hit) {
return qt.convertHitInfoToFX(hit);
}
public Filterable toFilterable(Image img) {
return qt.toFilterable(img);
}
public FilterContext getFilterContext(Object c) {
return qt.getFilterContext(c);
}
public AbstractMasterTimer getMasterTimer() {
return qt.getMasterTimer();
}
public FontLoader getFontLoader() {
return qt.getFontLoader();
}
public TextLayoutFactory getTextLayoutFactory() {
return qt.getTextLayoutFactory();
}
public Object createSVGPathObject(SVGPath s) {
return qt.createSVGPathObject(s);
}
public Path2D createSVGPath2D(SVGPath s) {
return qt.createSVGPath2D(s);
}
public boolean imageContains(Object image, float x, float y) {
return qt.imageContains(image, x, y);
}
public boolean isNestedLoopRunning() {
return qt.isNestedLoopRunning();
}
public boolean isSupported(ConditionalFeature f) {
return qt.isSupported(f);
}
public boolean isAntiAliasingSupported() {
return qt.isAntiAliasingSupported();
}
public TKClipboard getSystemClipboard() {
return qt.getSystemClipboard();
}
public TKSystemMenu getSystemMenu() {
return qt.getSystemMenu();
}
public TKClipboard getNamedClipboard(String name) {
return qt.getNamedClipboard(name);
}
public void startDrag(TKScene s, Set<TransferMode> tm, TKDragSourceListener l, Dragboard d) {
qt.startDrag(SceneImpl.get(s).qs, tm, l, d);
}
public void enableDrop(TKScene s, TKDropTargetListener l) {
qt.enableDrop(SceneImpl.get(s).qs, l);
}
public void registerDragGestureListener(TKScene s, Set<TransferMode> tm, TKDragGestureListener l) {
qt.registerDragGestureListener(SceneImpl.get(s).qs, tm, l);
}
public void installInputMethodRequests(TKScene s, InputMethodRequests requests) {
qt.installInputMethodRequests(SceneImpl.get(s).qs, requests);
}
public ImageLoader loadPlatformImage(Object platformImage) {
return qt.loadPlatformImage(platformImage);
}
public PlatformImage createPlatformImage(int w, int h) {
return qt.createPlatformImage(w, h);
}
public Object renderToImage(ImageRenderingContext p) {
return qt.renderToImage(p);
}
public long getMultiClickTime() {
return qt.getMultiClickTime();
}
public int getMultiClickMaxX() {
return qt.getMultiClickMaxX();
}
public int getMultiClickMaxY() {
return qt.getMultiClickMaxY();
}
protected Object createColorPaint(Color paint) {
throw new UnsupportedOperationException();
}
protected Object createLinearGradientPaint(LinearGradient paint) {
throw new UnsupportedOperationException();
}
protected Object createRadialGradientPaint(RadialGradient paint) {
throw new UnsupportedOperationException();
}
protected Object createImagePatternPaint(ImagePattern paint) {
throw new UnsupportedOperationException();
}
public boolean isFxUserThread() {
return qt.isFxUserThread();
}
public String toString() {
return qt.toString();
}
public void firePulse() {
qt.firePulse();
}
public void addStageTkPulseListener(TKPulseListener l) {
qt.addStageTkPulseListener(l);
}
public void removeStageTkPulseListener(TKPulseListener l) {
qt.removeStageTkPulseListener(l);
}
public void addSceneTkPulseListener(TKPulseListener l) {
qt.addSceneTkPulseListener(l);
}
public void removeSceneTkPulseListener(TKPulseListener l) {
qt.removeSceneTkPulseListener(l);
}
public void addPostSceneTkPulseListener(TKPulseListener l) {
qt.addPostSceneTkPulseListener(l);
}
public void removePostSceneTkPulseListener(TKPulseListener l) {
qt.removePostSceneTkPulseListener(l);
}
public void addTkListener(TKListener l) {
qt.addTkListener(l);
}
public void removeTkListener(TKListener l) {
qt.removeTkListener(l);
}
public void setLastTkPulseListener(TKPulseListener l) {
qt.setLastTkPulseListener(l);
}
public void addShutdownHook(Runnable hook) {
qt.addShutdownHook(hook);
}
public void removeShutdownHook(Runnable hook) {
qt.removeShutdownHook(hook);
}
public void notifyWindowListeners(List<TKStage> windows) {
qt.notifyWindowListeners(windows);
}
public void notifyLastNestedLoopExited() {
qt.notifyLastNestedLoopExited();
}
public InputStream getInputStream(String url, Class base) throws IOException {
return qt.getInputStream(url, base);
}
public boolean getDefaultImageSmooth() {
return qt.getDefaultImageSmooth();
}
public Object getPaint(Paint paint) {
return qt.getPaint(paint);
}
public TKClipboard createLocalClipboard() {
return qt.createLocalClipboard();
}
public void stopDrag(Dragboard dragboard) {
qt.stopDrag(dragboard);
}
public Color4f toColor4f(Color color) {
return qt.toColor4f(color);
}
public ShadowMode toShadowMode(BlurType blurType) {
return qt.toShadowMode(blurType);
}
public KeyCode getPlatformShortcutKey() {
return qt.getPlatformShortcutKey();
}
public void pauseScenes() {
qt.pauseScenes();
}
public void resumeScenes() {
qt.resumeScenes();
}
public void pauseCurrentThread() {
qt.pauseCurrentThread();
}
public Set<HighlightRegion> getHighlightedRegions() {
return qt.getHighlightedRegions();
}
static final class StageImpl implements TKStage {
final TKStage qs;
final Window peer;
final StageImpl owner;
final Modality modality;
boolean isBlocked() {
for (StageImpl w : owners)
if (w == this || w.isDescendantOf(this))
return true;
for (StageImpl w : stageImpls) {
if (w.peer.isShowing()) {
switch (w.modality) {
case APPLICATION_MODAL:
if (w != this && !this.isDescendantOf(w))
return true;
case WINDOW_MODAL:
if (w.isDescendantOf(this))
return true;
default:
}
}
}
return false;
}
StageImpl(TKStage quantumStage, Window peer, TKStage owner, Modality modality) {
if (quantumStage instanceof StageImpl || map.containsKey(quantumStage))
throw new IllegalArgumentException();
this.owner = owner == null ? null : get(owner);
this.modality = modality == null ? Modality.NONE : modality;
map.put(this.qs = Objects.requireNonNull(quantumStage), this);
if (peers.containsKey(peer))
peers.get(peer).dispose();
peers.put(this.peer = Objects.requireNonNull(peer), this);
stageImpls.add(this);
}
boolean isDescendantOf(StageImpl possibleAncestor) {
for (StageImpl stage = owner; stage != null; stage = stage.owner)
if (stage == possibleAncestor)
return true;
return false;
}
private static final HashMap<TKStage, StageImpl> map = new HashMap<>();
private static final HashMap<Window, StageImpl> peers = new HashMap<>();
static final StageImpl get(TKStage stage) {
if (Objects.requireNonNull(stage) instanceof StageImpl)
return (StageImpl) stage;
return Objects.requireNonNull(map.get(stage));
}
static final StageImpl get(Window peer) {
return peers.get(Objects.requireNonNull(peer));
}
public void dispose() {
map.remove(qs);
peers.remove(peer);
stageImpls.remove(this);
}
public void setTKStageListener(TKStageListener listener) {
qs.setTKStageListener(listener);
}
public TKScene createTKScene(boolean depthBuffer, boolean antiAliasing, AccessControlContext acc) {
return new SceneImpl(qs.createTKScene(depthBuffer, antiAliasing, acc));
}
public void setScene(TKScene scene) {
qs.setScene(scene == null ? null : SceneImpl.get(scene).qs);
}
public void setBounds(float x, float y, boolean xSet, boolean ySet, float w, float h, float cw, float ch, float xGravity, float yGravity) {
qs.setBounds(x, y, xSet, ySet, w, h, cw, ch, xGravity, yGravity);
}
public void setIcons(List icons) {
qs.setIcons(icons);
}
public void setTitle(String title) {
qs.setTitle(title);
}
public void setVisible(boolean visible) {
qs.setVisible(visible);
}
public void setOpacity(float opacity) {
qs.setOpacity(opacity);
}
public void setIconified(boolean iconified) {
qs.setIconified(iconified);
}
public void setMaximized(boolean maximized) {
qs.setMaximized(maximized);
}
public void setResizable(boolean resizable) {
qs.setResizable(resizable);
}
public void setImportant(boolean important) {
qs.setImportant(important);
}
public void setMinimumSize(int w, int h) {
qs.setMinimumSize(w, h);
}
public void setMaximumSize(int w, int h) {
qs.setMaximumSize(w, h);
}
public void setFullScreen(boolean f) {
qs.setFullScreen(f);
}
public void requestFocus() {
qs.requestFocus();
}
public void toBack() {
qs.toBack();
}
public void toFront() {
qs.toFront();
}
public void close() {
qs.close();
}
public void requestFocus(FocusCause cause) {
qs.requestFocus(cause);
}
public boolean grabFocus() {
return qs.grabFocus();
}
public void ungrabFocus() {
qs.ungrabFocus();
}
public void requestInput(String text, int type, double width,
double height, double Mxx, double Mxy, double Mxz, double Mxt,
double Myx, double Myy, double Myz, double Myt, double Mzx,
double Mzy, double Mzz, double Mzt) {
qs.requestInput(text, type, width, height, Mxx, Mxy, Mxz,
Mxt, Myx, Myy, Myz, Myt, Mzx, Mzy, Mzz, Mzt);
}
public void releaseInput() {
qs.releaseInput();
}
public void setRTL(boolean b) {
qs.setRTL(b);
}
public void setAccessibilityInitIsComplete(Object ac) {
qs.setAccessibilityInitIsComplete(ac);
}
public Object accessibleCreateStageProvider(AccessibleStageProvider ac) {
return qs.accessibleCreateStageProvider(ac);
}
public Object accessibleCreateBasicProvider(AccessibleProvider ac) {
return qs.accessibleCreateBasicProvider(ac);
}
public void accessibleDestroyBasicProvider(Object a) {
qs.accessibleDestroyBasicProvider(a);
}
public void accessibleFireEvent(Object a, int eventID) {
qs.accessibleFireEvent(a, eventID);
}
public void accessibleFirePropertyChange(Object a, int p, int o, int n) {
qs.accessibleFirePropertyChange(a, p, o, n);
}
public void accessibleFirePropertyChange(Object a, int p, boolean o, boolean n) {
qs.accessibleFirePropertyChange(a, p, o, n);
}
}
static final class SceneImpl implements TKScene {
public final TKScene qs;
public SceneImpl(TKScene quantumScene) {
if (quantumScene instanceof SceneImpl || map.containsKey(quantumScene))
throw new IllegalArgumentException();
map.put(this.qs = Objects.requireNonNull(quantumScene), this);
Method getPlatformView = getMethod(quantumScene.getClass(), "getPlatformView");
View view = (View)invoke(getPlatformView, quantumScene);
view.setEventHandler(new VEHImpl(view.getEventHandler()));
}
private static final HashMap<TKScene, SceneImpl> map = new HashMap<>();
public static final SceneImpl get(TKScene scene) {
if (Objects.requireNonNull(scene) instanceof SceneImpl)
return (SceneImpl) scene;
return Objects.requireNonNull(map.get(scene));
}
public void dispose() {
map.remove(qs);
qs.dispose();
}
public void waitForRenderingToComplete() {
qs.waitForRenderingToComplete();
}
public void waitForSynchronization() {
qs.waitForSynchronization();
}
public void releaseSynchronization(boolean u) {
qs.releaseSynchronization(u);
}
public void setTKSceneListener(TKSceneListener l) {
qs.setTKSceneListener(l);
}
public void setTKScenePaintListener(TKScenePaintListener l) {
qs.setTKScenePaintListener(l);
}
public void setRoot(NGNode root) {
qs.setRoot(root);
}
public void markDirty() {
qs.markDirty();
}
public void setCamera(NGCamera camera) {
qs.setCamera(camera);
}
public NGLightBase[] getLights() {
return qs.getLights();
}
public void setLights(NGLightBase[] lights) {
qs.setLights(lights);
}
public void setFillPaint(Object f) {
qs.setFillPaint(f);
}
public void setCursor(Object cursor) {
qs.setCursor(cursor);
}
public void enableInputMethodEvents(boolean enable) {
qs.enableInputMethodEvents(enable);
}
public void finishInputMethodComposition() {
qs.finishInputMethodComposition();
}
public void entireSceneNeedsRepaint() {
qs.entireSceneNeedsRepaint();
}
public TKClipboard createDragboard(boolean d) {
return qs.createDragboard(d);
}
}
static final class VEHImpl extends EventHandler {
private final EventHandler qh;
public VEHImpl(EventHandler quantumHandler) {
this.qh = quantumHandler;
}
public void handleViewEvent(View view, long time, int type) {
unwrap();
qh.handleViewEvent(view, time, type);
rewrap();
}
public void handleKeyEvent(View view, long time, int action, int keyCode,char[] keyChars, int m) {
qh.handleKeyEvent(view, time, action, keyCode, keyChars, m);
}
public void handleMenuEvent(View view, int x, int y, int xAbs, int yAbs,boolean k) {
qh.handleMenuEvent(view, x, y, xAbs, yAbs,k);
}
public void handleMouseEvent(View view, long time, int type, int button,int x, int y, int xAbs, int yAbs, int m,boolean p, boolean s) {
qh.handleMouseEvent(view, time, type, button, x, y, xAbs,yAbs, m, p, s);
}
public void handleScrollEvent(View view, long time, int x, int y, int xAbs,int yAbs, double deltaX, double deltaY, int m, int lines,int chars, int l, int c, double xm,double ym) {
qh.handleScrollEvent(view, time, x, y, xAbs, yAbs, deltaX, deltaY, m, lines, chars, l, c,xm, ym);
}
public void handleInputMethodEvent(long time, String text, int[] c, int[] a, byte[] v, int cc, int p) {
qh.handleInputMethodEvent(time, text, c, a, v, cc, p);
}
public double[] getInputMethodCandidatePos(int offset) {
return qh.getInputMethodCandidatePos(offset);
}
public void handleDragStart(View view, int button, int x, int y, int xAbs, int yAbs, ClipboardAssistance d) {
qh.handleDragStart(view, button, x, y, xAbs, yAbs, d);
}
public void handleDragEnd(View view, int p) {
qh.handleDragEnd(view, p);
}
public int handleDragEnter(View view, int x, int y, int xAbs, int yAbs, int r, ClipboardAssistance d) {
return qh.handleDragEnter(view, x, y, xAbs, yAbs, r, d);
}
public int handleDragOver(View view, int x, int y, int xAbs, int yAbs, int r, ClipboardAssistance d) {
return qh.handleDragOver(view, x, y, xAbs, yAbs, r, d);
}
public void handleDragLeave(View view, ClipboardAssistance d) {
qh.handleDragLeave(view, d);
}
public int handleDragDrop(View view, int x, int y, int xAbs, int yAbs, int r, ClipboardAssistance d) {
return qh.handleDragDrop(view, x, y, xAbs, yAbs, r, d);
}
public void handleBeginTouchEvent(View view, long time, int m, boolean isDirect, int tc) {
qh.handleBeginTouchEvent(view, time, m, isDirect, tc);
}
public void handleNextTouchEvent(View view, long time, int type, long touchId, int x, int y, int xAbs, int yAbs) {
qh.handleNextTouchEvent(view, time, type, touchId, x, y, xAbs, yAbs);
}
public void handleEndTouchEvent(View view, long time) {
qh.handleEndTouchEvent(view, time);
}
public void handleScrollGestureEvent(View v, long t, int type, int m, boolean d, boolean i, int c, int x, int y, int xAbs, int yAbs, double dx, double dy, double tdx, double tdy, double mx, double my) {
qh.handleScrollGestureEvent(v, t, type, m, d, i, c, x, y, xAbs, yAbs, dx, dy, tdx, tdy, mx, my);
}
public void handleZoomGestureEvent(View v, long t, int type, int m, boolean d, boolean i, int x, int y, int xAbs, int yAbs, double scale, double e, double s, double te) {
qh.handleZoomGestureEvent(v, t, type, m, d, i, x, y, xAbs, yAbs, scale, e, s, te);
}
public void handleRotateGestureEvent(View v, long t, int type, int m, boolean d, boolean i, int x, int y, int xAbs, int yAbs, double dangle, double a) {
qh.handleRotateGestureEvent(v, t, type, m, d, i, x, y, xAbs, yAbs, dangle, a);
}
public void handleSwipeGestureEvent(View v, long t, int type, int m, boolean d, boolean i, int c, int dir, int x, int y, int xAbs, int yAbs) {
qh.handleSwipeGestureEvent(v, t, type, m, d, i, c, dir, x, y, xAbs, yAbs);
}
}
}
关于javafx-8 - 当阶段被模式阶段禁用时,JavaFX8 中是否有事件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24987062/
对此感到疯狂,真的缺少一些东西。 我有webpack 4.6.0,webpack-cli ^ 2.1.2,所以是最新的。 在文档(https://webpack.js.org/concepts/mod
object Host "os.google.com" { import "windows" address = "linux.google.com" groups = ["linux"] } obj
每当我安装我的应用程序时,我都可以将数据库从 Assets 文件夹复制到 /data/data/packagename/databases/ .到此为止,应用程序工作得很好。 但 10 或 15 秒后
我在 cc 模式缓冲区中使用 hideshow.el 来折叠我不查看的文件部分。 如果能够在 XML 文档中做到这一点就好了。我使用 emacs 22.2.1 和内置的 sgml-mode 进行 xm
已结束。此问题不符合 Stack Overflow guidelines .它目前不接受答案。 我们不允许提出有关书籍、工具、软件库等方面的建议的问题。您可以编辑问题,以便用事实和引用来回答它。 关闭
根据java: public Scanner useDelimiter(String pattern) Sets this scanner's delimiting pattern to a patt
我读过一些关于 PRG 模式以及它如何防止用户重新提交表单的文章。比如this post有一张不错的图: 我能理解为什么在收到 2xx 后用户刷新页面时不会发生表单提交。但我仍然想知道: (1) 如果
看看下面的图片,您可能会清楚地看到这一点。 那么如何在带有其他一些 View 的简单屏幕中实现没有任何弹出/对话框/模式的微调器日期选择器? 我在整个网络上进行了谷歌搜索,但没有找到与之相关的任何合适
我不知道该怎么做,我一直遇到问题。 以下是代码: rows = int(input()) for i in range(1,rows): for j in range(1,i+1):
我想为重写创建一个正则表达式。 将所有请求重写为 index.php(不需要匹配),它不是以/api 开头,或者不是以('.html',或'.js'或'.css'或'.png'结束) 我的例子还是这样
MVC模式代表 Model-View-Controller(模型-视图-控制器) 模式 MVC模式用于应用程序的分层开发 Model(模型) - 模型代表一个存取数据的对象或 JAVA PO
我想为组织模式创建一个 RDF 模式世界。您可能知道,组织模式文档基于层次结构大纲,其中标题是主要的分组实体。 * March auxiliary :PROPERTIES: :HLEVEL: 1 :E
我正在编写一个可以从文件中读取 JSON 数据的软件。该文件包含“person”——一个值为对象数组的对象。我打算使用 JSON 模式验证库来验证内容,而不是自己编写代码。符合代表以下数据的 JSON
假设我有 4 张 table 人 公司 团体 和 账单 现在bills/persons和bills/companys和bills/groups之间是多对多的关系。 我看到了 4 种可能的 sql 模式
假设您有这样的文档: doc1: id:1 text: ... references: Journal1, 2013, pag 123 references: Journal2, 2014,
我有这个架构。它检查评论,目前工作正常。 var schema = { id: '', type: 'object', additionalProperties: false, pro
这可能很简单,但有人可以解释为什么以下模式匹配不明智吗?它说其他规则,例如1, 0, _ 永远不会匹配。 let matchTest(n : int) = let ran = new Rand
我有以下选择序列作为 XML 模式的一部分。理想情况下,我想要一个序列: 来自 my:namespace 的元素必须严格解析。 来自任何其他命名空间的元素,不包括 ##targetNamespace和
我希望编写一个 json 模式来涵盖这个(简化的)示例 { "errorMessage": "", "nbRunningQueries": 0, "isError": Fals
首先,我是 f# 的新手,所以也许答案很明显,但我没有看到。所以我有一些带有 id 和值的元组。我知道我正在寻找的 id,我想从我传入的三个元组中选择正确的元组。我打算用两个 match 语句来做到这
我是一名优秀的程序员,十分优秀!