當前位置: 首頁>>代碼示例>>Java>>正文


Java SwingPropertyChangeSupport類代碼示例

本文整理匯總了Java中javax.swing.event.SwingPropertyChangeSupport的典型用法代碼示例。如果您正苦於以下問題:Java SwingPropertyChangeSupport類的具體用法?Java SwingPropertyChangeSupport怎麽用?Java SwingPropertyChangeSupport使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SwingPropertyChangeSupport類屬於javax.swing.event包,在下文中一共展示了SwingPropertyChangeSupport類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ConnectionSettings

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
/**
 * Constructor - creates a new ConnectionSettings instance.
 */
public ConnectionSettings() {
    //setProxy("localhost", 8081);
    defaultConnectionLabel = null;//Application.getInstance().getContext().getResourceMap().getString("defaultConnection");
    pcs = new SwingPropertyChangeSupport(this);
    proxyType = Proxy.Type.DIRECT;
}
 
開發者ID:jhkst,項目名稱:dlface,代碼行數:10,代碼來源:ConnectionSettings.java

示例2: setLookAndFeel

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
/**
 * Sets the current look and feel to {@code newLookAndFeel}.
 * If the current look and feel is {@code non-null} {@code
 * uninitialize} is invoked on it. If {@code newLookAndFeel} is
 * {@code non-null}, {@code initialize} is invoked on it followed
 * by {@code getDefaults}. The defaults returned from {@code
 * newLookAndFeel.getDefaults()} replace those of the defaults
 * from the previous look and feel. If the {@code newLookAndFeel} is
 * {@code null}, the look and feel defaults are set to {@code null}.
 * <p>
 * A value of {@code null} can be used to set the look and feel
 * to {@code null}. As the {@code LookAndFeel} is required for
 * most of Swing to function, setting the {@code LookAndFeel} to
 * {@code null} is strongly discouraged.
 * <p>
 * This is a JavaBeans bound property.
 *
 * @param newLookAndFeel {@code LookAndFeel} to install
 * @throws UnsupportedLookAndFeelException if
 *          {@code newLookAndFeel} is {@code non-null} and
 *          {@code newLookAndFeel.isSupportedLookAndFeel()} returns
 *          {@code false}
 * @see #getLookAndFeel
 */
