Layout.

@param c the c
163805
public static void layout(@javax.annotation.Nonnull final Component c) {
    c.doLayout();
    if (c instanceof Container) {
      Arrays.stream(((Container) c).getComponents()).forEach(com.simiacryptus.util.Util::layout);
    }
  }
722940
public void setLayout(FormLayout layout, JPanel panel)
    {
        this.panel = panel;
        this.layout = layout;
        panel.setLayout(layout);
        cc = new CellConstraints();
        row = -1;
    }
1245586
public void layout (Component comp)
    {
        Graphics2D gfx = (Graphics2D)comp.getGraphics();
        if (gfx != null) {
            layout(gfx);
            gfx.dispose();
        }
    }
14012
function(ch, w, coord, prop) {
     if(this.layout.horizontal()) {
       return this.layoutH(ch, w, coord, prop);
     } else {
       return this.layoutV(ch, w, coord, prop);
     }
    }
906831
public void drawTop(View view, Canvas c) {
        int left = view.getLeft() - mWidth;
        int top = view.getTop() - mHeight;
        int right = view.getRight() + mWidth;
        int bottom = top + mHeight;
        mDivider.setBounds(left, top, right, bottom);
        mDivider.draw(c);
    }
959286
def add_layout(self, l):
        """"""
        if self.layout():
            self.layout().addLayout(l)
        else:
            layout = QVBoxLayout(self)
            layout.addLayout(l)
1230077
@Override
    public void createLayout(Dimension dim, Rectangle visibleRect)
    {
        if (pdfdocument != null) //PDF mode: create the layout only when the DOM tree is already finished
        {
            if (pdfLoaded)
                createPdfLayout(dim);
        }
        else //DOM mode
        {
        	if (root != null)
        		super.createLayout(dim, visibleRect);
        }
    }
770926
protected void buildLayout() {
        setSizeFull();
        setSpacing(true);
        setMargin(false);
        setStyleName("group");
        final VerticalLayout gridHeaderLayout = new VerticalLayout();
        gridHeaderLayout.setSizeFull();
        gridHeaderLayout.setSpacing(false);
        gridHeaderLayout.setMargin(false);

        gridHeaderLayout.setStyleName("table-layout");
        gridHeaderLayout.addComponent(gridHeader);

        gridHeaderLayout.setComponentAlignment(gridHeader, Alignment.TOP_CENTER);
        gridHeaderLayout.addComponent(grid);
        gridHeaderLayout.setComponentAlignment(grid, Alignment.TOP_CENTER);
        gridHeaderLayout.setExpandRatio(grid, 1.0F);

        addComponent(gridHeaderLayout);
        setComponentAlignment(gridHeaderLayout, Alignment.TOP_CENTER);
        setExpandRatio(gridHeaderLayout, 1.0F);
        if (hasFooterSupport()) {
            final Layout footerLayout = getFooterSupport().createFooterMessageComponent();
            addComponent(footerLayout);
            setComponentAlignment(footerLayout, Alignment.BOTTOM_CENTER);
        }

    }
35503
public void setVerticalLayout(float startX, float startY, float height, int maxLines, float leading) {
        this.startX = startX;
        this.startY = startY;
        this.height = height;
        this.maxLines = maxLines;
        setLeading(leading);
    }
1119919
@Override
    public void init(Controller c) {
        super.init(c);
        Display2D mainDisplay = new Display2D(600, 600, this);
        mainDisplay.setBackdrop(Color.white);
        try {
            Scenario2DPortrayal scenarioPortrayal = (Scenario2DPortrayal) this
                    .getSimulation().getScenarioPortrayal();
            scenarioPortrayal.addDisplay(Scenario2DPortrayal.MAIN_DISPLAY_ID,
                    mainDisplay);

            HashMap<String, Display2D> displays = scenarioPortrayal
                    .getDisplays();

            this.addDisplays(scenarioPortrayal);
            this.addCharts(scenarioPortrayal);

            HashMap<String, TimeSeriesChartGenerator> timeCharts = scenarioPortrayal
                    .getTimeCharts();

            for (Entry<String, Display2D> displayEntry : displays.entrySet()) {
                displayEntry.getValue().setClipping(false);
                JFrame frame = displayEntry.getValue().createFrame();
                scenarioPortrayal.addFrame(displayEntry.getKey(), frame);
                frame.setTitle(displayEntry.getKey());
                c.registerFrame(frame);
                frame.setVisible(true);
            }

            for (Entry<String, TimeSeriesChartGenerator> chartEntry : timeCharts
                    .entrySet()) {
                JFrame frame = chartEntry.getValue().createFrame();
                scenarioPortrayal.addFrame(chartEntry.getKey(), frame);
                frame.setTitle(chartEntry.getKey());
                c.registerFrame(frame);
                frame.setVisible(true);
            }

            HashMap<String, ScatterPlotGenerator> scatterPlots = scenarioPortrayal
                    .getScatterPlots();

            for (Entry<String, ScatterPlotGenerator> scatterEntry : scatterPlots
                    .entrySet()) {
                JFrame frame = scatterEntry.getValue().createFrame();
                scenarioPortrayal.addFrame(scatterEntry.getKey(), frame);
                frame.setTitle(scatterEntry.getKey());
                c.registerFrame(frame);
                frame.setVisible(true);
            }

            HashMap<String, HistogramGenerator> histograms = scenarioPortrayal
                    .getHistograms();

            for (Entry<String, HistogramGenerator> histogramrEntry : histograms
                    .entrySet()) {
                JFrame frame = histogramrEntry.getValue().createFrame();
                scenarioPortrayal.addFrame(histogramrEntry.getKey(), frame);
                frame.setTitle(histogramrEntry.getKey());
                c.registerFrame(frame);
                frame.setVisible(true);
            }

            this.locateFrames(scenarioPortrayal);

            // } catch (DuplictaedDisplayIDException e) {
            // logger.severe(e.getMessage());
            // e.printStackTrace();
            // } catch (DuplicatedPortrayalIDException e) {
            // logger.severe(e.getMessage());
            // e.printStackTrace();
            // } catch (ScenarioNotFoundException e) {
            // logger.severe(e.getMessage());
            // e.printStackTrace();
            // } catch (DuplictedFrameIDException e) {
            // e.printStackTrace();
            // } catch (DuplicatedChartIDException e) {
            // e.printStackTrace();
        } catch (ShanksException e) {
            logger.severe(e.getMessage());
            e.printStackTrace();
        }
    }
