当前位置: 首页>>代码示例>>Java>>正文


Java GridLayout类代码示例

本文整理汇总了Java中java.awt.GridLayout的典型用法代码示例。如果您正苦于以下问题:Java GridLayout类的具体用法?Java GridLayout怎么用?Java GridLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GridLayout类属于java.awt包,在下文中一共展示了GridLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: JAERDataViewer

import java.awt.GridLayout; //导入依赖的package包/类
/** Creates new form JAERDataViewer */
public JAERDataViewer(String title) {
    initComponents();
    
    this.setTitle(title);
    
    pnlGraph = new GraphPanel();
    pnlGraph.setBackground(new java.awt.Color(255, 255, 255));
    pnlGraph.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    pnlGraphContainer.setLayout(new GridLayout(0,1));
    pnlGraph.setUpdateEvent(new GraphPanelUpdateEvent() {
        public void update() {
            updateAxeBoxes();
        }
    });
    pnlGraphContainer.add(pnlGraph);
    pnlGraphContainer.revalidate();
    pnlGraphContainer.repaint();
    
    pnlGraph.setResizeX(false);
    pnlGraph.setResizeY(true);
    updateAxeBoxes();
    periodicUpdate(true);
    tblData.setModel(tabledata);
}
 
开发者ID:SensorsINI,项目名称:jaer,代码行数:26,代码来源:JAERDataViewer.java

示例2: FirstPassageTimeTest

import java.awt.GridLayout; //导入依赖的package包/类
public FirstPassageTimeTest(){
	super(new GridLayout(1,2));
	int dbscanMeter = 500;
	loadRealWorldData(new DistanceWithUnit(dbscanMeter, SpatialDistanceUnit.Meter));
	HashMap<Long, Double> values = null;
	values = firstPassageTimeCalculationTest();
	
	double[][] plotValues = new double [values.keySet().size()][2];
	
	int index=0;
	
	for(Entry<Long, Double> entry:values.entrySet()){
		plotValues[index][0] = entry.getKey();
		plotValues[index][1] = entry.getValue();
		
		index++;
	}
	
	
	PlotCanvas canvas = LinePlot.plot("First passage time", plotValues, Line.Style.SOLID, Color.RED);
       canvas.setTitle("First passage time (DBSCAN=" + dbscanMeter + "m)");
       canvas.setAxisLabels("t (hour)", "Fpt (t)");
       
	add(canvas);

}
 
开发者ID:hamdikavak,项目名称:human-mobility-modeling-utilities,代码行数:27,代码来源:FirstPassageTimeTest.java

示例3: FInfoDialog

import java.awt.GridLayout; //导入依赖的package包/类
/**
 * Creates new form FStandAdvance
 */
