Java Doc for Editor.java in  » IDE » bluej-editor » bluej » editor » 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 » bluej editor » bluej.editor 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


bluej.editor.Editor

All known Subclasses:   bluej.editor.moe.MoeEditor,
Editor
public interface Editor (Code)
Interface between an editor and the rest of BlueJ
version:
   $Id: Editor.java 5390 2007-11-21 05:06:41Z davmac $
author:
   Michael Cahill
author:
   Michael Kolling




Method Summary
 voidchangeName(String title, String filename, String docFileName)
     Change class name.
 voidclear()
     Clear the current buffer.
 voidclose()
     Close the editor window.
 voiddisplayMessage(String message, int lineNumber, int column, boolean beep, boolean setStepMark, String help)
     Display a message (used for compile/runtime errors).
 RectanglegetBounds()
     Gets the bounds for this editor window.
public  LineColumngetCaretLocation()
     Returns the current caret location within the edited text.
public  LineColumngetLineColumnFromOffset(int offset)
     Returns the LineColumn object from the given offset in the text.
public  intgetLineLength(int line)
     Returns the length of the line indicated in the edited text.
public  intgetOffsetFromLineColumn(LineColumn location)
     Translates a LineColumn into an offset into the text held by the editor.
public  ObjectgetProperty(String propertyKey)
     Returns a property of the current editor.
Parameters:
  propertyKey - The propertyKey of the property to retrieve.
public  LineColumngetSelectionBegin()
     Returns the location at which current selection begins.
public  LineColumngetSelectionEnd()
     Returns the location where the current selection ends.
public  StringgetText(LineColumn begin, LineColumn end)
     Returns the text which lies between the two LineColumn.
public  intgetTextLength()
     Returns the length of the data.
 voidinsertText(String text, boolean caretBack)
     Insert a string into the buffer.
 booleanisModified()
    
 booleanisReadOnly()
     Test if this editor is 'read-only'. the readOnlyStatus.
 booleanisShowing()
     True is the editor is on screen.
 booleanisShowingInterface()
     Tell whether the editor is currently displaying the interface or the source of the class.
public  intnumberOfLines()
     Return the number of lines in the documant.
 voidprint(PrinterJob printerJob)
    
 voidreInitBreakpoints()
     Breakpoints have been reset due to compilation or similar.
 voidrefresh()
    
 voidreloadFile()
     Reload and display the same file that was displayed before.
 voidremoveBreakpoints()
     All breakpoints have been cleared for this class, update the editor display to reflect this.
 voidremoveStepMark()
     Remove the step mark (the mark that shows the current line when single-stepping through code).
 voidsave()
     Save the buffer to disk under the current file name.
public  voidsetCaretLocation(LineColumn location)
     Sets the current Caret location within the edited text.
 voidsetCompiled(boolean compiled)
    
public  voidsetProperty(String propertyKey, Object value)
     Set a property for the current editor.
 voidsetReadOnly(boolean readOnly)
     Set the 'read-only' property of this editor.
 voidsetSelection(int lineNumber, int column, int len)
    
 voidsetSelection(int firstlineNumber, int firstColumn, int secondLineNumber, int SecondColumn)
    
public  voidsetSelection(LineColumn begin, LineColumn end)
     Request to the editor to mark the text between begin and end as selected.
public  voidsetText(LineColumn begin, LineColumn end, String newText)
     Request to the editor to replace the text between beginning and end with the given newText If begin and end points to the same location, the text is inserted.
 voidsetVisible(boolean vis)
     Show the editor window.
 booleanshowFile(String filename, boolean compiled, String docFilename, Rectangle bounds)
     Read a file into the editor buffer and show the editor.
 voidshowInterface(boolean interfaceStatus)
     Set the view of this editor to display either the source or the interface of the class.
public  voidwriteMessage(String msg)
     Display a message into the info area.



Method Detail
changeName
void changeName(String title, String filename, String docFileName)(Code)
Change class name.
Parameters:
  title - new window title
Parameters:
  filename - new file name
