Drag a container and its children

Hi,
How do i drag a container and its children? 
I see you can drag something and its parent, but i don't see how you can get the child from the draginitiator. 
Thanks

I've had a chance to play with this now and I had a pop at using the JLayeredPane, throwing a component to the top which is a MouseListener and KeyListener and consume()s all the events. Works fine for the most part, until there's a JButton within the component - they manage to carry on handling events despite the consuming component over the top of them. Hover over them and they repaint, they're clickable, and so on. Hmm.

Similar Messages

  • Disabling events for a container and its children

    I've stumbled across this one and don't currently have time to find a full solution, so just wondering if anyone else has implemented the same...
    I have a class which extends JPanel and adds a "wait(boolean)" method - when called with 'true' this kicks off a Timer which repaints with an animated overlay until it is called again with 'false.' The overlay is simply painted, it's not an actual component.
    All well and good so far.
    However, what I'd like to do is also disable mouse/key/etc events within that panel. Let's say one of the components which it contains is a table - I don't want the user to be able to change the selected row whilst the panel is in 'wait mode.'
    Since Swing uses a bubble-up event model, this isn't trivial - the on-liner solutions such as calling setEnabled() or overriding processEvent() won't work because the component itself doesn't actually receive the events.
    So, the solutions off the top of my head are,
    1. when wait is called, lock and traverse the tree and disable/enable all the components within it - not a good solution as this disrupts the state of the components and even if a map is maintained, and changes to the hierarchy during wait mode will cause trouble
    2. use the panel as a container for a wrapped panel plus an overlay which is only visible during wait mode, delegate various methods to the wrapped panel - I don't like this as it means overriding a whole truckload of methods and it feels fragile
    3. when wait is called, inject an overlay panel into the component tree - I don't like this either as it means understanding the panel's context in its parent (eg it might be the center of a BorderLayout or it might be the left component in a JSplitPane) and it also has obvious implications for events such as ComponentEvent on the children
    4. wrap a panel as per 2 and instead of delegating, simply provide a "getPanel()" method to obtain it - perfectly functional but utterly ugly and it allows people to easily and comprehensively break the behaviour if they wish
    I can't help feeling there's something obvious I'm missing :o) ...I'm thinking more along the lines of a composition model rather than extension now, but I think I fundamentally still have similar issues.
    Anyone got any ideas?

    I've had a chance to play with this now and I had a pop at using the JLayeredPane, throwing a component to the top which is a MouseListener and KeyListener and consume()s all the events. Works fine for the most part, until there's a JButton within the component - they manage to carry on handling events despite the consuming component over the top of them. Hover over them and they repaint, they're clickable, and so on. Hmm.

  • Copy Parent and its children records

    Hello:
    I have a requirement to implement the "deep copy" functionality i.e. copy Opportunity and its children records including Contact, Opportunity Product Revenue etc. Can this be accomplished with the weblink, web services or any other options? I have went over the Oracle web services Guide doc, but I am still not sure what steps need to take in order to implement this "deep copy" functionality. Could you direct me to any reference docs to implement this?
    Thanks in advance!
    -AJ

    Briefly, it looks like this.
    "Deep copy", as you describe it, can be just a programmatic manipulation of data via WebServices. So your program would go through these steps:
    - login to WS (or use stateless sessions)
    - use Query method on Opportunity object Web Service to retrieve all fields from the record, and all child records
    - create new Opportunity record, by calling Insert method
    - create child records of all types you need, also by calling Insert method (in WS 1.0 you will use InsertChild)
    Exact details depend on your programming language.
    You may need to use both 1.0 and 2.0, or select which version to use, because these two interface support different child objects.
    In any case, there is no way to create both parent and children in one call - you create Opportunity record, and then reference its ID in new child objects.
    Hope it helps.

  • Accessing to Windows Server 2003 SP2 R2 32-bit from a Windows XP SP3 32-bit leaves a fork of the explorer and its children processes !!!

    When I try to access to Windows Server 2003 SP2 R2 32-bit from a Windows XP SP3 32-bit and then closes the RDP from Windows XP (the client side), a fork of the explorer and its children processes will persist in the server side !!!
    Take a look at the screenshot to understand:
    is this normal behavior !?
    Thank you for your understanding ;)

    Hi,
    I think this is normal behavior.
    You just close the RDP from client side but not log off the server, right?
    Regards.
    Vivian Wang
    Yes, right I closed the RDP from client side, not log off the server.

  • How to hide a transparent container and its fields in webdynpro abap

    Hello Friends,
    I am trying to create a view where i want to show some fields based on some other field.
    What i exactly need is When i enter some data in 1 input field .
    Corresponding to that input field few text fields wud be opened automatically in the same view.
    No Pop-ups allowed.
    What i am doing is !!
    i have created another Transparent container for my  text view fields.
    But i  am unable to hide this fields..
    Kindly help..
    At the runtime..
    After entering the value in the input field..
    This transparent container should become visible with the textview fields...
    Gaur Mayank

    Hi,
    Create A Context Attribute (Say  Visible_Hide )of Type WDUI_VISIBILITY with initial value as 01.
    Goto your Container, Bind the Visible Property with Above Created Attribute(Visible_Hide).
    In the Input Field,Use the OnEnter Event and Set the Value to Visible_Hide as 02.
    Then the Container will be Visible.
    Thaks.
    Uma

  • Disabling a panel and its children---help

    I have textfields and JComboBoxes in my JPanel.
    Depeding on some conditions, I would like to disable
    the user from entering any value in the text fields and
    choosing from JComboBox. If I set the setEnabled method to false,
    the existing values in those fields greyed-out. Because
    of this, the fields look "dull". Is there anyway, I can disable
    those fields while the look and feel remains the same.
    Thanks.

    morgalr,
    I can see both points. I agree wholeheartedly with you that when programmers stick to standards things are much better for users. Let me as-sure you that I am the first (and loudest) complainer about this. When I am forced to use a GUI that does not conform to my accustomed collection of [keyboard shortcut/mouseless usablility] features, I am famous for shamelessly cussing the thoughtless designer/programmer.
    I think that disabled/grayed-out looking controls tell the user "I am not relevant right now". But sometimes you don't want the control to say "I am not relevant right now", but rather "I am displaying useful information in a place where it makes sense for you to see it but not to change it right now". And grayed-out controls can be difficult to read.
    For example, I once had an application that listed 15 rows of information about slots in a physical device I was talking to serially. The 15-row list served a dual purpose: it showed software config info corresponding to each physical slot, and it allowed editing of slot's configuration only if the slot was not configured yet. Since each row consisted of a label, a combobox, 2 textfields, and a button, disabling some rows looked ugly and made the information presented difficult to read (in other words, the configured information looked less important than the not-yet-configured info, when it should have been looking more important). Furthermore, in the case when a row corresponded to an absent physical device, that row rightfully needed to be disabled. I chose to make my own disabled look for the not-yet-configured rows. It involved hiding the button, changing the background of the label, textfield, and background panel itself to yellowish (so that they didn't really look like controls anymore), but they were still lined up with and had a consistant look as the non-disabled rows. For real-estate purposes, this single list was a very intuitive way to look at this info -- At a glance user could tell (1) which rows were already configured, (2) the configuration information about those rows, (3) which rows needed to be configured, and (4) which rows were irrelevant.
    I know it's hard to explain the GUI theory without showing, but I am trying to give example of a situation when overriding the normal disabled look was a good thing. But the comboboxes could not easily have their look changed, and that caused me grief (I was still quite a newbie then and hadn't ever dreamed of overriding the UI or subcomponents of anything).
    /Mel

  • Resizing a node and make children appear/disappear on its "visibility"

    I guees I could wrap the question within a smaller sample code snippet. On the other side I put the whole thing in here, so you can see what I am working on (should be complete an runnable).
    I am playing around with some sort of windowing within JavaFX (building my own windows).
    It does not look nice so far, but it works somehow. Anyhow, when I minimize the window by dragging the frame it will be minimized till the size of its children. I would like to get it as small as I want. Uncommenting the Line " //window.setMinSize(0.0, 0.0);" will let me make it as small as possible, BUT the children stay visible too, but they should dissapear as soon as the frame hits their bounds.
    Anybody having any idea for a nice/slick solution ?
    Here is the code:
    package org.rob.javafx.framework;
    import javafx.application.Application;
    import javafx.event.EventHandler;
    import javafx.geometry.Point2D;
    import javafx.scene.Cursor;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ButtonBuilder;
    import javafx.scene.control.Label;
    import javafx.scene.control.LabelBuilder;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.*;
    import javafx.stage.Stage;
    import javafx.stage.StageStyle;
    public class Tests  extends Application {
        private Stage primaryStage;
        private double titleBox_initX;
        private double titleBox_initY;
        private Point2D titleBox_dragAnchor;
        private boolean resize_dragStart = false;
        private double resize_initWidth;
        private double resize_initHeight;
        private double resize_initX;
        private double resize_initY;
        private int resize_edge = EDGE_NONE;
        private Point2D resize_dragAnchor;
        private boolean izing_isMax = false;
        private double izing_X;
        private double izing_Y;
        private double izing_Width;
        private double izing_Height;
        private void init(Stage primaryStage) {
            this.primaryStage = primaryStage;
            Group root = new Group();
            primaryStage.setResizable(true);
            primaryStage.setScene(new Scene(root, 500,500));
            primaryStage.initStyle(StageStyle.TRANSPARENT);
            final VBox centerContent = VBoxBuilder.create().children(new Label("Label1"), new Label("Label2")).build();
            final BorderPane windowContent = BorderPaneBuilder.create().center(centerContent).build();
            final Region windowContentBox = HBoxBuilder.create().children(windowContent).build();
            final Region window = createWindow("Blue circle", windowContentBox, root);
            window.setTranslateX(200);
            window.setTranslateY(80);
        private Region createWindow(final String title, final Region content, final Group parent) {
            final StackPane window = StackPaneBuilder.create().prefHeight(300).cursor(Cursor.HAND).prefWidth(200).style("-fx-background-color:#b0c4de; -fx-border-style:solid; -fx-border-width:6px; -fx-border-color: linear-gradient(to bottom right, gray, gray 50%, black 50%, black);").build();
            // Without : minimizing stops at the space the children need, with this you can make it as small as possible,
            // BUT the children are still visible. -> ToDo: Make the children dissapear, but keep the titlebar.
            //window.setMinSize(0.0, 0.0);
            // Title-Bar
            final Label titleLabel = LabelBuilder.create().text(title).style("-fx-text-fill:yellow;").build();
            final Region titleBoxSpring = new Region();
            titleBoxSpring.setPrefWidth(20);
            titleBoxSpring.setMinWidth(Region.USE_PREF_SIZE);
            final Button titleMinBtn = ButtonBuilder.create().text("_").cursor(Cursor.DEFAULT).build();
            final Button titleMaxBtn = ButtonBuilder.create().text("+").cursor(Cursor.DEFAULT).build();
            final Button titleCloseBtn = ButtonBuilder.create().text("X").cursor(Cursor.DEFAULT).build();
            HBox.setHgrow(titleBoxSpring, Priority.ALWAYS); // make the "spring" always grow, so the buttons are always on the right.
            final HBox titleResizeButtonBox = HBoxBuilder.create().spacing(2).children(titleMinBtn, titleMaxBtn, titleCloseBtn).style("-fx-alignment:center-right;").build();
            final HBox titleBox = HBoxBuilder.create().children(titleLabel,titleBoxSpring,titleResizeButtonBox).prefHeight(30).cursor(Cursor.HAND).spacing(4.0).style("-fx-alignment:center-left; -fx-background-color:blue; -fx-border-style:dashed; -fx-border-width:1px; -fx-border-color: linear-gradient(to bottom right, gray, gray 50%, black 50%, black);").build();
            final BorderPane windowContentPane = BorderPaneBuilder.create().top(titleBox).center(content).build();
            titleMinBtn.setOnMouseClicked(new EventHandler<MouseEvent>() {
                public void handle(MouseEvent me) {
                    // -------- Minimizing-Handling ------
                    if(izing_isMax)
                        maximizeItRevert(window);
                    else
                        minimizeIt(window);            }
            titleMaxBtn.setOnMouseClicked(new EventHandler<MouseEvent>() {
                public void handle(MouseEvent me) {
                    // -------- Maximize-Handling ------
                    if(izing_isMax)
                        maximizeItRevert(window);
                    else
                        maximizeIt(window);
            titleCloseBtn.setOnMouseClicked(new EventHandler<MouseEvent>() {
                public void handle(MouseEvent me) {
                    parent.getChildren().remove(window);
            titleBox.setOnMouseClicked(new EventHandler<MouseEvent>() {
                public void handle(MouseEvent me) {
                    switch(me.getClickCount()){
                        case 1:
                            break;
                        case 2:
                            // -------- Maximize-Handling ------
                            if(izing_isMax)
                                maximizeItRevert(window);
                            else
                                maximizeIt(window);
                            break;
                        default:
                            break;
                    //when mouse is pressed, store initial position
                    titleBox_initX = window.getTranslateX();
                    titleBox_initY = window.getTranslateY();
                    titleBox_dragAnchor = new Point2D(me.getSceneX(), me.getSceneY());
            titleBox.setOnMousePressed(new EventHandler<MouseEvent>() {
                public void handle(MouseEvent me) {
                    //when mouse is pressed, store initial position
                    titleBox_initX = window.getTranslateX();
                    titleBox_initY = window.getTranslateY();
                    titleBox_dragAnchor = new Point2D(me.getSceneX(), me.getSceneY());
            titleBox.setOnMouseDragged(new EventHandler<MouseEvent>() {
                public void handle(MouseEvent me) {
                    if(!izing_isMax){
                        double dragX = me.getSceneX() - titleBox_dragAnchor.getX();
                        double dragY = me.getSceneY() - titleBox_dragAnchor.getY();
                        double newXPosition = titleBox_initX + dragX;
                        double newYPosition = titleBox_initY + dragY;
                        window.setTranslateX(newXPosition);
                        window.setTranslateY(newYPosition);
            window.setOnMouseExited(new EventHandler<MouseEvent>() {
                public void handle(MouseEvent me) {
                    if(window.getCursor() != Cursor.DEFAULT)
                        window.setCursor(Cursor.DEFAULT);
            window.setOnMouseMoved(new EventHandler<MouseEvent>() {
                public void handle(MouseEvent me) {
                    // ------ Resize-Handling ------
                    int resize_edge = getRESIZE_EDGE(me, window);
                    switch(resize_edge){
                        case EDGE_NORTH:
                            if (window.getCursor() != Cursor.N_RESIZE)
                                window.setCursor(Cursor.N_RESIZE);
                            break;
                        case EDGE_NORTH_EAST:
                            if (window.getCursor() != Cursor.NE_RESIZE)
                                window.setCursor(Cursor.NE_RESIZE);
                            break;
                        case EDGE_EAST:
                            if (window.getCursor() != Cursor.E_RESIZE)
                                window.setCursor(Cursor.E_RESIZE);
                            break;
                        case EDGE_SOUTH_EAST:
                            if (window.getCursor() != Cursor.SE_RESIZE)
                                window.setCursor(Cursor.SE_RESIZE);
                            break;
                        case EDGE_SOUTH:
                            if (window.getCursor() != Cursor.S_RESIZE)
                                window.setCursor(Cursor.S_RESIZE);
                            break;
                        case EDGE_SOUTH_WEST:
                            if (window.getCursor() != Cursor.SW_RESIZE)
                                window.setCursor(Cursor.SW_RESIZE);
                            break;
                        case EDGE_WEST:
                            if (window.getCursor() != Cursor.W_RESIZE)
                                window.setCursor(Cursor.W_RESIZE);
                            break;
                        case EDGE_NORTH_WEST:
                            if (window.getCursor() != Cursor.NW_RESIZE)
                                window.setCursor(Cursor.NW_RESIZE);
                            break;
                        default:
                            if (window.getCursor() != Cursor.DEFAULT)
                                window.setCursor(Cursor.DEFAULT);
                            break;
            window.setOnMousePressed(new EventHandler<MouseEvent>() {
                public void handle(MouseEvent me) {
                    // ------ Resize-Handling ------
                    resize_edge = getRESIZE_EDGE(me, window);
                    if(resize_edge != EDGE_NONE){
                        resize_initX = window.getTranslateX();
                        resize_initY = window.getTranslateY();
                        resize_initWidth = window.getWidth();
                        resize_initHeight = window.getHeight();
                        resize_dragAnchor = new Point2D(me.getSceneX(), me.getSceneY());
                        resize_dragStart = true;
                    } else
                        resize_dragStart = false;
            window.setOnMouseDragged(new EventHandler<MouseEvent>() {
                public void handle(MouseEvent me) {
                    // ------ Resize-Handling ------
                    if(resize_dragStart){
                        double dragX = me.getSceneX() - resize_dragAnchor.getX();
                        double dragY = me.getSceneY() - resize_dragAnchor.getY();
                        System.out.println("DraxX = " + dragX + " ; DragY = " + dragY);
                        double newWidth = window.getPrefWidth();
                        double newHeight = window.getPrefHeight();
                        switch(resize_edge){
                            case EDGE_NORTH:
                                newHeight = resize_initHeight - dragY;
                                window.setTranslateY(resize_initY + dragY);
                                break;
                            case EDGE_NORTH_EAST:
                                newHeight = resize_initHeight - dragY;
                                window.setTranslateY(resize_initY + dragY);
                                newWidth = resize_initWidth + dragX;
                                break;
                            case EDGE_EAST:
                                newWidth = resize_initWidth + dragX;
                                break;
                            case EDGE_SOUTH_EAST:
                                newHeight = resize_initHeight + dragY;
                                newWidth = resize_initWidth + dragX;
                                break;
                            case EDGE_SOUTH:
                                newHeight = resize_initHeight + dragY;
                                break;
                            case EDGE_SOUTH_WEST:
                                newHeight = resize_initHeight + dragY;
                                newWidth = resize_initWidth - dragX;
                                window.setTranslateX(resize_initX + dragX);
                                break;
                            case EDGE_WEST:
                                newWidth = resize_initWidth - dragX;
                                window.setTranslateX(resize_initX + dragX);
                                break;
                            case EDGE_NORTH_WEST:
                                newHeight = resize_initHeight - dragY;
                                window.setTranslateY(resize_initY + dragY);
                                newWidth = resize_initWidth - dragX;
                                window.setTranslateX(resize_initX + dragX);
                                break;
                            default:
                                break;
                        System.out.println("New-Width = " + newWidth + " ; New-Height = " + newHeight);
                        System.out.println("Content-Width = " + content.getWidth() + " ; Content-Height = " + content.getHeight());
                        window.setPrefWidth(newWidth);
                        window.setPrefHeight(newHeight);
            window.getChildren().addAll(windowContentPane);
            parent.getChildren().add(window);
            return window;
        private void maximizeItRevert(Region window){
            window.setTranslateX(izing_X);
            window.setTranslateY(izing_Y);
            window.setPrefWidth(izing_Width);
            window.setPrefHeight(izing_Height);
            izing_isMax = false;
        private void maximizeIt(Region window){
            izing_X = window.getTranslateX();
            izing_Y = window.getTranslateY();
            izing_Width = window.getWidth();
            izing_Height = window.getHeight();
            window.setTranslateX(0);
            window.setTranslateY(0);
            if(primaryStage.getStyle() == StageStyle.TRANSPARENT){
                window.setPrefWidth(window.getScene().getWindow().getWidth());
                window.setPrefHeight(window.getScene().getWindow().getHeight());
            } else {
                window.setPrefWidth(window.getScene().getWindow().getWidth() - 16);     // ToDo: 16 is hardcoded, since I do not know how to get the window border size. Still to do.
                window.setPrefHeight(window.getScene().getWindow().getHeight() - 38);   // ToDo: same
            izing_isMax = true;
        private void minimizeIt(Region window){
            izing_X = window.getTranslateX();
            izing_Y = window.getTranslateY();
            izing_Width = window.getWidth();
            izing_Height = window.getHeight();
            window.setTranslateX(0);
            if(primaryStage.getStyle() == StageStyle.TRANSPARENT)
                window.setTranslateY(window.getScene().getWindow().getHeight() - 50);
            else
                window.setTranslateY(window.getScene().getWindow().getHeight() - 88);
            window.setPrefWidth(60);
            window.setPrefHeight(30);
            izing_isMax = true;
        private final static int EDGEWITH = 8;
        private final static int EDGE_NONE = 0;
        private final static int EDGE_NORTH = 1;
        private final static int EDGE_NORTH_EAST = 2;
        private final static int EDGE_EAST = 3;
        private final static int EDGE_SOUTH_EAST = 4;
        private final static int EDGE_SOUTH = 5;
        private final static int EDGE_SOUTH_WEST = 6;
        private final static int EDGE_WEST = 7;
        private final static int EDGE_NORTH_WEST = 8;
        private int getRESIZE_EDGE(MouseEvent me, Region region){
            if(isN_RESIZE(me, region)){
                return EDGE_NORTH;   
            } else if(isNE_RESIZE(me, region)){
                return EDGE_NORTH_EAST;
            } else if(isE_RESIZE(me, region)){
                return EDGE_EAST;
            } else if(isSE_RESIZE(me, region)){
                return EDGE_SOUTH_EAST;
            } else if(isS_RESIZE(me, region)){
                return EDGE_SOUTH;
            } else if(isSW_RESIZE(me, region)){
                return EDGE_SOUTH_WEST;
            } else if(isW_RESIZE(me, region)){
                return EDGE_WEST;
            } else if(isNW_RESIZE(me, region)){
                return EDGE_NORTH_WEST;
            } else
                return EDGE_NONE;
        private boolean isN_RESIZE(MouseEvent me, Region region){       // North
            double recentXPos = me.getX();
            double recentYPos = me.getY();
            double xMin = EDGEWITH;
            double xMax = region.getWidth() - EDGEWITH;
            double yMin = 0;
            double yMax = EDGEWITH;
            return recentXPos > xMin && recentXPos < xMax && recentYPos > yMin && recentYPos < yMax;
        private boolean isNE_RESIZE(MouseEvent me, Region region){      // North-East (Upper-Right Corner)
            double recentXPos = me.getX();
            double recentYPos = me.getY();
            double xMin = region.getWidth() - EDGEWITH;
            double xMax = region.getWidth();
            double yMin = 0;
            double yMax = EDGEWITH;
            return recentXPos > xMin && recentXPos < xMax && recentYPos > yMin && recentYPos < yMax;
        private boolean isE_RESIZE(MouseEvent me, Region region){       // East
            double recentXPos = me.getX();
            double recentYPos = me.getY();
            double xMin = region.getWidth() - EDGEWITH;
            double xMax = region.getWidth();
            double yMin = EDGEWITH;
            double yMax = region.getHeight() - EDGEWITH;
            return recentXPos > xMin && recentXPos < xMax && recentYPos > yMin && recentYPos < yMax;
        private boolean isSE_RESIZE(MouseEvent me, Region region){      // South-East (Lower-Right Corner)
            double recentXPos = me.getX();
            double recentYPos = me.getY();
            double xMin = region.getWidth() - EDGEWITH;
            double xMax = region.getWidth();
            double yMin = region.getHeight() - EDGEWITH;
            double yMax = region.getHeight();
            return recentXPos > xMin && recentXPos < xMax && recentYPos > yMin && recentYPos < yMax;
        private boolean isS_RESIZE(MouseEvent me, Region region){      // South
            double recentXPos = me.getX();
            double recentYPos = me.getY();
            double xMin = EDGEWITH;
            double xMax = region.getWidth() - EDGEWITH;
            double yMin = region.getHeight() - EDGEWITH;
            double yMax = region.getHeight();
            return recentXPos > xMin && recentXPos < xMax && recentYPos > yMin && recentYPos < yMax;
        private boolean isSW_RESIZE(MouseEvent me, Region region){      // South-West (Lower-Left Corner)
            double recentXPos = me.getX();
            double recentYPos = me.getY();
            double xMin = 0;
            double xMax = EDGEWITH;
            double yMin = region.getHeight() - EDGEWITH;
            double yMax = region.getHeight();
            return recentXPos > xMin && recentXPos < xMax && recentYPos > yMin && recentYPos < yMax;
        private boolean isW_RESIZE(MouseEvent me, Region region){      // West
            double recentXPos = me.getX();
            double recentYPos = me.getY();
            double xMin = 0;
            double xMax = EDGEWITH;
            double yMin = EDGEWITH;
            double yMax = region.getHeight() - EDGEWITH;
            return recentXPos > xMin && recentXPos < xMax && recentYPos > yMin && recentYPos < yMax;
        private boolean isNW_RESIZE(MouseEvent me, Region region){      // North-West (Upper-Left Corner)
            double recentXPos = me.getX();
            double recentYPos = me.getY();
            double xMin = 0;
            double xMax = EDGEWITH;
            double yMin = 0;
            double yMax = EDGEWITH;
            return recentXPos > xMin && recentXPos < xMax && recentYPos > yMin && recentYPos < yMax;
        @Override
        public void start(Stage primaryStage) throws Exception {
            init(primaryStage);
            primaryStage.show();
        public static void main(String[] args) { launch(args); }
    }

    Hmm~ in your case I think you have to compute it by yourself
    I would use the width and height of the content as dependency.
    Add this to the hande-method of your MouseDragged-EventHandler:
    HBox center = (HBox) ((BorderPane) ((StackPane) window).getChildren().get(0)).getCenter();
    HBox top = (HBox) ((BorderPane) ((StackPane) window).getChildren().get(0)).getTop();
    /** @todo: compute the border of the window into this */
    if (newWidth < center.getWidth() || (newHeight - top.getHeight()) < center.getHeight()) {
        center.setManaged(false);
        center.setVisible(false);
    else {
        center.setManaged(true);
        center.setVisible(true);
    }

  • [svn:fx-trunk] 12542: When adding a mask to the display list need to validate it and all its children .

    Revision: 12542
    Revision: 12542
    Author:   [email protected]
    Date:     2009-12-04 10:38:32 -0800 (Fri, 04 Dec 2009)
    Log Message:
    When adding a mask to the display list need to validate it and all its children.  Previously the children were not validated and their display list was updated before properties were committed or measure was done.  RichText was not set up to handle this.
    QE notes:
    Doc notes:
    Bugs: SDK-24511
    Reviewer:  Evtim, Deepa
    Tests run: checkintests, fxg, primitives, Group
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24511
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/MaskUtil.as

    AFAIK, the only way to do this is to write a system modifcation.
    The BADI is executed only once at startup of the session, so that makes it merely static. (A strange point in time, I discussed it with SAP and they just shook their heads)
    I had the same problem with some other F4-Helps and it was a big hazzle. From my experience, no straight answer.

  • 1.- I´m creating a Muse site which contains videos, photos and sound. All videos, sounds and pictures are located in diferent folders in my PC. Since Muse doesn't organize the project and its files like Dremweaver (all files in a single folder). How can I

    1.- I´m creating a Muse site which contains videos, photos and sound. All videos, sounds and pictures are located in diferent folders in my PC. Since Muse doesn't organize the project and its files like Dremweaver (all files in a single folder). How can I manage my site (containing all the media)  in order to upload it to a server?
    2.- Is there a Adobe Muse community in spanish language?
    Thanks for your help
      Mauricio444

    Kevin is suggesting that you store the projects you create while working through his book in a folder called RoboHelpProjects. It is not where you have to store every project you ever create.That is for the purposes of his book.
    RoboHelp initially defaults to My RoboHelp Projects but it's up to you whether you do. Generally on the forums we advise against that as  it is part of your profile and can result in excessively long path names in a few cases. Generally where authors create file names that are so long they almost serve as the content.
    Projects always have a root folder, call them Project 1 and Project 2 for this purpose. You can have those folders directly off your C drive (or other local partition) or within in a parent folder as above.
    Now to what you can and cannot do. You can delete a whole project by selecting Project 1 or Project 2 in Windows Explorer. Obviously if you delete the parent folder you will delete all your projects within.
    What you must not do is delete individual files within a project using Windows Explorer, for that you use RoboHelp's Project Manager. The exception is if you go to Tools > Reports there is a report Unused Files. Files listed there will have to be deleted using Windows Explorer for the very good reason they do not appear in Project Manager and, therefore, cannot be deleted that way.
    If you think about it, it is similar to Word. There is no option to delete a document there other than using File > Open and right clicking. Not very intuitive.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • A query related to ProgressBar and its placing inside Container

    Hi ,
    I tried an example with  Flex3 ProgressBar .I am posting the scenario in which it was correct in one case and wrong in another case .
    Please tell me what  is wrong here in the wrong case :
    The Program is related to :
    I have button on click of that i will be loading the Image . There is no Button and its event Listener Mentioned here .
    Correct Approach :
    This works fine as the Image and ProgressBar are in the same Container called HBox
    <mx:HBox>
    <mx:Image id="image" autoload="false"/>
    <mx:ProgressBar id="MYPB" source="{image}"/>
    </mx:HBox>
    Wrong Approach :
    The below isn't working as i placed ProgressBar outside the container called as HBox
    <mx:HBox>
    <mx:Image id="image" autoload="false"/>
    </mx:HBox>
    <mx:ProgressBar id="MYPB" source="{image}"/>
    Please share your ideas as why this behaves this way .

    Hi Kiran.
    I don't think either of the approach is wrong , it no way effected by placing the ProgressBar inside a container or outside the container.
    Run the sample application below. It will load for both approaches.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
    <mx:Script>
            <![CDATA[
                public function loadImage1():void {
                  image1.load('assets/liazon_logo.png');
                public function loadImage2():void {
                  image2.load('assets/liazon_logo.png');
            ]]>
        </mx:Script>
    <mx:HBox>
      <mx:Image id="image1" autoLoad="false"/>
    </mx:HBox>
    <mx:ProgressBar id="MYPB1" source="{image1}"/>
    <mx:Button label="Load Image1" click="loadImage1()"/>
    <mx:HBox>
      <mx:Image id="image2" autoLoad="false"/>
      <mx:ProgressBar id="MYPB2" source="{image2}"/>
    </mx:HBox>
    <mx:Button label="Load Image2" click="loadImage2()"/>
    </mx:Application>
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

  • Need to retrieve all the UDAs associated to a member and its respective children in Excel

    Dear Experts,
    I'm working on Essbase version 11.1.2.1.106 and Hyperion smart view 11.1.2.1. There is a custom dimension in the outline and UDAs are assigned to all the members of that custom dimension.
    Now the requirement is to retrieve all the UDAs of a particular member and its respective children in Excel. Please let me know if there is any option to fulfill the requirement.
    Let say there is a member A and it has 10 childrens(A1-A10). All these members have UDAs assigned to them. Now i would like to retrieve/adhoc analysis all these members as well as its associated UDA in Excel. How can we do that using smart view.
    All your inputs are appreciated.
    Thanks in Advance

    Sree,
    If one does as you suggest, the individual UDAs can be viewed in the member selector dialog box and then members (not the UDAs) can be selected based on that.
    That is not, I think, what the OP wants:
    >>Now the requirement is to retrieve all the UDAs of a particular member and its respective children in Excel.
    Your approach doesn't provide the above.
    People have thought about using MDX to get the UDAs (and maybe someone really good with MDX metadata queries might come up with this), but that doesn't seem to be the case:
    Retrieving all Uda using Mdx Query-what should be string_value_expression?
    The API or Applied OLAP's new and improved Outline Extractor would seem to be the way to go.  Or of course you could export out the outline using MaxL and then parse the XML.
    Regards,
    Cameron Lackpour

  • Seq Container and MaximumErrorCount = 0

    Hello,
    I am having an issue with understanding "MaximumErrorCount = 0". Let me explain the problem with an example.
    Suppose there are 10 Dimensions and 4 Fact tables to process.
    We want to attempt processing all 10 Dimensions in parallel even if a few of them fail.
    But we will process Facts only if all Dimensions were successful.
    To implement this logic,
    Sequence Container 1 ("MaximumErrorCount = 0"): Dimensions
    Sequence Container 2: Facts
    I thought when we set "MaximumErrorCount = 0" in a container (Sequence Container 1), the container would execute all its children tasks even if some of them encounter errors, but the at the of completion of the container, its status would
    be "error" so that the subsequent "success" precedence constraints will not be satisfied.
    However, this is not the actual behaviour. It appears that when "MaximumErrorCount = 0", the container is set to "success" at the completion even if there were errors. The screenshot below is evidence to that.
    I would appreciate if someone could explain this in detail and how to implement the logic required for my example.

    By setting the MaximumErrorCount to 0 you effectively made the Sequence container #1 to not to report errors.
    Don't.
    You need to leave it at the default (1), what needs to be done is to suppress the error bubbling up the chain via propagate = false.
    I am giving you rather a blog post because it saves my time: http://sqlblog.com/blogs/rushabh_mehta/archive/2008/04/24/gracefully-handing-task-error-in-ssis-package.aspx
    You'd need to add another Sequence Container to what is explained in the blog post.
    Arthur My Blog

  • How copy a layer and its layer mask to another image?

    Using PSE9, how can a copy a layer and its layer mask to another image?
    The on-line help contains a topic on how to copy a layer but trying the different methods in the help topic results in either nothing being copied or just the layer without its layer mask being copied.  Thanks.

    How are you copying?  If you float your images, so they are both partially visible in the work area, make the one with the to be copied layer active.  Then drag the layer from the layers palette onto the other image.  Now you should have both the layer and the mask on the second image.
    Juergen

  • [b]HOW TO:[/b]  Copy and Paste THE Filename AND its PATH from Finder

    HOW TO DO THIS: Copy and Paste THE selected Filename AND its entire PATH from Finder to another application as in document footer reference, or document database which has a path field to aid in locating the file later.
    Finder, Spotlight and File Info (can be used to display Path) or using Command F, command I, etc. but user is not allowed to copy the path to clipboard.
    This is rudimentary, yet the word Path, is unknown to Mac Help.
    Message was edited by: jbov

    AJ,
    Isn't it amazing....There is no Command Key for this action? Apple Care was confounded too. And thanx, it'll be a help....
    Jim
    its tedious, but this should work:
    open a terminal window.
    Drag and drop the icon for the file in the terminal
    window.
    This will put the full path including the filename on
    the command line.
    Copy the path from the command line, and paste
    (wherever).
    Close the terminal window.

  • Trying to remove itunes and its component get this"the feature you are trying to use is on a network resource that is unavailable

    trying to remove itunes and its component get this"the feature you are trying to use is on a network resource that is unavailable" click ok to try again or enter an alternate path to a folder containing the installation package "itunes.msi'

    tiburon77 wrote:
    trying to remove itunes and its component get this"the feature you are trying to use is on a network resource that is unavailable" click ok to try again or enter an alternate path to a folder containing the installation package "itunes.msi'
    Unfortunately, this sort of trouble has gotten more complicated to deal with ever since Microsoft pulled the Windows Installer CleanUp utility from their Download Center on June 25. First we have to find a copy of the utility.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for at least version 3.0 of the Windows Installer CleanUp utility. After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove".
    Quit out of CleanUp, restart the PC and try installing iTunes again. Does the install go through properly now?
    (If you do find a clean download site for the correct version of CleanUp, please don't tell me where it is. Without wishing to sound paranoid (although I grant it does sound paranoid), there is a non-zero chance that posting links to download locations for the utility here at Discussions leads to that download location being shut down.)

Maybe you are looking for

  • How do I unlock protected music files that I purchased?

    How do I recover files that are in the library but are protected that I purchased?  Some will play on my PC and some wont.

  • How to drop and import the tables

    i got some tables that need to be dropped and recreated.It has got a PK with on delete cascade constraint.I need to drop and import those tables.How can i ddo this. Can i diable the constraints on these tables and import?

  • Missing color profile

    Hello, I am running CS at my job. 4 days ago, Photoshop started asking for color profiles on every single image I open. Most of these images are ones that I have used repeatedly in the past with no errors or missing profile messages. My question....?

  • Problem to set background color for configTable cell

    Hi All, I've a configTable displays some status fields, and I need to set yellow color when the status is in processing and green when finished and red when cancelled. I've searched the forum and decided to use iterator with method RENDER_CELL_START.

  • Transparency Issue when exporting Image Sequence

    Hi, I'm creating short anims which have transparency and exporting them as png image sequences.  I'm finding two issues with the export though: 1)  The first frame is always solid black (when it should be totally transparent) 2)  The R,G,B channels o