public static void setLookAndFeel(LookAndFeel newLookAndFeel)
    throws UnsupportedLookAndFeelException
{
    if ((newLookAndFeel != null) && !newLookAndFeel.isSupportedLookAndFeel()) {
        String s = newLookAndFeel.toString() + " not supported on this platform";
        throw new UnsupportedLookAndFeelException(s);
    }

    LAFState lafState = getLAFState();
    LookAndFeel oldLookAndFeel = lafState.lookAndFeel;
    if (oldLookAndFeel != null) {
        oldLookAndFeel.uninitialize();
    }

    lafState.lookAndFeel = newLookAndFeel;
    if (newLookAndFeel != null) {
        sun.swing.DefaultLookup.setDefaultLookup(null);
        newLookAndFeel.initialize();
        lafState.setLookAndFeelDefaults(newLookAndFeel.getDefaults());
    }
    else {
        lafState.setLookAndFeelDefaults(null);
    }

    SwingPropertyChangeSupport changeSupport = lafState.
                                     getPropertyChangeSupport(false);
    if (changeSupport != null) {
        changeSupport.firePropertyChange("lookAndFeel", oldLookAndFeel,
                                         newLookAndFeel);
    }
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:56,代碼來源:UIManager.java

示例3: AbstractDecoratedAction

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
public AbstractDecoratedAction(Action action)
{
	this.action = action;
	this.propertyChangeSupport = new SwingPropertyChangeSupport(this);
	action.addPropertyChangeListener(new PropertyChangeListener()
	{
		public void propertyChange(PropertyChangeEvent ev)
		{
			String propertyName = ev.getPropertyName();
			if ("enabled".equals(propertyName))
			{
				propertyChangeSupport.firePropertyChange(ev);
			}
			else
			{
				Object newValue = getValue(propertyName);
				// In case a property value changes, fire the new value decorated in subclasses
				// unless new value is null (most Swing listeners don't check new value is null !)
				if (newValue != null)
				{
					propertyChangeSupport.firePropertyChange(
							new PropertyChangeEvent(ev.getSource(), propertyName, ev.getOldValue(), newValue));
				}
			}
		}
	});
}
 
開發者ID:valsr,項目名稱:SweetHome3D,代碼行數:28,代碼來源:ResourceAction.java

示例4: VideoClip

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
/**
 * Constructs a VideoClip.
 *
 * @param video the video
 */
public VideoClip(Video video) {
  support = new SwingPropertyChangeSupport(this);
  this.video = video;
  if(video!=null) {
    video.setProperty("videoclip", this); //$NON-NLS-1$
    setStartFrameNumber(video.getStartFrameNumber());
    if(video.getFrameCount()>1) {
      setStepCount(video.getEndFrameNumber()-startFrame+1);
    }
  }
  updateArray();
  isDefaultState = true;
}
 
開發者ID:OpenSourcePhysics,項目名稱:osp,代碼行數:19,代碼來源:VideoClip.java

示例5: ImageCoordSystem

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
/**
 * Constructs an ImageCoordSystem with a specified initial array length.
 *
 * @param length the initial length
 */
public ImageCoordSystem(int length) {
  this.length = length;
  toImage = new TransformArray(length);
  toWorld = new TransformArray(length);
  scaleX = new DoubleArray(length, 1);
  scaleY = new DoubleArray(length, 1);
  originX = new DoubleArray(length, 0);
  originY = new DoubleArray(length, 0);
  cosine = new DoubleArray(length, 1);
  sine = new DoubleArray(length, 0);
  support = new SwingPropertyChangeSupport(this);
  updateAllTransforms();
}
 
開發者ID:OpenSourcePhysics,項目名稱:osp,代碼行數:19,代碼來源:ImageCoordSystem.java

示例6: SuppressedListModel

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
public SuppressedListModel() {
    propertyChangeSupport = new SwingPropertyChangeSupport(this);
    myStats.registerPropertyChangeSupport(propertyChangeSupport);
    updateSuppressed();
}
 
開發者ID:halirutan,項目名稱:IntelliJ-Key-Promoter-X,代碼行數:6,代碼來源:SuppressedListModel.java

示例7: getPropertyChangeSupport

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
public SwingPropertyChangeSupport getPropertyChangeSupport() {
    return propertyChangeSupport;
}
 
開發者ID:halirutan,項目名稱:IntelliJ-Key-Promoter-X,代碼行數:4,代碼來源:SuppressedListModel.java

示例8: StatisticsListModel

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
public StatisticsListModel() {
    propertyChangeSupport = new SwingPropertyChangeSupport(this);
    myStats.registerPropertyChangeSupport(propertyChangeSupport);
    updateStats();
}
 
開發者ID:halirutan,項目名稱:IntelliJ-Key-Promoter-X,代碼行數:6,代碼來源:StatisticsListModel.java

示例9: ActionAdapter

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
private ActionAdapter(PluginAction pluginAction)
{
	this.pluginAction = pluginAction;
	this.propertyChangeSupport = new SwingPropertyChangeSupport(this);
	this.pluginAction.addPropertyChangeListener(new PropertyChangeListener()
	{
		public void propertyChange(PropertyChangeEvent ev)
		{
			String propertyName = ev.getPropertyName();
			Object oldValue = ev.getOldValue();
			Object newValue = ev.getNewValue();
			if (PluginAction.Property.ENABLED.name().equals(propertyName))
			{
				propertyChangeSupport.firePropertyChange(
						new PropertyChangeEvent(ev.getSource(), "enabled", oldValue, newValue));
			}
			else
			{
				// In case a property value changes, fire the new value decorated in subclasses
				// unless new value is null (most Swing listeners don't check new value is null !)
				if (newValue != null)
				{
					if (PluginAction.Property.NAME.name().equals(propertyName))
					{
						propertyChangeSupport.firePropertyChange(
								new PropertyChangeEvent(ev.getSource(), Action.NAME, oldValue, newValue));
					}
					else if (PluginAction.Property.SHORT_DESCRIPTION.name().equals(propertyName))
					{
						propertyChangeSupport.firePropertyChange(new PropertyChangeEvent(ev.getSource(),
								Action.SHORT_DESCRIPTION, oldValue, newValue));
					}
					else if (PluginAction.Property.MNEMONIC.name().equals(propertyName))
					{
						propertyChangeSupport
								.firePropertyChange(new PropertyChangeEvent(ev.getSource(), Action.MNEMONIC_KEY,
										oldValue != null ? new Integer((Character) oldValue) : null, newValue));
					}
					else if (PluginAction.Property.SMALL_ICON.name().equals(propertyName))
					{
						propertyChangeSupport
								.firePropertyChange(
										new PropertyChangeEvent(ev.getSource(), Action.SMALL_ICON,
												oldValue != null
														? IconManager.getInstance().getIcon((Content) oldValue,
																DEFAULT_SMALL_ICON_HEIGHT, HomePane.this)
														: null,
												newValue));
					}
					else
					{
						propertyChangeSupport.firePropertyChange(
								new PropertyChangeEvent(ev.getSource(), propertyName, oldValue, newValue));
					}
				}
			}
		}
	});
}
 
開發者ID:valsr,項目名稱:SweetHome3D,代碼行數:60,代碼來源:HomePane.java

示例10: getSwingPropertyChangeSupport

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
public SwingPropertyChangeSupport getSwingPropertyChangeSupport() {
	return pcs;
}
 
開發者ID:hypergraphdb,項目名稱:viewer,代碼行數:4,代碼來源:NetworkPanel.java

示例11: getSwingPropertyChangeSupport

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
public SwingPropertyChangeSupport getSwingPropertyChangeSupport()
{
    return pcs;
}
 
開發者ID:hypergraphdb,項目名稱:viewer,代碼行數:5,代碼來源:HGVDesktop.java

示例12: ZScriptParser

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
public ZScriptParser() {
	support = new SwingPropertyChangeSupport(this);
}
 
開發者ID:bobbylight,項目名稱:ZScriptLanguageSupport,代碼行數:4,代碼來源:ZScriptParser.java

示例13: TaskExecutor

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
public TaskExecutor(MessagingEndpoint endpoint, DataManager manager) throws Exception {
	this.manager = manager;
	this.requestTopic = endpoint.createTopic(Topics.Name.REQUEST_TOPIC, AccessMode.WRITE);
	this.jobExecutorStateChangeSupport = new SwingPropertyChangeSupport(this);
}
 
開發者ID:chipster,項目名稱:chipster,代碼行數:6,代碼來源:TaskExecutor.java

示例14: initialize

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
/**
 * Initialize this video.
 */
protected void initialize() {
  support = new SwingPropertyChangeSupport(this);
  filterStack.addPropertyChangeListener(this);
}
 
開發者ID:OpenSourcePhysics,項目名稱:osp,代碼行數:8,代碼來源:VideoAdapter.java

示例15: CheckTreeSelectionModel

import javax.swing.event.SwingPropertyChangeSupport; //導入依賴的package包/類
/**
 * Constructor.
 *
 * @param model a TreeModel
 */
public CheckTreeSelectionModel(TreeModel model) {
  this.model = model;
  setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
  support = new SwingPropertyChangeSupport(this);
}
 
開發者ID:OpenSourcePhysics,項目名稱:osp,代碼行數:11,代碼來源:CheckTreeSelectionModel.java


注:本文中的javax.swing.event.SwingPropertyChangeSupport類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。