本文整理了Java中javax.swing.JTabbedPane.setEnabledAt()
方法的一些代码示例,展示了JTabbedPane.setEnabledAt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.setEnabledAt()
方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:setEnabledAt
暂无
代码示例来源:origin: stackoverflow.com
jp.add(tb, BorderLayout.CENTER);
add(jp, BorderLayout.CENTER);
tb.setEnabledAt(1, false);
tb.setEnabledAt(3, false);
代码示例来源:origin: chewiebug/GCViewer
private void updateTabDisplay(GCResource gcResource) {
// enable only "parser" panel, as long as model contains no data
boolean modelHasData = gcResource.getModel() != null && gcResource.getModel().size() > 0;
for (int i = 0; i < modelChartAndDetailsPanel.getTabCount(); ++i) {
modelChartAndDetailsPanel.setEnabledAt(i,
modelHasData
|| modelChartAndDetailsPanel.getTitleAt(i).equals(
LocalisationHelper.getString("data_panel_tab_parser")));
}
if (!gcResource.isReload()) {
if (modelHasData) {
modelChartAndDetailsPanel.setSelectedIndex(0);
}
else {
modelChartAndDetailsPanel.setSelectedIndex(modelChartAndDetailsPanel.getTabCount()-1);
}
}
}
代码示例来源:origin: org.netbeans.api/org-openide-dialogs
/** Setter for help URL.
* @param helpURL help URL
*/
public void setHelpURL(URL helpURL) {
if (htmlBrowser == null) {
return;
}
if (helpURL != null) {
if (!helpURL.equals(htmlBrowser.getDocumentURL())) {
htmlBrowser.setURL(helpURL);
}
if (tabbedPane != null) {
tabbedPane.setEnabledAt(tabbedPane.indexOfComponent(htmlBrowser), true);
}
} else if (tabbedPane != null) {
tabbedPane.setSelectedComponent(contentPanel);
tabbedPane.setEnabledAt(tabbedPane.indexOfComponent(htmlBrowser), false);
}
}
代码示例来源:origin: winder/Universal-G-Code-Sender
private void showCommandTable(Boolean enabled) {
if (enabled && (backend.isConnected() && !backend.isIdle())) {
displayErrorDialog(Localization.getString("mainWindow.error.showTableActive"));
showCommandTableCheckBox.setSelected(false);
return;
}
this.commandTable.clear();
this.bottomTabbedPane.setEnabledAt(1, enabled);
commandTableScrollPane.setEnabled(enabled);
if (!enabled) {
this.bottomTabbedPane.setSelectedIndex(0);
} else {
this.bottomTabbedPane.setSelectedIndex(1);
}
}
代码示例来源:origin: org.netbeans.api/org-openide-dialogs
tabbedPane.addTab(NbBundle.getMessage(WizardDescriptor.class, "CTL_ContentName"), contentPanel);
tabbedPane.addTab(NbBundle.getMessage(WizardDescriptor.class, "CTL_HelpName"), htmlBrowser);
tabbedPane.setEnabledAt(1, false);
tabbedPane.setOpaque(false);
代码示例来源:origin: magefree/mage
public void showDownloadControls(boolean needToShow) {
// 2 modes:
// - only message;
// - message + download controls and buttons
this.panelGlobal.setVisible(true);
this.buttonStop.setVisible(!needToShow); // stop button only for loading mode
this.tabsList.setVisible(needToShow);
this.panelCommands.setVisible(needToShow);
// auto-size form
if (needToShow) {
this.setWindowSize(this.sizeModeMessageAndControls.width, this.sizeModeMessageAndControls.height);
} else {
this.setWindowSize(this.sizeModeMessageOnly.width, this.sizeModeMessageOnly.height);
}
this.makeWindowCentered();
//this.setLocationRelativeTo(null); // center screen //FIX
// icons on tabs left side
setTabTitle(0, "Standard download", "/buttons/card_panel.png");
setTabTitle(1, "Custom download", "/buttons/list_panel.png");
// TODO: add manual mode as tab
this.tabsList.getTabComponentAt(1).setEnabled(false);
this.tabsList.setEnabledAt(1, false);
}
代码示例来源:origin: ron190/jsql-injection
public void exportTab(int dragIndex, JTabbedPane target, int targetIndex) {
Component cmp = this.getComponentAt(dragIndex);
Component tab = this.getTabComponentAt(dragIndex);
String title = this.getTitleAt(dragIndex);
Icon icon = this.getIconAt(dragIndex);
String tip = this.getToolTipTextAt(dragIndex);
boolean isEnabled = this.isEnabledAt(dragIndex);
this.remove(dragIndex);
target.insertTab(title, icon, cmp, tip, targetIndex);
target.setEnabledAt(targetIndex, isEnabled);
target.setTabComponentAt(targetIndex, tab);
target.setSelectedIndex(targetIndex);
if (tab instanceof JComponent) {
((JComponent) tab).scrollRectToVisible(tab.getBounds());
}
}
代码示例来源:origin: fr.ifremer/isis-fish
@Override
public void setEnabledOptimizationTab(boolean selected) {
bodyTabbedPane.setEnabledAt(3, selected);
if (selected) {
bodyTabbedPane.setSelectedIndex(3);
}
}
代码示例来源:origin: opengeospatial/geoapi
@Override public void propertyChange(final PropertyChangeEvent event) {
tabs.setEnabledAt(2, (Boolean) event.getNewValue());
// Number 2 above is the index of "Exception" tab.
}
});
代码示例来源:origin: gurkenlabs/litiengine
private void updateTabbedGroup() {
if (this.comboBoxParticleType.getSelectedItem() == ParticleType.SPRITE) {
this.tabbedPanel.setSelectedIndex(1);
tabbedPanel.setEnabledAt(0, false);
tabbedPanel.setEnabledAt(1, true);
} else {
this.tabbedPanel.setSelectedIndex(0);
tabbedPanel.setEnabledAt(0, true);
tabbedPanel.setEnabledAt(1, false);
}
}
代码示例来源:origin: fr.ifremer/isis-fish
@Override
public void setEnabledPrescriptTab(boolean selected) {
bodyTabbedPane.setEnabledAt(1, selected);
if (selected) {
bodyTabbedPane.setSelectedIndex(1);
}
}
代码示例来源:origin: fr.ifremer/isis-fish
/**
* Refresh all simulation launch UI.
*/
@Override
protected void regionStorageChanged() {
boolean enabled = getRegionStorage() != null;
bodyTabbedPane.setEnabledAt(1, enabled);
bodyTabbedPane.setEnabledAt(2, enabled);
}
代码示例来源:origin: RUB-NDS/BurpSSOExtension
/**
* Creates new form UIHelp.
*/
public UIHelp() {
initComponents();
//Remove if help is implemented.
helpContainerPanel.setEnabledAt(0, false);
helpContainerPanel.setEnabledAt(1, false);
}
代码示例来源:origin: net.sf.jt400/jt400
/**
Update the document listener if needed.
**/
void update()
{
docListener_.enableOrder_ =
parent_.getSelectedItems().length==0?false:true;
if (docListener_.enableOrder_)
parent_.notebook_.setEnabledAt(parent_.ORDER_, true);
}
代码示例来源:origin: org.apache.cayenne.modeler/cayenne-modeler
protected void disabledTab(String name) {
if (name.equals(standardDataSourceFactories[0])) {
tabbedPaneController.getTabComponent().setEnabledAt(2, true);
} else {
tabbedPaneController.getTabComponent().setEnabledAt(2, false);
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
@Override
public void propertyChange(PropertyChangeEvent e) {
for (int i = 0; i < m_Panels.size(); i++) {
m_Panels.get(i).setInstances(m_PreprocessPanel.getInstances());
m_TabbedPane.setEnabledAt(i + 1, true);
}
}
});
代码示例来源:origin: org.fudaa.framework.fudaa/fudaa-common
/**
* Dfinit l'activit ou non du panneau taille.
*/
public void setPanneauTailleEnabled(boolean _b) {
pnDefinitions.setEnabledAt(pnDefinitions.indexOfTab("Taille"), _b);
if (!_b
&& pnDefinitions.getSelectedIndex() == pnDefinitions.indexOfTab("Taille"))
pnDefinitions.setSelectedIndex(0);
}
/**
代码示例来源:origin: xyz.cofe/gui.swing
@Override
public void setEnabledAt(int index, boolean enabled) {
Component cmpt = this.getTabComponentAt(index);
if( cmpt instanceof TabQuery )((TabQuery)cmpt).setTabEnabled(enabled);
super.setEnabledAt(index, enabled);
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
@Override
public void propertyChange(PropertyChangeEvent e) {
// System.err.println("Updated experiment");
Experiment exp = m_SetupPanel.getExperiment();
if (exp != null) {
exp.classFirst(m_ClassFirst);
m_RunPanel.setExperiment(exp);
// m_ResultsPanel.setExperiment(exp);
m_TabbedPane.setEnabledAt(1, true);
}
}
});
代码示例来源:origin: net.java.abeille/abeille
public void actionPerformed(ActionEvent evt) {
boolean isShared = ((JCheckBox) evt.getSource()).isSelected();
m_view.setSelected(ProjectSettingsNames.ID_PROJECT_FILE_SHARED, isShared);
m_view.enableComponent(ProjectSettingsNames.ID_PROJECT_ROOT_ENV_VARIABLE, isShared);
m_view.enableComponent(ProjectSettingsNames.ID_PROJECT_ENV_VAR_REFRESH_BTN, isShared);
m_view.getTabbedPane(ProjectSettingsNames.ID_PROJECT_SETTINGS_TAB).setEnabledAt(1, isShared);
if (!isShared) {
m_view.setSelectedItem(ProjectSettingsNames.ID_PROJECT_ROOT_ENV_VARIABLE, null);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!