com.alee.examples.content.DefaultExample Maven / Gradle / Ivy
/*
* This file is part of WebLookAndFeel library.
*
* WebLookAndFeel library is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* WebLookAndFeel library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WebLookAndFeel library. If not, see .
*/
package com.alee.examples.content;
import com.alee.examples.content.presentation.PresentationStep;
import com.alee.utils.ThreadUtils;
import javax.swing.*;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* This abstract class provides additional methods for WebLaF demo example classes.
*
* @author Mikle Garin
*/
public abstract class DefaultExample implements Example
{
/**
* Mouse buttons icons.
*/
public static final ImageIcon lmb = new ImageIcon ( DefaultExample.class.getResource ( "icons/mouse/lmb.png" ) );
public static final ImageIcon mmb = new ImageIcon ( DefaultExample.class.getResource ( "icons/mouse/mmb.png" ) );
public static final ImageIcon rmb = new ImageIcon ( DefaultExample.class.getResource ( "icons/mouse/rmb.png" ) );
public static final ImageIcon cursor = new ImageIcon ( DefaultExample.class.getResource ( "icons/mouse/cursor.png" ) );
/**
* Example icons cache.
*/
private static final Map iconsCache = new HashMap ();
/**
* Presentation end runnable.
*/
private Runnable onPresentationEnd;
/**
* Should stop presentation immediately.
*/
private boolean shouldStop = false;
/**
* Presentation thread.
*/
private Thread presentation;
/**
* {@inheritDoc}
*/
@Override
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy