|
Sweet Home 3D 3.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.eteks.sweethome3d.swing.FileContentManager
public class FileContentManager
Content manager for files with Swing file choosers.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.eteks.sweethome3d.viewcontroller.ContentManager |
---|
ContentManager.ContentType |
Constructor Summary | |
---|---|
FileContentManager(UserPreferences preferences)
|
Method Summary | |
---|---|
protected boolean |
confirmOverwrite(View parentView,
java.lang.String fileName)
Displays a dialog that let user choose whether he wants to overwrite file fileName or not. |
Content |
getContent(java.lang.String contentName)
Returns a URL content object that references
the given file path. |
java.lang.String |
getDefaultFileExtension(ContentManager.ContentType contentType)
Returns the default file extension of a given content type. |
protected java.lang.String |
getFileDialogTitle(boolean save)
Returns default file dialog title. |
protected javax.swing.filechooser.FileFilter[] |
getFileFilter(ContentManager.ContentType contentType)
Returns the file filters available for a given content type. |
java.lang.String |
getPresentationName(java.lang.String contentName,
ContentManager.ContentType contentType)
Returns the file name of the file path in parameter. |
boolean |
isAcceptable(java.lang.String contentName,
ContentManager.ContentType contentType)
Returns true if the file path in parameter is accepted
for contentType . |
java.lang.String |
showOpenDialog(View parentView,
java.lang.String dialogTitle,
ContentManager.ContentType contentType)
Returns the file path chosen by user with an open file dialog. |
java.lang.String |
showSaveDialog(View parentView,
java.lang.String dialogTitle,
ContentManager.ContentType contentType,
java.lang.String name)
Returns the file path chosen by user with a save file dialog. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileContentManager(UserPreferences preferences)
Method Detail |
---|
public Content getContent(java.lang.String contentName) throws RecorderException
URL content
object that references
the given file path.
getContent
in interface ContentManager
RecorderException
public java.lang.String getPresentationName(java.lang.String contentName, ContentManager.ContentType contentType)
getPresentationName
in interface ContentManager
protected javax.swing.filechooser.FileFilter[] getFileFilter(ContentManager.ContentType contentType)
public java.lang.String getDefaultFileExtension(ContentManager.ContentType contentType)
null
this extension will be appended automatically
to the file name chosen by user in save dialog.
This method may be overridden to change the default file extension of an existing content type
or to define the default file extension of a user defined content type.
public boolean isAcceptable(java.lang.String contentName, ContentManager.ContentType contentType)
true
if the file path in parameter is accepted
for contentType
.
isAcceptable
in interface ContentManager
public java.lang.String showOpenDialog(View parentView, java.lang.String dialogTitle, ContentManager.ContentType contentType)
showOpenDialog
in interface ContentManager
null
if user canceled its choice.public java.lang.String showSaveDialog(View parentView, java.lang.String dialogTitle, ContentManager.ContentType contentType, java.lang.String name)
showSaveDialog
in interface ContentManager
null
if user canceled its choice.protected java.lang.String getFileDialogTitle(boolean save)
protected boolean confirmOverwrite(View parentView, java.lang.String fileName)
fileName
or not.
true
if user confirmed to overwrite.
|
Sweet Home 3D 3.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
![]() |
? Copyrights 2006-2011 eTeks - All rights reserved
Distributed under GNU General Public License |