public class MarkdownTextAreaWithPreview
extends com.googlecode.jfilechooserbookmarks.gui.BasePanel
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected JEditorPane |
m_PanePreview
the preview.
|
protected org.markdownj.MarkdownProcessor |
m_Processor
the markdown processor.
|
protected JTabbedPane |
m_TabbedPane
the tabbed pane.
|
protected JTextArea |
m_TextCode
the text area for writing markdown code.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
MarkdownTextAreaWithPreview() |
Modifier and Type | Method and Description |
---|---|
int |
getCaretPosition()
Returns the current caret position.
|
int |
getColumns()
Returns the columns.
|
Document |
getDocument()
Returns the underlying document.
|
boolean |
getLineWrap()
Returns whether line wrap is enabled.
|
int |
getRows()
Returns the rows.
|
String |
getSelectedText()
Returns the underlying text.
|
String |
getText()
Returns the markdown code to display.
|
Font |
getTextFont()
Returns the text font in use.
|
boolean |
getWrapStyleWord()
Returns whether word wrap is enabled.
|
protected void |
initGUI()
Initializes the widgets.
|
protected void |
initialize()
Initializes the members.
|
boolean |
isEditable()
Returns whether the text area is editable or not.
|
static void |
main(String[] args)
For testing only.
|
void |
setCaretPosition(int pos)
Sets the caret position.
|
void |
setColumns(int value)
Sets the columns.
|
void |
setEditable(boolean value)
Sets whether the text area is editable or not.
|
void |
setLineWrap(boolean value)
Sets whether to line wrap or not.
|
void |
setRows(int value)
Sets the rows.
|
void |
setText(String value)
Sets the markdown code to display.
|
void |
setTextFont(Font value)
Sets the text font.
|
void |
setWrapStyleWord(boolean value)
Sets whether to word wrap or not.
|
protected void |
update()
Updates the markdown display.
|
afterHide, afterShow, beforeHide, beforeShow, closeParent, finishInit, getParentDialog, getParentFrame, getParentInternalFrame, getParentTitle, printErrorMessage, printException, setParentTitle, setVisible
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected JTabbedPane m_TabbedPane
protected JTextArea m_TextCode
protected JEditorPane m_PanePreview
protected org.markdownj.MarkdownProcessor m_Processor
protected void initialize()
initialize
in class com.googlecode.jfilechooserbookmarks.gui.BasePanel
protected void initGUI()
initGUI
in class com.googlecode.jfilechooserbookmarks.gui.BasePanel
public void setText(String value)
value
- the markdown codepublic String getText()
public Document getDocument()
public String getSelectedText()
public void setRows(int value)
value
- the rowspublic int getRows()
public void setColumns(int value)
value
- the columnspublic int getColumns()
public void setEditable(boolean value)
value
- if true the text area is editablepublic boolean isEditable()
public void setLineWrap(boolean value)
value
- if true line wrap is enabledpublic boolean getLineWrap()
public void setWrapStyleWord(boolean value)
value
- if true word wrap is enabledpublic boolean getWrapStyleWord()
public void setTextFont(Font value)
value
- the fontpublic Font getTextFont()
public void setCaretPosition(int pos)
pos
- the position (0-based)public int getCaretPosition()
protected void update()
public static void main(String[] args)
args
- ignoredCopyright © 2017. All Rights Reserved.