當前位置: 首頁>>代碼示例>>Java>>正文


Java FlowLayout.LEADING屬性代碼示例

本文整理匯總了Java中java.awt.FlowLayout.LEADING屬性的典型用法代碼示例。如果您正苦於以下問題:Java FlowLayout.LEADING屬性的具體用法?Java FlowLayout.LEADING怎麽用?Java FlowLayout.LEADING使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在java.awt.FlowLayout的用法示例。


在下文中一共展示了FlowLayout.LEADING屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: AlignmentPropertyEditor

public AlignmentPropertyEditor() {
    super(
        new int[] {
            FlowLayout.CENTER,
            FlowLayout.LEFT,
            FlowLayout.RIGHT,
            FlowLayout.LEADING,
            FlowLayout.TRAILING
        },
        new String[] {
            "java.awt.FlowLayout.CENTER", // NOI18N
            "java.awt.FlowLayout.LEFT", // NOI18N
            "java.awt.FlowLayout.RIGHT", // NOI18N
            "java.awt.FlowLayout.LEADING", // NOI18N
            "java.awt.FlowLayout.TRAILING" // NOI18N
        },
        new String[] {
            "VALUE_AlignmentCenter", // NOI18N
            "VALUE_AlignmentLeft", // NOI18N
            "VALUE_AlignmentRight", // NOI18N
            "VALUE_AlignmentLeading", // NOI18N
            "VALUE_AlignmentTrailing" // NOI18N
        }
    );
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:25,代碼來源:FlowLayoutBeanInfo.java

示例2: initComponents

private void initComponents() {
    setLayout(new BorderLayout());

    previewPanel = new JPanel(new FlowLayout(0, 0, FlowLayout.LEADING));
    previewPanel.setBorder(BorderFactory.createEmptyBorder(4, 7, 2, 7));

    label = new JLabel();
    label.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(2, 7, 7, 7),
                                                       new ThinBevelBorder(BevelBorder.LOWERED)));
    label.setBorder(BorderFactory.createCompoundBorder(label.getBorder(), BorderFactory.createEmptyBorder(4, 3, 4, 3)));
    label.setFont(label.getFont().deriveFont(Font.BOLD));

    JPanel p = new JPanel(new BorderLayout());
    p.setBorder(BorderFactory.createRaisedBevelBorder());
    p.add(previewPanel, BorderLayout.NORTH);
    p.add(label, BorderLayout.CENTER);

    add(p, BorderLayout.CENTER);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:19,代碼來源:ToggleProfilingPointAction.java

示例3: redraw

public void redraw() {
	// We redraw only if data has changed - Sebastiano Spicuglia
	if (!redrawNeeded)
		return;
	this.removeAll();
	if (data.hasResults() && data.areResultsOK()
			&& data.getResults().getSaturationSectors().size() > 0) {
		if (data.getClasses() == 2) {
			this.removeAll();
			this.setLayout(new BorderLayout());
			graph = new PerformanceIndices2DGraph(data);
			this.add(new JabaCanvas(graph), BorderLayout.CENTER);
			this.add(new JLabel(JabaConstants.DESCRIPITION_GRAPH_PERFORMANCE_INDEX),
					BorderLayout.PAGE_END);
			JPanel flowPanel = new JPanel(
					new FlowLayout(FlowLayout.LEADING));
			flowPanel.add(new JLabel(JabaConstants.SELECT_WHICH_INDEX));
			whichIndexComboBox = new JComboBox(whichIndexArray);
			whichIndexComboBox.addActionListener(this);
			flowPanel.add(whichIndexComboBox);
			//this.add(flowPanel, BorderLayout.PAGE_START);
			repaint();
		} else if (data.getClasses() == 3) {
			this.removeAll();
			// Not supported
			repaint();
		}
	} else {
		JEditorPane synView = new JTextPane();
		synView.setContentType("text/html");
		synView.setEditable(false);
		JScrollPane synScroll = new JScrollPane(synView);
		synScroll
				.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
		synScroll
				.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
		synView.setText("<html><body><center><font face=\"bold\" size=\"3\">Utilization will be here displayed once you solve the model.</font></center></body></html>");
		this.add(synScroll);
		repaint();
	}
	redrawNeeded = false;
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:42,代碼來源:PerformanceIndicesPanel.java

示例4: LoadingSavegameDialog

/**
 * Creates a dialog to set the options for loading a saved game.
 *
 * @param freeColClient The {@code FreeColClient} for the game.
 * @param frame The owner frame.
 */
public LoadingSavegameDialog(FreeColClient freeColClient, JFrame frame) {
    super(freeColClient, frame);

    JPanel panel = new JPanel();
    panel.setBorder(Utility.blankBorder(10, 10, 10, 10));
    panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));
    panel.setOpaque(false);

    JLabel header = Utility.localizedHeaderLabel(
        Messages.nameKey("loadingSavegameDialog"), JLabel.CENTER,
        FontLibrary.FontSize.MEDIUM);
    header.setBorder(Utility.blankBorder(20, 0, 0, 0));

    JPanel p1 = new JPanel(new FlowLayout(FlowLayout.LEADING));
    p1.add(Utility.localizedLabel("loadingSavegameDialog.serverName"));

    serverNameField = new JTextField();

    JPanel p2 = new JPanel(new FlowLayout(FlowLayout.LEADING));
    p2.add(Utility.localizedLabel("loadingSavegameDialog.port"));

    portField = new JSpinner(new SpinnerNumberModel(FreeCol.getServerPort(),
                                                    1, 65536, 1));
    ButtonGroup bg = new ButtonGroup();
    String str = Messages.message("loadingSavegameDialog.singlePlayer");
    singlePlayer = new JRadioButton(str);
    bg.add(singlePlayer);
    str = Messages.message("loadingSavegameDialog.privateMultiplayer");
    privateMultiplayer = new JRadioButton(str);
    bg.add(privateMultiplayer);
    str = Messages.message("loadingSavegameDialog.publicMultiplayer");
    publicMultiplayer = new JRadioButton(str);
    bg.add(publicMultiplayer);

    panel.add(header);
    panel.add(p1);
    panel.add(serverNameField);
    panel.add(p2);
    panel.add(portField);
    panel.add(singlePlayer);
    panel.add(privateMultiplayer);
    panel.add(publicMultiplayer);
    panel.setSize(panel.getPreferredSize());

    initializeConfirmDialog(frame, true, panel, null, "ok", "cancel");
}
 
開發者ID:FreeCol,項目名稱:freecol,代碼行數:52,代碼來源:LoadingSavegameDialog.java

示例5: getPanel

private JPanel getPanel(String key) {
    JPanel result = new JPanel(new FlowLayout(FlowLayout.LEADING));
    result.setOpaque(false);
    result.setBorder(Utility.localizedBorder(key, Color.GRAY));
    return result;
}
 
開發者ID:FreeCol,項目名稱:freecol,代碼行數:6,代碼來源:ReportEducationPanel.java


注:本文中的java.awt.FlowLayout.LEADING屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。