Create the layout manager for the title pane.

@return the layout manager.
494089
private LayoutManager createLayout() {
        SeaGlassContext context = getContext(this);
        LayoutManager   lm      = (LayoutManager) style.get(context, "InternalFrameTitlePane.titlePaneLayout");

        context.dispose();

        return (lm != null) ? lm : new SeaGlassTitlePaneLayout();
    }
1140790
public LinearLayoutManager asVerticalListView() {
        this.presentation = PeasyPresentation.VerticalList;
        resetItemDecorations();
        resetItemAnimator();
        final LinearLayoutManager layoutManager = PeasyRecyclerView.VerticalList.newLayoutManager(getContext());
        getRecyclerView().setLayoutManager(layoutManager);
        getRecyclerView().addItemDecoration(new DividerItemDecoration(getContext(), layoutManager.getOrientation()));
        getRecyclerView().setItemAnimator(new DefaultItemAnimator());
        return layoutManager;
    }
484109
private DefaultPanel createTopPanel() {
		DefaultPanel top = new DefaultPanel();
		top.setLayout(new BoxLayout(top, BoxLayout.X_AXIS));
		top.setAlignmentX(Component.LEFT_ALIGNMENT);
		top.setPreferredSize(new Dimension(Short.MAX_VALUE, 40));

		top.add(Box.createRigidArea(new Dimension(5, 0)));

		// property label
		JLabel propLabel = new JLabel("Property");
		propLabel.setBounds(10, 20, 40, 20);
		propLabel.setForeground(COLOR_LABEL);
		top.add(propLabel);
		top.add(Box.createRigidArea(new Dimension(5, 0)));

		// add properties combobox
		properties = new JComboBox();
		properties.setMaximumSize(new Dimension(100, 20));
		properties.setMinimumSize(new Dimension(100, 20));
		properties.setPreferredSize(new Dimension(100, 20));
		properties.addItemListener(new ItemListener() {
			public void itemStateChanged(ItemEvent event) {
				String item = (String) event.getItem();
				LinearInterpolator currentValue = (LinearInterpolator) values
						.get(item);
				panel.setInterpolator(currentValue);
			}
		});
		top.add(properties);
		top.add(Box.createRigidArea(new Dimension(10, 0)));

		// min label
		JLabel minLabel = new JLabel("Min");
		minLabel.setMaximumSize(new Dimension(100, 20));
		minLabel.setForeground(COLOR_LABEL);
		top.add(minLabel);
		top.add(Box.createRigidArea(new Dimension(5, 0)));

		// min spinner
		minSpinner = new JSpinner(new SpinnerNumberModel(0, -1000, 1000, 1));
		minSpinner.setMaximumSize(new Dimension(100, 20));
		minSpinner.addChangeListener(new ChangeListener() {
			public void stateChanged(ChangeEvent e) {
				fireUpdated(e.getSource());
			}
		});
		top.add(minSpinner);
		top.add(Box.createRigidArea(new Dimension(5, 0)));

		// max label
		JLabel maxLabel = new JLabel("Max");
		maxLabel.setMaximumSize(new Dimension(100, 20));
		maxLabel.setForeground(COLOR_LABEL);
		top.add(maxLabel);
		top.add(Box.createRigidArea(new Dimension(5, 0)));

		// max spinner
		maxSpinner = new JSpinner(new SpinnerNumberModel(255, -1000, 1000, 1));
		maxSpinner.setMaximumSize(new Dimension(100, 20));
		maxSpinner.addChangeListener(new ChangeListener() {
			public void stateChanged(ChangeEvent e) {
				fireUpdated(e.getSource());
			}
		});
		top.add(maxSpinner);
		top.add(Box.createRigidArea(new Dimension(5, 0)));

		// spacer
		top.add(Box.createHorizontalGlue());

		// value x label
		valueXLabel = new JLabel(TEXT_CURRENT_X);
		valueXLabel.setMaximumSize(new Dimension(100, 20));
		valueXLabel.setForeground(COLOR_LABEL);
		top.add(valueXLabel);
		top.add(Box.createRigidArea(new Dimension(10, 0)));

		// value y label
		valueYLabel = new JLabel(TEXT_CURRENT_Y);
		valueYLabel.setMaximumSize(new Dimension(100, 20));
		valueYLabel.setForeground(COLOR_LABEL);
		top.add(valueYLabel);
		top.add(Box.createRigidArea(new Dimension(10, 0)));

		return top;
	}