public FInfoDialog(java.awt.Frame parent, boolean modal) {
    super(parent, modal);
    infoDialog = this;
    initComponents();
    if (WelcomeParams.getInstance().btnFont != null) {
        buttonBack.setFont(WelcomeParams.getInstance().btnFont);
        buttonInRoot.setFont(WelcomeParams.getInstance().btnFont);
        buttonPrint.setFont(WelcomeParams.getInstance().btnFont);
        jButton2.setFont(WelcomeParams.getInstance().btnFont);
    }

    //На верхней панели пункта регистрации, там где заголовок и картинка в углу, можно вывести вэб-контент по URL. Оставьте пустым если не требуется
    if (!WelcomeParams.getInstance().topURL.isEmpty()) {
        panelUp.removeAll();
        final BrowserFX bro = new BrowserFX();
        final GridLayout gl = new GridLayout(1, 1);
        panelUp.setLayout(gl);
        panelUp.add(bro);
        bro.load(Uses.prepareAbsolutPathForImg(WelcomeParams.getInstance().topURL));
    }
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:25,代码来源:FInfoDialog.java

示例4: BrowserFX

import java.awt.GridLayout; //导入依赖的package包/类
public BrowserFX() {
    javafxPanel = new JFXPanel();
    GridLayout gl = new GridLayout(1, 1);
    setLayout(gl);
    add(javafxPanel, BorderLayout.CENTER);
    try {
        Thread.sleep(3000);
    } catch (InterruptedException ex) {
    }

    Platform.runLater(() -> {
        bro = new Browser();
        bro.getWebEngine().setJavaScriptEnabled(true);
        Scene scene = new Scene(bro, 750, 500, Color.web("#666970"));
        javafxPanel.setScene(scene);
        ready = true;
    });
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:19,代码来源:BrowserFX.java

示例5: initSave

import java.awt.GridLayout; //导入依赖的package包/类
void initSave() {
	savePanel = new JPanel(new GridLayout(0,1));
	savePanel.setBorder( BorderFactory.createTitledBorder("Save Options"));
	ButtonGroup gp = new ButtonGroup();
	saveToFile = new JToggleButton("Save ASCII table");
	savePanel.add( saveToFile );
	gp.add( saveToFile );
	saveToClipboard = new JToggleButton("Copy to clipboard");
	savePanel.add( saveToClipboard );
	gp.add( saveToClipboard );
	saveJPEG = new JToggleButton("Save JPEG image");
	savePanel.add( saveJPEG );
	gp.add( saveJPEG );
	savePNG = new JToggleButton("Save PNG image");
	savePanel.add( savePNG );
	gp.add( savePNG );
	print = new JToggleButton("Print");
	savePanel.add( print );
	gp.add( print );
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:21,代码来源:GMAProfile.java

示例6: getReplacemetPanel

import java.awt.GridLayout; //导入依赖的package包/类
private Component getReplacemetPanel() {
    JPanel group = new JPanel(new GridLayout(0, 1));
    group.setBorder(BorderFactory.createTitledBorder(ResourceLoader
            .getString("ArrowReplacementType.name")));
    group.add(safe = new JRadioButton("ArrowReplacementType.safe"));
    group.add(children = new JRadioButton("ArrowReplacementType.branching"));
    group.add(all = new JRadioButton("ArrowReplacementType.everywhere"));
    safe.setSelected(true);

    ButtonGroup g = new ButtonGroup();
    g.add(children);
    g.add(all);
    g.add(safe);

    setReplaceEnable(false);

    return group;
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:19,代码来源:SectorNameEditor.java

示例7: FilesModifiedConfirmation

import java.awt.GridLayout; //导入依赖的package包/类
public FilesModifiedConfirmation(SaveCookie[] saveCookies) {
    btnSaveAll = createSaveAllButton();
    btnSave    = createSaveButton();

    Mnemonics.setLocalizedText(btnSaveAll, getInitialSaveAllButtonText());
    Mnemonics.setLocalizedText(btnSave,    getInitialSaveButtonText());

    JScrollPane scrollPane
            = new JScrollPane(list = createFilesList(saveCookies));

    if (!listModel.isEmpty()) {
        list.setSelectedIndex(0);
    } else {
        updateSaveButtonState();
    }

    JComponent panel = new JPanel(new GridLayout(1, 1));
    panel.add(scrollPane);
    panel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
    mainComponent = panel;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:FilesModifiedConfirmation.java

示例8: initialize

import java.awt.GridLayout; //导入依赖的package包/类
/**
 * This method initializes this
 *
 * @return void
 */
private void initialize() {
    double[][] size = {{5, TableLayout.FILL, 5},
            {5, TableLayout.FILL, 5}};
    this.setLayout(new TableLayout(size));
    final GridLayout gridLayout3 = new GridLayout();
    JPanel child = new JPanel(gridLayout3);
    this.setSize(351, 105);
    gridLayout3.setRows(3);
    gridLayout3.setColumns(2);
    gridLayout3.setHgap(5);
    gridLayout3.setVgap(5);
    child.add(getJRadioButton(), null);
    child.add(getJRadioButton1(), null);
    child.add(getJRadioButton2(), null);
    child.add(getJRadioButton3(), null);
    child.add(getJRadioButton4(), null);
    child.add(getJTextField(), null);
    this.add(child, "1,1");
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:25,代码来源:StatusPanel.java

示例9: VisualPanelCopyOptions

import java.awt.GridLayout; //导入依赖的package包/类
/**
 * Create the panel.
 */
public VisualPanelCopyOptions() {
    setLayout(new GridLayout(0, 1, 0, 0));

    copyFont = new JCheckBox("Visual.copyFont");
    copyFont.setSelected(true);
    add(copyFont);

    copyBackground = new JCheckBox("Visual.copyBackground");
    copyBackground.setSelected(true);
    add(copyBackground);

    copyForeground = new JCheckBox("Visual.copyForeground");
    copyForeground.setSelected(true);
    add(copyForeground);

    copySize = new JCheckBox("Visual.copySize");
    copySize.setSelected(true);
    add(copySize);

}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:24,代码来源:VisualPanelCopyOptions.java

示例10: redoLayout

import java.awt.GridLayout; //导入依赖的package包/类
/**
 * Removes and adds the single result blocks according to the current width.
 */
private void redoLayout() {
	resultPanel.removeAll();
	if (expanded) {
		int curWidth = parent.getSize().width;
		int relevantWidth = SingleResultOverview.MIN_WIDTH + 25;
		int xCount = curWidth / relevantWidth;
		int yCount = (int) Math.ceil((double) results.size() / xCount);
		resultPanel.setLayout(new GridLayout(yCount, xCount));
		for (SingleResultOverview overview : results) {
			resultPanel.add(overview);
		}
	}
	revalidate();

}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:19,代码来源:ProcessExecutionResultOverview.java

示例11: BhattiproluPad

import java.awt.GridLayout; //导入依赖的package包/类
public BhattiproluPad() {
	mainFrame = new JFrame("Bhattiprolu Pad - Now, type in Telugu easily");
	mainFrame.setSize(800, 800);
	mainFrame.setLayout(new GridLayout(3, 1));

	headLabel = new JLabel("Bhattiprolu Pad 0.1", JLabel.CENTER);
	contentLabel = new JLabel("Empty", JLabel.CENTER);
	mainPanel = new JPanel();
	mainPanel.setLayout(new FlowLayout());

	headLabel.setFont(englishFont);
	contentLabel.setFont(teluguFont);

	mainFrame.add(headLabel);
	mainFrame.add(mainPanel);
	mainFrame.add(contentLabel);
	mainFrame.setVisible(true);
	mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

}
 
开发者ID:codersasank,项目名称:bhattiprolu-pad,代码行数:21,代码来源:BhattiproluPad.java

示例12: initComponents

import java.awt.GridLayout; //导入依赖的package包/类
private void initComponents() {
	Box vBox = Box.createVerticalBox();
	Box hBox = Box.createHorizontalBox();
	synView = new JTextPane();
	synView.setContentType("text/html");
	synView.setEditable(false);
	synScroll = new JScrollPane(synView);
	synScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	synScroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
	vBox.add(Box.createVerticalStrut(30));
	vBox.add(hBox);
	vBox.add(Box.createVerticalStrut(30));
	hBox.add(Box.createHorizontalStrut(20));
	hBox.add(synScroll);
	hBox.add(Box.createHorizontalStrut(20));
	this.setLayout(new GridLayout(1, 1));
	this.add(vBox);
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:19,代码来源:SynopsisPanel.java

示例13: initSave

import java.awt.GridLayout; //导入依赖的package包/类
void initSave() {
	savePanel = new JPanel(new GridLayout(0,1));
	savePanel.setBorder( BorderFactory.createTitledBorder("Save Options"));
	ButtonGroup gp = new ButtonGroup();
	saveToFile = new JToggleButton("Save ASCII table");
	savePanel.add( saveToFile );
	gp.add( saveToFile );
	saveToClipboard = new JToggleButton("Copy to clipboard");
	savePanel.add( saveToClipboard );
	gp.add( saveToClipboard );
	saveJPEG = new JToggleButton("Save JPEG image");
	savePanel.add( saveJPEG );
	gp.add( saveJPEG );
	savePNG = new JToggleButton("Save PNG image");
	savePanel.add( savePNG );
	gp.add( savePNG );
	saveToExcel = new JToggleButton("Save Excel table");
	savePanel.add( saveToExcel );
	gp.add( saveToExcel );
	print = new JToggleButton("Print");
	savePanel.add( print );
	gp.add( print );
}
 
开发者ID:iedadata,项目名称:geomapapp,代码行数:24,代码来源:XYSave.java

示例14: AbstractTreeEditor

import java.awt.GridLayout; //导入依赖的package包/类
public AbstractTreeEditor()
{
	tree = createTree();
	tree.addTreeSelectionListener(this);
	tree.setPreferredSize(new Dimension(325, 0));
	tree.setMinimumSize(new Dimension(325, 0));

	// Ensure the root nodes start loading
	tree.loadChildren(tree.getRootNode());

	editArea = new JPanel(new GridLayout(1, 1));

	AppletGuiUtils.removeBordersFromSplitPane(this);
	setOrientation(JSplitPane.HORIZONTAL_SPLIT);
	setContinuousLayout(true);
	setResizeWeight(0.05);

	add(tree, JSplitPane.LEFT);
	add(editArea, JSplitPane.RIGHT);

	noSelectionEditor = new BasicMessageEditor(
		CurrentLocale.get("com.tle.admin.gui.common.tree.nodeeditor.nonodeselected"));

	showTreeNodeEditor(noSelectionEditor);
}
 
开发者ID:equella,项目名称:Equella,代码行数:26,代码来源:AbstractTreeEditor.java

示例15: initComponents

import java.awt.GridLayout; //导入依赖的package包/类
private void initComponents() {
	Box vBox = Box.createVerticalBox();
	Box hBox = Box.createHorizontalBox();
	synView = new JTextPane();
	synView.setContentType("text/html");
	synView.setEditable(false);
	synScroll = new JScrollPane(synView);
	synScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	synScroll.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
	vBox.add(Box.createVerticalStrut(30));
	vBox.add(hBox);
	vBox.add(Box.createVerticalStrut(30));
	hBox.add(Box.createHorizontalStrut(20));
	hBox.add(synScroll);
	hBox.add(Box.createHorizontalStrut(20));
	this.setLayout(new GridLayout(1, 1));
	this.add(vBox);
	synView
			.setText("<html><body><center><font face=\"bold\" size=\"3\">Saturation Sectors will be here displayed once you solve the model.</font></center></body></html>");
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:21,代码来源:SectorsTextualPanel.java


注:本文中的java.awt.GridLayout类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。