Parameters:
  docFileName - new documentation file name



clear
void clear()(Code)
Clear the current buffer. The editor is not redisplayed after a call to this function. It is typically used in a sequence "clear; [insertText]; show".



close
void close()(Code)
Close the editor window.



displayMessage
void displayMessage(String message, int lineNumber, int column, boolean beep, boolean setStepMark, String help)(Code)
Display a message (used for compile/runtime errors). An editor must support at least two lines of message text, so the message can contain a newline character.
Parameters:
  message - the message to be displayed
Parameters:
  lineNumber - the line to move the cursor to (the line is alsohighlighted)
Parameters:
  column - the column to move the cursor to
Parameters:
  beep - if true, do a system beep
Parameters:
  setStepMark - if true, set step mark (for single stepping)
Parameters:
  help - name of help group (may be null)



getBounds
Rectangle getBounds()(Code)
Gets the bounds for this editor window. This method is used to store the bounds between sessions. The bounds



getCaretLocation
public LineColumn getCaretLocation()(Code)
Returns the current caret location within the edited text. the LineColumn object.



getLineColumnFromOffset
public LineColumn getLineColumnFromOffset(int offset)(Code)
Returns the LineColumn object from the given offset in the text. the LineColumn object or null if the offset points outside the text.



getLineLength
public int getLineLength(int line)(Code)
Returns the length of the line indicated in the edited text.
Parameters:
  line - the line in the text for which the length should be calculated, starting from 0 the length of the line, -1 if line is invalid



getOffsetFromLineColumn
public int getOffsetFromLineColumn(LineColumn location)(Code)
Translates a LineColumn into an offset into the text held by the editor.
Parameters:
  location - position to be translated the offset into the content of this editor
throws:
  IllegalArgumentException - if the specified LineColumnrepresent a position which does not exist in the text.



getProperty
public Object getProperty(String propertyKey)(Code)
Returns a property of the current editor.
Parameters:
  propertyKey - The propertyKey of the property to retrieve. the property value or null if it is not found



getSelectionBegin
public LineColumn getSelectionBegin()(Code)
Returns the location at which current selection begins. the current beginning of the selection or null if no text is selected.



getSelectionEnd
public LineColumn getSelectionEnd()(Code)
Returns the location where the current selection ends. the current end of the selection or null if no text is selected.



getText
public String getText(LineColumn begin, LineColumn end)(Code)
Returns the text which lies between the two LineColumn.
Parameters:
  begin - The beginning of the text to get
Parameters:
  end - The end of the text to get The text value
throws:
  IllegalArgumentException - if either of the specified TextLocations represent a position which does not exist in the text.



getTextLength
public int getTextLength()(Code)
Returns the length of the data. This is the number of characters of content that represents the users data. It is possible to obtain the line and column of the last character of text by using the getLineColumnFromOffset() method. the length >= 0



insertText
void insertText(String text, boolean caretBack)(Code)
Insert a string into the buffer. The editor is not immediately redisplayed. This function is typically used in a sequence "clear; [insertText]; show".
Parameters:
  text - the text to be inserted
Parameters:
  caretBack - move the caret to the beginning of the inserted text



isModified
boolean isModified()(Code)
Determine whether this editor has been modified from the version on disk a boolean indicating whether the file is modified



isReadOnly
boolean isReadOnly()(Code)
Test if this editor is 'read-only'. the readOnlyStatus. If true, editor is non-editable.



isShowing
boolean isShowing()(Code)
True is the editor is on screen. true if editor is on screen



isShowingInterface
boolean isShowingInterface()(Code)
Tell whether the editor is currently displaying the interface or the source of the class. True, if interface is currently shown, false otherwise.



numberOfLines
public int numberOfLines()(Code)
Return the number of lines in the documant.



print
void print(PrinterJob printerJob)(Code)
Prints the contents of the editor



reInitBreakpoints
void reInitBreakpoints()(Code)
Breakpoints have been reset due to compilation or similar. Re-initialize the breakpoints by re-setting them via the EditorWatcher interface.