155908
public static JPanel wrapTitled(String title, JComponent component)
    {
        JPanel p = new JPanel(new GridLayout(1,1));
        p.setBorder(BorderFactory.createTitledBorder(title));
        p.add(component);
        return p;
    }
862626
private javax.swing.JPanel getPanelCommand() {
		if (panelCommand == null) {
			panelCommand = new javax.swing.JPanel();
			panelCommand.setLayout(new java.awt.GridBagLayout());
			panelCommand.setName(Constant.messages.getString("httpsessions.panel.title"));

			// Add the two components: toolbar and work pane
			GridBagConstraints toolbarGridBag = new GridBagConstraints();
			GridBagConstraints workPaneGridBag = new GridBagConstraints();

			toolbarGridBag.gridx = 0;
			toolbarGridBag.gridy = 0;
			toolbarGridBag.weightx = 1.0d;
			toolbarGridBag.insets = new java.awt.Insets(2, 2, 2, 2);
			toolbarGridBag.anchor = java.awt.GridBagConstraints.NORTHWEST;
			toolbarGridBag.fill = java.awt.GridBagConstraints.HORIZONTAL;

			workPaneGridBag.gridx = 0;
			workPaneGridBag.gridy = 1;
			workPaneGridBag.weightx = 1.0;
			workPaneGridBag.weighty = 1.0;
			workPaneGridBag.insets = new java.awt.Insets(0, 0, 0, 0);
			workPaneGridBag.anchor = java.awt.GridBagConstraints.NORTHWEST;
			workPaneGridBag.fill = java.awt.GridBagConstraints.BOTH;

			panelCommand.add(this.getPanelToolbar(), toolbarGridBag);
			panelCommand.add(getWorkPane(), workPaneGridBag);
		}
		return panelCommand;
	}
446385
public void layoutParts() {
    StringBuilder styleClass = new StringBuilder("group");

    // if there are no rows yet, getRowCount returns -1, in this case the next row is 0
    int nextRow = PreferencesFxUtils.getRowCount(grid) + 1;

    // Only when the preferencesGroup has a title
    if (preferencesGroup.getTitle() != null) {
      grid.add(titleLabel, 0, nextRow++, 2, 1);
      styleClass.append("-title");
      titleLabel.getStyleClass().add("group-title");
    }

    List<Field> fields = preferencesGroup.getElements().stream()
        .map(Field.class::cast)
        .collect(Collectors.toList());
    styleClass.append("-setting");

    int rowAmount = nextRow;
    for (int i = 0; i < fields.size(); i++) {
      // add to GridPane
      Field field = fields.get(i);
      SimpleControl c = (SimpleControl) field.getRenderer();
      c.setField(field);
      grid.add(c.getFieldLabel(), 0, i + rowAmount, 1, 1);
      grid.add(c.getNode(), 1, i + rowAmount, 1, 1);

      // Styling
      GridPane.setHgrow(c.getNode(), Priority.SOMETIMES);
      GridPane.setValignment(c.getNode(), VPos.CENTER);
      GridPane.setValignment(c.getFieldLabel(), VPos.CENTER);

      // additional styling for the last setting
      if (i == fields.size() - 1) {
        styleClass.append("-last");
        GridPane.setMargin(
            c.getNode(),
            new Insets(0, 0, PreferencesFxFormRenderer.SPACING * 4, 0)
        );
        GridPane.setMargin(
            c.getFieldLabel(),
            new Insets(0, 0, PreferencesFxFormRenderer.SPACING * 4, 0)
        );
      }

      c.getFieldLabel().getStyleClass().add(styleClass.toString() + "-label");
      c.getNode().getStyleClass().add(styleClass.toString() + "-node");
    }
  }
651231
private Pane buildButtonBar(final boolean isHorizontal) {

        if (isHorizontal) {
            this.box = new HBox();
            this.box.setMaxWidth(Region.USE_COMPUTED_SIZE);

            this.box.getStyleClass().add("HorizontalTabbedPane");

        } else {
            this.box = new VBox();
            this.box.setMaxHeight(Region.USE_COMPUTED_SIZE);

            this.box.getStyleClass().add("VerticalTabbedPane");
        }

        switch (model().object().orientation()) {
            case top:
                this.box.getStyleClass().add("Top");
                ((HBox) this.box).setAlignment(Pos.BOTTOM_LEFT);
                break;
            case bottom:
                this.box.getStyleClass().add("Bottom");
                ((HBox) this.box).setAlignment(Pos.TOP_RIGHT);
                break;
            case left:
                this.box.getStyleClass().add("Left");
                ((VBox) this.box).setAlignment(Pos.TOP_RIGHT);
                break;
            case right:
                this.box.getStyleClass().add("Right");
                ((VBox) this.box).setAlignment(Pos.TOP_LEFT);
                break;
        }

        return this.box;
    }
