de.frag.umlplugin.graphio
Class SaveDialog

java.lang.Object
  extended by de.frag.umlplugin.graphio.SaveDialog

public class SaveDialog
extends java.lang.Object

Dialog for selecting save format and target file.


Constructor Summary
SaveDialog(com.intellij.openapi.project.Project project, java.lang.String title, java.lang.String browseLabel, java.lang.String browseDetails, java.lang.String pathKey, FileType... fileTypes)
          Shows current element under cursor or mouse in graphical navigator.
 
Method Summary
 void close()
          Closes this dialog.
 FileType getFileType()
          Gets selected file type.
 java.lang.String getPath()
          Gets selected target save path.
 int getThumbnailHeight()
          Gets thumbnail height to use for thumbnail images.
 boolean saveThumbnail()
          Checks whether a thumbnail image should be saved.
 void show(java.lang.Runnable saveAction)
          Shows dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaveDialog

public SaveDialog(@NotNull
                  com.intellij.openapi.project.Project project,
                  @NotNull
                  java.lang.String title,
                  @NotNull
                  java.lang.String browseLabel,
                  @NotNull
                  java.lang.String browseDetails,
                  @NotNull
                  java.lang.String pathKey,
                  @NotNull
                  FileType... fileTypes)
Shows current element under cursor or mouse in graphical navigator.

Parameters:
project - current project
title - dialog title
browseLabel - label for path browse button
browseDetails - details for path browse button and field
pathKey - key for storing selected base path, so when user opens dialog next time, the selected path is already inserted as base path
fileTypes - file types to choose from
Method Detail

show

public void show(@NotNull
                 java.lang.Runnable saveAction)
Shows dialog.

Parameters:
saveAction - runnable to execute if user selected save-button

close

public void close()
Closes this dialog.


getPath

@NotNull
public java.lang.String getPath()
Gets selected target save path.

Returns:
target path

getFileType

@NotNull
public FileType getFileType()
Gets selected file type.

Returns:
selected file type

saveThumbnail

public boolean saveThumbnail()
Checks whether a thumbnail image should be saved.

Returns:
true, if thumbnail image should be saved; false otherwise

getThumbnailHeight

public int getThumbnailHeight()
Gets thumbnail height to use for thumbnail images.

Returns:
thumbnail height in pixels