java.awt.Container.removePropertyChangeListener()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中java.awt.Container.removePropertyChangeListener()方法的一些代码示例,展示了Container.removePropertyChangeListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Container.removePropertyChangeListener()方法的具体详情如下:
包路径:java.awt.Container
类名称:Container
方法名:removePropertyChangeListener

Container.removePropertyChangeListener介绍

暂无

代码示例

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

try { p.removePropertyChangeListener(this); }
catch(NoSuchMethodError ex) { } // Kaffe
restore(p,null);

代码示例来源:origin: org.softsmithy.lib/softsmithy-lib-swing

@Override
public void stopListening() {
  super.stopListening();
  getStyleable().removeHierarchyListener(parentListener);
  if (getStyleable().getParent() != null) {
    getStyleable().getParent().removePropertyChangeListener("background", parentBackgroundListener);
    getStyleable().getParent().removePropertyChangeListener("foreground", parentForegroundListener);
    getStyleable().getParent().removePropertyChangeListener("font", parentFontListener);
    getStyleable().getParent().removePropertyChangeListener("opaque", parentOpaqueListener);
  }
}

代码示例来源:origin: org.softsmithy.lib/lib-core

@Override
public void stopListening() {
 super.stopListening();
 getStyleable().removeHierarchyListener(parentListener);
 if (getStyleable().getParent() != null){
  getStyleable().getParent().removePropertyChangeListener("background", parentBackgroundListener);
  getStyleable().getParent().removePropertyChangeListener("foreground", parentForegroundListener);
  getStyleable().getParent().removePropertyChangeListener("font", parentFontListener);
  getStyleable().getParent().removePropertyChangeListener("opaque", parentOpaqueListener);
 }
}

代码示例来源:origin: org.softsmithy.lib/lib-core

/** Called when the hierarchy has been changed. To discern the actual
 * type of change, call <code>HierarchyEvent.getChangeFlags()</code>.
 *
 * @see HierarchyEvent#getChangeFlags()
 *
 */
public void hierarchyChanged(HierarchyEvent e) {
 //System.out.println("hierarchyChanged");
 // optimize??
 getStyleable().getParent().removePropertyChangeListener("background", parentBackgroundListener);
 getStyleable().getParent().removePropertyChangeListener("foreground", parentForegroundListener);
 getStyleable().getParent().removePropertyChangeListener("font", parentFontListener);
 getStyleable().getParent().removePropertyChangeListener("opaque", parentOpaqueListener);
 getStyleable().getParent().addPropertyChangeListener("background", parentBackgroundListener);
 getStyleable().getParent().addPropertyChangeListener("foreground", parentForegroundListener);
 getStyleable().getParent().addPropertyChangeListener("font", parentFontListener);
 getStyleable().getParent().addPropertyChangeListener("opaque", parentOpaqueListener);
}

代码示例来源:origin: org.softsmithy.lib/softsmithy-lib-swing

/**
   * Called when the hierarchy has been changed. To discern the actual type of change, call
   * <code>HierarchyEvent.getChangeFlags()</code>.
   *
   * @see HierarchyEvent#getChangeFlags()
   *
   */
  @Override
  public void hierarchyChanged(HierarchyEvent e) {
    //System.out.println("hierarchyChanged");
    // optimize??
    getStyleable().getParent().removePropertyChangeListener("background", parentBackgroundListener);
    getStyleable().getParent().removePropertyChangeListener("foreground", parentForegroundListener);
    getStyleable().getParent().removePropertyChangeListener("font", parentFontListener);
    getStyleable().getParent().removePropertyChangeListener("opaque", parentOpaqueListener);
    getStyleable().getParent().addPropertyChangeListener("background", parentBackgroundListener);
    getStyleable().getParent().addPropertyChangeListener("foreground", parentForegroundListener);
    getStyleable().getParent().addPropertyChangeListener("font", parentFontListener);
    getStyleable().getParent().addPropertyChangeListener("opaque", parentOpaqueListener);
  }
}

代码示例来源:origin: org.softsmithy.lib/lib-core

/** Called when the hierarchy has been changed. To discern the actual
  * type of change, call <code>HierarchyEvent.getChangeFlags()</code>.
  *
  * @see HierarchyEvent#getChangeFlags()
  *
  */
 public void hierarchyChanged(HierarchyEvent e) {
  //System.out.println("hierarchyChanged");
  // optimize??
  if (e.getChangedParent() != null){ // why is this neccessary?
   e.getChangedParent().removePropertyChangeListener("defaultSelectedCustomizerBorderColor", defaultSelectedCustomizerBorderColorListener);
  }
  if (getCustomizer().getParentCustomizerPane() != null){
   getCustomizer().getParentCustomizerPane().addPropertyChangeListener("defaultSelectedCustomizerBorderColor", defaultSelectedCustomizerBorderColorListener);
  }
  resetSelectedBorder();
 }
}

代码示例来源:origin: org.softsmithy.lib/lib-core

/** Called when the hierarchy has been changed. To discern the actual
  * type of change, call <code>HierarchyEvent.getChangeFlags()</code>.
  *
  * @see HierarchyEvent#getChangeFlags()
  *
  */
 public void hierarchyChanged(HierarchyEvent e) {
  //System.out.println("hierarchyChanged!!!");
  // optimize??
  if (e.getChangedParent() != null){ // why is this neccessary?
   e.getChangedParent().removePropertyChangeListener("defaultNormalCustomizerBorderColor", defaultNormalCustomizerBorderColorListener);
  }
  if (getCustomizer().getParentCustomizerPane() != null){
   getCustomizer().getParentCustomizerPane().addPropertyChangeListener("defaultNormalCustomizerBorderColor", defaultNormalCustomizerBorderColorListener);
  }
  getNormalState().resetBorder(getColor());
 }
}

相关文章

微信公众号

最新文章

更多

Container类方法