diff -r b9015fe488dc glass/glass-mat-lib-windows/src/FullScreenWindow.cpp --- a/glass/glass-mat-lib-windows/src/FullScreenWindow.cpp Fri Oct 26 16:17:42 2012 +0400 +++ b/glass/glass-mat-lib-windows/src/FullScreenWindow.cpp Fri Oct 26 16:41:46 2012 -0400 @@ -67,17 +67,7 @@ void FullScreenWindow::ClientRectInScreen(HWND hwnd, RECT * rect) { ::GetClientRect(hwnd, rect); - - //Actually the client area is at (0, 0), but let's be generic - POINT p = {rect->left, rect->top}; - ::ClientToScreen(hwnd, &p); - const int dx = p.x - rect->left; - const int dy = p.y - rect->top; - - rect->left += dx; - rect->top += dy; - rect->right += dx; - rect->bottom += dy; + ::MapWindowPoints(hwnd, (HWND)NULL, (LPPOINT)&rect, (sizeof(RECT)/sizeof(POINT))); } void FullScreenWindow::AttachView(GlassView * view, BOOL keepRatio) diff -r b9015fe488dc glass/glass-mat-lib-windows/src/GlassView.cpp --- a/glass/glass-mat-lib-windows/src/GlassView.cpp Fri Oct 26 16:17:42 2012 +0400 +++ b/glass/glass-mat-lib-windows/src/GlassView.cpp Fri Oct 26 16:41:46 2012 -0400 @@ -288,13 +288,13 @@ return 0; } - RECT rect; - POINT p = {0, 0}; + RECT rect1, rect2; - ::GetWindowRect(hWnd, &rect); - ::ClientToScreen(hWnd, &p); + ::GetWindowRect(hWnd, &rect1); + ::GetClientRect(hWnd, &rect2); + ::MapWindowPoints(hWnd, (HWND)NULL, (LPPOINT)&rect2, (sizeof(RECT)/sizeof(POINT))); - return p.x - rect.left; + return rect2.left - rect1.left; } LEAVE_MAIN_THREAD_WITH_view; @@ -317,13 +317,14 @@ return 0; } - RECT rect; + RECT rect1, rect2; POINT p = {0, 0}; - ::GetWindowRect(hWnd, &rect); - ::ClientToScreen(hWnd, &p); + ::GetWindowRect(hWnd, &rect1); + ::GetClientRect(hWnd, &rect2); + ::MapWindowPoints(hWnd, (HWND)NULL, (LPPOINT)&rect2, (sizeof(RECT)/sizeof(POINT))); - return p.y - rect.top; + return rect2.top - rect1.top; } LEAVE_MAIN_THREAD_WITH_view; diff -r b9015fe488dc glass/glass-mat-lib-windows/src/GlassWindow.cpp --- a/glass/glass-mat-lib-windows/src/GlassWindow.cpp Fri Oct 26 16:17:42 2012 +0400 +++ b/glass/glass-mat-lib-windows/src/GlassWindow.cpp Fri Oct 26 16:41:46 2012 -0400 @@ -576,13 +576,11 @@ } RECT outer, inner; - POINT * pInner = (POINT*)&inner; ::GetWindowRect(GetHWND(), &outer); ::GetClientRect(GetHWND(), &inner); - ::ClientToScreen(GetHWND(), &pInner[0]); - ::ClientToScreen(GetHWND(), &pInner[1]); + ::MapWindowPoints(GetHWND(), (HWND)NULL, (LPPOINT)&inner, (sizeof(RECT)/sizeof(POINT))); m_insets.top = inner.top - outer.top; m_insets.left = inner.left - outer.left; @@ -961,6 +959,10 @@ dwExStyle |= WS_EX_TOOLWINDOW; } + if (mask & com_sun_glass_ui_Window_RIGHT_TO_LEFT) { + dwExStyle |= WS_EX_NOINHERITLAYOUT | WS_EX_LAYOUTRTL; + } + GlassWindow *pWindow = new GlassWindow(jThis, (mask & com_sun_glass_ui_Window_TRANSPARENT) != 0, (mask & com_sun_glass_ui_Window_TITLED) != 0, false, owner); @@ -1008,7 +1010,7 @@ DWORD dwExStyle; dwStyle = WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_CHILD; - dwExStyle = 0; + dwExStyle = WS_EX_NOINHERITLAYOUT; GlassWindow *pWindow = new GlassWindow(jThis, false, false, true, parent); @@ -1605,11 +1607,9 @@ { GlassWindow *pWindow = GlassWindow::FromHandle(hWnd); HWND delegateHWnd = pWindow ? pWindow->GetDelegateWindow() : 0; - POINT p = {0, 0}; - if (::ClientToScreen(delegateHWnd ? delegateHWnd : hWnd, &p)) { - return p.x; - } - return 0; + RECT rect = {0}; + ::MapWindowPoints(delegateHWnd ? delegateHWnd : hWnd, (HWND)NULL, (LPPOINT)&rect, (sizeof(RECT)/sizeof(POINT))); + return rect.left; } LEAVE_MAIN_THREAD_WITH_hWnd; @@ -1628,11 +1628,9 @@ { GlassWindow *pWindow = GlassWindow::FromHandle(hWnd); HWND delegateHWnd = pWindow ? pWindow->GetDelegateWindow() : 0; - POINT p = {0, 0}; - if (::ClientToScreen(delegateHWnd ? delegateHWnd : hWnd, &p)) { - return p.y; - } - return 0; + RECT rect = {0}; + ::MapWindowPoints(delegateHWnd ? delegateHWnd : hWnd, (HWND)NULL, (LPPOINT)&rect, (sizeof(RECT)/sizeof(POINT))); + return rect.top; } LEAVE_MAIN_THREAD_WITH_hWnd; diff -r b9015fe488dc glass/glass-mat-lib-windows/src/ViewContainer.cpp --- a/glass/glass-mat-lib-windows/src/ViewContainer.cpp Fri Oct 26 16:17:42 2012 +0400 +++ b/glass/glass-mat-lib-windows/src/ViewContainer.cpp Fri Oct 26 16:41:46 2012 -0400 @@ -224,6 +224,13 @@ return; } } + // unmirror the x coordinate + LONG style = ::GetWindowLong(hwnd, GWL_EXSTYLE); + if (style & WS_EX_LAYOUTRTL) { + RECT rect = {0}; + GetClientRect(hwnd, &rect); + pt.x = max(0, rect.right - rect.left) - pt.x; + } JNIEnv* env = GetEnv(); env->CallVoidMethod(GetView(), javaIDs.View.notifyMenu, pt.x, pt.y, absX, absY, isKeyboardTrigger); CheckAndClearException(env); @@ -463,6 +470,14 @@ ::ClientToScreen(hwnd, &ptAbs); } + // unmirror the x coordinate + LONG style = ::GetWindowLong(hwnd, GWL_EXSTYLE); + if (style & WS_EX_LAYOUTRTL) { + RECT rect = {0}; + GetClientRect(hwnd, &rect); + pt.x = max(0, rect.right - rect.left) - pt.x; + } + jint jModifiers = GetModifiers(); const jboolean isSynthesized = jboolean(IsPenEvent()); @@ -562,6 +577,14 @@ POINT pt = ptAbs; ::ScreenToClient(hwnd, &pt); + // unmirror the x coordinate + LONG style = ::GetWindowLong(hwnd, GWL_EXSTYLE); + if (style & WS_EX_LAYOUTRTL) { + RECT rect = {0}; + GetClientRect(hwnd, &rect); + pt.x = max(0, rect.right - rect.left) - pt.x; + } + JNIEnv *env = GetEnv(); env->CallVoidMethod(GetView(), javaIDs.View.notifyMouse, com_sun_glass_events_MouseEvent_EXIT, 0, pt.x, pt.y, ptAbs.x, ptAbs.y, @@ -808,6 +831,14 @@ client.x = screen.x = LONG(ti->x / 100); client.y = screen.y = LONG(ti->y / 100); ScreenToClient(hWnd, &client); + + // unmirror the x coordinate + LONG style = ::GetWindowLong(hWnd, GWL_EXSTYLE); + if (style & WS_EX_LAYOUTRTL) { + RECT rect = {0}; + GetClientRect(hWnd, &rect); + client.x = max(0, rect.right - rect.left) - client.x; + } env->CallStaticObjectMethod(gestureSupportCls, javaIDs.Gestures.notifyNextTouchEventMID, @@ -908,6 +939,14 @@ client.y = screen.y; ScreenToClient(hWnd, &client); + // unmirror the x coordinate + LONG style = ::GetWindowLong(hWnd, GWL_EXSTYLE); + if (style & WS_EX_LAYOUTRTL) { + RECT rect = {0}; + GetClientRect(hWnd, &rect); + client.x = max(0, rect.right - rect.left) - client.x; + } + jint modifiers = GetModifiers(); env->CallStaticVoidMethod(m_gestureSupportCls, javaIDs.Gestures.gesturePerformedMID, diff -r b9015fe488dc glass/glass-mat/src/com/sun/glass/ui/Window.java --- a/glass/glass-mat/src/com/sun/glass/ui/Window.java Fri Oct 26 16:17:42 2012 +0400 +++ b/glass/glass-mat/src/com/sun/glass/ui/Window.java Fri Oct 26 16:41:46 2012 -0400 @@ -75,6 +75,11 @@ public static final int MINIMIZABLE = 1 << 5; public static final int MAXIMIZABLE = 1 << 6; + /** + * Indicates that the window trim will draw from right to left. + */ + public static final int RIGHT_TO_LEFT = 1 << 7; + final static private class State { private static final int NORMAL = 1; private static final int MINIMIZED = 2; diff -r b9015fe488dc javafx-ui-desktop/src/javafx/scene/media/MediaView.java --- a/javafx-ui-desktop/src/javafx/scene/media/MediaView.java Fri Oct 26 16:17:42 2012 +0400 +++ b/javafx-ui-desktop/src/javafx/scene/media/MediaView.java Fri Oct 26 16:41:46 2012 -0400 @@ -14,6 +14,7 @@ import javafx.beans.property.ObjectPropertyBase; import javafx.collections.ObservableMap; import javafx.event.EventHandler; +import javafx.geometry.NodeOrientation; import javafx.geometry.Rectangle2D; import javafx.scene.Node; @@ -145,6 +146,7 @@ public MediaView() { setSmooth(Toolkit.getToolkit().getDefaultImageSmooth()); decodedFrameRateListener = createVideoFrameRateListener(); + setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT); } /** @@ -162,6 +164,7 @@ public MediaView(MediaPlayer mediaPlayer) { setSmooth(Toolkit.getToolkit().getDefaultImageSmooth()); decodedFrameRateListener = createVideoFrameRateListener(); + setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT); setMediaPlayer(mediaPlayer); } diff -r b9015fe488dc javafx-ui-quantum/src/com/sun/javafx/tk/quantum/EmbeddedStage.java --- a/javafx-ui-quantum/src/com/sun/javafx/tk/quantum/EmbeddedStage.java Fri Oct 26 16:17:42 2012 +0400 +++ b/javafx-ui-quantum/src/com/sun/javafx/tk/quantum/EmbeddedStage.java Fri Oct 26 16:41:46 2012 -0400 @@ -247,4 +247,7 @@ throw new UnsupportedOperationException("Not supported yet."); } + @Override + public void setRTL(boolean b) { + } } diff -r b9015fe488dc javafx-ui-quantum/src/com/sun/javafx/tk/quantum/QuantumToolkit.java --- a/javafx-ui-quantum/src/com/sun/javafx/tk/quantum/QuantumToolkit.java Fri Oct 26 16:17:42 2012 +0400 +++ b/javafx-ui-quantum/src/com/sun/javafx/tk/quantum/QuantumToolkit.java Fri Oct 26 16:41:46 2012 -0400 @@ -543,9 +543,12 @@ } @Override public TKStage createTKStage(StageStyle stageStyle, - boolean primary, Modality modality, TKStage owner) { + boolean primary, Modality modality, TKStage owner, boolean rtl) { assertToolkitRunning(); - return new WindowStage(verbose, stageStyle, primary, modality, owner).init(systemMenu); + WindowStage stage = new WindowStage(verbose, stageStyle, primary, modality, owner); + stage.setRTL(rtl); + stage.init(systemMenu); + return stage; } @Override public Object enterNestedEventLoop(Object key) { diff -r b9015fe488dc javafx-ui-quantum/src/com/sun/javafx/tk/quantum/WindowStage.java --- a/javafx-ui-quantum/src/com/sun/javafx/tk/quantum/WindowStage.java Fri Oct 26 16:17:42 2012 +0400 +++ b/javafx-ui-quantum/src/com/sun/javafx/tk/quantum/WindowStage.java Fri Oct 26 16:41:46 2012 -0400 @@ -44,6 +44,7 @@ int maxHeight = Integer.MAX_VALUE; private OverlayWarning warning = null; + private boolean rtl = false; private boolean transparent = false; private boolean isPrimaryStage = false; private boolean isAppletStage = false; // true if this is an embedded applet window @@ -122,23 +123,23 @@ } protected void initPlatformWindow() { - int windowMask = 0; + int windowMask = rtl ? Window.RIGHT_TO_LEFT : 0; Application app = Application.GetApplication(); if (isPrimaryStage && (null != appletWindow)) { platformWindow = app.createWindow(appletWindow.getGlassWindow().getNativeWindow()); } else if (style == StageStyle.DECORATED) { - windowMask = Window.TITLED | Window.CLOSABLE | Window.MINIMIZABLE | + windowMask |= Window.TITLED | Window.CLOSABLE | Window.MINIMIZABLE | Window.MAXIMIZABLE; platformWindow = app.createWindow(ownerWindow, Screen.getMainScreen(), windowMask); platformWindow.setResizable(true); } else if (style == StageStyle.UTILITY) { - windowMask = Window.TITLED | Window.UTILITY | Window.CLOSABLE; + windowMask |= Window.TITLED | Window.UTILITY | Window.CLOSABLE; platformWindow = app.createWindow(ownerWindow, Screen.getMainScreen(), windowMask); } else { - windowMask = (transparent ? Window.TRANSPARENT : Window.UNTITLED) | + windowMask |= (transparent ? Window.TRANSPARENT : Window.UNTITLED) | Window.CLOSABLE; platformWindow = app.createWindow(ownerWindow, Screen.getMainScreen(), windowMask); @@ -680,5 +681,9 @@ public void releaseInput() { platformWindow.releaseInput(); } - + + @Override + public void setRTL(boolean b) { + rtl = b; + } } diff -r b9015fe488dc javafx-ui-webnode/src/javafx/scene/web/HTMLEditor.java --- a/javafx-ui-webnode/src/javafx/scene/web/HTMLEditor.java Fri Oct 26 16:17:42 2012 +0400 +++ b/javafx-ui-webnode/src/javafx/scene/web/HTMLEditor.java Fri Oct 26 16:41:46 2012 -0400 @@ -8,6 +8,7 @@ import com.sun.javafx.css.StyleableProperty; import com.sun.javafx.scene.web.skin.HTMLEditorSkin; +import javafx.geometry.NodeOrientation; import javafx.scene.control.Control; import java.security.AccessController; @@ -25,6 +26,7 @@ * Creates a new instance of the HTMLEditor control. */ public HTMLEditor() { + setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT); StyleableProperty styleable = StyleableProperty.getStyleableProperty(super.skinClassNameProperty()); styleable.set(this,"com.sun.javafx.scene.web.skin.HTMLEditorSkin"); } diff -r b9015fe488dc javafx-ui-webnode/src/javafx/scene/web/WebView.java --- a/javafx-ui-webnode/src/javafx/scene/web/WebView.java Fri Oct 26 16:17:42 2012 +0400 +++ b/javafx-ui-webnode/src/javafx/scene/web/WebView.java Fri Oct 26 16:41:46 2012 -0400 @@ -20,6 +20,7 @@ import javafx.collections.ObservableList; import javafx.event.EventHandler; import javafx.event.EventType; +import javafx.geometry.NodeOrientation; import javafx.scene.Node; import javafx.scene.Parent; import javafx.scene.Scene; @@ -245,6 +246,7 @@ * Creates a {@code WebView} object. */ public WebView() { + setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT); getStyleClass().add("web-view"); engine = new WebEngine(); engine.setView(this); diff -r b9015fe488dc toys/HelloWorld/src/helloworld/HelloChoiceBox.java --- a/toys/HelloWorld/src/helloworld/HelloChoiceBox.java Fri Oct 26 16:17:42 2012 +0400 +++ b/toys/HelloWorld/src/helloworld/HelloChoiceBox.java Fri Oct 26 16:41:46 2012 -0400 @@ -7,6 +7,7 @@ import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; +import javafx.geometry.NodeOrientation; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.ChoiceBox; @@ -50,6 +51,7 @@ HBox hbox = new HBox(10); hbox.getChildren().addAll(choiceBox, vbox); stage.setScene(new Scene(hbox)); + stage.getScene().setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); stage.show(); } } diff -r b9015fe488dc toys/HelloWorld/src/helloworld/HelloLineChart.java --- a/toys/HelloWorld/src/helloworld/HelloLineChart.java Fri Oct 26 16:17:42 2012 +0400 +++ b/toys/HelloWorld/src/helloworld/HelloLineChart.java Fri Oct 26 16:41:46 2012 -0400 @@ -6,6 +6,7 @@ import javafx.application.Application; import javafx.collections.FXCollections; import javafx.collections.ObservableList; +import javafx.geometry.NodeOrientation; import javafx.scene.Scene; import javafx.scene.chart.Chart; import javafx.scene.chart.LineChart; @@ -31,6 +32,7 @@ final NumberAxis xAxis = new NumberAxis(); final NumberAxis yAxis = new NumberAxis(); final LineChart lc = new LineChart(xAxis,yAxis); + lc.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); // setup chart lc.setTitle("Line Chart Example"); xAxis.setLabel("X Axis"); diff -r b9015fe488dc toys/HelloWorld/src/helloworld/HelloListView.java --- a/toys/HelloWorld/src/helloworld/HelloListView.java Fri Oct 26 16:17:42 2012 +0400 +++ b/toys/HelloWorld/src/helloworld/HelloListView.java Fri Oct 26 16:41:46 2012 -0400 @@ -32,6 +32,7 @@ import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.geometry.Insets; +import javafx.geometry.NodeOrientation; import javafx.geometry.Orientation; import javafx.scene.Group; import javafx.scene.Node; @@ -181,6 +182,7 @@ @Override public void start(Stage stage) { stage.setTitle("Hello ListView"); final Scene scene = new Scene(new Group(), 875, 700); + scene.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); scene.setFill(Color.LIGHTGRAY); Group root = (Group)scene.getRoot(); @@ -413,6 +415,7 @@ // simple list view with content ListView horizontalListView = new ListView(); horizontalListView.setOrientation(Orientation.HORIZONTAL); + horizontalListView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE); horizontalListView.setItems(data); grid.add(horizontalListView, 0, 0); diff -r b9015fe488dc toys/HelloWorld/src/helloworld/HelloMenu.java --- a/toys/HelloWorld/src/helloworld/HelloMenu.java Fri Oct 26 16:17:42 2012 +0400 +++ b/toys/HelloWorld/src/helloworld/HelloMenu.java Fri Oct 26 16:41:46 2012 -0400 @@ -17,6 +17,7 @@ import javafx.event.ActionEvent; import javafx.event.Event; import javafx.event.EventHandler; +import javafx.geometry.NodeOrientation; import javafx.geometry.Pos; import javafx.scene.Node; import javafx.scene.Scene; @@ -204,6 +205,7 @@ }); } stage.setScene(scene); + scene.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); stage.show(); } diff -r b9015fe488dc toys/HelloWorld/src/helloworld/HelloScrollBar.java --- a/toys/HelloWorld/src/helloworld/HelloScrollBar.java Fri Oct 26 16:17:42 2012 +0400 +++ b/toys/HelloWorld/src/helloworld/HelloScrollBar.java Fri Oct 26 16:41:46 2012 -0400 @@ -4,6 +4,7 @@ package helloworld; import javafx.application.Application; +import javafx.geometry.NodeOrientation; import javafx.geometry.Orientation; import javafx.scene.Group; import javafx.scene.Scene; @@ -63,6 +64,7 @@ test(); stage.setTitle("Hello ScrollBar"); Scene scene = new Scene(new Group(), 600, 450); + scene.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); scene.setFill(Color.CHOCOLATE); Group root = (Group)scene.getRoot(); diff -r b9015fe488dc toys/HelloWorld/src/helloworld/HelloScrollPane.java --- a/toys/HelloWorld/src/helloworld/HelloScrollPane.java Fri Oct 26 16:17:42 2012 +0400 +++ b/toys/HelloWorld/src/helloworld/HelloScrollPane.java Fri Oct 26 16:41:46 2012 -0400 @@ -6,6 +6,7 @@ import javafx.application.Application; +import javafx.geometry.NodeOrientation; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.ScrollPane; @@ -20,7 +21,8 @@ */ public class HelloScrollPane extends Application { - private static final String URL_PREFIX = "file:src/helloworld/"; + //private static final String URL_PREFIX = "file:src/helloworld/"; + private static final String URL_PREFIX = "file:\\Users\\Steve\\Documents\\graphics-80\\jfx\\rt-closed\\toys\\HelloWorld\\src\\helloworld\\"; public static Image createImage(String filename, float width, float height) { return new Image(URL_PREFIX + filename, width, height, true, true, false); @@ -48,6 +50,7 @@ stage.setTitle("Hello ScrollPane"); Scene scene = new Scene(new Group(), 600, 450); + scene.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); scene.setFill(Color.CHOCOLATE); Group root = (Group)scene.getRoot(); @@ -62,6 +65,7 @@ sView1.setVisible(true); root.getChildren().add(sView1); + /* ScrollPane sView2 = new ScrollPane(); sView2.setContent(imageView2); sView2.setPrefSize(214, 150); @@ -69,9 +73,11 @@ sView2.setLayoutY(40); sView2.setPannable(true); sView2.setVisible(true); + */ /* ** set focus traversable to allow keyboard input. */ + /* sView2.setFocusTraversable(true); root.getChildren().add(sView2); @@ -83,7 +89,7 @@ sView3.setPannable(true); sView3.setVisible(true); root.getChildren().add(sView3); - +*/ stage.setScene(scene); stage.show(); } diff -r b9015fe488dc toys/HelloWorld/src/helloworld/HelloSlider.java --- a/toys/HelloWorld/src/helloworld/HelloSlider.java Fri Oct 26 16:17:42 2012 +0400 +++ b/toys/HelloWorld/src/helloworld/HelloSlider.java Fri Oct 26 16:41:46 2012 -0400 @@ -4,6 +4,7 @@ package helloworld; import javafx.application.Application; +import javafx.geometry.NodeOrientation; import javafx.scene.Scene; import javafx.scene.control.Slider; import javafx.scene.image.Image; @@ -60,6 +61,7 @@ vbox.getChildren().add(slider); Scene scene = new Scene(vbox); + scene.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); stage.setScene(scene); stage.show(); } diff -r b9015fe488dc toys/HelloWorld/src/helloworld/HelloTableView.java --- a/toys/HelloWorld/src/helloworld/HelloTableView.java Fri Oct 26 16:17:42 2012 +0400 +++ b/toys/HelloWorld/src/helloworld/HelloTableView.java Fri Oct 26 16:41:46 2012 -0400 @@ -29,8 +29,10 @@ import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.event.ActionEvent; +import javafx.event.Event; import javafx.event.EventHandler; import javafx.geometry.Insets; +import javafx.geometry.NodeOrientation; import javafx.geometry.Pos; import javafx.scene.Group; import javafx.scene.Node; @@ -351,6 +353,7 @@ @Override public void start(Stage stage) { stage.setTitle("Hello TableView"); final Scene scene = new Scene(new Group(), 875, 700); + scene.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); scene.setFill(Color.LIGHTGRAY); Group root = (Group)scene.getRoot(); @@ -409,6 +412,12 @@ // simple list view final TableView tableView = new TableView(); + tableView.addEventFilter(MouseEvent.MOUSE_PRESSED, new EventHandler() { + public void handle(Event event) { + System.out.println("Press " + event.getSource() + " " + event.getTarget()); + + } + }); tableView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE); tableView.getSelectionModel().setCellSelectionEnabled(false); tableView.setTableMenuButtonVisible(false); diff -r b9015fe488dc toys/HelloWorld/src/helloworld/HelloToolBar.java --- a/toys/HelloWorld/src/helloworld/HelloToolBar.java Fri Oct 26 16:17:42 2012 +0400 +++ b/toys/HelloWorld/src/helloworld/HelloToolBar.java Fri Oct 26 16:41:46 2012 -0400 @@ -5,6 +5,7 @@ package helloworld; import javafx.application.Application; +import javafx.geometry.NodeOrientation; import javafx.geometry.Orientation; import javafx.scene.Scene; import javafx.scene.control.Button; @@ -27,6 +28,7 @@ stage.setTitle("ToolBar"); final VBox box = new VBox(10); final Scene scene = new Scene(box, 500, 500); + scene.setNodeOrientation(NodeOrientation.RIGHT_TO_LEFT); final ToolBar tb = new ToolBar(); tb.setOrientation(Orientation.HORIZONTAL);