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


Java SequentialGroup.addComponent方法代码示例

本文整理汇总了Java中javax.swing.GroupLayout.SequentialGroup.addComponent方法的典型用法代码示例。如果您正苦于以下问题:Java SequentialGroup.addComponent方法的具体用法?Java SequentialGroup.addComponent怎么用?Java SequentialGroup.addComponent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.GroupLayout.SequentialGroup的用法示例。


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

示例1: updatePanels

import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
private void updatePanels() {
	jFiltersPanel.removeAll();
	GroupLayout groupLayout = new GroupLayout(jFiltersPanel);
	jFiltersPanel.setLayout(groupLayout);
	groupLayout.setAutoCreateGaps(true);
	groupLayout.setAutoCreateContainerGaps(false);
	ParallelGroup horizontalGroup = groupLayout.createParallelGroup();
	SequentialGroup verticalGroup = groupLayout.createSequentialGroup();
	for (LocationPanel locationPanel : locationPanels) {
		horizontalGroup.addComponent(locationPanel.getPanel());
		verticalGroup.addComponent(locationPanel.getPanel());
	}
	jFiltersPanel.setVisible(!locationPanels.isEmpty());
	groupLayout.setHorizontalGroup(horizontalGroup);
	groupLayout.setVerticalGroup(verticalGroup);
	autoValidate();
	this.getDialog().pack();
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:19,代码来源:StockpileDialog.java

示例2: generateJFreeChart

import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
/**
 * Generate a vertical list of JFreeCharts
 * 
 * @param labels
 *            - the labels for the values
 * @param index
 *            - the index
 * @param values
 * @return
 */
public static String generateJFreeChart(List<String> labels,
        List<Double> index, List<List<Double>> values) {
    JPanel panel = new JPanel();
    // create a layout
    GroupLayout layout = new GroupLayout(panel);
    panel.setLayout(layout);
    layout.setAutoCreateGaps(true);
    layout.setAutoCreateContainerGaps(true);
    SequentialGroup sgv = layout.createSequentialGroup();
    layout.setVerticalGroup(sgv);
    ParallelGroup pgh = layout.createParallelGroup();
    layout.setHorizontalGroup(pgh);
    for (int i = 0; i != labels.size(); i++) {
        XYSeries xys = new XYSeries(labels.get(i));
        for (int j = 0; j != index.size(); j++) {
            xys.add(index.get(j), values.get(i).get(j));
        }
        XYSeriesCollection xysc = new XYSeriesCollection(xys);
        JFreeChart chart =
                ChartFactory.createXYLineChart(labels.get(i), "Time",
                        "Focus", xysc, PlotOrientation.VERTICAL, false,
                        false, false);
        chart.setBackgroundPaint(Color.white);
        chart.getTitle().setFont(new Font("Tahoma", Font.BOLD, 14));
        ChartPanel cp = new ChartPanel(chart);
        sgv.addComponent(cp);
        pgh.addComponent(cp);
    }
    JFrame frame = new JFrame();
    frame.add(panel);
    frame.pack();
    frame.setVisible(true);
    return null;
}
 
开发者ID:Xapagy,项目名称:Xapagy,代码行数:45,代码来源:tdVisualizationGenerator.java

示例3: makeVerticalGroup

import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
private SequentialGroup makeVerticalGroup( GroupLayout layout ) {
	SequentialGroup verticalGroup = layout.createSequentialGroup();

	verticalGroup.addGroup( layout.createParallelGroup( GroupLayout.Alignment.BASELINE )
			.addComponent( subjectJLabel )
			.addComponent( relationJLabel )
			.addComponent( objectJLabel )
	);

	for ( int i = 0; i < Constants.MAX_EXPORTS; i++ ) {
		verticalGroup.addGroup( layout.createParallelGroup( GroupLayout.Alignment.BASELINE )
				.addComponent( removeRowButtons.get( i ) )
				.addComponent( subjectComboBoxes.get( i ) )
				.addComponent( relationComboBoxes.get( i ) )
				.addComponent( objectComboBoxes.get( i ) )
		);
	}

	verticalGroup.addComponent( maxExportLimitLabel );
	verticalGroup.addGroup( layout.createParallelGroup( GroupLayout.Alignment.BASELINE )
			.addComponent( addRelationshipButton )
			.addComponent( togrid )
			.addComponent( exportButton )
	);

	return verticalGroup;
}
 
开发者ID:Ostrich-Emulators,项目名称:semtool,代码行数:28,代码来源:ExportSpecificRelationshipsToLoadingSheetAction.java

示例4: doLayout

import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
private void doLayout() {
	autoValidate();
	jFilters.removeAll();
	
	GroupLayout layout = new GroupLayout(jFilters);
	jFilters.setLayout(layout);
	layout.setAutoCreateGaps(true);
	layout.setAutoCreateContainerGaps(false);

	ParallelGroup horizontalGroup = layout.createParallelGroup();
	SequentialGroup verticalGroup = layout.createSequentialGroup();
	for (FilterPanel ownerPanel : ownerPanels) {
		horizontalGroup.addComponent(ownerPanel.getPanel());
		verticalGroup.addComponent(ownerPanel.getPanel());
	}

	for (FilterPanel flagPanel : flagPanels) {
		horizontalGroup.addComponent(flagPanel.getPanel());
		verticalGroup.addComponent(flagPanel.getPanel());
	}

	for (FilterPanel containerPanel : containerPanels) {
		horizontalGroup.addComponent(containerPanel.getPanel());
		verticalGroup.addComponent(containerPanel.getPanel());
	}

	layout.setVerticalGroup(verticalGroup);
	layout.setHorizontalGroup(horizontalGroup);
	getDialog().pack();
}
 
开发者ID:GoldenGnu,项目名称:jeveassets,代码行数:31,代码来源:StockpileDialog.java

示例5: createLayout

import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
private void createLayout() {
	this.setLayout(layout = new GroupLayout(this));

	setFloatable(false);
	
	SequentialGroup hGroup = layout.createSequentialGroup();
	ParallelGroup pGroup = layout.createParallelGroup(GroupLayout.Alignment.BASELINE);
	
	boolean isSubst = LookAndFeelManager.isSubstance();
	
	for(int i = 0; i < BUTTONCOUNT; i++) {
		if (isSubst) {
			hGroup.addComponent(buttons[i], sizes[i], buttons[i].getPreferredSize().width, Short.MAX_VALUE);
			pGroup.addComponent(buttons[i], 0, buttons[i].getPreferredSize().height, Short.MAX_VALUE);
		} else {
			hGroup.addComponent(buttons[i]);
			pGroup.addComponent(buttons[i]);
		}
		
		hGroup.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 0, Short.MAX_VALUE);
		final int fi = i;
		buttons[i].addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				onClick(fi);
			}
		});
	}
	
	if (isSubst) {
		hGroup.addGap(4);
	}
	
	layout.setHorizontalGroup(hGroup);
	
	layout.setVerticalGroup(pGroup);
}
 
