类javax.swing.LayoutStyle.ComponentPlacement源码实例Demo

下面列出了怎么用javax.swing.LayoutStyle.ComponentPlacement的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: dragonwell8_jdk   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码2 项目: TencentKona-8   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码3 项目: jdk8u60   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码4 项目: openjdk-jdk8u   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码5 项目: openjdk-jdk8u-backup   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码6 项目: Bytecoder   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码7 项目: openjdk-jdk9   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码8 项目: jdk8u-jdk   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码9 项目: hottub   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码10 项目: openjdk-8-source   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码11 项目: openjdk-8   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码12 项目: jdk8u_jdk   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码13 项目: jdk8u-jdk   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码14 项目: jdk8u-dev-jdk   文件: DefaultLayoutStyle.java
@Override
public int getPreferredGap(JComponent component1, JComponent component2,
        ComponentPlacement type, int position, Container parent) {
    if (component1 == null || component2 == null || type == null) {
        throw new NullPointerException();
    }

    checkPosition(position);

    if (type == ComponentPlacement.INDENT &&
            (position == SwingConstants.EAST ||
             position == SwingConstants.WEST)) {
        int indent = getIndent(component1, position);
        if (indent > 0) {
            return indent;
        }
    }
    return (type == ComponentPlacement.UNRELATED) ? 12 : 6;
}
 
源代码15 项目: templatespider   文件: diffItemPanel.java
/**
 * Create the panel.
 */
public diffItemPanel() {
	
	lblNewLabel = new JLabel("template name");
	lblNewLabel.setFont(new Font("Dialog", Font.BOLD, 18));
	
	JScrollPane scrollPane = new JScrollPane();
	GroupLayout groupLayout = new GroupLayout(this);
	groupLayout.setHorizontalGroup(
		groupLayout.createParallelGroup(Alignment.LEADING)
			.addGroup(groupLayout.createSequentialGroup()
				.addComponent(lblNewLabel, GroupLayout.DEFAULT_SIZE, 444, Short.MAX_VALUE)
				.addGap(6))
			.addComponent(scrollPane, GroupLayout.DEFAULT_SIZE, 450, Short.MAX_VALUE)
	);
	groupLayout.setVerticalGroup(
		groupLayout.createParallelGroup(Alignment.LEADING)
			.addGroup(groupLayout.createSequentialGroup()
				.addComponent(lblNewLabel)
				.addPreferredGap(ComponentPlacement.RELATED)
				.addComponent(scrollPane, GroupLayout.DEFAULT_SIZE, 272, Short.MAX_VALUE))
	);
	
	textArea = new JTextArea();
	scrollPane.setViewportView(textArea);
	setLayout(groupLayout);

}
 
源代码16 项目: netbeans   文件: BoxFillerInitializer.java
WidthHeightPanel(boolean showWidth, boolean showHeight) {
    ResourceBundle bundle = NbBundle.getBundle(BoxFillerInitializer.class);
    JLabel widthLabel = new JLabel(bundle.getString("BoxFillerInitializer.width")); // NOI18N
    JLabel heightLabel = new JLabel(bundle.getString("BoxFillerInitializer.height")); // NOI18N
    widthField = new JSpinner(new SpinnerNumberModel());
    heightField = new JSpinner(new SpinnerNumberModel());
    GroupLayout layout = new GroupLayout(this);
    setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
                .addComponent(widthLabel)
                .addComponent(heightLabel))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                .addComponent(widthField)
                .addComponent(heightField))
            .addContainerGap())
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                .addComponent(widthLabel)
                .addComponent(widthField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                .addComponent(heightLabel)
                .addComponent(heightField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    );
    widthLabel.setVisible(showWidth);
    heightLabel.setVisible(showHeight);
    widthField.setVisible(showWidth);
    heightField.setVisible(showHeight);
}
 
源代码17 项目: netbeans   文件: CodeCompletionPanel.java
/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    autoCompletionSmartQuotesLabel = new JLabel();
    autoCompletionSmartQuotesCheckBox = new JCheckBox();

    Mnemonics.setLocalizedText(autoCompletionSmartQuotesLabel, NbBundle.getMessage(CodeCompletionPanel.class, "CodeCompletionPanel.autoCompletionSmartQuotesLabel.text")); // NOI18N

    Mnemonics.setLocalizedText(autoCompletionSmartQuotesCheckBox, NbBundle.getMessage(CodeCompletionPanel.class, "CodeCompletionPanel.autoCompletionSmartQuotesCheckBox.text")); // NOI18N

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                .addComponent(autoCompletionSmartQuotesLabel)
                .addComponent(autoCompletionSmartQuotesCheckBox))
            .addContainerGap(30, Short.MAX_VALUE))
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addComponent(autoCompletionSmartQuotesLabel)
            .addPreferredGap(ComponentPlacement.RELATED)
            .addComponent(autoCompletionSmartQuotesCheckBox)
            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    );

    getAccessibleContext().setAccessibleName(NbBundle.getMessage(CodeCompletionPanel.class, "CodeCompletionPanel.AccessibleContext.accessibleName")); // NOI18N
    getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(CodeCompletionPanel.class, "CodeCompletionPanel.AccessibleContext.accessibleDescription")); // NOI18N
}
 