refresh
void refresh()(Code)
Refresh the editor display (needed if font size has changed)



reloadFile
void reloadFile()(Code)
Reload and display the same file that was displayed before. This should generated a modificationEvent followed by a saveEvent.



removeBreakpoints
void removeBreakpoints()(Code)
All breakpoints have been cleared for this class, update the editor display to reflect this.



removeStepMark
void removeStepMark()(Code)
Remove the step mark (the mark that shows the current line when single-stepping through code). If it is not currently displayed, do nothing.



save
void save() throws IOException(Code)
Save the buffer to disk under the current file name. This is an error if the editor has not been given a file name (ie. if readFile was not executed). If save() is called on an unmodified file, it returns immediately without re-writing the file to disk.



setCaretLocation
public void setCaretLocation(LineColumn location)(Code)
Sets the current Caret location within the edited text.
Parameters:
  location - The location in the text to set the Caret to.
throws:
  IllegalArgumentException - if the specified TextLocation represents a position which does not exist in the text.



setCompiled
void setCompiled(boolean compiled)(Code)
Set the "compiled" status
Parameters:
  compiled - true if the class has been compiled



setProperty
public void setProperty(String propertyKey, Object value)(Code)
Set a property for the current editor. Any existing property with this key will be overwritten.
Parameters:
  propertyKey - The property key of the new property
Parameters:
  value - The new property value



setReadOnly
void setReadOnly(boolean readOnly)(Code)
Set the 'read-only' property of this editor.
Parameters:
  readOnlyStatus - If true, editor is non-editable.



setSelection
void setSelection(int lineNumber, int column, int len)(Code)
Set the selection of the editor to be a len characters on the line lineNumber, starting with column columnNumber
Parameters:
  lineNumber - the line to select characters on
Parameters:
  column - the column to start selection at (1st column is 1 - not 0)
Parameters:
  len - the number of characters to select



setSelection
void setSelection(int firstlineNumber, int firstColumn, int secondLineNumber, int SecondColumn)(Code)
Set the selection of the editor to be a len characters on the line lineNumber, starting with column columnNumber
Parameters:
  lineNumber - the line to select characters on
Parameters:
  column - the column to start selection at (1st column is 1 - not 0)
Parameters:
  len - the number of characters to select



setSelection
public void setSelection(LineColumn begin, LineColumn end)(Code)
Request to the editor to mark the text between begin and end as selected.
Parameters:
  begin - where to start the selection
Parameters:
  end - where to end the selection
throws:
  IllegalArgumentException - if either of the specified TextLocationsrepresent a position which does not exist in the text.



setText
public void setText(LineColumn begin, LineColumn end, String newText) throws BadLocationException(Code)
Request to the editor to replace the text between beginning and end with the given newText If begin and end points to the same location, the text is inserted.
Parameters:
  begin - where to start to replace
Parameters:
  end - where to end to replace
Parameters:
  newText - The new text value
throws:
  IllegalArgumentException - if either of the specified LineColumnrepresent a position which does not exist in the text.
throws:
  BadLocationException - if internally the text points outside a location in the text.



setVisible
void setVisible(boolean vis)(Code)
Show the editor window. This includes whatever is necessary of the following: make visible, de-iconify, bring to front of window stack.
Parameters:
  vis - DOCUMENT ME!



showFile
boolean showFile(String filename, boolean compiled, String docFilename, Rectangle bounds)(Code)
Read a file into the editor buffer and show the editor. If the editor already contains text, it is cleared first.
Parameters:
  filename - the file to be read
Parameters:
  compiled - true if this is a compiled class false is there was a problem, true otherwise



showInterface
void showInterface(boolean interfaceStatus)(Code)
Set the view of this editor to display either the source or the interface of the class.
Parameters:
  interfaceStatus - If true, display class interface, otherwise source.



writeMessage
public void writeMessage(String msg)(Code)
Display a message into the info area. The message will be cleared when the caret is moved.
Parameters:
  msg - the message to display



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