java.util.Vector#removeElement ( )源码实例Demo

下面列出了java.util.Vector#removeElement ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: jdk1.8-source-analysis   文件: UIManager.java
/**
 * Removes a <code>LookAndFeel</code> from the list of auxiliary look and feels.
 * The auxiliary look and feels tell the multiplexing look and feel what
 * other <code>LookAndFeel</code> classes for a component instance are to be used
 * in addition to the default <code>LookAndFeel</code> class when creating a
 * multiplexing UI.  The change will only take effect when a new
 * UI class is created or when the default look and feel is changed
 * on a component instance.
 * <p>Note these are not the same as the installed look and feels.
 * @return true if the <code>LookAndFeel</code> was removed from the list
 * @see #removeAuxiliaryLookAndFeel
 * @see #getAuxiliaryLookAndFeels
 * @see #setLookAndFeel
 * @see #getInstalledLookAndFeels
 */
static public boolean removeAuxiliaryLookAndFeel(LookAndFeel laf) {
    maybeInitialize();

    boolean result;

    Vector<LookAndFeel> v = getLAFState().auxLookAndFeels;
    if ((v == null) || (v.size() == 0)) {
        return false;
    }

    result = v.removeElement(laf);
    if (result) {
        if (v.size() == 0) {
            getLAFState().auxLookAndFeels = null;
            getLAFState().multiLookAndFeel = null;
        } else {
            getLAFState().auxLookAndFeels = v;
        }
    }
    laf.uninitialize();

    return result;
}
 
源代码2 项目: dragonwell8_jdk   文件: UIManager.java
/**
 * Removes a <code>LookAndFeel</code> from the list of auxiliary look and feels.
 * The auxiliary look and feels tell the multiplexing look and feel what
 * other <code>LookAndFeel</code> classes for a component instance are to be used
 * in addition to the default <code>LookAndFeel</code> class when creating a
 * multiplexing UI.  The change will only take effect when a new
 * UI class is created or when the default look and feel is changed
 * on a component instance.
 * <p>Note these are not the same as the installed look and feels.
 * @return true if the <code>LookAndFeel</code> was removed from the list
 * @see #removeAuxiliaryLookAndFeel
 * @see #getAuxiliaryLookAndFeels
 * @see #setLookAndFeel
 * @see #getInstalledLookAndFeels
 */
static public boolean removeAuxiliaryLookAndFeel(LookAndFeel laf) {
    maybeInitialize();

    boolean result;

    Vector<LookAndFeel> v = getLAFState().auxLookAndFeels;
    if ((v == null) || (v.size() == 0)) {
        return false;
    }

    result = v.removeElement(laf);
    if (result) {
        if (v.size() == 0) {
            getLAFState().auxLookAndFeels = null;
            getLAFState().multiLookAndFeel = null;
        } else {
            getLAFState().auxLookAndFeels = v;
        }
    }
    laf.uninitialize();

    return result;
}
 
源代码3 项目: openjdk-8-source   文件: UIManager.java
/**
 * Removes a <code>LookAndFeel</code> from the list of auxiliary look and feels.
 * The auxiliary look and feels tell the multiplexing look and feel what
 * other <code>LookAndFeel</code> classes for a component instance are to be used
 * in addition to the default <code>LookAndFeel</code> class when creating a
 * multiplexing UI.  The change will only take effect when a new
 * UI class is created or when the default look and feel is changed
 * on a component instance.
 * <p>Note these are not the same as the installed look and feels.
 * @return true if the <code>LookAndFeel</code> was removed from the list
 * @see #removeAuxiliaryLookAndFeel
 * @see #getAuxiliaryLookAndFeels
 * @see #setLookAndFeel
 * @see #getInstalledLookAndFeels
 */
