Java Doc for AbstractMode.java in  » IDE » J » org » armedbear » j » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE » J » org.armedbear.j 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.armedbear.j.AbstractMode

All known Subclasses:   org.armedbear.j.VHDLMode,  org.armedbear.j.AsmMode,  org.armedbear.j.AutoconfMode,  org.armedbear.j.DirectoryMode,  org.armedbear.j.TclMode,  org.armedbear.j.SchemeMode,  org.armedbear.j.PythonMode,  org.armedbear.j.ImageMode,  org.armedbear.j.ListTagsMode,  org.armedbear.j.ShellScriptMode,  org.armedbear.j.CompilationMode,  org.armedbear.j.VerilogMode,  org.armedbear.j.ListRegistersMode,  org.armedbear.j.PerlMode,  org.armedbear.j.mail.MessageMode,  org.armedbear.j.ShellMode,  org.armedbear.j.jdb.JdbMode,  org.armedbear.j.mail.MailboxMode,  org.armedbear.j.WebMode,  org.armedbear.j.mail.SendMailMode,  org.armedbear.j.ListOccurrencesMode,  org.armedbear.j.XmlMode,  org.armedbear.j.mail.NewsGroupsMode,  org.armedbear.j.JavaMode,  org.armedbear.j.ArchiveMode,  org.armedbear.j.MakefileMode,  org.armedbear.j.RubyMode,  org.armedbear.j.DiffMode,  org.armedbear.j.CSSMode,  org.armedbear.j.PlainTextMode,  org.armedbear.j.HtmlMode,  org.armedbear.j.LispMode,  org.armedbear.j.PropertiesMode,  org.armedbear.j.WordMode,  org.armedbear.j.CheckinMode,  org.armedbear.j.BinaryMode,  org.armedbear.j.ManMode,
AbstractMode
abstract public class AbstractMode implements Constants,Mode(Code)

AbstractMode provides an interface for implementing specific modes. A mode is a set of rules to define the way that the editor behaves. This includes key mappings, menu generation, context menu handling, toolbar generation, a sidebar component, tooltips, colors, indentation, and general properties. All modes should extend AbstractMode and are encouraged to override the methods that are pertinent to that mode. The default implementation given in AbstractMode will suffice for the rest.

Any class extending AbstractMode must add its id and displayName to the Constants class.

More on overriding AbstractMode goes here***
See Also:   Constants


Field Summary
protected  KeyMapkeyMap
    
protected  FilekeyMapFile
    
protected  Keywordskeywords
    
protected  PropertyListproperties
    

Constructor Summary
protected  AbstractMode(int id, String displayName)
    

Method Summary
final public  booleanaccepts(String filename)
    
public  booleanacceptsLinePaste(Editor editor)
    
protected  JMenuItemaddContextMenuItem(String text, String command, JPopupMenu popup, Dispatcher dispatcher)
    
protected  voidaddDefaultContextMenuItems(Editor editor, JPopupMenu popup)
    
public  booleancanIndent()
     The default is false.
public  booleancanIndentPaste()
     The default is false.
public  booleanconfirmClose(Editor editor, Buffer buffer)
    
public  BuffercreateBuffer(File file)
     Creates a Buffer for the given File.
public  MenuBarcreateMenuBar(Frame frame)
    
final public synchronized  voiddeleteKeyMap()
    
public  PositionfindIdentifierStart(Line line, int offset)
    
public  charfixCase(Editor editor, char c)
     The default is to return the original character.
public  booleangetBooleanProperty(Property property)
    
public  ColorgetColorProperty(Property property)
    
public  StringgetCommentEnd()
     The default is null.
public  StringgetCommentStart()
     The default is null.
public  JPopupMenugetContextMenu(Editor editor)
    
public  StringgetContextString(Editor editor, boolean verbose)
     The default is to return the tag before the cursor position, if the buffer has tags.
public  intgetCorrectIndentation(Line line, Buffer buffer)
     The default is 0.
protected  ToolBargetCustomToolBar(Frame frame)
    
protected  ToolBargetDefaultToolBar(Frame frame)
    
protected  ObjectgetDefaultValue(Property property)
     Returns the default value for the given Property.
Parameters:
  property - the Property to get the default value for.
final public  StringgetDisplayName()
     Returns the display name of this mode.
public  ExpressiongetExpressionAtDot(Editor editor, boolean exact)
    
public  FormattergetFormatter(Buffer buffer)
     Returns a Formatter for the given Buffer.
Parameters:
  buffer - The Buffer that is to be formattedaccording to this mode.
protected  StringgetFullKey(String key)
    
final public  intgetId()
     Returns the unique identifier of this mode.
final public  StringgetIdentifier(Position pos)
    
final public  StringgetIdentifier(Line line, int offset)
    
public  intgetIntegerProperty(Property property)
    
final public synchronized  KeyMapgetKeyMap()
    
