本文整理了Java中javax.swing.JComponent.addPropertyChangeListener()
方法的一些代码示例,展示了JComponent.addPropertyChangeListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JComponent.addPropertyChangeListener()
方法的具体详情如下:
包路径:javax.swing.JComponent
类名称:JComponent
方法名:addPropertyChangeListener
暂无
代码示例来源:origin: skylot/jadx
public void addRow(String label, String tooltip, JComponent comp) {
c.gridy = row++;
JLabel jLabel = new JLabel(label);
jLabel.setLabelFor(comp);
jLabel.setHorizontalAlignment(SwingConstants.LEFT);
c.gridx = 0;
c.gridwidth = 1;
c.anchor = GridBagConstraints.LINE_START;
c.weightx = 0.8;
c.fill = GridBagConstraints.NONE;
add(jLabel, c);
c.gridx = 1;
c.gridwidth = GridBagConstraints.REMAINDER;
c.anchor = GridBagConstraints.CENTER;
c.weightx = 0.2;
c.fill = GridBagConstraints.HORIZONTAL;
if (tooltip != null) {
jLabel.setToolTipText(tooltip);
comp.setToolTipText(tooltip);
}
add(comp, c);
comp.addPropertyChangeListener("enabled", evt -> jLabel.setEnabled((boolean) evt.getNewValue()));
}
代码示例来源:origin: groovy/groovy-core
public synchronized void syntheticBind() {
boundComponent = (JComponent) ((PropertyBinding)sourceBinding).getBean();
boundComponent.addPropertyChangeListener(propertyName, this);
boundComponent.addComponentListener(this);
}
代码示例来源:origin: org.netbeans.api/org-openide-awt
protected void prepare() {
comp.addPropertyChangeListener(new VisL());
if (comp.isShowing()) {
addNotify();
} else {
updateState(null);
}
}
代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf
public ContentDropTargetListener(JComponent component, ToolWindowManager toolWindowManager) {
this.component = component;
this.toolWindowManager = toolWindowManager;
this.component.addPropertyChangeListener("dragAnchor", this);
this.component.addPropertyChangeListener("dragToolWindow", this);
}
代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf
public ToolWindowDropTargetListener(JComponent component,
MyDoggyToolWindowManager toolWindowManager,
ToolWindowAnchor anchor) {
this.component = component;
this.toolWindowManager = toolWindowManager;
this.anchor = anchor;
this.component.addPropertyChangeListener("dragAnchor", this);
this.component.addPropertyChangeListener("dragToolWindow", this);
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
public void install(JComponent c){
if(isInstalled(c)){
return;
}
c.addPropertyChangeListener("UI", this);
installed.put(c, Boolean.FALSE);
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
/**
* Install this as controller for the given component.
*
* @param table the component which has renderers to control.
*/
public void install(T table) {
release();
this.component = table;
table.addPropertyChangeListener(RolloverProducer.CLICKED_KEY, this);
table.addPropertyChangeListener(RolloverProducer.ROLLOVER_KEY, this);
registerExecuteButtonAction();
}
代码示例来源:origin: net.sf.jt400/jt400
/**
Adds a listener to be notified when the value of any bound
property is changed.
@param listener The listener.
**/
public void addPropertyChangeListener (PropertyChangeListener listener)
{
changeListeners_.addPropertyChangeListener(listener);
super.addPropertyChangeListener(listener);
}
代码示例来源:origin: net.sf.jt400/jt400
/**
Adds a listener to be notified when the value of any
bound property changes.
@param listener The listener.
**/
public void addPropertyChangeListener (PropertyChangeListener listener)
{
super.addPropertyChangeListener (listener);
propertyChangeSupport_.addPropertyChangeListener (listener);
}
代码示例来源:origin: net.sf.jt400/jt400
/**
Adds a listener to be notified when the value of any
bound property changes.
@param listener The listener.
**/
public void addPropertyChangeListener (PropertyChangeListener listener)
{
super.addPropertyChangeListener (listener);
propertyChangeSupport_.addPropertyChangeListener (listener);
}
代码示例来源:origin: de.rototor.jeuclid/jeuclid-core
/** {@inheritDoc} */
@Override
public void installUI(final JComponent c) {
if (c instanceof JMathComponent) {
c.addPropertyChangeListener(this);
this.installDefaults(c);
} else {
throw new IllegalArgumentException(
"This UI can only be installed on a JMathComponent");
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-core
/**
* Install this as controller for the given component.
*
* @param table the component which has renderers to control.
*/
public void install(T table) {
release();
this.component = table;
table.addPropertyChangeListener(RolloverProducer.CLICKED_KEY, this);
table.addPropertyChangeListener(RolloverProducer.ROLLOVER_KEY, this);
registerExecuteButtonAction();
}
代码示例来源:origin: net.sf.jt400/jt400
/**
Adds a listener to be notified when the value of any
bound property changes.
@param listener The listener.
**/
public void addPropertyChangeListener (PropertyChangeListener listener)
{
super.addPropertyChangeListener(listener); // @C1A
if (propertyChangeSupport_ != null) // @C1A
propertyChangeSupport_.addPropertyChangeListener (listener);
}
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
/**
* Install this as controller for the given component.
*
* @param table the component which has renderers to control.
*/
public void install(T table) {
release();
this.component = table;
table.addPropertyChangeListener(RolloverProducer.CLICKED_KEY, this);
table.addPropertyChangeListener(RolloverProducer.ROLLOVER_KEY, this);
registerExecuteButtonAction();
}
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-plaf
public void install(JComponent c){
if(isInstalled(c)){
return;
}
c.addPropertyChangeListener("UI", this);
installed.put(c, Boolean.FALSE);
}
代码示例来源:origin: net.sf.jt400/jt400
/**
Adds a listener to be notified when the value of any
bound property changes.
@param listener The listener.
**/
public void addPropertyChangeListener (PropertyChangeListener listener)
{
super.addPropertyChangeListener (listener);
propertyChangeSupport_.addPropertyChangeListener (listener);
}
代码示例来源:origin: net.sf.jt400/jt400
/**
Adds a listener to be notified when the value of any
bound property changes.
@param listener The listener.
**/
public void addPropertyChangeListener (PropertyChangeListener listener)
{
super.addPropertyChangeListener (listener);
propertyChangeSupport_.addPropertyChangeListener (listener);
}
代码示例来源:origin: com.jtattoo/JTattoo
public void installUI(JComponent c) {
super.installUI(c);
c.setBorder(UIManager.getBorder("ProgressBar.border"));
propertyChangeListener = new PropertyChangeHandler();
c.addPropertyChangeListener(propertyChangeListener);
}
代码示例来源:origin: org.codehaus.groovy/groovy-swing
public synchronized void syntheticBind() {
boundComponent = (JComponent) ((PropertyBinding)sourceBinding).getBean();
boundComponent.addPropertyChangeListener(propertyName, this);
boundComponent.addComponentListener(this);
}
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf
@Override
public void installUI(JComponent c) {
super.installUI(c);
oldArrowIcon = arrowIcon;
boolean isLeftToRight = c.getComponentOrientation().isLeftToRight();
arrowIcon = NapkinIconFactory.createArrowIcon(
(isLeftToRight ? EAST : WEST), 8);
c.addPropertyChangeListener("componentOrientation",
orientationListener);
NapkinUtil.installUI(c);
}
内容来源于网络,如有侵权,请联系作者删除!