kiyut.citra 2.5

kiyut.citra.canvas
Class FXContextManager

java.lang.Object
  extended by kiyut.citra.canvas.AbstractFXContext
      extended by kiyut.citra.canvas.FXContextManager
All Implemented Interfaces:
FXContext

public class FXContextManager
extends AbstractFXContext

Global or application wide singleton instances implementation of FXContext

Author:
Kiyut

Field Summary
 
Fields inherited from class kiyut.citra.canvas.AbstractFXContext
canvas, filter, filterMode, interactor, selectionStroke1, selectionStroke2, selectionStrokePaint1, selectionStrokePaint2, tool, toolOverlayFillPaint, toolOverlayStrokePaint
 
Method Summary
static FXContextManager getInstance()
          Returns the single instance.
 org.openide.util.Lookup getLookup()
          Return this object lookup
 void open(File file)
          Open Image File as the specified file param
 void revert()
          Reopen the Image File
 void saveAs()
          Save As the current active canvas, and update the file location
 void saveCopy()
          Save Copy the current active canvas, does not update the file location
protected  void saveImpl(BufferedImage image, boolean copy)
          Save the supplied image.
 void setFilter(FXFilter filter)
          Overidden to put filter into the lookup
 
Methods inherited from class kiyut.citra.canvas.AbstractFXContext
getCanvas, getFilter, getSelectionStroke1, getSelectionStroke2, getSelectionStrokePaint1, getSelectionStrokePaint2, getTool, getToolOverlayFillPaint, getToolOverlayStrokePaint, isFilterMode, setCanvas, setFilterMode, setTool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static FXContextManager getInstance()
Returns the single instance.

Returns:
The single instance.

getLookup

public org.openide.util.Lookup getLookup()
Return this object lookup

Returns:
Lookup

setFilter

public void setFilter(FXFilter filter)
Overidden to put filter into the lookup

Specified by:
setFilter in interface FXContext
Overrides:
setFilter in class AbstractFXContext

open

public void open(File file)
Open Image File as the specified file param

Parameters:
file - File
See Also:
revert()

revert

public void revert()
Reopen the Image File

See Also:
open(File)

saveAs

public void saveAs()
Save As the current active canvas, and update the file location

See Also:
saveCopy(), saveImpl(BufferedImage, boolean)

saveCopy

public void saveCopy()
Save Copy the current active canvas, does not update the file location

See Also:
saveAs(), saveImpl(BufferedImage, boolean)

saveImpl

protected void saveImpl(BufferedImage image,
                        boolean copy)
Save the supplied image. It delegated to the ImageWriterDialog

Parameters:
image - BufferedImage
copy - true (saveCopy) or false (saveAs)
See Also:
saveAs(), saveCopy()

kiyut.citra 2.5