Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 11 java.desktop.jmod - Desktop Module
JDK 11 java.desktop.jmod is the JMOD file for JDK 11 Desktop module.
JDK 11 Desktop module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.desktop.jmod.
JDK 11 Desktop module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Desktop module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.desktop.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ javax/swing/undo/StateEdit.java
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package javax.swing.undo;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
/**
* <P>StateEdit is a general edit for objects that change state.
* Objects being edited must conform to the StateEditable interface.</P>
*
* <P>This edit class works by asking an object to store it's state in
* Hashtables before and after editing occurs. Upon undo or redo the
* object is told to restore it's state from these Hashtables.</P>
*
* A state edit is used as follows:
* <PRE>
* // Create the edit during the "before" state of the object
* StateEdit newEdit = new StateEdit(myObject);
* // Modify the object
* myObject.someStateModifyingMethod();
* // "end" the edit when you are done modifying the object
* newEdit.end();
* </PRE>
*
* <P><EM>Note that when a StateEdit ends, it removes redundant state from
* the Hashtables - A state Hashtable is not guaranteed to contain all
* keys/values placed into it when the state is stored!</EM></P>
*
* @see StateEditable
*
* @author Ray Ryan
*/
@SuppressWarnings("serial") // Same-version serialization only
public class StateEdit
extends AbstractUndoableEdit {
/**
* Obsolete RCS version identity.
*/
protected static final String RCSID = "$Id: StateEdit.java,v 1.6 1997/10/01 20:05:51 sandipc Exp $";
//
// Attributes
//
/**
* The object being edited
*/
protected StateEditable object;
/**
* The state information prior to the edit
*/
protected Hashtable<Object,Object> preState;
/**
* The state information after the edit
*/
protected Hashtable<Object,Object> postState;
/**
* The undo/redo presentation name
*/
protected String undoRedoName;
//
// Constructors
//
/**
* Create and return a new StateEdit.
*
* @param anObject The object to watch for changing state
*
* @see StateEdit
*/
public StateEdit(StateEditable anObject) {
super();
init (anObject,null);
}
/**
* Create and return a new StateEdit with a presentation name.
*
* @param anObject The object to watch for changing state
* @param name The presentation name to be used for this edit
*
* @see StateEdit
*/
public StateEdit(StateEditable anObject, String name) {
super();
init (anObject,name);
}
/**
* Initialize the state edit.
* @param anObject The object to watch for changing state
* @param name The presentation name to be used for this edit
*/
protected void init (StateEditable anObject, String name) {
this.object = anObject;
this.preState = new Hashtable<Object, Object>(11);
this.object.storeState(this.preState);
this.postState = null;
this.undoRedoName = name;
}
//
// Operation
//
/**
* Gets the post-edit state of the StateEditable object and
* ends the edit.
*/
public void end() {
this.postState = new Hashtable<Object, Object>(11);
this.object.storeState(this.postState);
this.removeRedundantState();
}
/**
* Tells the edited object to apply the state prior to the edit
*/
public void undo() {
super.undo();
this.object.restoreState(preState);
}
/**
* Tells the edited object to apply the state after the edit
*/
public void redo() {
super.redo();
this.object.restoreState(postState);
}
/**
* Gets the presentation name for this edit
*/
public String getPresentationName() {
return this.undoRedoName;
}
//
// Internal support
//
/**
* Remove redundant key/values in state hashtables.
*/
protected void removeRedundantState() {
Vector<Object> uselessKeys = new Vector<>();
Enumeration<Object> myKeys = preState.keys();
// Locate redundant state
while (myKeys.hasMoreElements()) {
Object myKey = myKeys.nextElement();
if (postState.containsKey(myKey) &&
postState.get(myKey).equals(preState.get(myKey))) {
uselessKeys.addElement(myKey);
}
}
// Remove redundant state
for (int i = uselessKeys.size()-1; i >= 0; i--) {
Object myKey = uselessKeys.elementAt(i);
preState.remove(myKey);
postState.remove(myKey);
}
}
} // End of class StateEdit
⏎ javax/swing/undo/StateEdit.java
Or download all of them as a single archive file:
File name: java.desktop-11.0.1-src.zip File size: 7974380 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.instrument.jmod - Instrument Module
2022-08-06, ≈889🔥, 5💬
Popular Posts:
JDK 17 jdk.jlink.jmod is the JMOD file for JDK 17 JLink tool, which can be invoked by the "jlink" co...
maven-model-builder-3.8. 6.jaris the JAR file for Apache Maven 3.8.6 Model Builder module. Apache Ma...
JDK 17 jdk.jpackage.jmod is the JMOD file for JDK 17 JPackage tool, which can be invoked by the "jpa...
How to read XML document from socket connections with the socket\DelayedInput.java provided in the A...
HttpComponents Core Source Code Files are provided in the source package file, httpcomponents-core-5...