com.alee.examples.content
Class DefaultExample

java.lang.Object
  extended by com.alee.examples.content.DefaultExample
All Implemented Interfaces:
Example
Direct Known Subclasses:
AccordionExample, AndroidButtonsExample, AndroidFieldsExample, AndroidLabelExample, AndroidPanelExample, AndroidTextAreaExample, AsyncTreesExample, AttachedTabbedPanesExample, BlocksTransitionExample, BorderPaintersExample, ButtonBreadcrumbsExample, ButtonPaintersExample, ButtonPopupExample, ButtonProgressOverlayExample, ButtonsExample, CalendarExample, CheckBoxExample, CheckBoxListExample, CheckBoxTreeExample, CollapsiblePanesExample, ColorChooserDialogExample, ColorChooserDialogExample, ColorChooserFieldExample, ColorChooserPanelExample, ComboBoxExample, ComplexExample, ConfirmOptionPaneExample, CurtainTransitionExample, CustomContentTooltipExample, CustomDelayedTooltipExample, CustomHotkeyTooltipExample, CustomIconedTooltipExample, CustomInstantTooltipExample, CustomizedButtonsExample, CustomizedPopOverExample, CustomMultiSideTooltipExample, CustomNotificationsExample, CustomOneTimeTooltipExample, CustomPaintersExample, DateFieldExample, DecoratedPanelExample, DefaultMenuBarExample, DefaultToolbarExample, DesktopPaneExample, DetachedPopOverExample, DirectionalPopOverExample, DirectoryChooserExample, DocumentPaneExample, DoubleGroupedButtonsExample, DynamicMenuExample, EditableComboBoxExample, EditorPaneExample, ErrorOptionPaneExample, ExtendedConfirmOptionPaneExample, FadeTransitionExample, FieldComponentsExample, FieldsInputPromptExample, FileBreadcrumbsExample, FileChooserDialogExample, FileChooserFieldsExample, FileChoosersExample, FileDropExample, FilesListExample, FileTreesExample, FocusTrackingExample, FocusTrackingPanelsExample, FormattedTextFieldsExample, FuturicoButtonsExample, FuturicoFieldsExample, FuturicoLabelExample, FuturicoPanelExample, FuturicoTextAreaExample, FuturicoToolbarExample, GalleryExample, GradientColorChooserExample, GroupedButtonsExample, HorizontalProgressBarsExample, HorizontalSlidersExample, HorizontalSplitPaneExample, HotkeyLabelsExample, IconedBreadcrumbsExample, ImageProgressOverlayExample, InputOptionPaneExample, LabelBreadcrumbsExample, LabelOverlayExample, LabelsExample, LanguageExample, LinkLabelsExample, ListsExample, MemoryBarExample, MessageOptionPaneExample, ModalPopOverExample, MultilineLabelExample, NinePatchEditorExample, NinePatchPaintersExample, OptionPanesExample, PanelBreadcrumbsExample, PartialPanelsExample, PasswordFieldsExample, PathFieldExample, ProgressBreadcrumbsExample, ProgressDialogExample, RadioButtonExample, RandomTransitionExample, ResizeOverlayExample, ShadedLabelsExample, SimplePopOverExample, SimplePopupExample, SimpleScrollPaneExample, SlideTransitionExample, SpinnersExample, SplitButtonExample, StaticTableExample, StatusBarExample, StepLabelsExample, StepProgressExample, StyledComboBoxExample, StyledTabbedPanesExample, SwingTooltipExample, SwitchExample, TabbedPanesExample, TableExample, TextAreaExample, TextAreaOverlayExample, TextFieldOverlayExample, TextFieldsExample, TextNotificationsExample, TextPaneExample, TextProgressOverlayExample, ToggleButtonBreadcrumbsExample, ToggleButtonsExample, TreesExample, TristateCheckBoxExample, UndecoratedStatusBarExample, VerticalLabelsExample, VerticalProgressBarsExample, VerticalSlidersExample, VerticalSplitPaneExample, WebComponentPanelExample, WebDecoratedImageExample, WebDialogExample, WebFrameExample, WebImageDropExample, WebImageExample

public abstract class DefaultExample
extends java.lang.Object
implements Example

