public class EditorPeekPopup
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
editorPeek
True if the extended editor peek functionality is switched on.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String[] |
createTextLines(java.lang.String text) |
static void |
hidePopup(boolean keepKey) |
static boolean |
isShowing() |
static void |
showPopup(java.lang.Object key,
BasicEditorPane editorPane,
java.lang.String[] text,
java.awt.Rectangle sourceRect,
int startLine,
int endLine,
int lineHeight,
java.awt.Color[] backgroundColors,
int fadeAmount,
int minimumSize)
Show the pop up containing a snippet of code rendered directly from the editor
If you have any effects on the editor that shouldn't show up in the snippet then
remove them before calling this and then add them back directly afterwards.
|
static void |
showPopup(java.lang.Object key,
BasicEditorPane editorPane,
java.lang.String text,
java.awt.Rectangle sourceRect,
int startLine,
int endLine,
int lineHeight,
java.awt.Color backgroundColor,
int fadeAmount,
int minimumSize)
Show the pop up containing a snippet of code rendered directly from the editor
If you have any effects on the editor that shouldn't show up in the snippet then
remove them before calling this and then add them back directly afterwards.
|
static void |
showPopup(java.lang.Object key,
javax.swing.RootPaneContainer window,
BasicEditorPane editorPane,
java.lang.String[] text,
java.awt.Rectangle sourceRect,
int startLine,
int endLine,
int lineHeight,
java.awt.Color[] backgroundColors,
int fadeAmount,
int minimumSize)
Show the pop up containing a snippet of code rendered directly from the editor
If you have any effects on the editor that shouldn't show up in the snippet then
remove them before calling this and then add them back directly afterwards.
|
public static boolean editorPeek
public static void showPopup(java.lang.Object key, BasicEditorPane editorPane, java.lang.String[] text, java.awt.Rectangle sourceRect, int startLine, int endLine, int lineHeight, java.awt.Color[] backgroundColors, int fadeAmount, int minimumSize)
key
- - an object used to determine whether to re-generate the popup. If this
method is called with the same key that was used on the last call then this method returns
immediately. Calling hidePopup(true) will remove the key.editorPane
- text
- one line per array entry will be displayed in the pop upsourceRect
- the rectangle (in screen coords) from which the popup will 'pop' The popup can appear
left or reight of the rectangle depending on screen space.startLine
- endLine
- lineHeight
- backgroundColors
- each line will be background colored to the appropriate indexed colorfadeAmount
- - The snippet shows a small part of the surrounding lines, they will be faded by this number of pixelsminimumSize
- - minimum size in pixels for teh popup. -1 indicates no minimum sizepublic static void showPopup(java.lang.Object key, javax.swing.RootPaneContainer window, BasicEditorPane editorPane, java.lang.String[] text, java.awt.Rectangle sourceRect, int startLine, int endLine, int lineHeight, java.awt.Color[] backgroundColors, int fadeAmount, int minimumSize)
key
- - an object used to determine whether to re-generate the popup. If this
method is called with the same key that was used on the lasteditorPane
- text
- one line per array entry will be displayed in the pop upcall then this method returns
immediately. Calling hidePopup(true) will remove the key.sourceRect
- the rectangle (in screen coords) from which the popup will 'pop' The popup can appear
left or reight of the rectangle depending on screen space.startLine
- endLine
- lineHeight
- backgroundColors
- each line will be background colored to the appropriate indexed colorfadeAmount
- - The snippet shows a small part of the surrounding lines, they will be faded by this number of pixelsminimumSize
- - minimum size in pixels for the popup. -1 indicates no minimum sizepublic static void showPopup(java.lang.Object key, BasicEditorPane editorPane, java.lang.String text, java.awt.Rectangle sourceRect, int startLine, int endLine, int lineHeight, java.awt.Color backgroundColor, int fadeAmount, int minimumSize)
key
- - an object used to determine whether to re-generate the popup. If this
method is called with the same key that was used on the last call then this method returns
immediately. Calling hidePopup(true) will remove the key.sourceRect
- the rectangle (in screen coords) from which the popup will 'pop' The popup can appear
left or reight of the rectangle depending on screen space.editorPane
- startLine
- endLine
- lineHeight
- backgroundColor
- fadeAmount
- - The snippet shows a small part of the surrounding lines, they will be faded by this number of pixelsminimumSize
- - minimum size in pixels for teh popup. -1 indicates no minimum sizepublic static java.lang.String[] createTextLines(java.lang.String text)
public static void hidePopup(boolean keepKey)
public static boolean isShowing()