static public boolean removeAuxiliaryLookAndFeel(LookAndFeel laf) {
    maybeInitialize();

    boolean result;

    Vector<LookAndFeel> v = getLAFState().auxLookAndFeels;
    if ((v == null) || (v.size() == 0)) {
        return false;
    }

    result = v.removeElement(laf);
    if (result) {
        if (v.size() == 0) {
            getLAFState().auxLookAndFeels = null;
            getLAFState().multiLookAndFeel = null;
        } else {
            getLAFState().auxLookAndFeels = v;
        }
    }
    laf.uninitialize();

    return result;
}
 
源代码4 项目: jdk8u60   文件: UIManager.java
/**
 * Removes a <code>LookAndFeel</code> from the list of auxiliary look and feels.
 * The auxiliary look and feels tell the multiplexing look and feel what
 * other <code>LookAndFeel</code> classes for a component instance are to be used
 * in addition to the default <code>LookAndFeel</code> class when creating a
 * multiplexing UI.  The change will only take effect when a new
 * UI class is created or when the default look and feel is changed
 * on a component instance.
 * <p>Note these are not the same as the installed look and feels.
 * @return true if the <code>LookAndFeel</code> was removed from the list
 * @see #removeAuxiliaryLookAndFeel
 * @see #getAuxiliaryLookAndFeels
 * @see #setLookAndFeel
 * @see #getInstalledLookAndFeels
 */
static public boolean removeAuxiliaryLookAndFeel(LookAndFeel laf) {
    maybeInitialize();

    boolean result;

    Vector<LookAndFeel> v = getLAFState().auxLookAndFeels;
    if ((v == null) || (v.size() == 0)) {
        return false;
    }

    result = v.removeElement(laf);
    if (result) {
        if (v.size() == 0) {
            getLAFState().auxLookAndFeels = null;
            getLAFState().multiLookAndFeel = null;
        } else {
            getLAFState().auxLookAndFeels = v;
        }
    }
    laf.uninitialize();

    return result;
}
 
源代码5 项目: openjdk-jdk8u   文件: UIManager.java
/**
 * Removes a <code>LookAndFeel</code> from the list of auxiliary look and feels.
 * The auxiliary look and feels tell the multiplexing look and feel what
 * other <code>LookAndFeel</code> classes for a component instance are to be used
 * in addition to the default <code>LookAndFeel</code> class when creating a
 * multiplexing UI.  The change will only take effect when a new
 * UI class is created or when the default look and feel is changed
 * on a component instance.
 * <p>Note these are not the same as the installed look and feels.
 * @return true if the <code>LookAndFeel</code> was removed from the list
 * @see #removeAuxiliaryLookAndFeel
 * @see #getAuxiliaryLookAndFeels
 * @see #setLookAndFeel
 * @see #getInstalledLookAndFeels
 */
static public boolean removeAuxiliaryLookAndFeel(LookAndFeel laf) {
    maybeInitialize();

    boolean result;

    Vector<LookAndFeel> v = getLAFState().auxLookAndFeels;
    if ((v == null) || (v.size() == 0)) {
        return false;
    }

    result = v.removeElement(laf);
    if (result) {
        if (v.size() == 0) {
            getLAFState().auxLookAndFeels = null;
            getLAFState().multiLookAndFeel = null;
        } else {
            getLAFState().auxLookAndFeels = v;
        }
    }
    laf.uninitialize();

    return result;
}
 
源代码6 项目: openjdk-jdk8u-backup   文件: UIManager.java
/**
 * Removes a <code>LookAndFeel</code> from the list of auxiliary look and feels.
 * The auxiliary look and feels tell the multiplexing look and feel what
 * other <code>LookAndFeel</code> classes for a component instance are to be used
 * in addition to the default <code>LookAndFeel</code> class when creating a
 * multiplexing UI.  The change will only take effect when a new
 * UI class is created or when the default look and feel is changed
 * on a component instance.
 * <p>Note these are not the same as the installed look and feels.
 * @return true if the <code>LookAndFeel</code> was removed from the list
 * @see #removeAuxiliaryLookAndFeel
 * @see #getAuxiliaryLookAndFeels
 * @see #setLookAndFeel
 * @see #getInstalledLookAndFeels
 */