578678
private FormLayout initContent() {

        FormLayout form = new FormLayout();
        CmsPathSelectField field = new CmsPathSelectField();
        field.setValue(getInitialTarget(m_context.getCms(), m_context.getResources().get(0)));
        field.setStartWithSitempaView(true);
        field.setResourceFilter(CmsResourceFilter.IGNORE_EXPIRATION.addRequireFolder());
        field.setCaption(CmsVaadinUtils.getMessageText(org.opencms.workplace.commons.Messages.GUI_COPY_MOVE_TARGET_0));
        form.addComponent(field);
        m_targetSelect = field;
        m_copyMode.addItem(CmsContainerPageCopier.CopyMode.automatic);
        m_copyMode.setItemCaption(
            CmsContainerPageCopier.CopyMode.automatic,
            CmsVaadinUtils.getMessageText(Messages.GUI_COPYPAGE_MODE_AUTO_0));

        m_copyMode.addItem(CmsContainerPageCopier.CopyMode.smartCopyAndChangeLocale);
        m_copyMode.setItemCaption(
            CmsContainerPageCopier.CopyMode.smartCopyAndChangeLocale,
            CmsVaadinUtils.getMessageText(Messages.GUI_COPYPAGE_MODE_SMART_0));
        m_copyMode.addItem(CmsContainerPageCopier.CopyMode.reuse);
        m_copyMode.setItemCaption(
            CmsContainerPageCopier.CopyMode.reuse,
            CmsVaadinUtils.getMessageText(Messages.GUI_COPYPAGE_MODE_REUSE_0));
        m_copyMode.setValue(CmsContainerPageCopier.CopyMode.automatic);
        form.addComponent(m_copyMode);
        m_copyMode.setCaption(CmsVaadinUtils.getMessageText(Messages.GUI_COPYPAGE_COPY_MODE_0));
        return form;
    }
1345656
public Canvas getViewPanel() {
		VLayout mainLayout = new VLayout();
		mainLayout.setWidth100();
		mainLayout.setHeight100();
		mainLayout.setBackgroundColor("#A0A0A0");

		HLayout layout = new HLayout();
		layout.setWidth100();
		layout.setHeight100();
		layout.setMembersMargin(10);
		layout.setMargin(10);

		// ---------------------------------------------------------------------
		// Create the left-side (map and tabs):
		// ---------------------------------------------------------------------
		final MapWidget map = new MapWidget("mapRasterizingMain", "appRasterizing");
		final Toolbar toolbar = new Toolbar(map, WidgetLayout.toolbarLargeButtonSize);
		toolbar.setBackgroundColor("#647386");
		toolbar.setBackgroundImage("");
		toolbar.setBorder("0px");

		map.getMapModel().addMapModelChangedHandler(new MapModelChangedHandler() {

			public void onMapModelChanged(MapModelChangedEvent event) {
				// switch all labels on
				for (Layer layer : map.getMapModel().getLayers()) {
					layer.setLabeled(true);
				}
			}
		});

		map.getMapModel().addLayerSelectionHandler(new LayerSelectionHandler() {

			public void onSelectLayer(LayerSelectedEvent event) {
				for (Layer layer : map.getMapModel().getLayers()) {
					if (layer.isSelected()) {
						layer.setVisible(true);
					} else {
						layer.setVisible(false);
					}
				}
			}

			public void onDeselectLayer(LayerDeselectedEvent event) {
			}
		});

		VLayout mapLayout = new VLayout();
		mapLayout.addMember(toolbar);
		mapLayout.addMember(map);
		mapLayout.setHeight("65%");

		VLayout leftLayout = new VLayout();
		leftLayout.setBorder("10px solid #777777");
		leftLayout.setStyleName("round_corner");
		leftLayout.addMember(mapLayout);

		layout.addMember(leftLayout);

		// ---------------------------------------------------------------------
		// Create the right-side (overview map, layer-tree, legend):
		// ---------------------------------------------------------------------
		final SectionStack sectionStack = new SectionStack();
		sectionStack.setBorder("10px solid #777777");
		sectionStack.setStyleName("round_corner");
		sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
		sectionStack.setCanReorderSections(true);
		sectionStack.setCanResizeSections(false);
		sectionStack.setSize("250px", "100%");

		// Overview map layout:
		SectionStackSection section1 = new SectionStackSection("Overview map");
		section1.setExpanded(true);
		OverviewMap overviewMap = new OverviewMap("mapRasterizingOverview", "appRasterizing", map, false, true);
		overviewMap.setTargetMaxExtentRectangleStyle(new ShapeStyle("#888888", 0.3f, "#666666", 0.75f, 2));
		overviewMap.setRectangleStyle(new ShapeStyle("#6699FF", 0.3f, "#6699CC", 1f, 2));
		section1.addItem(overviewMap);
		sectionStack.addSection(section1);

		// LayerTree layout:
		SectionStackSection section2 = new SectionStackSection("Layer tree");
		section2.setExpanded(true);
		LayerTree layerTree = new LayerTree(map);
		section2.addItem(layerTree);
		sectionStack.addSection(section2);

		// Legend layout:
		SectionStackSection section3 = new SectionStackSection("Legend");
		section3.setExpanded(true);
		Legend legend = new Legend(map.getMapModel());
		legend.setBackgroundColor("#FFFFFF");
		section3.addItem(legend);
		sectionStack.addSection(section3);

		// Putting the right side layouts together:
		layout.addMember(sectionStack);

		// ---------------------------------------------------------------------
		// Finally draw everything:
		// ---------------------------------------------------------------------
		mainLayout.addMember(layout);
		mainLayout.draw();
		return mainLayout;
	}
