|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
edu.rice.cs.drjava.ui.NewVersionPopup
public class NewVersionPopup
Displays whether a new version of DrJava is available.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JDialog |
|---|
JDialog.AccessibleJDialog |
| Nested classes/interfaces inherited from class java.awt.Dialog |
|---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private JPanel |
_bottomPanel
the panel with the buttons and combobox |
private Action |
_closeAction
|
private JButton |
_closeButton
the button that closes this window |
private Action |
_downloadAction
Close this window, but display the full DrJava Errors window. |
private JButton |
_downloadButton
the button that downloads the new version |
private MainFrame |
_mainFrame
the parent frame |
private |
_modeBox
whether to keep displaying this dialog, and for which releases |
private String[] |
_msg
the message for the user |
private String |
_newestVersionString
the version string of the new version found, or "" |
private Action |
_updateAction
Download new DrJava and update this DrJava, then restart. |
private JButton |
_updateButton
the button that updates to the new version |
private JOptionPane |
_versionPanel
the version information pane |
private static Date |
BUILD_TIME
the build time of this version |
protected Runnable1<WindowEvent> |
CANCEL
Runnable that calls _cancel. |
static Log |
LOG
|
| Fields inherited from class javax.swing.JDialog |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Dialog |
|---|
DEFAULT_MODALITY_TYPE |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
NewVersionPopup(MainFrame parent)
Creates a window to display whether a new version of DrJava is available. |
|
| Method Summary | |
|---|---|
private void |
_openFileDownloadPage(String url)
Opens the specified page. |
protected void |
abortUpdate()
|
protected void |
abortUpdate(boolean close)
|
protected void |
abortUpdate(String message)
|
protected void |
abortUpdate(String message,
boolean close)
|
static boolean |
checkNewBetaVersion(Box<String> versionStringRef,
Box<Date> buildTimeRef)
Return true if there is a beta release available that's newer than this version. |
static boolean |
checkNewDevVersion(Box<String> versionStringRef,
Box<Date> buildTimeRef)
Return true if there is a development release available that's newer than this version. |
static boolean |
checkNewStableVersion(Box<String> versionStringRef,
Box<Date> buildTimeRef)
Return true if there is a stable release available that's newer than this version. |
boolean |
checkNewVersion()
Returns true if there is a new version available that matches the users criterion. |
static boolean |
checkNewWeeklyVersion(Box<String> versionStringRef,
Box<Date> buildTimeRef)
Return true if there is a weekly build available that's newer than this version. |
protected void |
closeAction()
|
protected void |
downloadAction()
|
protected String |
getAutomaticDownloadURL()
Return the automatic download URL. |
static Date |
getBuildTime(URL url)
Returns the build time for the URL, or null if it could not be read. |
static Date |
getBuildTime(URL url,
Box<String> versionStringRef)
Returns the build time for the URL, or null if it could not be read. |
protected String |
getManualDownloadURL()
Return the manual download URL. |
protected String[] |
getMessage(Box<Boolean> availableRef)
|
void |
setVisible(boolean vis)
Toggle visibility of this frame. |
protected void |
updateAction()
|
private void |
updateText()
|
| Methods inherited from class java.awt.Dialog |
|---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, show, toBack |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private_modeBox
private JButton _closeButton
private JButton _updateButton
private JButton _downloadButton
private MainFrame _mainFrame
private JOptionPane _versionPanel
private JPanel _bottomPanel
private static Date BUILD_TIME
private String[] _msg
private String _newestVersionString
private Action _closeAction
private Action _updateAction
private Action _downloadAction
public static final Log LOG
protected final Runnable1<WindowEvent> CANCEL
| Constructor Detail |
|---|
public NewVersionPopup(MainFrame parent)
| Method Detail |
|---|
private void updateText()
protected void closeAction()
protected void downloadAction()
protected void abortUpdate()
protected void abortUpdate(String message)
protected void abortUpdate(boolean close)
protected void abortUpdate(String message,
boolean close)
protected void updateAction()
protected String getAutomaticDownloadURL()
protected String getManualDownloadURL()
private void _openFileDownloadPage(String url)
public boolean checkNewVersion()
protected String[] getMessage(Box<Boolean> availableRef)
public static boolean checkNewStableVersion(Box<String> versionStringRef,
Box<Date> buildTimeRef)
versionStringRef - a reference that will be filled with the version string, or null if not desiredbuildTimeRef - a reference that will be filled with the build time, or null if not desired
public static boolean checkNewBetaVersion(Box<String> versionStringRef,
Box<Date> buildTimeRef)
versionStringRef - a reference that will be filled with the version string, or null if not desiredbuildTimeRef - a reference that will be filled with the build time, or null if not desired
public static boolean checkNewDevVersion(Box<String> versionStringRef,
Box<Date> buildTimeRef)
versionStringRef - a reference that will be filled with the version string, or null if not desiredbuildTimeRef - a reference that will be filled with the build time, or null if not desired
public static boolean checkNewWeeklyVersion(Box<String> versionStringRef,
Box<Date> buildTimeRef)
versionStringRef - a reference that will be filled with the version string, or null if not desiredbuildTimeRef - a reference that will be filled with the build time, or null if not desired
public static Date getBuildTime(URL url)
public static Date getBuildTime(URL url,
Box<String> versionStringRef)
url - the URL that contains the version stringversionStringRef - a reference that will be filled with the version string, or null if not desired
public void setVisible(boolean vis)
setVisible in class Dialog
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||