static public boolean removeAuxiliaryLookAndFeel(LookAndFeel laf) {
    maybeInitialize();

    boolean result;

    Vector<LookAndFeel> v = getLAFState().auxLookAndFeels;
    if ((v == null) || (v.size() == 0)) {
        return false;
    }

    result = v.removeElement(laf);
    if (result) {
        if (v.size() == 0) {
            getLAFState().auxLookAndFeels = null;
            getLAFState().multiLookAndFeel = null;
        } else {
            getLAFState().auxLookAndFeels = v;
        }
    }
    laf.uninitialize();

    return result;
}
 
源代码7 项目: jdk8u-jdk   文件: UIManager.java
/**
 * Removes a <code>LookAndFeel</code> from the list of auxiliary look and feels.
 * The auxiliary look and feels tell the multiplexing look and feel what
 * other <code>LookAndFeel</code> classes for a component instance are to be used
 * in addition to the default <code>LookAndFeel</code> class when creating a
 * multiplexing UI.  The change will only take effect when a new
 * UI class is created or when the default look and feel is changed
 * on a component instance.
 * <p>Note these are not the same as the installed look and feels.
 * @return true if the <code>LookAndFeel</code> was removed from the list
 * @see #removeAuxiliaryLookAndFeel
 * @see #getAuxiliaryLookAndFeels
 * @see #setLookAndFeel
 * @see #getInstalledLookAndFeels
 */
static public boolean removeAuxiliaryLookAndFeel(LookAndFeel laf) {
    maybeInitialize();

    boolean result;

    Vector<LookAndFeel> v = getLAFState().auxLookAndFeels;
    if ((v == null) || (v.size() == 0)) {
        return false;
    }

    result = v.removeElement(laf);
    if (result) {
        if (v.size() == 0) {
            getLAFState().auxLookAndFeels = null;
            getLAFState().multiLookAndFeel = null;
        } else {
            getLAFState().auxLookAndFeels = v;
        }
    }
    laf.uninitialize();

    return result;
}
 
源代码8 项目: gate-core   文件: RelationSet.java
public synchronized void removeRelationSetListener(RelationSetListener l) {
  if(listeners != null && listeners.contains(l)) {
    @SuppressWarnings("unchecked")
    Vector<RelationSetListener> v =
            (Vector<RelationSetListener>)listeners.clone();
    v.removeElement(l);
    listeners = v;
  }
}
 
源代码9 项目: netbeans   文件: DebuggerManager.java
/** 
 * Remove a debuggerManager listener to changes of watches and breakpoints.
 *
 * @param propertyName a name of property to listen on
 * @param l the debuggerManager listener to remove
 */
public void removeDebuggerListener (
    String propertyName, 
    DebuggerManagerListener l
) {
    synchronized (listenersMap) {
        Vector listeners = (Vector) listenersMap.get (propertyName);
        if (listeners == null) return;
        listeners.removeElement (l);
        if (listeners.size () == 0)
            listenersMap.remove (propertyName);
    }
}
 
源代码10 项目: gate-core   文件: Factory.java
public synchronized void removeCreoleListener(CreoleListener l) {
  if(creoleListeners != null && creoleListeners.contains(l)) {
    @SuppressWarnings("unchecked")
    Vector<CreoleListener> v =
            (Vector<CreoleListener>)creoleListeners.clone();
    v.removeElement(l);
    creoleListeners = v;
  }// if
}
 
源代码11 项目: gate-core   文件: AnnotationImpl.java
/**
 *
 * Removes an annotation listener
 */
@Override
public synchronized void removeAnnotationListener(AnnotationListener l) {
  if (annotationListeners != null && annotationListeners.contains(l)) {
    @SuppressWarnings("unchecked")
    Vector<AnnotationListener> v = (Vector<AnnotationListener>) annotationListeners.clone();
    v.removeElement(l);
    annotationListeners = v;
  }
}
 