549565
@Override
    protected Container createMessageArea() {
        JPanel top = new JPanel();
        top.setName("OptionPane.messageArea");
        top.setLayout(new BorderLayout());

        /* Fill the body. */
        Container body = new JPanel(new GridBagLayout());
        Container realBody = new JPanel(new BorderLayout());

        body.setName("OptionPane.body");
        realBody.setName("OptionPane.realBody");

        if (getIcon() != null) {
            JPanel sep = new JPanel();
            sep.setName("OptionPane.separator");
            sep.setPreferredSize(new Dimension(15, 1));
            realBody.add(sep, BorderLayout.BEFORE_LINE_BEGINS);
        }
        realBody.add(body, BorderLayout.CENTER);

        GridBagConstraints cons = new GridBagConstraints();
        cons.gridx = cons.gridy = 0;
        cons.gridwidth = GridBagConstraints.REMAINDER;
        cons.gridheight = 1;

        SeaGlassContext context = getContext(optionPane, ENABLED);
        cons.anchor = context.getStyle().getInt(context, "OptionPane.messageAnchor", GridBagConstraints.CENTER);
        context.dispose();

        cons.insets = new Insets(0, 0, 3, 0);

        addMessageComponents(body, cons, getMessage(), getMaxCharactersPerLineCount(), false);
        top.add(realBody, BorderLayout.CENTER);

        addIcon(top);
        return top;
    }
919850
def __createLayout(self):
        """"""
        self.resize(450, 150)
        self.setSizeGripEnabled(True)

        verticalLayout = QVBoxLayout(self)

        whereGroupbox = QGroupBox(self)
        whereGroupbox.setTitle("Garbage collector message destination")
        sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            whereGroupbox.sizePolicy().hasHeightForWidth())
        whereGroupbox.setSizePolicy(sizePolicy)

        layoutWhere = QVBoxLayout(whereGroupbox)
        self.__silentRButton = QRadioButton(whereGroupbox)
        self.__silentRButton.setText("Silent")
        layoutWhere.addWidget(self.__silentRButton)
        self.__statusbarRButton = QRadioButton(whereGroupbox)
        self.__statusbarRButton.setText("Status bar")
        layoutWhere.addWidget(self.__statusbarRButton)
        self.__logtabRButton = QRadioButton(whereGroupbox)
        self.__logtabRButton.setText("Log tab")
        layoutWhere.addWidget(self.__logtabRButton)

        verticalLayout.addWidget(whereGroupbox)

        buttonBox = QDialogButtonBox(self)
        buttonBox.setOrientation(Qt.Horizontal)
        buttonBox.setStandardButtons(QDialogButtonBox.Ok |
                                     QDialogButtonBox.Cancel)
        self.__OKButton = buttonBox.button(QDialogButtonBox.Ok)
        self.__OKButton.setDefault(True)
        buttonBox.accepted.connect(self.accept)
        buttonBox.rejected.connect(self.close)
        verticalLayout.addWidget(buttonBox)
