Java Code Examples for java.util.Vector#removeElement()
The following examples show how to use
java.util.Vector#removeElement() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UIManager.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * 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; }
Example 2
Source File: UIManager.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * 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; }
Example 3
Source File: UIManager.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * 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; }
Example 4
Source File: UIManager.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * 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; }
Example 5
Source File: UIManager.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * 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; }
Example 6
Source File: UIManager.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * 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; }
Example 7
Source File: UIManager.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * 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; }
Example 8
Source File: AnnotationSetImpl.java From gate-core with GNU Lesser General Public License v3.0 | 5 votes |
@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; } }
Example 9
Source File: AbstractProcessingResource.java From gate-core with GNU Lesser General Public License v3.0 | 5 votes |
/** * 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; } }
Example 10
Source File: NameBearerHandle.java From gate-core with GNU Lesser General Public License v3.0 | 5 votes |
@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; } }
Example 11
Source File: DocumentFormat.java From gate-core with GNU Lesser General Public License v3.0 | 5 votes |
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; } }
Example 12
Source File: DocumentImpl.java From gate-core with GNU Lesser General Public License v3.0 | 5 votes |
@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; } }
Example 13
Source File: CoordGmsImpl.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
/** 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); } } }
Example 14
Source File: Https.java From jpexs-decompiler with GNU General Public License v3.0 | 5 votes |
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)); } } }
Example 15
Source File: AnnotationSetImpl.java From gate-core with GNU Lesser General Public License v3.0 | 5 votes |
@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; } }
Example 16
Source File: AnnotationImpl.java From gate-core with GNU Lesser General Public License v3.0 | 5 votes |
/** * * 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; } }
Example 17
Source File: Factory.java From gate-core with GNU Lesser General Public License v3.0 | 5 votes |
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 }
Example 18
Source File: DebuggerManager.java From netbeans with Apache License 2.0 | 5 votes |
/** * 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); } }
Example 19
Source File: RelationSet.java From gate-core with GNU Lesser General Public License v3.0 | 5 votes |
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; } }
Example 20
Source File: Score.java From jmg with GNU General Public License v2.0 | 4 votes |
/** * Deletes the last Part added to the Score */ public void removeLastPart() { Vector vct = (Vector)this.partList; vct.removeElement(vct.lastElement()); }