源代码12 项目: gate-core   文件: AnnotationSetImpl.java
@Override
public synchronized void removeAnnotationSetListener(AnnotationSetListener l) {
  if(annotationSetListeners != null && annotationSetListeners.contains(l)) {
    @SuppressWarnings("unchecked")
    Vector<AnnotationSetListener> v = (Vector<AnnotationSetListener>)annotationSetListeners.clone();
    v.removeElement(l);
    annotationSetListeners = v;
  }
}
 
源代码13 项目: gate-core   文件: AnnotationSetImpl.java
@Override
public synchronized void removeGateListener(GateListener l) {
  if(gateListeners != null && gateListeners.contains(l)) {
    @SuppressWarnings("unchecked")
    Vector<GateListener> v = (Vector<GateListener>)gateListeners.clone();
    v.removeElement(l);
    gateListeners = v;
  }
}
 
源代码14 项目: jpexs-decompiler   文件: Https.java
private static void cacheRemove(String host, int port, Https http) {
    Vector v = (Vector) cache.get(cacheKey(host, port));
    if (v != null) {
        v.removeElement(http);
        if (v.isEmpty()) {
            cache.remove(cacheKey(host, port));
        }
    }
}
 
源代码15 项目: gemfirexd-oss   文件: CoordGmsImpl.java
/** Removed rejected merge requests from merge_rsps and coords */
protected/*GemStoneAddition*/ void removeRejectedMergeRequests(Vector coords) {
    MergeData data;
    for(Iterator it=merge_rsps.iterator(); it.hasNext();) {
        data=(MergeData)it.next();
        if(data.merge_rejected) {
            if(data.getSender() != null && coords != null)
                coords.removeElement(data.getSender());
            it.remove();
            if(log.isDebugEnabled()) log.debug("removed element " + data);
        }
    }
}
 
源代码16 项目: gate-core   文件: DocumentImpl.java
@Override
public synchronized void removeDocumentListener(DocumentListener l) {
  if(documentListeners != null && documentListeners.contains(l)) {
    @SuppressWarnings("unchecked")
    Vector<DocumentListener> v = (Vector<DocumentListener>)documentListeners.clone();
    v.removeElement(l);
    documentListeners = v;
  }
}
 
源代码17 项目: gate-core   文件: DocumentFormat.java
public synchronized void removeStatusListener(StatusListener l) {
  if (statusListeners != null && statusListeners.contains(l)) {
    @SuppressWarnings("unchecked")
    Vector<StatusListener> v = (Vector<StatusListener>) statusListeners.clone();
    v.removeElement(l);
    statusListeners = v;
  }
}
 
源代码18 项目: gate-core   文件: NameBearerHandle.java
@SuppressWarnings("unchecked")
public synchronized void removeProgressListener(ProgressListener l) {
  if(progressListeners != null && progressListeners.contains(l)) {
    Vector<ProgressListener> v = (Vector<ProgressListener>)progressListeners
            .clone();
    v.removeElement(l);
    progressListeners = v;
  }
}
 
源代码19 项目: gate-core   文件: AbstractProcessingResource.java
/**
 * Removes a {@link gate.event.ProgressListener} from the list of listeners
 * for this processing resource.
 */
public synchronized void removeProgressListener(ProgressListener l) {
  if (progressListeners != null && progressListeners.contains(l)) {
    @SuppressWarnings("unchecked")
    Vector<ProgressListener> v = (Vector<ProgressListener>)progressListeners.clone();
    v.removeElement(l);
    progressListeners = v;
  }
}
 
源代码20 项目: jmg   文件: Score.java
/**
 * Deletes the last Part added to the Score
 */
 public void removeLastPart() {
    Vector vct = (Vector)this.partList;
    vct.removeElement(vct.lastElement());
}