public  FilegetKeyMapFile()
    
public  StringgetMenuName()
    
public  StringgetMouseMovedContextString(Editor editor, Position pos)
     The default is null.
public  NavigationComponentgetSidebarComponent(Editor editor)
    
public  StringgetStringProperty(Property property)
    
public  SyntaxIteratorgetSyntaxIterator(Position pos)
     The default is to return an instance of DefaultSyntaxIterator DefaultSyntaxIterator .
public  TaggergetTagger(SystemBuffer buffer)
     The default is null.
public  ToolBargetToolBar(Frame frame)
    
public  StringgetToolTipText(Editor editor, MouseEvent e)
     The default is null.
public  booleanhasQualifiedNames()
     The default is false.
public  booleanisCommentLine(Line line)
     The default is false.
public  booleanisIdentifierPart(char c)
     The default is the result of Character.isJavaIdentifierPart(char).
public  booleanisIdentifierStart(char c)
     The default is the result of Character.isJavaIdentifierStart(char).
public  booleanisInComment(Buffer buffer, Position pos)
     The default is false.
public  booleanisInQuote(Buffer buffer, Position pos)
     The default implementation considers both single and double quotes (which is wrong for Lisp) and only looks at the current line (which is wrong for C and C++).
public  booleanisKeyword(String s)
    
public  booleanisQualifiedName(String s)
     The default is true if s contains either a period '.' or a double colon "::".
public  booleanisTaggable()
     The default is false.
public  voidloadFile(Buffer buffer, File file)
     The default is to do nothing.
public  voidpopulateLispMenu(Editor editor, Menu menu)
    
public  voidpopulateMenu(Editor editor, Menu menu)
    
public  voidpopulateModeMenu(Editor editor, Menu menu)
    
protected  voidpopulateSearchMenu(Editor editor, Menu menu)
    
protected  voidsetKeyMapDefaults(KeyMap km)
    
public  voidsetProperty(Property property, String value)
     Sets the given property name to the given property value.
public  voidsetProperty(Property property, boolean value)
     Sets the given property name to the given property value.
public  voidsetProperty(Property property, int value)
     Sets the given property name to the given property value.
final public  StringtoString()
     Returns the display name for this mode.
final public synchronized  voiduseDefaultKeyMap()
    

Field Detail
keyMap
protected KeyMap keyMap(Code)



keyMapFile
protected File keyMapFile(Code)



keywords
protected Keywords keywords(Code)



properties
protected PropertyList properties(Code)




Constructor Detail
AbstractMode
protected AbstractMode(int id, String displayName)(Code)




Method Detail
accepts
final public boolean accepts(String filename)(Code)



acceptsLinePaste
public boolean acceptsLinePaste(Editor editor)(Code)



addContextMenuItem
protected JMenuItem addContextMenuItem(String text, String command, JPopupMenu popup, Dispatcher dispatcher)(Code)



addDefaultContextMenuItems
protected void addDefaultContextMenuItems(Editor editor, JPopupMenu popup)(Code)



canIndent
public boolean canIndent()(Code)
The default is false.



canIndentPaste
public boolean canIndentPaste()(Code)
The default is false.



confirmClose
public boolean confirmClose(Editor editor, Buffer buffer)(Code)



createBuffer
public Buffer createBuffer(File file)(Code)
Creates a Buffer for the given File. For now, all this implementation does is return null.
Parameters:
  file - null
See Also:   org.armedbear.j.mail.SendMailMode.createBuffer(File)



createMenuBar
public MenuBar createMenuBar(Frame frame)(Code)



deleteKeyMap
final public synchronized void deleteKeyMap()(Code)



findIdentifierStart
public Position findIdentifierStart(Line line, int offset)(Code)



fixCase
public char fixCase(Editor editor, char c)(Code)
The default is to return the original character.
Parameters:
  editor -
Parameters:
  c -



getBooleanProperty
public boolean getBooleanProperty(Property property)(Code)



getColorProperty
public Color getColorProperty(Property property)(Code)



getCommentEnd
public String getCommentEnd()(Code)
The default is null.



getCommentStart
public String getCommentStart()(Code)
The default is null.



getContextMenu
public JPopupMenu getContextMenu(Editor editor)(Code)



getContextString
public String getContextString(Editor editor, boolean verbose)(Code)
The default is to return the tag before the cursor position, if the buffer has tags.
Parameters:
  editor -
Parameters:
  verbose -



getCorrectIndentation
public int getCorrectIndentation(Line line, Buffer buffer)(Code)
The default is 0.
Parameters:
  line -
Parameters:
  buffer -



getCustomToolBar
protected ToolBar getCustomToolBar(Frame frame)(Code)



getDefaultToolBar
protected ToolBar getDefaultToolBar(Frame frame)(Code)