源代码18 项目: netbeans   文件: InstallPanel.java
private void doDisplayEnableTask (
            JComponent enableMainLabel,
            JComponent enableDetailLabel,
            JComponent enableProgress
        ) {
    
    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(enableMainLabel)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(enableDetailLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGap(54, 54, 54))
                .addComponent(enableProgress, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addContainerGap())
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                .addComponent(enableMainLabel)
                .addComponent(enableDetailLabel))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addComponent(enableProgress, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    );
    
}
 
源代码19 项目: netbeans   文件: FailedFilesPanel.java
/**
 * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    titleLabel = new JLabel();
    failedFilesScrollPane = new JScrollPane();
    failedFilesList = new JList<String>();

    Mnemonics.setLocalizedText(titleLabel, "TITLE"); // NOI18N

    failedFilesList.setEnabled(false);
    failedFilesScrollPane.setViewportView(failedFilesList);

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                .addComponent(failedFilesScrollPane)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(titleLabel)
                    .addGap(0, 0, Short.MAX_VALUE)))
            .addContainerGap())
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addComponent(titleLabel)
            .addPreferredGap(ComponentPlacement.RELATED)
            .addComponent(failedFilesScrollPane)
            .addContainerGap())
    );
}
 
源代码20 项目: netbeans   文件: TransferSelector.java
/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {


    treePanel = new JPanel();
    checkAllCheckBox = new JCheckBox();

    setBorder(BorderFactory.createEtchedBorder());

    treePanel.setLayout(new BorderLayout());
    Mnemonics.setLocalizedText(checkAllCheckBox, NbBundle.getMessage(TransferSelector.class, "TransferSelector.checkAllCheckBox.text"));
    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addComponent(checkAllCheckBox)
            .addContainerGap(212, Short.MAX_VALUE))
        .addComponent(treePanel, GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE)
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(Alignment.TRAILING, layout.createSequentialGroup()
            .addComponent(treePanel, GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE)
            .addPreferredGap(ComponentPlacement.RELATED)
            .addComponent(checkAllCheckBox))
    );
}
 
源代码21 项目: netbeans   文件: CustomizerIncludePath.java
/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    includePathLabel = new JLabel();
    includePathTabbedPane = new JTabbedPane();
    includePathInfoLabel = new JLabel();

    Mnemonics.setLocalizedText(includePathLabel, NbBundle.getMessage(CustomizerIncludePath.class, "CustomizerIncludePath.includePathLabel.text")); // NOI18N

    Mnemonics.setLocalizedText(includePathInfoLabel, NbBundle.getMessage(CustomizerIncludePath.class, "CustomizerIncludePath.includePathInfoLabel.text")); // NOI18N

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addComponent(includePathLabel)
        .addComponent(includePathInfoLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
        .addComponent(includePathTabbedPane)
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addComponent(includePathLabel)
            .addPreferredGap(ComponentPlacement.RELATED)
            .addComponent(includePathTabbedPane)
            .addPreferredGap(ComponentPlacement.RELATED)
            .addComponent(includePathInfoLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
    );
}
 
源代码22 项目: netbeans   文件: SelectFilePanel.java
/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    selectFileLabel = new JLabel();
    selectFileScrollPane = new JScrollPane();
    selectFileList = new JList<>();

    selectFileLabel.setLabelFor(selectFileList);
    Mnemonics.setLocalizedText(selectFileLabel, NbBundle.getMessage(SelectFilePanel.class, "SelectFilePanel.selectFileLabel.text")); // NOI18N

    selectFileList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    selectFileScrollPane.setViewportView(selectFileList);

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                .addComponent(selectFileScrollPane, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
                .addComponent(selectFileLabel))
            .addContainerGap())
    );
    layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addComponent(selectFileLabel)
            .addPreferredGap(ComponentPlacement.RELATED)
            .addComponent(selectFileScrollPane, GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE))
    );
}
 
源代码23 项目: netbeans   文件: Doctrine2CustomizerPanel.java
/**
 * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form
 * Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    enabledCheckBox = new JCheckBox();
    enabledInfoLabel = new JLabel();
    Mnemonics.setLocalizedText(enabledCheckBox, NbBundle.getMessage(Doctrine2CustomizerPanel.class, "Doctrine2CustomizerPanel.enabledCheckBox.text")); // NOI18N
    Mnemonics.setLocalizedText(enabledInfoLabel, NbBundle.getMessage(Doctrine2CustomizerPanel.class, "Doctrine2CustomizerPanel.enabledInfoLabel.text")); // NOI18N

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addComponent(enabledCheckBox)
        .addGroup(layout.createSequentialGroup()
            .addGap(21, 21, 21)
            .addComponent(enabledInfoLabel))
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addComponent(enabledCheckBox)
            .addPreferredGap(ComponentPlacement.RELATED)
            .addComponent(enabledInfoLabel))
    );
}
 
源代码24 项目: netbeans   文件: VCSCommitPanel.java
static Component makeVerticalStrut(JComponent compA,
                                    JComponent compB,
                                    ComponentPlacement relatedUnrelated, 
                                    JPanel parent) {
    int height = LayoutStyle.getInstance().getPreferredGap(
                        compA,
                        compB,
                        relatedUnrelated,
                        SOUTH,
                        parent);
    return Box.createVerticalStrut(height);
}
 
源代码25 项目: netbeans   文件: VCSCommitPanel.java
static Component makeHorizontalStrut(JComponent compA,
                                          JComponent compB,
                                          ComponentPlacement relatedUnrelated,
                                          JPanel parent) {
        int width = LayoutStyle.getInstance().getPreferredGap(
                            compA,
                            compB,
                            relatedUnrelated,
                            WEST,
                            parent);
        return Box.createHorizontalStrut(width);
}
 
源代码26 项目: BowlerStudio   文件: LocalSettingsPanel.java
@Override
public void initComponents() {
	GroupLayout groupLayout = new GroupLayout(this);
	groupLayout.setHorizontalGroup(
		groupLayout.createParallelGroup(Alignment.LEADING)
			.addGroup(groupLayout.createSequentialGroup()
				.addContainerGap()
				.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
					.addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup()
						.addComponent(getTfSlic3rLocation(), GroupLayout.DEFAULT_SIZE, 283, Short.MAX_VALUE)
						.addPreferredGap(ComponentPlacement.RELATED)
						.addComponent(getBtnChangeSlicr()))
					.addComponent(getBtnLoadDefaults(), Alignment.TRAILING)
					.addComponent(getLblCurrentLocationOf()))
				.addContainerGap())
	);
	groupLayout.setVerticalGroup(
		groupLayout.createParallelGroup(Alignment.LEADING)
			.addGroup(groupLayout.createSequentialGroup()
				.addContainerGap()
				.addComponent(getLblCurrentLocationOf())
				.addPreferredGap(ComponentPlacement.RELATED)
				.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
					.addComponent(getTfSlic3rLocation(), GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
					.addComponent(getBtnChangeSlicr()))
				.addPreferredGap(ComponentPlacement.RELATED, 212, Short.MAX_VALUE)
				.addComponent(getBtnLoadDefaults())
				.addContainerGap())
	);
	setLayout(groupLayout);
	getTfSlic3rLocation().setText(prefs.getSlic3rLocation());
	
}
 
源代码27 项目: netbeans   文件: NewMirrorPanel.java
/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    lblId = new JLabel();
    txtId = new JTextField();
    lblMirrorOf = new JLabel();
    comMirrorOf = new JComboBox();
    lblUrl = new JLabel();
    comUrl = new JComboBox();
    btnLink = new JButton();

    lblId.setLabelFor(txtId);
    Mnemonics.setLocalizedText(lblId, NbBundle.getMessage(NewMirrorPanel.class, "NewMirrorPanel.lblId.text")); // NOI18N

    lblMirrorOf.setLabelFor(comMirrorOf);
    Mnemonics.setLocalizedText(lblMirrorOf, NbBundle.getMessage(NewMirrorPanel.class, "NewMirrorPanel.lblMirrorOf.text")); // NOI18N

    comMirrorOf.setEditable(true);
    comMirrorOf.setModel(new DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

    lblUrl.setLabelFor(comUrl);
    Mnemonics.setLocalizedText(lblUrl, NbBundle.getMessage(NewMirrorPanel.class, "NewMirrorPanel.lblUrl.text")); // NOI18N

    comUrl.setEditable(true);
    comUrl.setModel(new DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

    Mnemonics.setLocalizedText(btnLink, NbBundle.getMessage(NewMirrorPanel.class, "NewMirrorPanel.btnLink.text")); // NOI18N
    btnLink.setBorder(null);
    btnLink.setBorderPainted(false);
    btnLink.setContentAreaFilled(false);
    btnLink.setHorizontalAlignment(SwingConstants.LEFT);

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(Alignment.LEADING)
                        .addComponent(lblMirrorOf)
                        .addComponent(lblId))
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(txtId, GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)
                            .addGap(145, 145, 145))
                        .addComponent(comMirrorOf, 0, 304, Short.MAX_VALUE)))
                .addGroup(layout.createSequentialGroup()
                    .addComponent(lblUrl)
                    .addPreferredGap(ComponentPlacement.UNRELATED)
                    .addComponent(comUrl, 0, 303, Short.MAX_VALUE))
                .addComponent(btnLink, GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE))
            .addContainerGap())
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                .addComponent(lblId)
                .addComponent(txtId, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                .addComponent(lblMirrorOf)
                .addComponent(comMirrorOf, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                .addComponent(lblUrl)
                .addComponent(comUrl, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
            .addGap(18, 18, 18)
            .addComponent(btnLink, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
            .addContainerGap(36, Short.MAX_VALUE))
    );
}
 
源代码28 项目: netbeans   文件: InstallPanel.java
private void doDisplayInstallTask (
            JComponent downloadMainLabel,
            JComponent downloadDetailLabel,
            JComponent downloadProgress,
            JComponent verifyMainLabel,
            JComponent verifyDetailLabel,
            JComponent verifyProgress,
            JComponent installMainLabel,
            JComponent installDetailLabel,
            JComponent installProgress
        ) {
    
    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(downloadMainLabel)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(downloadDetailLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGap(54, 54, 54))
                .addComponent(downloadProgress, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(verifyMainLabel)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(verifyDetailLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGap(54, 54, 54))
                .addComponent(verifyProgress, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(installMainLabel)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(installDetailLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGap(54, 54, 54))
                .addComponent(installProgress, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addContainerGap())
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                .addComponent(downloadMainLabel)
                .addComponent(downloadDetailLabel))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addComponent(downloadProgress, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
            .addGap(19, 19, 19)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                .addComponent(verifyMainLabel)
                .addComponent(verifyDetailLabel))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addComponent(verifyProgress, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                .addComponent(installMainLabel)
                .addComponent(installDetailLabel))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addComponent(installProgress, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    );
    
}
 
源代码29 项目: netbeans   文件: BrowseFolderPanel.java
/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    targetFolderLabel = new JLabel();
    targetFolderTextField = new JTextField();
    browseTargetFolderButton = new JButton();

    targetFolderLabel.setLabelFor(targetFolderTextField);
    Mnemonics.setLocalizedText(targetFolderLabel, NbBundle.getMessage(BrowseFolderPanel.class, "BrowseFolderPanel.targetFolderLabel.text"));
    Mnemonics.setLocalizedText(browseTargetFolderButton, NbBundle.getMessage(BrowseFolderPanel.class, "BrowseFolderPanel.browseTargetFolderButton.text"));
    browseTargetFolderButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            browseTargetFolderButtonActionPerformed(evt);
        }
    });

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap()
            .addComponent(targetFolderLabel)
            .addPreferredGap(ComponentPlacement.RELATED)
            .addComponent(targetFolderTextField, GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
            .addPreferredGap(ComponentPlacement.RELATED)
            .addComponent(browseTargetFolderButton)
            .addContainerGap())
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                .addComponent(targetFolderLabel)
                .addComponent(targetFolderTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                .addComponent(browseTargetFolderButton)))
    );
}
 
源代码30 项目: netbeans   文件: PhpDocPanel.java
/** This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    targetLabel = new JLabel();
    targetTextField = new JTextField();
    targetButton = new JButton();
    titleLabel = new JLabel();
    titleTextField = new JTextField();

    targetLabel.setLabelFor(targetTextField);
    Mnemonics.setLocalizedText(targetLabel, NbBundle.getMessage(PhpDocPanel.class, "PhpDocPanel.targetLabel.text"));
    Mnemonics.setLocalizedText(targetButton, NbBundle.getMessage(PhpDocPanel.class, "PhpDocPanel.targetButton.text"));
    targetButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            targetButtonActionPerformed(evt);
        }
    });

    titleLabel.setLabelFor(titleTextField);
    Mnemonics.setLocalizedText(titleLabel, NbBundle.getMessage(PhpDocPanel.class, "PhpDocPanel.titleLabel.text"));

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                .addComponent(targetLabel)
                .addComponent(titleLabel))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addGroup(layout.createParallelGroup(Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addComponent(targetTextField)
                    .addPreferredGap(ComponentPlacement.RELATED)
                    .addComponent(targetButton))
                .addComponent(titleTextField, GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE)))
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                .addComponent(targetLabel)
                .addComponent(targetTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                .addComponent(targetButton))
            .addPreferredGap(ComponentPlacement.RELATED)
            .addGroup(layout.createParallelGroup(Alignment.BASELINE)
                .addComponent(titleLabel)
                .addComponent(titleTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
            .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    );
}
 
 类所在包
 类方法
 同包方法