Package org.netbeans.api.visual.widget

Examples of org.netbeans.api.visual.widget.LayerWidget


    private NodeMenu nodeMenu = new NodeMenu(this);

    private EdgeMenu edgeMenu = new EdgeMenu(this);

    public DemoGraphScene() {
        mainLayer = new LayerWidget(this);
        addChild(mainLayer);
        connectionLayer = new LayerWidget(this);
        addChild(connectionLayer);
        addChild(interractionLayer);
        // getActions().addAction(ActionFactory.createRectangularSelectAction(this,
        // backgroundLayer));
        // �����ɾ�� this.getActions().addAction(new WholeDragAction(this));
View Full Code Here


    public Component parent = null;
    private ResizeWidget widget = null;

    public ScorePanel() {

        mainLayer = new LayerWidget(this);
        addChild(mainLayer);
        InputMap inputMap = new InputMap();
        inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0, false), "VK_LEFT");
        inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0, false), "VK_RIGHT");
        inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0, false), "VK_UP");
View Full Code Here

//    private WidgetAction editorAction = ActionFactory.createInplaceEditorAction(new LabelTextFieldEditor());
    //   private Image image;
    //private Random r = new Random();

    public GraphEditorScene() {
        mainLayer = new LayerWidget(this);
        connectionLayer = new LayerWidget(this);
        interactionLayer = new LayerWidget(this);
        addChild(mainLayer);
        addChild(connectionLayer);
        addChild(interactionLayer);
//         image = Utilities.icon2Image(new ImageIcon(getClass().getResource("/demo/chuk.png"))); 
View Full Code Here

        selection = new HashSet<BlockWidget>();

        this.getInputBindings().setZoomActionModifiers(0);
        this.setLayout(LayoutFactory.createAbsoluteLayout());

        mainLayer = new LayerWidget(this);
        this.addChild(mainLayer);

        edgeLayer = new LayerWidget(this);
        this.addChild(edgeLayer);

        selectLayer = new LayerWidget(this);
        this.addChild(selectLayer);

        this.getActions().addAction(hoverAction);
        this.getActions().addAction(selectAction);
        this.getActions().addAction(ActionFactory.createRectangularSelectAction(this, selectLayer, this));
View Full Code Here

        scrollPane.getHorizontalScrollBar().setUnitIncrement(SCROLL_UNIT_INCREMENT);
        scrollPane.getHorizontalScrollBar().setBlockIncrement(SCROLL_BLOCK_INCREMENT);
        scrollPane.getViewport().addChangeListener(scrollChangeListener);
        hoverAction = this.createWidgetHoverAction();

        blockLayer = new LayerWidget(this);
        this.addChild(blockLayer);

        startLayer = new LayerWidget(this);
        this.addChild(startLayer);
        // TODO: String startLabelString = "Loading graph with " + originalDiagram.getFigures().size() + " figures and " + originalDiagram.getConnections().size() + " connections...";
        String startLabelString = "";
        LabelWidget w = new LabelWidget(this, startLabelString);
        scrollChangeListener.register(w, new Point(10, 10));
        w.setAlignment(LabelWidget.Alignment.CENTER);
        startLabel = w;
        startLayer.addChild(w);

        mainLayer = new LayerWidget(this);
        this.addChild(mainLayer);

        topLeft = new Widget(this);
        topLeft.setPreferredLocation(new Point(-BORDER_SIZE, -BORDER_SIZE));
        this.addChild(topLeft);


        bottomRight = new Widget(this);
        bottomRight.setPreferredLocation(new Point(-BORDER_SIZE, -BORDER_SIZE));
        this.addChild(bottomRight);

        slotLayer = new LayerWidget(this);
        this.addChild(slotLayer);

        connectionLayer = new LayerWidget(this);
        this.addChild(connectionLayer);

        LayerWidget selectionLayer = new LayerWidget(this);
        this.addChild(selectionLayer);

        this.setLayout(LayoutFactory.createAbsoluteLayout());

        this.getActions().addAction(hoverAction);
        zoomAction = new BoundedZoomAction(1.1, false);
        zoomAction.setMaxFactor(ZOOM_MAX_FACTOR);
        zoomAction.setMinFactor(ZOOM_MIN_FACTOR);
        this.getActions().addAction(ActionFactory.createMouseCenteredZoomAction(1.1));
        panAction = new ExtendedPanAction();
        this.getActions().addAction(panAction);
        this.getActions().addAction(ActionFactory.createPopupMenuAction(popupMenuProvider));

        LayerWidget selectLayer = new LayerWidget(this);
        this.addChild(selectLayer);
        this.getActions().addAction(ActionFactory.createRectangularSelectAction(rectangularSelectDecorator, selectLayer, rectangularSelectProvider));

        blockWidgets = new HashMap<InputBlock, BlockWidget>();
View Full Code Here

TOP

Related Classes of org.netbeans.api.visual.widget.LayerWidget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.