开发者ID:Mikescher,项目名称:jClipCorn,代码行数:38,代码来源:SmallClipCharSortSelector.java

示例6: buildPledgesV

import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
private Group buildPledgesV(GroupLayout layout) {
    SequentialGroup contractsSectionV = layout.createSequentialGroup();

    contractsSectionV.addGap(5, 10, 15);
    contractsSectionV.addComponent(scrPledge);
    contractsSectionV.addGap(5, 10, 15);

    return contractsSectionV;
}
 
开发者ID:pikimix,项目名称:ChatProgram,代码行数:10,代码来源:Changeling.java

示例7: sequentialRadioArray

import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
public static SequentialGroup sequentialRadioArray( GroupLayout layout,
        Component[] array ) {
    SequentialGroup rtn = layout.createSequentialGroup();
    for ( int i = 0; i < array.length; i++ ) {
        rtn.addComponent(array[i]);
    }
    return rtn;
}
 
开发者ID:pikimix,项目名称:ChatProgram,代码行数:9,代码来源:Functions.java

示例8: graphChoiceEvolution

import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
/**
 * Generates the graph which plots the three choice scores (independent,
 * dependent and mood) for the evolution of a choice in time.
 * 
 * @param tdc
 *            - encompasses the selected choice
 * @param database
 *            - the database of values collected
 * @param agent
 * @param index
 *            - a list of time points which will be plotted on the x axis
 * @param choiceRange
 *            - the y axis will be [0, choiceRange]
 */
