Mouse transparency on undesorated scene

I have a JavaFX no decorated scene that contain handlers for mouse events such as Moved, Pressed and Dragged to implement widows resizing and moving. Root pane of the window is AnchorPane.
I can't add a picture to the question, please look at the linked image: https://dl.dropboxusercontent.com/u/6196421/Screen_1.png
The problem is in the following. When I am adding a ScrollPane to the root pane, I can't provide a window resizing for user, because scroll tad is handling mouse events. I also unable to reach this functionality by making upper pane mouse traversable and trying to backward mouse events to upper layer from root pane.
Window is looking like following: https://dl.dropboxusercontent.com/u/6196421/Screen_2.png
Could you please to help to find a way to solve this problem? It's strongly required to use undecorated window and to use scrollpane areas too.
Thank you!

Hello,
Is your operating system Windows Vista?
The bitmap tools do not work well with the transparent Aero interface. Are these the tools that are slow?
If yes, then it is possible to turn off the Aero interface for Fireworks and the tools will not be slow. Post back if this is the problem.

Similar Messages

  • Scene Selection False Start

    Hi there,
    I'm currently working on the DVD for a feature length film. The DVD includes working video special features and I'm trying to install a scene selection menu now. Unfortunately when I press a button corresponding to a chapter it plays maybe the first frame before returning me to my scene selection menu. The same thing happens when I try to "Preview From Here" on a specific chapter, when it is right clicked on the timeline. The chapters have no overrivdes or end actions attached to them. Any idea how to solve this problem?
    Any help would be greatly appreciated!!
    Andrew

    It works now. I clicked the Preview DVD playback triangle button (as I had done before) and waited for the main menu to appear. After mousing over the words "Scene Selection" the yellow circle was adjacent to scene selection I then clicked on the words "Scene Selection" and was taken to the scene selection menu showing the 3 scenes I had set up.
    My mistake before was in clicking on the yellow filled-in circle. Nothing happens.
    In design mode (with the four submode buttons shown) navigation is not predictable.
    Thanks for your help.

  • (Mighty) Mouse with Windows7 and BootCamp

    Hi,
    I am trying to get my Mighty Mouse running on Windows7 using Bootcamp. I have read several threads but it still does not work!
    What is more problematic: I am using my old USB mouse from my Quicksilver mac (a "Pro Mouse" - transparent look), and even here I cannot manage to get the right click enabled properly...
    When I click on the "Add Bluetooth device" button in the system settings, the mighty mouse is found, but the installation is not finished and I am not able to right click on it (because of the problems with the existing USB mouse), in order to change some settings of it ... if that would be possible..
    Any ideas?
    PS:
    iMac (2007), Snow Leopard, BootCamp says version 4.0 (from Windows System Control)

    Found some hint in the web that fixed my issue:
    http://maclord.ozarweb.com/mevzu/resolved-apple-magic-mouse-problem-on-windows/
    It seems as if I really had to remove the mouse in MacOS from the bluetooth device list.

  • How can a transparent stage have round corners and drop shadow?

    Hi,
    This is actually 2 questions:
    1- How can a transparent stage have background corners?
    I've tried doing this:
    .rootPane
    -fx-border-radius: 4 4 4 4;
    -fx-background-radius: 4 4 4 4;
    -fx-border-color: gray;
    -fx-border-style: solid;
    -fx-border-width: 1;
    -fx-background-image: url("resource/clean_textile.png");
    And make the root of the scene have the ".rootPane" style class.
    But it sometimes shows some visual artifacts on the corners. Am I doing it wrong? is this a bug?
    2 - How can a transparent stage show the windows 7 drop shadow effect of windows? Is it possible?

    How can a transparent stage have background corners?Yes, this is a possible.
    There are a few of tricks and you need all of them:
    1. StageStyle must be transparent:
    new Stage(StageStyle.TRANSPARENT);2. Scene fill must also be transparent:
    new Scene(root, Color.TRANSPARENT);3. Color the background:
    -fx-background-color: derive(cadetblue, -20%); 4. You need to apply the dropshadow effect to the background region.
    -fx-effect: dropshadow(three-pass-box, derive(cadetblue, -20%), 10, 0, 4, 4); 5. You need to inset the background in the region which has the dropshadow so that the shadow will be visible within the Stage and not clipped out of the stage bounds.
    -fx-background-insets: 12; 6. You need to apply a radius to the background to round it's corners.
    -fx-background-radius: 6;Here is a sample in this gist revision =>
    https://gist.github.com/1887631/155d5e052b6ec7d0eaa6f825713f98f8e542152e
    How can a transparent stage show the windows 7 drop shadow effect of windows? Is it possible?You can kind of approximate it using the above techniques, but I don't think you will be able to get an exact match without something like: http://javafx-jira.kenai.com/browse/RT-18936 "Enable aero-style glass transparencies" (and probably additional JavaFX platform support as well) being implemented.

  • How to set alignment in a TextField?

    I need to set allignment of the text in a TextField to right. There is no such under TextField.
    Anybody knows how to set alignment in a textfield in javaFX 2.0 ?
    Thanks

    It may be worth filing a feature request jira to get platform native support for this.
    You might think that textField.setStyle("-fx-text-alignment: right;") would work, but it does not.
    I guess that the -fx-text-alignment css property only right aligns multi-line text, not text within a text field.
    The following code uses binding to keep Text in a TextField right aligned.
    The translations place the text visually right and keyboard editing is OK.
    Mouse transparency is enabled because mouse based selections still act as though the text is left aligned.
    So it's not a complete solution.
    public void start(final Stage stage) throws Exception {
      // create a text field.
      final TextField textField = new TextField("This is right aligned text");
      textField.setStyle("-fx-text-alignment: right;");
      textField.setMinWidth(400);
      textField.setMouseTransparent(true);
      // layout the scene.
      final VBox layout = new VBox();
      layout.setStyle("-fx-background-color: cornsilk; -fx-padding: 10; -fx-alignment: center;");
      layout.getChildren().addAll(textField);
      Scene scene = new Scene(layout);
      stage.setScene(scene);
      stage.show();
      // keep the text in the textbox right aligned.
      final Text text = (Text) textField.lookup("Text");
      rightAlign(text, textField);
      textField.textProperty().addListener(new InvalidationListener() {
        @Override public void invalidated(Observable observable) {
          rightAlign(text, textField);
    private void rightAlign(Text text, TextField textField) {
      text.getParent().translateXProperty().bind(textField.widthProperty().subtract(text.xProperty().multiply(2)).subtract(text.getLayoutBounds().getWidth()));
    }

  • Scrollable/scalable image with buttons on top of it?

    Hey guys,
    I've had a few half-goes at doing this before but now have to do it for real in my project and I'm struggling to get something clean and I'm looking for pointers.
    I want to have an image (typically a schematic, or a map) which is scrollable and zoomable. I want to overlay some buttons on the image for controlling zoom (and other things, but lets keep it simple for now). I want the whole thing to be a custom component that I can drop into another panel, and for that custom component to be resized nicely inline with its parent (i.e. if I put it in a BorderPane.center it should take up the available space and no more or less).
    So I started with something logical/simple, a StackPane at the top-level with a ScrollPane containing an ImageView as the first child, and then an 'overlay' panel as the top child of the StackPane to conatain my buttons. I want to anchor my buttons to the top right of the image so I use an Anchor Pane for this. Something like:
    public class MapView extends StackPane
        public MapView()
            ImageView imageView = new ImageView(new Image("C:/temp/my-image.jpg"));
            ScrollPane scrollPane = new ScrollPane();
            scrollPane.setPannable(true);
            scrollPane.setContent(imageView);
            getChildren().add(scrollPane);
            HBox zoomButtons = new HBox(5);
            Button zoomInButton = new Button("+");
            zoomButtons.getChildren().add(zoomInButton);
            Button zoomOutButton = new Button("-");
            zoomButtons.getChildren().add(zoomOutButton);
            AnchorPane controls = new AnchorPane();
            AnchorPane.setRightAnchor(zoomButtons, 20.0);
            AnchorPane.setTopAnchor(zoomButtons, 5.0);
            controls.getChildren().add(zoomButtons);
            getChildren().add(controls);
    }This gives me the perfect layout but with one massive problem: the AnchorPane is stretched to take up the whole area of the StackPane (which is what I want from a layout perspective) but that means it blocks the mouse input to the underlying image view so I can't scroll.
    So I try adding a call to the handy setMouseTransparent method:
    controls.setMouseTransparent(true);And now I can scroll my image around, but I have the inverse problem: the buttons are now mouse transparent as well so I can't click them.
    Snookered.
    So maybe a Group is an option? I try using one instead of the AnchorPane:
    ImageView imageView = new ImageView(new Image("C:\\temp\\corso\\pandids\\pandid-2.jpg"));
    ScrollPane scrollPane = new ScrollPane();
    scrollPane.setPannable(true);
    scrollPane.setContent(imageView);
    getChildren().add(scrollPane);
    HBox zoomButtons = new HBox(5);
    Button zoomInButton = new Button("+");
    zoomButtons.getChildren().add(zoomInButton);
    Button zoomOutButton = new Button("-");
    zoomButtons.getChildren().add(zoomOutButton);
    Group group = new Group(zoomButtons);
    getChildren().add(group);I get my buttons in the middle of the screen and I can both scroll my image and click my buttons. But I can't figure out a way to anchor the buttons up to the top right. Group seems to resize itself to the contents of its children (I imagine there's a reason for this, but it makes Group completely unusable for every scenario I've had for it), so I can't really adjust the size or position of the Group. Calling resize() seems to have no effect and there's no setMaxSize or setPrefSize. Calling setLayoutX doesn't do anything cause its all within a StackPane. The only horribly hack I can think of is to add a dummy component to the group which is the size of the container the group is in. Too painful and too fragile to be a real option.
    Snookered again.
    Maybe I need a Group at the top level instead of the StackPane, but then it all goes a bit nuts with the ImageView sizing and layout pretty much totally gone.
    The only other hack I can come up with is to put my own mouse listener on the anchor pane and implement 'panning' manually, but then the scroll bars won't work so I'll probably have to turn these off.
    It seems like this should be really easy, and the first, logical simple approach was so close it hurts. Am I missing something simple, or is it really this hard?

    Hi Zonski,
    what about this?
            Group group = new Group(zoomButtons);               
            group.translateXProperty().bind(group.layoutXProperty().subtract(20));
            group.translateYProperty().bind(group.layoutYProperty().multiply(-1).add(20));
            getChildren().add(group);Works for me
    Cheers
    Michael

  • Strange stack trace from clicking on chart in javafx

    Hi folks -
    I want to be able to have an action occur when I click on a lineChart node in javafx (2.2). Before even implementing such behavior, though, I notice that I am getting a pileup of errors when I click on the chart window in my application:
    java.lang.IllegalArgumentException: argument type mismatch
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:601)
         at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(Unknown Source)
         at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
         at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
         at javafx.event.Event.fireEvent(Unknown Source)
         at javafx.scene.Scene$ClickGenerator.postProcess(Unknown Source)
         at javafx.scene.Scene$ClickGenerator.access$8600(Unknown Source)
         at javafx.scene.Scene$MouseHandler.process(Unknown Source)
         at javafx.scene.Scene$MouseHandler.process(Unknown Source)
         at javafx.scene.Scene$MouseHandler.access$1900(Unknown Source)
         at javafx.scene.Scene.impl_processMouseEvent(Unknown Source)
         at javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
         at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
         at com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
         at com.sun.glass.ui.View.notifyMouse(Unknown Source)
         at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
         at com.sun.glass.ui.win.WinApplication.access$100(Unknown Source)
         at com.sun.glass.ui.win.WinApplication$2$1.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:722)
    Can anyone shed any insight as to what is going on, here? Thanks.

    Hi
    The problem is an incorrect type of an argument of the click event.
    It seems that you used javafx.event.ActionEvent.
    But the event of a mouse click is javafx.scene.input.MouseEvent.
    So JavaFX cannot handle the event, and then through java.lang.IllegalArgumentException with message "argument type mismatch".
    regards.

  • Gig Ethernet V/S  SCI as Cluster Private Interconnect for Oracle RAC

    Hello Gurus
    Can any one pls confirm if it's possible to configure 2 or more Gigabit Ethernet interconnects ( Sun Cluster 3.1 Private Interconnects) on a E6900 cluster ?
    It's for a High Availability requirement of Oracle 9i RAC. i need to know ,
    1) can i use gigabit ethernet as Private cluster interconnect for Deploying Oracle RAC on E6900 ?
    2) What is the recommended Private Cluster Interconnect for Oracle RAC ? GiG ethernet or SCI with RSM ?
    3) How about the scenarios where one can have say 3 X Gig Ethernet V/S 2 X SCI , as their cluster's Private Interconnects ?
    4) How the Interconnect traffic gets distributed amongest the multiple GigaBit ethernet Interconnects ( For oracle RAC) , & is anything required to be done at oracle Rac Level to enable Oracle to recognise that there are multiple interconnect cards it needs to start utilizing all of the GigaBit ethernet Interfaces for transfering packets ?
    5) what would happen to Oracle RAC if one of the Gigabit ethernet private interconnects fails
    Have tried searching for this info but could not locate any doc that can precisely clarify these doubts that i have .........
    thanks for the patience
    Regards,
    Nilesh

    Answers inline...
    Tim
    Can any one pls confirm if it's possible to configure
    2 or more Gigabit Ethernet interconnects ( Sun
    Cluster 3.1 Private Interconnects) on a E6900
    cluster ?Yes, absolutely. You can configure up to 6 NICs for the private networks. Traffic is automatically striped across them if you specify clprivnet0 to Oracle RAC (9i or 10g). That is TCP connections and UDP messages.
    It's for a High Availability requirement of Oracle
    9i RAC. i need to know ,
    1) can i use gigabit ethernet as Private cluster
    interconnect for Deploying Oracle RAC on E6900 ? Yes, definitely.
    2) What is the recommended Private Cluster
    Interconnect for Oracle RAC ? GiG ethernet or SCI
    with RSM ? SCI is or is in the process of being EOL'ed. Gigabit is usually sufficient. Longer term you may want to consider Infiniband or 10 Gigabit ethernet with RDS.
    3) How about the scenarios where one can have say 3 X
    Gig Ethernet V/S 2 X SCI , as their cluster's
    Private Interconnects ? I would still go for 3 x GbE because it is usually cheaper and will probably work just as well. The latency and bandwidth differences are often masked by the performance of the software higher up the stack. In short, unless you tuned the heck out of your application and just about everything else, don't worry too much about the difference between GbE and SCI.
    4) How the Interconnect traffic gets distributed
    amongest the multiple GigaBit ethernet Interconnects
    ( For oracle RAC) , & is anything required to be done
    at oracle Rac Level to enable Oracle to recognise
    that there are multiple interconnect cards it needs
    to start utilizing all of the GigaBit ethernet
    Interfaces for transfering packets ?You don't need to do anything at the Oracle level. That's the beauty of using Oracle RAC with Sun Cluster as opposed to RAC on its own. The striping takes place automatically and transparently behind the scenes.
    5) what would happen to Oracle RAC if one of the
    Gigabit ethernet private interconnects fails It's completely transparent. Oracle will never see the failure.
    Have tried searching for this info but could not
    locate any doc that can precisely clarify these
    doubts that i have .........This is all covered in a paper that I have just completed and should be published after Christmas. Unfortunately, I cannot give out the paper yet.
    thanks for the patience
    Regards,
    Nilesh

  • Location of itunes update file in Windows 7

    After launching iTunes (10.6.1.7), I am notified that there is an update available, and I approve the download.  Unfortunately, a download location is not displayed nor the exact file name.  A notification that the download is complete is not given.  Specification or modification of a download location for updates is not apparent within iTunes preferences as it is for the media files.  A search by modification date or presumed file name has not been successful.  It is obvious an update is not occurring transparently behind the scenes, because I have repeated this process four times over the past three weeks, each time closing out of iTunes after providing a sufficient time (perhaps 15 minutes) and then relauching only to find the version number unchanged.  A plethora of information is available online regarding downloading purchases but not for routine maintenance.  I could uninstall iTunes, QuickTime, etc, and then rinse and repeat, but this seems analogous to using a Rube Goldberg construct when all I need is a fly swatter.  I would greatly appreciate suggestions.  Thank you.

    After launching iTunes (10.6.1.7), I am notified that there is an update available, and I approve the download.  Unfortunately, a download location is not displayed nor the exact file name.  A notification that the download is complete is not given.
    Try updating your iTunes using an iTunesSetup.exe (or iTunes64Setup.exe) downloaded from the Apple website:
    http://www.apple.com/itunes/download/
    Does that go through any better for you?

  • Reference same dimension multiple times in a cube

    Hi,
    I'm creating a cube with Analytic Workspace Manager. The cube needs to reference same dimension more than once. For example, in a movie ticket booking cube, there's a booking date and a show date , both should reference same pre-created TIME dimension. Because one dimension can be added to a cube only once, now my solution is to define 2 dimensions, i.e. BOOKING_TIME and SHOW_TIME, both are based on same underlying table and have exactly same levels/hierarchies/mapping, and then add them to the cube. I believe there must be smarter approaches out there, please advise.
    Thanks!
    Jim
    Edited by: user11955172 on 2012-12-10 上午2:36

    For hand written/custom sql going against the Cube:
    You're right that you can use one of the 3 time dimension based views (duplicated 4 times for time1/2/3/4 dimensions).
    If you need to use 2 out of 4 time dimensions in your query (by applying an application based filter/restriction) then you would need to alias the relevant view(s) 2 times and get your result.
    If you needed to use all 4 time attribute dimensions, then you need to alias the time dimension view 4 times.
    12 views represent the full spectrum of possible report/query usage scenarios available to users via these 4 time dimension views. A typical session with various reports/queries is unlikely to refer to all of them (possible but not likely).
    In different scenarios, any one of the 3 views - dimension view, h1, h2 view - comes into play for each dimension.
    In every query/report scenario, only 1 out of the 3 applicable views would be needed or suitable based on the query/report specifics.
    E.g:
    * If your query is at lowest level and is also referencing attributes/descriptions which pertain to >1 hierarchies, then the view v_time<N>d is the appropriate view to use. Neither vtime<N>h1 or vtime<N>_h2 will be able to give you the results you require if you have attributes defined exclusively in either hierarchy h1 or h2.
    * Setting the default hierarchy to either h1 or h2 determines which hierarchy view is expected to be used/preferred in cases where dimension is not referenced or where Top level of dimension is desired in query/report. E.g: Top level is same for both hierarchies h1 and h2 but read the Top Level values from h1 view as h1 is marked as the default hierarchy for dimension.
    * The level of the query is generally determined by the lowest level of the attributes/fields in your query. If you have attributes like Long_Desc, Short_Desc (available at all levels/all hiers) and you have 2 attributes from Hierarchy H1 and from levels L1 (one level above leaf) and L3 (higher than L1 by 2 levels)... then the query uses v_time<N>h1 and will apply a filter to choose/constraint levelname field = 'L1'.
    * Reporting tools like OBIEE etc. have security filters defined to ensure that the joins to missing dimensions and the appropriate dimension level filters appended to the query in a transparent "behind the scenes" manner.
    NOTE: By modeling the time based fields as different dimensions, you get the benefit of time series analysis along any of the 4 dimensions. You can create a Month-to-Date Revenue measure along "Show Biz Time" dimension and also create a Year-to-Date Revenue Measure based on "Booking Time" dimension. Also compare % variance of "MTD - Revenue - Show Biz Time" with corresponding value for Last year "MTD LY - Revenue - Show Biz Time". This is the benefit you get by breaking out the 4 columns in relational fact and modeling them as explicit time dimensions. You pay a small price in terms of cube space expansion, time dimension load increase but as acknowledged earlier, this dimension can be loaded incrementally, the full load process is done only initially. It is an offline process (batch) and does not hamper query performance.
    Regd
    3) In the underlying star schema, we have only one time dimension table, in the ticket booking fact table, we have 4 dimension columns referencing the same time dimension table. So it's intuitive to expect similar design in the cube. Current approach seems like replicating the dimension table for each dimension column.Do you have parentage along h1/h2 laid out in terms of different parent columns ... 06:30am should have parent D1 in h1 hierarchy (regular day) and parent=D1-1 in h2 hierarchy (business day)?
    h1=regular day hierarchy
    h2=biz day hierarchy
    In that case, perhaps you want "Booking Time" (Time1) to use view: v_time1_h1 by default and "Booking Biz Time" (Time3) to use v_time3_h2 by default.
    Using h2 hierarchy for Time1 or h1 hierarchy for Time3 would be illogical/invalid. Maybe you can simplify things by removing the hierarchies from olap model which dont apply to the dimension.
    HTH
    Shankar

  • Changing BorderPane contraints causes component to disappear

    Hello everyone,
    I have this short snippet that is giving me a headache, don't know if it's something i'm doing wrong but the behavior seems weird to me:
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    public class MainWindow extends Application {
         public static void main(String[] args) {
              Application.launch(args);
         public void start(Stage s) {
              BorderPane workArea = new BorderPane();
              Button button = new Button(".");
              Scene scene = new Scene(workArea, 800, 600, Color.TRANSPARENT);
              s.setScene(scene);
              s.show();
              workArea.setCenter(button);
              workArea.getChildren().remove(button);
              workArea.setLeft(button);
              workArea.getChildren().remove(button);
              workArea.setCenter(button);
    }As you can see i move the same component back and forth between left and center. When you run this piece of code you'll get and empty stage.
    I have a workaround (more like a hack) but it seems that i'm lacking something, what i do in order for this to work is creating a new instance of button and remove the original from the Pane, this works ok but then i would have to copy all the properties from the original object.
    Any idea on if it's normal, why, and how to workaround this?
    Thanks
    Bruno

    Hi Bruno,
    Yea, weird this doesn't work - just ran it and got the same results as you. Strangely the following does work:
    public void start(Stage stage) throws Exception
        BorderPane workArea = new BorderPane();
        Scene scene = new Scene(workArea, 800, 600);
        stage.setScene(scene);
        stage.show();
        Button button = new Button("Test");
        workArea.setLeft(button);
        workArea.setLeft(null);
        workArea.setRight(button);
        workArea.setRight(null);
        workArea.setCenter(button);
    }So it looks like it is a problem specifically with the remove on BorderPane not doing something that the setLeft/Right/Center does. I can't see a bug for it so I would suggest raising one. The above code is painful as you would have to record where it was last added in order to remove it on the next move.
    You could also use another layout. For my money, I highly recommend MigLayout. You can do very complex layouts simply in a single pane and it handles this dynamic adding stuff well:
    public void start(Stage stage) throws Exception
        MigPane workArea = new MigPane("fill");
        Scene scene = new Scene(workArea, 800, 600);
        stage.setScene(scene);
        stage.show();
        Button button = new Button("Test");
        workArea.add(button, "left");
        workArea.getChildren().remove(button);
        workArea.add(button, "right");
        workArea.getChildren().remove(button);
        workArea.add(button, "center");
    }You need the core MigLayout library from here: http://www.miglayout.com/
    And the JFX wrapper is here: http://java.net/projects/miglayoutfx2/pages/Home
    Start using Mig and you will never look back. I have used it in Swing heavily for commercial apps and it has never let me down.
    If you can't bring yourself to use Mig, and you only want to change the anchor like in your simple example, here's a little cheat that seems to work:
    public void start(Stage stage) throws Exception
        GridPane workArea = new GridPane();
        Scene scene = new Scene(workArea, 800, 600);
        stage.setScene(scene);
        stage.show();
        Button button = new Button("Test");
        workArea.add(button, 0, 0);
        workArea.setAlignment(Pos.CENTER_LEFT);
        workArea.setAlignment(Pos.CENTER_RIGHT);
        workArea.setAlignment(Pos.CENTER);
    }This sidesteps the whole add/remove issue.
    Cheers,
    zonski

  • Urgent!!!  How to pick  a  shape3D and give it a web link!!

    Hi,
    I'm new to java 3D.Can someone teach me how to pick a shape 3D and then give it a web link.
    I'll be delighted if someone send me some sample source code.
    This is urgent!! Please help!!
    Thanks.
    Chanax.

    There is a two part answer to your question:
    1. Detect when the object is picked
    -Detect when a mouse click is generated. When this happens, cast a ray from the mouse position to the scene graph to see if it 'picks' your desired object,
    - Make sure that pick reporting is enabled on ths shape you want picked, and on all nodes that are it's parent. Picking only works if all nodes from the base to the leaf are set to be pickable. More info on picking can be found here: http://java.sun.com/developer/onlineTraining/java3d/j3d_tutorial_ch4.pdf
    2. Launch the web browser (This is not java3d related)
    - Once you have confirmed that your shape was picked, you can open a web browser either using the System.exec() command (not very portable), or you could create a JTextPane and use Java's HTML features to display an HTML page directly. More on this at http://java.sun.com/docs/books/tutorial/uiswing/components/text.html

  • Cameras vs. views; views.xml

    Hi guys,
    [Question 1]
    I'm having problems defining and using appropriate user-defined cameras / views created within Acrobat 3D Toolkit.
    What I would like to do is predefine a set of appropriate user-defined views based on exact angles within my U3D model, and use this set within 3D annotations embedded in PDF documents.
    What I do not want are inexact views. I know that I could generate views by mouse-dragging (rotating) the scene within Acrobat 3D and saving the current view using the view snapshot button. That's not what I want.
    First of all I think I understand the difference between using views vs. using cameras:
    - When using views and clicking the left mouse button, the camera stays fixed, and the model is rotated about the center of the scene.
    - When using cameras and clicking the left mouse button, the camera is rotated around its focal point.
    I came up with the following workflow:
    (1) Open a U3D model in Acrobat 3D Toolkit
    (2) Select the desired view, e.g. 30° isometric view left top front, no perspective
    (3) Create a new camera (which is based on the current view)
    (4) Save the U3D model
    (5) Embed the U3D model into a PDF document thus creating a new 3D annotation
    (6) Import the cameras stored in the U3D model converting them into 3D annotation views
    The problem is that the resulting 3D annotation views are cameras but not views. I.e. when the user activates such a view and drags the mouse, the camera will be rotated but not the model! If the camera is far enough away from the center of the scene, the model "escapes".
    How can I solve this?
    [Question 2]
    Acrobat 3D Toolkit user manual:
    p.51:
    "Note: A sample views.xml is included with Acrobat 3D Toolkit and can be used as a template to define your custom views."
    p.54:
    User-defined views can be created either by creating camera objects or by defining the views in the views.xml file."
    p.54:
    "views.xml file: Views created using the views.xml file are non-positional. That is, they only control the angle of the camera. They are activated by using the Views menu (on page 293). Note that this file must be located in Acrobat 3D Toolkit's root installation folder for the views to be visible in the Views menu."
    I have no such file in my Acrobat installation folder. Where can I get a sample views.xml file?
    Thanks in advance for your help!
    Best regards
    Sebi

    The issue with the camera orbiting around its center is due to a limitation of the U3D file format. U3D does not support the concept of a camera target object or position. This means that when cameras are imported from the file the information pertaining to their orbit distance is lost in the conversion.
    The only way to really get around this shortcoming at the moment is to manually create the views in the PDF file with the correct camera target distance.
    Another possible solution is to create the views and then add a JavaScript file that has a CameraEventHandler that updates the camera's target distance based up the camera information provided.
    Something like the following:
    viewManager = new CameraEventHandler();
    viewManager.onEvent = function( event )
      if ( event.targetDistance == 1 )
        bb = scene.computeBoundingBox();
        cam = event.canvas.getCamera();
        dist = bb.center.subtract( cam.position ).length;
        dir = cam.targetPosition.subtract( cam.position );
        cam.targetPosition.set( cam.position.add( dir.scale( dist ) ) );
    runtime.addEventHandler( viewManager );
    Note: This will not work well for cameras placed very close to the exact center of the scene and added views that happen to have an exact target distance of 1 (very unlikely)

  • Reflectivity with Gradient Mesh ?

    I want to know how to create glass using the gradient mesh tool. I want glass that is reflective with transparency, I don't want the transparency to show the object below or that would kill the effect, gradients work but I want quasi-realism unless gradients are my only option in that case, I know my answer

    function(){return A.apply(null,[this].concat($A(arguments)))}
    I want glass that is reflective with transparency, I don't want the transparency to show the object below
    Transparency, by definition, shows the object below.
    Are you just saying you want to draw a scene that contains a glass object which appears to be transparent in the scene, but that doesn't actually use any AI "transparency" feature--in the sense that you can convincingly paint a wine glass using opaque oil paints?
    Regardless, why the insistence on a specific tool (Mesh Grad)?
    Drawing glass is like drawing anything else: just draw what you see. When you look at a glass, you don't see glass; you just see highlights, shadows, reflections, and distortions (if the glass is curved) and perhaps a slight tinting of whatever is behind the glass. So just draw the highlights, shadows, reflections, distortions, and tints that you see.
    Which tool you use is mostly immaterial, but Mesh Grads are in general unwieldy and tedious. Glass reflections and highlights are very often sharp-edged along at least one side. You can accomplish sharp edges with Mesh Grads, but their claim to fame is primarily multi-directional grads, which regular linear and radial grads can't do.
    JET

  • Changing a circular vector shape's size

    I need to be able to change (via lingo) the vertex list of a
    circle so that
    it becomes bigger/smaller based on the user dragging the
    mouse. I can't just
    change the rect of the sprite, as I want to extract the alpha
    from the
    vector member when the user has stopped dragging the mouse.
    I can change the size of the vector shape easily by
    incrementing/decrementing each vertex (4 in a circle) but of
    course it loses
    it's shape because I am not adjusting the points that make up
    the handles. I
    would imagine that for circles, there is a simple formula for
    calculating
    the points of the handle based on the vertices. Does anyone
    know? Is there
    a simpler solution I am overlooking altogether?

    I also have seen some issues working in the vector editor.
    Fortunately that
    is not what I am doing. Users of the program I am building
    can create shapes
    by clicking and dragging their mouse. Behind the scenes the
    code is
    adding/modifying the vertexList of a single vector shape.
    This is all
    working rock-solid. Previously users could create rectangles,
    polygons
    (including complex polygons) and freehand shapes using
    vectors, but I want
    to add circles.
    This is all part of a multi-user game, where one user is
    creating these
    shapes and sending them to other users (movies) over the
    internet. Sending a
    small list of coodinates is much more efficient than sending
    an image.
    Movies on the other end can reconstruct the shapes based on
    the vertexList
    received. Also I have already implemented the code to handle
    vectors, and
    would like to avoid having to write extra code just to handle
    circles drawn
    in a bitmap member.
    Any way I have noticed that the ratio of a vertex point to a
    handle point is
    consistent for circle shapes, approximately 1.786. So I wrote
    a fairly
    simple function that takes the desired radius as a parameter
    and updates
    vertex and handles appropriately. I haven't fully tested this
    yet, but
    initial results seem to be acceptable for my needs.
    Thanks

Maybe you are looking for

  • Urgent - How to change Item category for Open Purchase Order

    Hi Team, Lil bit tricky issue. My client has asked us to change the existing Item Category values, Combinations, Category Set etc. Its been changed and uploaded successfully. The question here is how we need to handle the category for Open Purchase O

  • Getting null value while parsing "XML String" with  encoding WINDOWS-1252.

    Hi, when I am converting the Follwoing "xml string " to Document, I am getting the "null" as a document value.     String strXML =  "<?xml version="1.0" encoding="WINDOWS-1252"?>                           <category name="SearchByAttributes" value="Se

  • G5 iMac will not run programs

    Hello again Guys, I'm back......  Just a quick note, Thanks to all who have offered me advice over my past issues.  I have a new one for you.  I recently picked up a G5 20 inch iMac  1.8 PPC  1.5 ram (gonna go pick up another gig today.  Nothing out

  • Video - can you have more than one per session?

    Can I have more than one video in a logic session - like one at the top of a session then 5 minutes later drop another in? I know Pro Tools has multiple video tracks. How do composers out there deal with new cuts etc?

  • Versatile editor for multi-platform word game

    Hi My 1st here. Will Flex do? WL Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Detect language Dutch English Estonian Filipino Finnish French Galici