getDefaultValue
protected Object getDefaultValue(Property property)(Code)
Returns the default value for the given Property.
Parameters:
  property - the Property to get the default value for. the default value.



getDisplayName
final public String getDisplayName()(Code)
Returns the display name of this mode. Display names should be defined in Constants. The display name of this mode.
See Also:   Constants



getExpressionAtDot
public Expression getExpressionAtDot(Editor editor, boolean exact)(Code)



getFormatter
public Formatter getFormatter(Buffer buffer)(Code)
Returns a Formatter for the given Buffer.
Parameters:
  buffer - The Buffer that is to be formattedaccording to this mode. A Formatter for the given mode.(The default is a PlainTextFormatter.)



getFullKey
protected String getFullKey(String key)(Code)



getId
final public int getId()(Code)
Returns the unique identifier of this mode. All ids should be defined in Constants. The unique identifier of this mode.
See Also:   Constants



getIdentifier
final public String getIdentifier(Position pos)(Code)



getIdentifier
final public String getIdentifier(Line line, int offset)(Code)



getIntegerProperty
public int getIntegerProperty(Property property)(Code)



getKeyMap
final public synchronized KeyMap getKeyMap()(Code)



getKeyMapFile
public File getKeyMapFile()(Code)



getMenuName
public String getMenuName()(Code)



getMouseMovedContextString
public String getMouseMovedContextString(Editor editor, Position pos)(Code)
The default is null.
Parameters:
  editor -
Parameters:
  pos -



getSidebarComponent
public NavigationComponent getSidebarComponent(Editor editor)(Code)



getStringProperty
public String getStringProperty(Property property)(Code)



getSyntaxIterator
public SyntaxIterator getSyntaxIterator(Position pos)(Code)
The default is to return an instance of DefaultSyntaxIterator DefaultSyntaxIterator .
Parameters:
  pos -



getTagger
public Tagger getTagger(SystemBuffer buffer)(Code)
The default is null.
Parameters:
  buffer -



getToolBar
public ToolBar getToolBar(Frame frame)(Code)



getToolTipText
public String getToolTipText(Editor editor, MouseEvent e)(Code)
The default is null.
Parameters:
  editor -
Parameters:
  e -



hasQualifiedNames
public boolean hasQualifiedNames()(Code)
The default is false.



isCommentLine
public boolean isCommentLine(Line line)(Code)
The default is false.
Parameters:
  line -



isIdentifierPart
public boolean isIdentifierPart(char c)(Code)
The default is the result of Character.isJavaIdentifierPart(char).



isIdentifierStart
public boolean isIdentifierStart(char c)(Code)
The default is the result of Character.isJavaIdentifierStart(char).



isInComment
public boolean isInComment(Buffer buffer, Position pos)(Code)
The default is false.
Parameters:
  buffer -
Parameters:
  pos -



isInQuote
public boolean isInQuote(Buffer buffer, Position pos)(Code)
The default implementation considers both single and double quotes (which is wrong for Lisp) and only looks at the current line (which is wrong for C and C++).
Parameters:
  buffer -
Parameters:
  pos -



isKeyword
public boolean isKeyword(String s)(Code)



isQualifiedName
public boolean isQualifiedName(String s)(Code)
The default is true if s contains either a period '.' or a double colon "::".
Parameters:
  s -



isTaggable
public boolean isTaggable()(Code)
The default is false.



loadFile
public void loadFile(Buffer buffer, File file)(Code)
The default is to do nothing.
Parameters:
  buffer -
Parameters:
  file -



populateLispMenu
public void populateLispMenu(Editor editor, Menu menu)(Code)



populateMenu
public void populateMenu(Editor editor, Menu menu)(Code)



populateModeMenu
public void populateModeMenu(Editor editor, Menu menu)(Code)



populateSearchMenu
protected void populateSearchMenu(Editor editor, Menu menu)(Code)



setKeyMapDefaults
protected void setKeyMapDefaults(KeyMap km)(Code)



setProperty
public void setProperty(Property property, String value)(Code)
Sets the given property name to the given property value. The property can then be accessed by calling getStringProperty(Property) getStringProperty .
Parameters:
  property - the property to set.
Parameters:
  value - the value to set it to.



setProperty
public void setProperty(Property property, boolean value)(Code)
Sets the given property name to the given property value. The property can then be accessed by calling getBooleanProperty(Property) getBooleanProperty .
Parameters:
  property - the property to set.
Parameters:
  value - the value to set it to.



setProperty
public void setProperty(Property property, int value)(Code)
Sets the given property name to the given property value. The property can then be accessed by calling getIntegerProperty(Property) getIntegerProperty .
Parameters:
  property - the property to set.
Parameters:
  value - the value to set it to.



toString
final public String toString()(Code)
Returns the display name for this mode. The display name for this mode.



useDefaultKeyMap
final public synchronized void useDefaultKeyMap()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.