Top Description Inners Fields Constructors Methods
com.calendarfx.view.popover

public Class EntryMapView

extends EntryPopOverPane
Class Inheritance
Imports
com.calendarfx.model.Entry, com.calendarfx.util.LoggingDomain, javafx.beans.InvalidationListener, .WeakInvalidationListener, javafx.beans.binding.Bindings, javafx.beans.property.SimpleStringProperty, .StringProperty, javafx.concurrent.Service, .Task, javafx.geometry.Insets, javafx.scene.Cursor, javafx.scene.image.Image, javafx.scene.layout.Background, .BackgroundImage, .BackgroundPosition, .BackgroundRepeat, .BackgroundSize, .StackPane, javafx.scene.shape.Rectangle, java.awt.Desktop, .Desktop.Action, java.io.IOException, java.net.URISyntaxException, .URL, .URLEncoder, java.nio.charset.StandardCharsets, java.util.Objects, java.util.logging.Level

Pane that shows in a map the location of the entry.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Field Summary

Modifier and TypeField and Description
private final Entry<?>
private final StringProperty
private final EntryMapView.ImageLoader
private final InvalidationListener
private final WeakInvalidationListener

Constructor Summary

AccessConstructor and Description
public
EntryMapView(Entry<?> entry)

Method Summary

Modifier and TypeMethod and Description
public final String
public final StringProperty
public Image
public final void
setGoogleApiKey(String googleApiKey)

Field Detail

entryback to summary
private final Entry<?> entry
googleApiKeyback to summary
private final StringProperty googleApiKey
imageLoaderback to summary
private final EntryMapView.ImageLoader imageLoader
invalidationListenerback to summary
private final InvalidationListener invalidationListener
weakInvalidationListenerback to summary
private final WeakInvalidationListener weakInvalidationListener

Constructor Detail

EntryMapViewback to summary
public EntryMapView(Entry<?> entry)

Method Detail

getGoogleApiKeyback to summary
public final String getGoogleApiKey()
googleApiKeyPropertyback to summary
public final StringProperty googleApiKeyProperty()
loadMapImageback to summary
public Image loadMapImage(String address)
setGoogleApiKeyback to summary
public final void setGoogleApiKey(String googleApiKey)
com.calendarfx.view.popover back to summary

private Class EntryMapView.ImageLoader

extends Service<Image>
Class Inheritance

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Task<V>
createTask()

Implements abstract javafx.concurrent.Service.createTask.

Invoked after the Service is started on the JavaFX Application Thread.

Inherited from javafx.concurrent.Service:
addEventFilteraddEventHandlerbuildEventDispatchChaincancelcancelledexceptionPropertyexecuteTaskexecutorPropertyfailedfireEventgetExceptiongetExecutorgetMessagegetOnCancelledgetOnFailedgetOnReadygetOnRunninggetOnScheduledgetOnSucceededgetProgressgetStategetTitlegetTotalWorkgetValuegetWorkDoneisRunningmessagePropertyonCancelledPropertyonFailedPropertyonReadyPropertyonRunningPropertyonScheduledPropertyonSucceededPropertyprogressPropertyreadyremoveEventFilterremoveEventHandlerresetrestartrunningrunningPropertyscheduledsetEventHandlersetExecutorsetOnCancelledsetOnFailedsetOnReadysetOnRunningsetOnScheduledsetOnSucceededstartstatePropertysucceededtitlePropertytotalWorkPropertyvaluePropertyworkDoneProperty

Constructor Detail

ImageLoaderback to summary
public ImageLoader()

Method Detail

createTaskback to summary
protected Task<V> createTask()

Implements abstract javafx.concurrent.Service.createTask.

Doc from javafx.concurrent.Service.createTask.

Invoked after the Service is started on the JavaFX Application Thread. Implementations should save off any state into final variables prior to creating the Task, since accessing properties defined on the Service within the background thread code of the Task will result in exceptions. For example:


    protected Task createTask() {
        final String url = myService.getUrl();
        return new Task<String>() {
            protected String call() {
                URL u = new URL("http://www.oracle.com");
                BufferedReader in = new BufferedReader(
                        new InputStreamReader(u.openStream()));
                String result = in.readLine();
                in.close();
                return result;
            }
        }
    }

If the Task is a pre-defined class (as opposed to being an anonymous class), and if it followed the recommended best-practice, then there is no need to save off state prior to constructing the Task since its state is completely provided in its constructor.

protected Task createTask() {
        // This is safe because getUrl is called on the FX Application
        // Thread and the FirstLineReaderTasks stores it as an
        // immutable property
        return new FirstLineReaderTask(myService.getUrl());
    }
Returns:Task<V>

the Task to execute

Annotations
@Override
com.calendarfx.view.popover back to summary

private Class EntryMapView.ImageTask

extends Task<Image>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
public
ImageTask(String location)

Method Summary

Modifier and TypeMethod and Description
protected Image
call()

Implements abstract javafx.concurrent.Task.call.

Invoked when the Task is executed, the call method must be overridden and implemented by subclasses.

Inherited from javafx.concurrent.Task:
addEventFilteraddEventHandlerbuildEventDispatchChaincancelcancelcancelledexceptionPropertyfailedfireEventgetExceptiongetMessagegetOnCancelledgetOnFailedgetOnRunninggetOnScheduledgetOnSucceededgetProgressgetStategetTitlegetTotalWorkgetValuegetWorkDoneisRunningmessagePropertyonCancelledPropertyonFailedPropertyonRunningPropertyonScheduledPropertyonSucceededPropertyprogressPropertyremoveEventFilterremoveEventHandlerrunningrunningPropertyscheduledsetEventHandlersetOnCancelledsetOnFailedsetOnRunningsetOnScheduledsetOnSucceededstatePropertysucceededtitlePropertytotalWorkPropertyupdateMessageupdateProgressupdateProgressupdateTitleupdateValuevaluePropertyworkDoneProperty

Field Detail

locationback to summary
private final String location

Constructor Detail

ImageTaskback to summary
public ImageTask(String location)

Method Detail

callback to summary
protected Image call() throws Exception

Implements abstract javafx.concurrent.Task.call.

Doc from javafx.concurrent.Task.call.

Invoked when the Task is executed, the call method must be overridden and implemented by subclasses. The call method actually performs the background thread logic. Only the updateProgress, updateMessage, updateValue and updateTitle methods of Task may be called from code within this method. Any other interaction with the Task from the background thread will result in runtime exceptions.

Returns:Image

The result of the background work, if any.

Annotations
@Override
Exceptions
Exception:
an unhandled exception which occurred during the background operation