This abstract class provides additional methods for WebLaF demo example classes.

Author:
Mikle Garin

Field Summary
static javax.swing.ImageIcon cursor
           
static javax.swing.ImageIcon lmb
          Mouse buttons icons.
static javax.swing.ImageIcon mmb
           
static javax.swing.ImageIcon rmb
           
 
Constructor Summary
DefaultExample()
           
 
Method Summary
 void doWhenPresentationFinished(java.lang.Runnable runnable)
          Sets a runnable that should be executed at the end of the presentation.
 FeatureState getFeatureState()
          Returns current state of the component development.
 java.util.List<PresentationStep> getPresentationSteps()
          Returns null list of live presentation steps by default.
 java.net.URL getResource(java.lang.String path)
          Returns resource file url which is located in resources package.
 java.util.List<java.lang.Object> getResources()
          Returns list of resources used in example.
 boolean isFillWidth()
          Returns whether the example component should fill all available width or not.
 boolean isPresentationAvailable()
          Returns whether live presentation is available for this example or not.
 javax.swing.ImageIcon loadIcon(java.lang.Class nearClass, java.lang.String path)
          Returns icon loaded from example icons package.
 javax.swing.ImageIcon loadIcon(java.lang.String path)
          Returns icon loaded from example icons package.
 void nextPresentationStep()
          Forces live presentation to proceed to next step.
 void startPresentation()
          Starts live presentation.
 void stopPresentation()
          Stops live presentation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.alee.examples.content.Example
getDescription, getPreview, getTitle
 

Field Detail

lmb

public static final javax.swing.ImageIcon lmb
Mouse buttons icons.


mmb

public static final javax.swing.ImageIcon mmb

rmb

public static final javax.swing.ImageIcon rmb

cursor

public static final javax.swing.ImageIcon cursor
Constructor Detail

DefaultExample

public DefaultExample()
Method Detail

getResources

public java.util.List<java.lang.Object> getResources()
Returns list of resources used in example. There might be anything - images, files, urls, classes or something else. ExampleManager might provide preview components for some of their types.

Specified by:
getResources in interface Example
Returns:
list of resources used in example

isPresentationAvailable

public boolean isPresentationAvailable()
Returns whether live presentation is available for this example or not. Live presentation should guide user through the example, displaying its possible usage ways.

Specified by:
isPresentationAvailable in interface Example
Returns:
true if live presentation is available for this example, false otherwise

getPresentationSteps

public java.util.List<PresentationStep> getPresentationSteps()
Returns null list of live presentation steps by default.

Returns:
null

startPresentation

public void startPresentation()
Starts live presentation.

Specified by:
startPresentation in interface Example

nextPresentationStep

public void nextPresentationStep()
Forces live presentation to proceed to next step.

Specified by:
nextPresentationStep in interface Example

stopPresentation

public void stopPresentation()
Stops live presentation.

Specified by:
stopPresentation in interface Example

doWhenPresentationFinished

public void doWhenPresentationFinished(java.lang.Runnable runnable)
Sets a runnable that should be executed at the end of the presentation. You might want to cleanup some variables or components here.

Specified by:
doWhenPresentationFinished in interface Example
Parameters:
runnable - runnable

getFeatureState

public FeatureState getFeatureState()
Returns current state of the component development.

Specified by:
getFeatureState in interface Example
Returns:
current state of the component development

isFillWidth

public boolean isFillWidth()
Returns whether the example component should fill all available width or not.

Specified by:
isFillWidth in interface Example
Returns:
true if the example component should fill all available width, false otherwise

loadIcon

public javax.swing.ImageIcon loadIcon(java.lang.String path)
Returns icon loaded from example icons package.

Parameters:
path - path to the icon inside icons package
Returns:
loaded icon

loadIcon

public javax.swing.ImageIcon loadIcon(java.lang.Class nearClass,
                                      java.lang.String path)
Returns icon loaded from example icons package.

Parameters:
nearClass - example class
path - path to the icon inside icons package
Returns:
loaded icon

getResource

public java.net.URL getResource(java.lang.String path)
Returns resource file url which is located in resources package.

Parameters:
path - path to the resource file inside resources package
Returns:
resource file url