pt.despodata.java.ddata
Class DDataEditorPane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
pt.despodata.java.ddata.DDataEditorPane
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
- public class DDataEditorPane
- extends javax.swing.JPanel
Title:
Description:
Editor pane que implementa a possibilidade de scroll
De futuro tambem permitira uma toolbar com botoes de
formatacao
??? Deveria ser derivada de JComponent e nao de painel
Copyright:
Copyright (C) 2000 Despodata
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc, 59 Temple Place-Suite 330, Boston, MA 02111-1307, USA.
Company : Despodata
- Version:
- 1.0
- See Also:
- Serialized Form
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
|
Method Summary |
void |
addCaretListener(javax.swing.event.CaretListener listener)
|
void |
addHyperlinkListener(javax.swing.event.HyperlinkListener listener)
|
void |
addInputMethodListener(java.awt.event.InputMethodListener l)
|
static javax.swing.text.Keymap |
addKeymap(java.lang.String nm,
javax.swing.text.Keymap parent)
|
void |
autoScroll(java.awt.Rectangle aRect)
|
void |
copy()
|
static javax.swing.text.EditorKit |
createEditorKitForContentType(java.lang.String type)
|
void |
cut()
|
void |
fireHyperlinkUpdate(javax.swing.event.HyperlinkEvent e)
|
javax.accessibility.AccessibleContext |
getAccessibleContext()
|
javax.swing.Action[] |
getActions()
|
javax.swing.text.Caret |
getCaret()
|
java.awt.Color |
getCaretColor()
|
int |
getCaretPosition()
|
java.lang.String |
getContentType()
|
java.awt.Color |
getDisabledTextColor()
|
javax.swing.text.Document |
getDocument()
|
javax.swing.text.EditorKit |
getEditorKit()
|
javax.swing.text.EditorKit |
getEditorKitForContentType(java.lang.String type)
|
char |
getFocusAccelerator()
|
java.awt.Font |
getFont()
|
javax.swing.text.Highlighter |
getHighlighter()
|
javax.swing.text.Keymap |
getKeymap()
|
static javax.swing.text.Keymap |
getKeymap(java.lang.String nm)
|
java.awt.Insets |
getMargin()
|
int |
getMaxColumns()
|
int |
getMaxLines()
|
java.lang.Object |
getObject()
Devolve o valor correspondente ao campo de texto |
java.net.URL |
getPage()
|
java.awt.Dimension |
getPreferredScrollableViewportSize()
|
int |
getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
|
boolean |
getScrollableTracksViewportHeight()
|
boolean |
getScrollableTracksViewportWidth()
|
int |
getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
|
java.lang.String |
getSelectedText()
|
java.awt.Color |
getSelectedTextColor()
|
java.awt.Color |
getSelectionColor()
|
int |
getSelectionEnd()
|
int |
getSelectionStart()
|
java.lang.String |
getText()
|
java.lang.String |
getText(int offs,
int len)
|
int |
getTextLines()
Devolve o numero de linhas que o texto ocupa |
boolean |
isEditable()
|
boolean |
isEnabled()
|
boolean |
isFocusTraversable()
|
static void |
loadKeymap(javax.swing.text.Keymap map,
javax.swing.text.JTextComponent.KeyBinding[] bindings,
javax.swing.Action[] actions)
|
java.awt.Rectangle |
modelToView(int pos)
|
void |
moveCaretPosition(int pos)
|
void |
paste()
|
void |
printNLines()
Metodo para debug do numero de linhas existente |
void |
read(java.io.InputStream in,
java.lang.Object desc)
|
void |
read(java.io.Reader in,
java.lang.Object desc)
|
static void |
registerEditorKitForContentType(java.lang.String type,
java.lang.String classname)
|
static void |
registerEditorKitForContentType(java.lang.String type,
java.lang.String classname,
java.lang.ClassLoader loader)
|
void |
removeCaretListener(javax.swing.event.CaretListener listener)
|
void |
removeHyperlinkListener(javax.swing.event.HyperlinkListener listener)
|
static javax.swing.text.Keymap |
removeKeymap(java.lang.String nm)
|
void |
removeNotify()
|
void |
select(int selectionStart,
int selectionEnd)
|
void |
selectAll()
|
void |
setCaret(javax.swing.text.Caret c)
|
void |
setCaretColor(java.awt.Color c)
|
void |
setCaretPosition(int position)
|
void |
setContentType(java.lang.String type)
|
void |
setDisabledTextColor(java.awt.Color c)
|
void |
setDocument(javax.swing.text.Document doc)
|
void |
setEditable(boolean b)
|
void |
setEditorKit(javax.swing.text.EditorKit kit)
|
void |
setEditorKitForContentType(java.lang.String type,
javax.swing.text.EditorKit k)
|
void |
setEnabled(boolean b)
|
void |
setFocusAccelerator(char aKey)
|
void |
setFont(java.awt.Font f)
|
void |
setHighlighter(javax.swing.text.Highlighter h)
|
void |
setKeymap(javax.swing.text.Keymap map)
|
void |
setMargin(java.awt.Insets m)
|
void |
setMaxColumns(int _maxColumns)
Altera o numero maximo de colunas deste widget. |
void |
setMaxLines(int _maxLines)
Altera o numero maximo de linhas deste widget. |
void |
setObject(java.lang.Object object)
Afecta o objecto com um valor |
void |
setPage(java.lang.String url)
|
void |
setPage(java.net.URL page)
|
void |
setSelectedTextColor(java.awt.Color c)
|
void |
setSelectionColor(java.awt.Color c)
|
void |
setSelectionEnd(int selectionEnd)
|
void |
setSelectionStart(int selectionStart)
|
void |
setText(java.lang.String t)
|
int |
viewToModel(java.awt.Point pt)
|
void |
write(java.io.Writer out)
|
| Methods inherited from class javax.swing.JPanel |
getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FOCUS_ACCELERATOR_KEY
public static final java.lang.String FOCUS_ACCELERATOR_KEY
- See Also:
- Constant Field Values
DEFAULT_KEYMAP
public static final java.lang.String DEFAULT_KEYMAP
- See Also:
- Constant Field Values
DDataEditorPane
public DDataEditorPane()
getMaxLines
public int getMaxLines()
setMaxLines
public void setMaxLines(int _maxLines)
- Altera o numero maximo de linhas deste widget.
- Parameters:
_maxLines - O numero maximo de linhas.
getMaxColumns
public int getMaxColumns()
setMaxColumns
public void setMaxColumns(int _maxColumns)
- Altera o numero maximo de colunas deste widget.
- Parameters:
_maxColumns - O numero maximo de colunas.
addHyperlinkListener
public void addHyperlinkListener(javax.swing.event.HyperlinkListener listener)
createEditorKitForContentType
public static javax.swing.text.EditorKit createEditorKitForContentType(java.lang.String type)
fireHyperlinkUpdate
public void fireHyperlinkUpdate(javax.swing.event.HyperlinkEvent e)
getContentType
public java.lang.String getContentType()
getEditorKit
public javax.swing.text.EditorKit getEditorKit()
getEditorKitForContentType
public javax.swing.text.EditorKit getEditorKitForContentType(java.lang.String type)
getPage
public java.net.URL getPage()
getScrollableTracksViewportHeight
public boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportWidth
public boolean getScrollableTracksViewportWidth()
getText
public java.lang.String getText()
read
public void read(java.io.InputStream in,
java.lang.Object desc)
throws java.io.IOException
- Throws:
java.io.IOException
registerEditorKitForContentType
public static void registerEditorKitForContentType(java.lang.String type,
java.lang.String classname)
registerEditorKitForContentType
public static void registerEditorKitForContentType(java.lang.String type,
java.lang.String classname,
java.lang.ClassLoader loader)
removeHyperlinkListener
public void removeHyperlinkListener(javax.swing.event.HyperlinkListener listener)
setContentType
public void setContentType(java.lang.String type)
setEditorKit
public void setEditorKit(javax.swing.text.EditorKit kit)
setEditorKitForContentType
public void setEditorKitForContentType(java.lang.String type,
javax.swing.text.EditorKit k)
setPage
public void setPage(java.lang.String url)
throws java.io.IOException
- Throws:
java.io.IOException
setPage
public void setPage(java.net.URL page)
throws java.io.IOException
- Throws:
java.io.IOException
setText
public void setText(java.lang.String t)
getObject
public java.lang.Object getObject()
- Devolve o valor correspondente ao campo de texto
setObject
public void setObject(java.lang.Object object)
- Afecta o objecto com um valor
getTextLines
public int getTextLines()
- Devolve o numero de linhas que o texto ocupa
printNLines
public void printNLines()
- Metodo para debug do numero de linhas existente
addCaretListener
public void addCaretListener(javax.swing.event.CaretListener listener)
removeCaretListener
public void removeCaretListener(javax.swing.event.CaretListener listener)
setDocument
public void setDocument(javax.swing.text.Document doc)
getDocument
public javax.swing.text.Document getDocument()
getActions
public javax.swing.Action[] getActions()
setMargin
public void setMargin(java.awt.Insets m)
getMargin
public java.awt.Insets getMargin()
getCaret
public javax.swing.text.Caret getCaret()
setCaret
public void setCaret(javax.swing.text.Caret c)
getHighlighter
public javax.swing.text.Highlighter getHighlighter()
setHighlighter
public void setHighlighter(javax.swing.text.Highlighter h)
setKeymap
public void setKeymap(javax.swing.text.Keymap map)
getKeymap
public javax.swing.text.Keymap getKeymap()
addKeymap
public static javax.swing.text.Keymap addKeymap(java.lang.String nm,
javax.swing.text.Keymap parent)
removeKeymap
public static javax.swing.text.Keymap removeKeymap(java.lang.String nm)
getKeymap
public static javax.swing.text.Keymap getKeymap(java.lang.String nm)
loadKeymap
public static void loadKeymap(javax.swing.text.Keymap map,
javax.swing.text.JTextComponent.KeyBinding[] bindings,
javax.swing.Action[] actions)
getCaretColor
public java.awt.Color getCaretColor()
setCaretColor
public void setCaretColor(java.awt.Color c)
getSelectionColor
public java.awt.Color getSelectionColor()
setSelectionColor
public void setSelectionColor(java.awt.Color c)
getSelectedTextColor
public java.awt.Color getSelectedTextColor()
setSelectedTextColor
public void setSelectedTextColor(java.awt.Color c)
getDisabledTextColor
public java.awt.Color getDisabledTextColor()
setDisabledTextColor
public void setDisabledTextColor(java.awt.Color c)
getText
public java.lang.String getText(int offs,
int len)
throws javax.swing.text.BadLocationException
- Throws:
javax.swing.text.BadLocationException
modelToView
public java.awt.Rectangle modelToView(int pos)
throws javax.swing.text.BadLocationException
- Throws:
javax.swing.text.BadLocationException
viewToModel
public int viewToModel(java.awt.Point pt)
cut
public void cut()
copy
public void copy()
paste
public void paste()
moveCaretPosition
public void moveCaretPosition(int pos)
setFocusAccelerator
public void setFocusAccelerator(char aKey)
getFocusAccelerator
public char getFocusAccelerator()
read
public void read(java.io.Reader in,
java.lang.Object desc)
throws java.io.IOException
- Throws:
java.io.IOException
write
public void write(java.io.Writer out)
throws java.io.IOException
- Throws:
java.io.IOException
removeNotify
public void removeNotify()
setEnabled
public void setEnabled(boolean b)
isFocusTraversable
public boolean isFocusTraversable()
setCaretPosition
public void setCaretPosition(int position)
getCaretPosition
public int getCaretPosition()
getSelectedText
public java.lang.String getSelectedText()
isEditable
public boolean isEditable()
isEnabled
public boolean isEnabled()
setEditable
public void setEditable(boolean b)
getSelectionStart
public int getSelectionStart()
setSelectionStart
public void setSelectionStart(int selectionStart)
getSelectionEnd
public int getSelectionEnd()
setSelectionEnd
public void setSelectionEnd(int selectionEnd)
select
public void select(int selectionStart,
int selectionEnd)
selectAll
public void selectAll()
getPreferredScrollableViewportSize
public java.awt.Dimension getPreferredScrollableViewportSize()
getScrollableUnitIncrement
public int getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
getScrollableBlockIncrement
public int getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
int orientation,
int direction)
getAccessibleContext
public javax.accessibility.AccessibleContext getAccessibleContext()
addInputMethodListener
public void addInputMethodListener(java.awt.event.InputMethodListener l)
setFont
public void setFont(java.awt.Font f)
getFont
public java.awt.Font getFont()
autoScroll
public void autoScroll(java.awt.Rectangle aRect)