public static void graphChoiceEvolution(tdComponent tdc,
        tdDataBase database, Agent agent, List<Double> index,
        double choiceRange) {
    String label = xwChoice.xwConcise(new TwFormatter(), tdc.getChoice(), agent);

    // create a general purpose xy collection for jfreechart
    XYSeriesCollection xysc = new XYSeriesCollection();
    // focus and memory
    xysc.addSeries(new XYSeries("ChoiceScoreIndependent"));
    xysc.addSeries(new XYSeries("ChoiceScoreDependent"));
    xysc.addSeries(new XYSeries("ChoiceScoreMood"));
    // Fill in the values
    for (Double time : index) {
        double dtime = time;
        double valueChoiceScoreIndependent =
                database.getChoiceScoreDependent(tdc.getIdentifier(), time);
        xysc.getSeries("ChoiceScoreIndependent").add(dtime,
                valueChoiceScoreIndependent);
        double valueChoiceScoreDependent =
                database.getChoiceScoreDependent(tdc.getIdentifier(), time);
        xysc.getSeries("ChoiceScoreDependent").add(dtime,
                valueChoiceScoreDependent);
        double valueChoiceScoreMood =
                database.getChoiceScoreDependent(tdc.getIdentifier(), time);
        xysc.getSeries("ChoiceScoreMood").add(dtime, valueChoiceScoreMood);
    }
    //
    // ok, now let us create a graph
    //
    JPanel panel = new JPanel();
    // create a layout
    GroupLayout layout = new GroupLayout(panel);
    panel.setLayout(layout);
    layout.setAutoCreateGaps(true);
    layout.setAutoCreateContainerGaps(true);
    SequentialGroup sgv = layout.createSequentialGroup();
    layout.setVerticalGroup(sgv);
    ParallelGroup pgh = layout.createParallelGroup();
    layout.setHorizontalGroup(pgh);
    //
    // the graph with the focus and the memory
    //
    XYSeriesCollection xysFM = new XYSeriesCollection();
    xysFM.addSeries(xysc.getSeries("ChoiceScoreIndependent"));
    xysFM.addSeries(xysc.getSeries("ChoiceScoreDependent"));
    xysFM.addSeries(xysc.getSeries("ChoiceScoreMood"));
    JFreeChart chart =
            ChartFactory.createXYLineChart(label + " - Choice", "Time",
                    "Value", xysFM, PlotOrientation.VERTICAL, true, false,
                    false);
    GraphEvolution.setChartProperties(chart,
            GraphEvolution.lineStylesColorful);
    ChartPanel cp = new ChartPanel(chart);
    sgv.addComponent(cp);
    pgh.addComponent(cp);
    JFrame frame = new JFrame();
    frame.add(panel);
    frame.pack();
    frame.setVisible(true);
}
 
开发者ID:Xapagy,项目名称:Xapagy,代码行数:75,代码来源:GraphEvolution.java

示例9: graphLinksBetweenVis

import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
/**
 * Graphs the evolution of the links of all types (PRED, SUCC, SUMMARY,
 * CONTEXT etc) between two Vis.
 * 
 * @param fromVi
 * @param toVi
 * @param tdb
 * @param agent
 * @param index
 *            - a list of time points which will be plotted on the x axis
 */
public static void graphLinksBetweenVis(tdComponent fromVi,
        tdComponent toVi, tdDataBase tdb, Agent agent, List<Double> index) {
    String label =
            "Links between " + fromVi.getIdentifier() + " and "
                    + toVi.getIdentifier();
    // create a general purpose xy collection for jfreechart
    XYSeriesCollection xysc = new XYSeriesCollection();
    // add a series for each link type
    for (String linkName : agent.getLinks().getLinkTypeNames()) {
        XYSeries linkSeries = new XYSeries(linkName);
        xysc.addSeries(linkSeries);
        // now fill in the series with values
        for (Double time : index) {
            double dtime = time;
            double linkValue =
                    tdb.getLinkValue(fromVi.getIdentifier(),
                            toVi.getIdentifier(), linkName, time);
            linkSeries.add(dtime, linkValue);
        }
    }
    //
    // ok, now let us create a graph
    //
    JPanel panel = new JPanel();
    // create a layout
    GroupLayout layout = new GroupLayout(panel);
    panel.setLayout(layout);
    layout.setAutoCreateGaps(true);
    layout.setAutoCreateContainerGaps(true);
    SequentialGroup sgv = layout.createSequentialGroup();
    layout.setVerticalGroup(sgv);
    ParallelGroup pgh = layout.createParallelGroup();
    layout.setHorizontalGroup(pgh);
    JFreeChart chart =
            ChartFactory.createXYLineChart(label, "Time", "Value", xysc,
                    PlotOrientation.VERTICAL, true, false, false);
    GraphEvolution.setChartProperties(chart,
            GraphEvolution.lineStylesColorful);
    ChartPanel cp = new ChartPanel(chart);
    sgv.addComponent(cp);
    pgh.addComponent(cp);
    JFrame frame = new JFrame();
    frame.add(panel);
    frame.pack();
    frame.setVisible(true);
}
 
