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


Java GroupLayout.replace方法代码示例

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


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

示例1: switchHelper

import javax.swing.GroupLayout; //导入方法依赖的package包/类
private void switchHelper() {
    JLabel temp = new JLabel();
    GroupLayout layout = (GroupLayout)getLayout();
    layout.replace(dummyCreateLabel, temp);
    layout.replace(createNewButton, dummyCreateLabel);
    layout.replace(temp, createNewButton);
    
    if(attachLogFileButton != null) {
        layout.replace(dummyAttachLabel, temp);
        layout.replace(attachLogFileButton, dummyAttachLabel);
        layout.replace(temp, attachLogFileButton);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:AttachmentsPanel.java

示例2: TaskPanel

import javax.swing.GroupLayout; //导入方法依赖的package包/类
/**
 * Creates new form TaskPanel
 */
public TaskPanel (LocalTask task) {
    this.task = task;
    initComponents();
    updateReadOnlyField(headerField);
    Font font = new JLabel().getFont();
    headerField.setFont(font.deriveFont((float) (font.getSize() * 1.7)));

    mainScrollPane.getVerticalScrollBar().setUnitIncrement(10);
    
    privateNotesField.addCaretListener(new CaretListener() {
        @Override
        public void caretUpdate (CaretEvent e) {
            makeCaretVisible(privateNotesField);
        }
    });
    // A11Y - Issues 163597 and 163598
    UIUtils.fixFocusTraversalKeys(privateNotesField);
    initSpellChecker();

    attachmentsPanel = new AttachmentsPanel(this);
    attachmentsSection.setContent(attachmentsPanel);
    
    GroupLayout layout = (GroupLayout) attributesPanel.getLayout();
    dueDatePicker = UIUtils.createDatePickerComponent();
    scheduleDatePicker = new SchedulePicker();
    layout.replace(dummyDueDateField, dueDatePicker.getComponent());
    dueDateLabel.setLabelFor(dueDatePicker.getComponent());
    layout.replace(dummyScheduleDateField, scheduleDatePicker.getComponent());
    scheduleDateLabel.setLabelFor(scheduleDatePicker.getComponent());
    attachListeners();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:35,代码来源:TaskPanel.java

示例3: AddSubtaskPanel

import javax.swing.GroupLayout; //导入方法依赖的package包/类
AddSubtaskPanel () {
    initComponents();

    support = new ChangeSupport(this);
    qs = IssueQuickSearch.create();
    qs.setChangeListener(this);
    GroupLayout layout = (GroupLayout) getLayout();
    layout.replace(issuePanel, qs.getComponent());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:AddSubtaskPanel.java

示例4: QuickSearchPanel

import javax.swing.GroupLayout; //导入方法依赖的package包/类
/**
 * Creates new form QuickSearchPanel
 */
public QuickSearchPanel(RepositoryImpl repositoryImpl) {
    initComponents();
    quickIssueSearch = new QuickSearchComboBar(this);
    GroupLayout layout = (GroupLayout) this.getLayout();
    quickIssueSearch.setRepository(repositoryImpl);
    layout.replace(placeholderTask, quickIssueSearch);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:QuickSearchPanel.java

示例5: swap

import javax.swing.GroupLayout; //导入方法依赖的package包/类
private static void swap(GroupLayout layout, JComponent comp1, JComponent comp2, JComponent temp) {
    layout.replace(comp1, temp);
    layout.replace(comp2, comp1);
    layout.replace(temp, comp2);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:IssuePanel.java

示例6: QueryTopComponent

import javax.swing.GroupLayout; //导入方法依赖的package包/类
QueryTopComponent() {
    initComponents();
    instanceContent.add(getActionMap());
    associateLookup(new AbstractLookup(instanceContent));
    RepositoryRegistry.getInstance().addPropertyChangeListener(this);
    repositoryComboBox = new javax.swing.JComboBox();
    newButton = new LinkButton();

    /* layout */
    Font titleFont = title.getFont();
    title.setFont(titleFont.deriveFont(1.7f * titleFont.getSize()));
    title.setBorder(BorderFactory.createEmptyBorder(
            0, getLeftContainerGap(title), 0, 0));

    leftRepoPanel.setVisible(false);
    repoPanel = new RepoSelectorPanel(repositoryComboBox, newButton);
    
    GroupLayout layout = (GroupLayout) headerPanel.getLayout();
    leftRepoPanel.setVisible(true);
    layout.replace(leftRepoPanel, repoPanel);
    
    /* texts */
    Mnemonics.setLocalizedText(
            title,
            getBundleText("QueryTopComponent.findIssuesLabel.text"));//NOI18N
    Mnemonics.setLocalizedText(newButton,
            getBundleText("QueryTopComponent.newButton.text_1"));   //NOI18N

    /* accessibility texts */
    repositoryComboBox.getAccessibleContext().setAccessibleDescription(
            getBundleText("QueryTopComponent.repositoryComboBox.AccessibleContext.accessibleDescription")); //NOI18N
    newButton.getAccessibleContext().setAccessibleDescription(
            getBundleText("QueryTopComponent.newButton.AccessibleContext.accessibleDescription")); //NOI18N

    /* background colors */
    Color editorBgColor = UIManager.getDefaults()
                          .getColor("EditorPane.background");       //NOI18N
    repoPanel.setBackground(editorBgColor);
    headerPanel.setBackground(editorBgColor);
    queryPanel.setBackground(editorBgColor);
    mainPanel.setBackground(editorBgColor);

    /* focus */
    repoPanel.setNextFocusableComponent(newButton);

    /* scrolling */
    int unitIncrement = (int) (1.5f * titleFont.getSize() + 0.5f);
    jScrollPane1.getHorizontalScrollBar().setUnitIncrement(unitIncrement);
    jScrollPane1.getVerticalScrollBar().setUnitIncrement(unitIncrement);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:51,代码来源:QueryTopComponent.java


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