490725
private JScrollPane getJScrollPane() {
		if (jScrollPane == null) {
			jScrollPane = new JScrollPane();
			jScrollPane.setViewportView(getTxtLicense());
			jScrollPane.setName("jScrollPane");
			jScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
		}
		return jScrollPane;
	}
1374920
@Override
	public Layout<AbstractType,String> getConfiguredLayout() {
		return new StaticLayout<AbstractType,String>( this.graph, this, getGraphDimension());
	}
1244082
protected JComponent createControl() {
		// In this view, we're just going to use standard Swing to place a
		// few controls.

		// The location of the text to display has been set as a Resource in the
		// property descriptionTextPath. So, use that resource to obtain a URL
		// and set that as the page for the text pane.

		JTextPane textPane = new JTextPane();
		JScrollPane spDescription = getApplicationConfig().componentFactory().createScrollPane(textPane);
		try {
			textPane.setPage(getDescriptionTextPath().getURL());
		}
		catch (IOException e) {
			throw new RuntimeException("Unable to load description URL", e);
		}

		JLabel lblMessage = getApplicationConfig().componentFactory().createLabel(getFirstMessage());
		lblMessage.setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));

		JPanel panel = getApplicationConfig().componentFactory().createPanel(new BorderLayout());
		panel.add(spDescription);
		panel.add(lblMessage, BorderLayout.SOUTH);

		return panel;
	}
361129
public ContentPropertyManager getContentPropertyManager() {
        if (contentPropertyManager != null) {
            return contentPropertyManager;
        }
        contentPropertyManager = (ContentPropertyManager) ContainerManager.getComponent("contentPropertyManager");
        return contentPropertyManager;
    }
643725
public static OrientationHelperEx createVerticalHelper(ExposeLinearLayoutManagerEx layoutManager) {
        return new OrientationHelperEx(layoutManager) {
            @Override
            public int getEndAfterPadding() {
                return mLayoutManager.getHeight() - mLayoutManager.getPaddingBottom();
            }

            @Override
            public int getEnd() {
                return mLayoutManager.getHeight();
            }

            @Override
            public void offsetChildren(int amount) {
                mLayoutManager.offsetChildrenVertical(amount);
            }

            @Override
            public int getStartAfterPadding() {
                return mLayoutManager.getPaddingTop();
            }

            @Override
            public int getDecoratedMeasurement(View view) {
                final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams)
                    view.getLayoutParams();
                return !mLayoutManager.isEnableMarginOverLap() ? mLayoutManager.getDecoratedMeasuredHeight(view) + params.topMargin
                    + params.bottomMargin : mLayoutManager.getDecoratedMeasuredHeight(view);
            }

            @Override
            public int getDecoratedMeasurementInOther(View view) {
                final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams)
                    view.getLayoutParams();
                return mLayoutManager.getDecoratedMeasuredWidth(view) + params.leftMargin + params.rightMargin ;
            }

            @Override
            public int getDecoratedEnd(View view) {
                final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams)
                    view.getLayoutParams();
                return !mLayoutManager.isEnableMarginOverLap() ? mLayoutManager.getDecoratedBottom(view)
                    + params.bottomMargin : mLayoutManager.getDecoratedBottom(view);
            }

            @Override
            public int getDecoratedStart(View view) {
                final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams)
                    view.getLayoutParams();
                return !mLayoutManager.isEnableMarginOverLap() ? mLayoutManager.getDecoratedTop(view) - params.topMargin
                    : mLayoutManager.getDecoratedTop(view);
            }

            @Override
            public int getTotalSpace() {
                return mLayoutManager.getHeight() - mLayoutManager.getPaddingTop()
                    - mLayoutManager.getPaddingBottom();
            }

            @Override
            public void offsetChild(View view, int offset) {
                view.offsetTopAndBottom(offset);
            }

            @Override
            public int getEndPadding() {
                return mLayoutManager.getPaddingBottom();
            }
        };
    }
726246
private JFrame initMainFrame()
    {
        final String title = getTitle();
        final JFrame jframe = new JFrame(title, conf);
        jframe.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
        jframe.addWindowListener(new WindowAdapter()
        {
            @Override
            public void windowClosing(WindowEvent event)
            {
                listeners.forEach(ScreenListener::notifyClosed);
            }
        });
        jframe.setResizable(false);
        jframe.setUndecorated(false);
        jframe.setIgnoreRepaint(true);

        return jframe;
    }