开发者ID:Xapagy,项目名称:Xapagy,代码行数:58,代码来源:GraphEvolution.java

示例10: getNewAnsweringPanel

import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
@Override
public JPanel getNewAnsweringPanel() {
    LikertskalaQuestion question = (LikertskalaQuestion) super.getQuestion();

    radioGroup = new ButtonGroup();
    radioList = new ArrayList<JRadioButton>();
    JLabel minJLabel = new JLabel(question.getLeftLabel());
    minJLabel.setHorizontalAlignment(SwingConstants.RIGHT);
    JLabel maxJLabel = new JLabel(question.getRightLabel());
    JRadioButton button;

    JPanel answer = new JPanel();
    GroupLayout layout = new GroupLayout(answer);
    answer.setLayout(layout);
    layout.setAutoCreateGaps(true);

    SequentialGroup hoGrp = layout.createSequentialGroup();
    ParallelGroup veGrp = layout.createParallelGroup(GroupLayout.Alignment.BASELINE);

    hoGrp.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE);
    hoGrp.addComponent(minJLabel);
    veGrp.addComponent(minJLabel);

    for (int i = 0; i < question.getCountOptions(); i++) {
        button = new JRadioButton("");
        button.setName(String.valueOf(i));

        radioGroup.add(button);
        radioList.add(button);

        hoGrp.addComponent(button, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE,
                GroupLayout.PREFERRED_SIZE);
        veGrp.addComponent(button);
    }

    hoGrp.addComponent(maxJLabel);
    veGrp.addComponent(maxJLabel);
    layout.linkSize(SwingConstants.HORIZONTAL, minJLabel, maxJLabel);
    hoGrp.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE);

    layout.setHorizontalGroup(hoGrp);
    layout.setVerticalGroup(veGrp);

    return answer;
}
 
开发者ID:ieg-vienna,项目名称:EvalBench,代码行数:46,代码来源:LikertskalaQuestionPanelStrategy.java

示例11: makeSettings

import javax.swing.GroupLayout.SequentialGroup; //导入方法依赖的package包/类
private JPanel makeSettings()
{
JPanel p = new JPanel();
GroupLayout layout = new GroupLayout(p);
layout.setAutoCreateContainerGaps(true);
p.setLayout(layout);

List<JPanel> panels = generateOptionPanels();

sDef = new SimpleCodeHolder(res.definitions);
sGlobLoc = new SimpleCodeHolder(res.globalLocals);
sInit = new SimpleCodeHolder(res.initialization);
sClean = new SimpleCodeHolder(res.cleanup);

bDef = new JButton(Messages.getString("EnigmaSettingsFrame.BUTTON_DEFINITIONS"),CODE_ICON); //$NON-NLS-1$
bGlobLoc = new JButton(Messages.getString("EnigmaSettingsFrame.BUTTON_GLOBAL_LOCALS"),CODE_ICON); //$NON-NLS-1$
bInit = new JButton(Messages.getString("EnigmaSettingsFrame.BUTTON_INITIALIZATION"),CODE_ICON); //$NON-NLS-1$
bClean = new JButton(Messages.getString("EnigmaSettingsFrame.BUTTON_CLEANUP"),CODE_ICON); //$NON-NLS-1$

bDef.addActionListener(this);
bGlobLoc.addActionListener(this);
bInit.addActionListener(this);
bClean.addActionListener(this);

Group gh = layout.createParallelGroup();
SequentialGroup gv = layout.createSequentialGroup();
if (panels != null) for (JPanel pp : panels)
	{
	gh.addComponent(pp);
	gv.addComponent(pp);
	}

layout.setHorizontalGroup(gh
/**/.addGroup(layout.createSequentialGroup()
/*	*/.addComponent(bDef)
/*	*/.addComponent(bGlobLoc))
/**/.addGroup(layout.createSequentialGroup()
/*	*/.addComponent(bInit)
/*	*/.addComponent(bClean)));
layout.setVerticalGroup(gv
/**/.addGroup(layout.createParallelGroup()
/*	*/.addComponent(bDef)
/*	*/.addComponent(bGlobLoc))
/**/.addGroup(layout.createParallelGroup()
/*	*/.addComponent(bInit)
/*	*/.addComponent(bClean))
/**/.addContainerGap());

return p;
}
 
开发者ID:enigma-dev,项目名称:lgmplugin,代码行数:51,代码来源:EnigmaSettingsHandler.java


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