241200
void setWorkbenchLayout(Layout layout) {
		validateNotNull(layout, "layout");

		if (this.layout == layout) {
			return;
		}

		requestTabIndex = getCurrentRequestTabIndex();

		Layout previousLayout = this.layout;
		this.layout = layout;

		componentMaximiser.unmaximiseComponent();
		removeAll();

		List<AbstractPanel> visiblePanels;
		switch (layout) {
		case FULL:
			visiblePanels = getTabbedStatus().getVisiblePanels();
			getTabbedStatus().hideAllTabs();
			visiblePanels.addAll(getTabbedWork().getVisiblePanels());
			getTabbedWork().hideAllTabs();
			visiblePanels.addAll(getTabbedSelect().getVisiblePanels());
			getTabbedSelect().hideAllTabs();
			getTabbedFull().setVisiblePanels(visiblePanels);
			updateFullLayout();
			this.add(getFullLayoutPanel());
			break;
		case EXPAND_SELECT:
		case EXPAND_STATUS:
		default:
			this.add(layout == Layout.EXPAND_STATUS ? createStatusPanelsSplit() : createSelectPanelsSplit());

			if (previousLayout == Layout.FULL) {
				visiblePanels = getTabbedFull().getVisiblePanels();
				getTabbedFull().hideAllTabs();
				getTabbedStatus().setVisiblePanels(visiblePanels);
				getTabbedWork().setVisiblePanels(visiblePanels);
				getTabbedSelect().setVisiblePanels(visiblePanels);

				setResponsePanelPosition(responsePanelPosition);
			}
			break;
		}

		this.validate();
		this.repaint();
	}
490297
private void init() {
        this.setOrientation(LinearLayout.VERTICAL);
        mLayoutParams = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    }
103802
private void updateStyle(JComponent c) {
        SeaGlassContext context  = getContext(this, ENABLED);
        SynthStyle      oldStyle = style;

        style = SeaGlassLookAndFeel.updateSeaglassStyle(context, this);

        if (style != oldStyle) {
            titleSpacing = style.getInt(context, "InternalFrameTitlePane.titleSpacing", 2);
        }

        context.dispose();
    }
661855
private void applyLayout()
    {
        int n = container.getComponentCount();
        for (int i=0; i<n; i++)
        {
            Component component = container.getComponent(i);
            if (component instanceof FrameComponent)
            {
                FrameComponent frameComponent = (FrameComponent)component;
                JInternalFrame internalFrame = 
                    frameComponent.getInternalFrame();
                Rectangle bounds = SwingUtilities.convertRectangle(
                    container, component.getBounds(), rootContainer);
                //System.out.println(
                //    "Set bounds of "+internalFrame.getTitle()+" to "+bounds);
                internalFrame.setBounds(bounds);
            }
            else
            {
                LayoutContainer childLayoutContainer = 
                    (LayoutContainer)component;
                //System.out.println(
                //    "Child with "+childLayoutContainer.getLayout());
                childLayoutContainer.owner.applyLayout();
            }
        }
    }
1252359
@Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        super.onLayout(changed, left, top, right, bottom);

        // See if the image needs redrawing
        refreshImage(false);
    }
76824
def AddToLayout(self, layout):
        
        for param in self.params:
            widget = param.RenderWidget()
            layout.addRow(param.caption, widget)
515351
def write_layout(layout = nil, type = nil) # :nodoc:
      tag = 'c:layout'

      if layout
        @writer.tag_elements(tag)  { write_manual_layout(layout, type) }
      else
        @writer.empty_tag(tag)
      end
    end