下面列出了java.util.Vector#removeElement ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* 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;
}
/**
* 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;
}
/**
* 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;
}
/**
* 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;
}
/**
* 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;
}
/**
* 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;
}
/**
* 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;
}
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;
}
}
/**
* 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);
}
}
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
}
/**
*
* 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;
}
}
@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;
}
}
@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;
}
}
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));
}
}
}
/** 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);
}
}
}
@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;
}
}
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;
}
}
@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;
}
}
/**
* 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;
}
}
/**
* Deletes the last Part added to the Score
*/
public void removeLastPart() {
Vector vct = (Vector)this.partList;
vct.removeElement(vct.lastElement());
}