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:
JRE 8 rt.jar - javax.* Package Source Code
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries.
JRE (Java Runtime) 8 is the runtime environment included in JDK 8.
JRE 8 rt.jar libraries are divided into 6 packages:
com.* - Internal Oracle and Sun Microsystems libraries java.* - Standard Java API libraries. javax.* - Extended Java API libraries. jdk.* - JDK supporting libraries. org.* - Third party libraries. sun.* - Old libraries developed by Sun Microsystems.
JAR File Information:
Directory of C:\fyicenter\jdk-1.8.0_191\jre\lib
63,596,151 rt.jar
Here is the list of Java classes of the javax.* package in JRE 1.8.0_191 rt.jar. Java source codes are also provided.
✍: FYIcenter
⏎ javax/swing/Autoscroller.java
/*
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package javax.swing;
import java.awt.*;
import java.awt.event.*;
import sun.awt.AWTAccessor;
import sun.awt.AWTAccessor.MouseEventAccessor;
/**
* Autoscroller is responsible for generating synthetic mouse dragged
* events. It is the responsibility of the Component (or its MouseListeners)
* that receive the events to do the actual scrolling in response to the
* mouse dragged events.
*
* @author Dave Moore
* @author Scott Violet
*/
class Autoscroller implements ActionListener {
/**
* Global Autoscroller.
*/
private static Autoscroller sharedInstance = new Autoscroller();
// As there can only ever be one autoscroller active these fields are
// static. The Timer is recreated as necessary to target the appropriate
// Autoscroller instance.
private static MouseEvent event;
private static Timer timer;
private static JComponent component;
//
// The public API, all methods are cover methods for an instance method
//
/**
* Stops autoscroll events from happening on the specified component.
*/
public static void stop(JComponent c) {
sharedInstance._stop(c);
}
/**
* Stops autoscroll events from happening on the specified component.
*/
public static boolean isRunning(JComponent c) {
return sharedInstance._isRunning(c);
}
/**
* Invoked when a mouse dragged event occurs, will start the autoscroller
* if necessary.
*/
public static void processMouseDragged(MouseEvent e) {
sharedInstance._processMouseDragged(e);
}
Autoscroller() {
}
/**
* Starts the timer targeting the passed in component.
*/
private void start(JComponent c, MouseEvent e) {
Point screenLocation = c.getLocationOnScreen();
if (component != c) {
_stop(component);
}
component = c;
event = new MouseEvent(component, e.getID(), e.getWhen(),
e.getModifiers(), e.getX() + screenLocation.x,
e.getY() + screenLocation.y,
e.getXOnScreen(),
e.getYOnScreen(),
e.getClickCount(), e.isPopupTrigger(),
MouseEvent.NOBUTTON);
MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
meAccessor.setCausedByTouchEvent(event,
meAccessor.isCausedByTouchEvent(e));
if (timer == null) {
timer = new Timer(100, this);
}
if (!timer.isRunning()) {
timer.start();
}
}
//
// Methods mirror the public static API
//
/**
* Stops scrolling for the passed in widget.
*/
private void _stop(JComponent c) {
if (component == c) {
if (timer != null) {
timer.stop();
}
timer = null;
event = null;
component = null;
}
}
/**
* Returns true if autoscrolling is currently running for the specified
* widget.
*/
private boolean _isRunning(JComponent c) {
return (c == component && timer != null && timer.isRunning());
}
/**
* MouseListener method, invokes start/stop as necessary.
*/
private void _processMouseDragged(MouseEvent e) {
JComponent component = (JComponent)e.getComponent();
boolean stop = true;
if (component.isShowing()) {
Rectangle visibleRect = component.getVisibleRect();
stop = visibleRect.contains(e.getX(), e.getY());
}
if (stop) {
_stop(component);
} else {
start(component, e);
}
}
//
// ActionListener
//
/**
* ActionListener method. Invoked when the Timer fires. This will scroll
* if necessary.
*/
public void actionPerformed(ActionEvent x) {
JComponent component = Autoscroller.component;
if (component == null || !component.isShowing() || (event == null)) {
_stop(component);
return;
}
Point screenLocation = component.getLocationOnScreen();
MouseEvent e = new MouseEvent(component, event.getID(),
event.getWhen(), event.getModifiers(),
event.getX() - screenLocation.x,
event.getY() - screenLocation.y,
event.getXOnScreen(),
event.getYOnScreen(),
event.getClickCount(),
event.isPopupTrigger(),
MouseEvent.NOBUTTON);
MouseEventAccessor meAccessor = AWTAccessor.getMouseEventAccessor();
meAccessor.setCausedByTouchEvent(e,
meAccessor.isCausedByTouchEvent(event));
component.superProcessMouseMotionEvent(e);
}
}
⏎ javax/swing/Autoscroller.java
Or download all of them as a single archive file:
File name: jre-rt-javax-1.8.0_191-src.zip File size: 5381005 bytes Release date: 2018-10-28 Download
⇒ JRE 8 rt.jar - org.* Package Source Code
2024-07-16, ≈485🔥, 7💬
Popular Posts:
JLayer is a library that decodes/plays/converts MPEG 1/2/2.5 Layer 1/2/3 (i.e. MP3) in real time for...
This package is the backport of java.util.concurrent API, introduced in Java 5.0 and further refined...
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
JDK 11 java.smartcardio.jmod is the JMOD file for JDK 11 Smartcardio module. JDK 11 Smart Card IO mo...
Java Servlet API 3.0.1 Source Code Files are important if you want to compile them with different JD...