本文整理汇总了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);
}
}
示例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();
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}