Examples of SlotLayout


Examples of com.sun.hotspot.igv.view.SlotLayout

        this.figure = f;
        this.resolveBounds(null, calculateClientArea());

        leftWidget = new Widget(s);
        this.addChild(leftWidget);
        leftWidget.setLayout(new SlotLayout(SlotLayout.HorizontalAlignment.Right, VERTICAL_LAYOUT));//LayoutFactory.createVerticalFlowLayout(LayoutFactory.SerialAlignment.JUSTIFY, 0));

        middleWidget = new Widget(s);
        this.addChild(middleWidget);

        if (VERTICAL_LAYOUT) {
            this.setLayout(LayoutFactory.createVerticalFlowLayout());
        } else {
            this.setLayout(LayoutFactory.createHorizontalFlowLayout());
        }

        middleWidget.setLayout(LayoutFactory.createVerticalFlowLayout());

        middleWidget.setBackground(f.getColor());
        middleWidget.setOpaque(true);
        assert this.getScene() != null;
        assert this.getScene().getView() != null;
        middleWidget.setBorder(BorderFactory.createLineBorder(Color.BLACK));


        labelWidgets = new ArrayList<LabelWidget>();

        String[] strings = figure.getLines();

        for (String cur : strings) {

            String displayString = cur;

            LabelWidget lw = new LabelWidget(s);
            labelWidgets.add(lw);
            middleWidget.addChild(lw);
            lw.setLabel(displayString);

            lw.setFont(font);
            lw.setForeground(Color.BLACK);
            lw.setAlignment(LabelWidget.Alignment.CENTER);
            lw.setVerticalAlignment(LabelWidget.VerticalAlignment.CENTER);
            lw.setMaximumSize(new Dimension(f.getWidth(), 20000));
            lw.setMinimumSize(new Dimension(f.getWidth(), 20));
        }

        rightWidget = new Widget(s);
        this.addChild(rightWidget);
        rightWidget.setLayout(new SlotLayout(SlotLayout.HorizontalAlignment.Left, VERTICAL_LAYOUT));//LayoutFactory.createVerticalLayout(LayoutFactory.SerialAlignment.JUSTIFY, 0));

        // Initialize node for property sheet
        node = new AbstractNode(Children.LEAF) {

            @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.