|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mucommander.ui.viewer.text.TextFactory
public class TextFactory
ViewerFactory and EditorFactory implementation for creating text viewers and editors.
| Constructor Summary | |
|---|---|
TextFactory()
|
|
| Method Summary | |
|---|---|
boolean |
canEditFile(AbstractFile file)
Returns true if this factory can create a file editor for the specified file. |
boolean |
canViewFile(AbstractFile file)
Returns true if this factory can create a file viewer for the specified file. |
FileEditor |
createFileEditor()
Returns a new instance of FileEditor. |
FileViewer |
createFileViewer()
Returns a new instance of FileViewer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextFactory()
| Method Detail |
|---|
public boolean canViewFile(AbstractFile file)
throws WarnUserException
ViewerFactorytrue if this factory can create a file viewer for the specified file.
The FileEditor may base its decision stricly upon the file's name and its extension or may wish to read some of the file and compare it to a magic number.
canViewFile in interface ViewerFactoryfile - file for which a viewer must be created.
true if this factory can create a file viewer for the specified file.
WarnUserException - if the specified file can be viewed after the warning message contained in the
exception is displayed to the end user.
public boolean canEditFile(AbstractFile file)
throws WarnUserException
EditorFactorytrue if this factory can create a file editor for the specified file.
The FileEditor may base its decision stricly upon the file's name and its extension or may wish to read some of the file and compare it to a magic number.
canEditFile in interface EditorFactoryfile - file for which a editor must be created.
true if this factory can create a file editor for the specified file.
WarnUserException - if the specified file can be edited after the warning message contained in the
exception is displayed to the end user.public FileViewer createFileViewer()
ViewerFactoryFileViewer.
createFileViewer in interface ViewerFactoryFileViewer.public FileEditor createFileEditor()
EditorFactoryFileEditor.
createFileEditor in interface EditorFactoryFileEditor.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard