本文整理了Java中javax.swing.JTabbedPane.addPropertyChangeListener()
方法的一些代码示例,展示了JTabbedPane.addPropertyChangeListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane.addPropertyChangeListener()
方法的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
方法名:addPropertyChangeListener
暂无
代码示例来源:origin: net.java.dev.laf-widget/laf-widget
this.jcomp.addPropertyChangeListener(this.propertyListener);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-mercurial
private void initializeTabs () {
tabbedPane = TabbedPaneFactory.createCloseButtonTabbedPane();
tabbedPane.addPropertyChangeListener(this);
tabbedPane.addTab(NbBundle.getMessage(CommitPanel.class, "CTL_CommitDialog_Tab_Commit"), basePanel); //NOI18N
tabbedPane.setPreferredSize(basePanel.getPreferredSize());
add(tabbedPane);
tabbedPane.addChangeListener(this);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-remotefs-versioning-api
private void initializeCommitPane () {
if (tabbedPane == null) {
tabbedPane = TabbedPaneFactory.createCloseButtonTabbedPane();
tabbedPane.addPropertyChangeListener(this);
tabbedPane.addTab(modifier.getMessage(VCSCommitPanelModifier.BundleMessage.TABS_MAIN_NAME), basePanel);
tabbedPane.setPreferredSize(basePanel.getPreferredSize());
add(tabbedPane);
tabbedPane.addChangeListener(this);
}
}
代码示例来源:origin: org.codehaus.mevenide/lifecycle-build-plan
private BuildPlanTopComponent() {
initComponents();
setName(NbBundle.getMessage(BuildPlanTopComponent.class, "CTL_BuildPlanTopComponent"));
setIcon(Utilities.loadImage("org/codehaus/mevenide/buildplan/nodes/buildplangoals.png", true));
tabpane.addPropertyChangeListener(TabbedPaneFactory.PROP_CLOSE, new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
synchronized (BuildPlanTopComponent.class) {
JTabbedPane pane = (JTabbedPane) evt.getSource();
int sel = pane.getSelectedIndex();
pane.removeTabAt(sel);
if (pane.getTabCount() == 1) {
BuildPlanViewUI bpvui = (BuildPlanViewUI) pane.getComponent(0);
pane.removeAll();
removeAll();
addView(bpvui);
}
}
}
});
putClientProperty("SlidingName", NbBundle.getMessage(BuildPlanTopComponent.class, "CTL_BuildPlanTopComponent")); //NOI18N
}
代码示例来源:origin: khuxtable/seaglass
/**
* @see javax.swing.plaf.basic.BasicTabbedPaneUI#installListeners()
*/
protected void installListeners() {
super.installListeners();
tabPane.addMouseMotionListener((MouseAdapter) mouseListener);
tabPane.addPropertyChangeListener(this);
scrollBackwardButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
scrollBackward();
}
});
scrollForwardButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
scrollForward();
}
});
}
代码示例来源:origin: net.java.dev.laf-widget/laf-widget
this.jcomp.addPropertyChangeListener(this.propertyChangeListener);
代码示例来源:origin: com.google.code.validationframework/validationframework-swing
this.tabIndex = tabIndex;
this.tabbedPane.addPropertyChangeListener("indexForTitle", tabPropertyAdapter);
this.tabbedPane.addPropertyChangeListener("enabled", tabPropertyAdapter);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-terminal-nb
@Override
protected void initComponents() {
super.initComponents();
tabbedPane = TabbedPaneFactory.createCloseButtonTabbedPane();
tabbedPane.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (evt.getPropertyName().equals(TabbedPaneFactory.PROP_CLOSE)) {
JComponent comp = (JComponent) evt.getNewValue();
remove(comp);
}
}
});
tabbedPane.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
checkSelectionChange();
}
});
popL = new PopupListener();
tabbedPane.addMouseListener(popL);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-gsf-testrunner-ui
/** Creates a new instance of ResultWindow */
@NbBundle.Messages({"TITLE_TEST_RESULTS=Test Results",
"ACSN_TestResults=Test Results",
"ACSD_TestResults=Displays information about passed and failed tests and output generated by them"})
public ResultWindow() {
super();
setFocusable(true);
setLayout(new BorderLayout());
setName(ID);
setDisplayName(Bundle.TITLE_TEST_RESULTS());
setIcon(ImageUtilities.loadImage( "org/netbeans/modules/gsf/testrunner/ui/resources/testResults.png", true));//NOI18N
AccessibleContext accContext = getAccessibleContext();
accContext.setAccessibleName(Bundle.ACSN_TestResults());
accContext.setAccessibleDescription(Bundle.ACSD_TestResults());
pop = new JPopupMenu();
pop.add(new Close());
pop.add(new CloseAll());
pop.add(new CloseAllButCurrent());
popL = new PopupListener();
closeL = new CloseListener();
tabPane = TabbedPaneFactory.createCloseButtonTabbedPane();
tabPane.setMinimumSize(new Dimension(0, 0));
tabPane.addMouseListener(popL);
tabPane.addPropertyChangeListener(closeL);
add(tabPane);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-kenai-ui
chats.addPropertyChangeListener(TabbedPaneFactory.PROP_CLOSE, new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
if (TabbedPaneFactory.PROP_CLOSE.equals(evt.getPropertyName()) && (evt.getNewValue() instanceof ChatPanel)) {
代码示例来源:origin: cmu-phil/tetrad
tabbedPane().addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent propertyChangeEvent) {
if ("proposedVariableNameChange".equals(propertyChangeEvent.getPropertyName())) {
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-callgraph
void addTabPanel(JPanel panel) {
if (getComponentCount() == 0) {
add(panel, BorderLayout.CENTER);
} else {
Component comp = getComponent(0);
if (comp instanceof JTabbedPane) {
((JTabbedPane) comp).addTab(panel.getName() + " ", null, panel, panel.getToolTipText()); // NOI18N
((JTabbedPane) comp).setSelectedComponent(panel);
comp.validate();
} else if (comp instanceof JButton) {
setName(panel.getToolTipText());
remove(comp);
add(panel, BorderLayout.CENTER);
} else {
setName(getMessage("CTL_CallGraphTopComponent")); // NOI18N
remove(comp);
JTabbedPane pane = TabbedPaneFactory.createCloseButtonTabbedPane();
pane.addMouseListener(listener);
pane.addPropertyChangeListener(closeL);
add(pane, BorderLayout.CENTER);
pane.addTab(comp.getName() + " ", null, comp, ((JPanel) comp).getToolTipText()); //NOI18N
pane.addTab(panel.getName() + " ", null, panel, panel.getToolTipText()); //NOI18N
pane.setSelectedComponent(panel);
pane.validate();
}
}
validate();
requestActive();
}
代码示例来源:origin: com.github.arnabk/pgslookandfeel
protected void installListeners() {
super.installListeners();
if (tabHandler == null) {
tabHandler = new TabRolloverHandler();
}
tabPane.addMouseListener(tabHandler);
tabPane.addMouseMotionListener(tabHandler);
if (propHandler == null) {
propHandler = new MyPropertyChangeHandler();
}
tabPane.addPropertyChangeListener(propHandler);
if (PlafOptions.isWheelTabbedPaneEnabled()) {
if (tabScrollHandler == null) {
tabScrollHandler = new TabbedPaneMouseWheelScroller();
}
tabPane.addMouseWheelListener(tabScrollHandler);
}
if (PlafOptions.isTabbedPaneRightClickSelectionEnabled()) {
if (tabSelectionHandler == null) {
tabSelectionHandler = new TabSelectionMouseHandler();
}
tabPane.addMouseListener(tabSelectionHandler);
}
if (PlafOptions.isTabReorderingEnabled()) {
enableReordering();
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/toniclf
tabPane.addPropertyChangeListener(propertyChangeListener);
代码示例来源:origin: com.jtattoo/JTattoo
protected void installListeners() {
if ((propertyChangeListener = createPropertyChangeListener()) != null) {
tabPane.addPropertyChangeListener(propertyChangeListener);
内容来源于网络,如有侵权,请联系作者删除!