Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.splendid.awtchat
Class SmileyTextAreaArea  view SmileyTextAreaArea download SmileyTextAreaArea.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Canvas
          extended bycom.splendid.awtchat.SmileyTextAreaArea
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.AdjustmentListener, java.awt.event.ComponentListener, java.util.EventListener, java.awt.event.FocusListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable

public class SmileyTextAreaArea
extends java.awt.Canvas
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.AdjustmentListener, java.awt.event.FocusListener, java.awt.event.ComponentListener


Nested Class Summary
private  class SmileyTextAreaArea.ContentLine
           
private  class SmileyTextAreaArea.Run
           
 
Nested classes inherited from class java.awt.Canvas
java.awt.Canvas.AccessibleAWTCanvas
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
(package private)  java.awt.Color backgroundColor
           
private static int bgColorIndex
           
private  int borderx
           
private  int bordery
           
private  int bufferlen
           
(package private)  boolean canBreak
           
private  java.util.Vector contentLines
           
(package private)  CopyText copyText
           
private  int currentColorIndex
           
private  int currentCombinedBoldItalic
           
private  boolean currentUnderlined
           
private  int dimx
           
private  int dimxv
           
private  int dimy
           
private  int dimyv
           
private static int fgColorIndex
           
(package private) static java.awt.Color[] fixedColors
           
private  int fmAscent
           
private  int[] fmAscentFonts
           
private  int fmDescent
           
private  int[] fmDescentFonts
           
private  int fmDY
           
private  java.awt.FontMetrics[] fmFonts
           
private  int fmLeading
           
private  int fmSpaceFonts
           
private  java.awt.Container focus_element
           
(package private)  java.awt.Color foregroundColor
           
private  java.awt.Graphics gfx_buff
           
(package private)  HyperlinkReceiver hyperlinkReceiver
           
private  java.awt.Image img_buff
           
(package private)  boolean inappend
           
(package private)  int INTER
           
(package private)  boolean inupdate
           
(package private)  boolean isSelectable
           
(package private)  boolean last_action_scrolling
           
(package private)  java.util.Vector lines
           
(package private)  int mode
           
(package private)  java.awt.Color mouseoverColor
           
(package private)  ar.com.jkohen.awt.NickInfoPopup nick_pop
           
(package private)  int offset
           
(package private)  java.awt.Point old_coords
           
(package private)  int oldSbValue
           
(package private)  int paint_i
           
(package private)  java.awt.Dimension preferreddim
           
(package private)  java.awt.Scrollbar sb
           
(package private)  boolean SB_WORKAROUND_ENABLED
           
(package private)  int sbLength
           
(package private)  int sbValue
           
(package private)  java.awt.Color selectedColor
           
(package private)  int SMILEY_DEFAULT_SIZE
           
(package private)  SmileyTextArea sta
           
(package private)  int subsequentindent
           
(package private)  java.util.Vector tabs
           
private  int urlColorIndex
           
private  java.awt.Font[] usedFonts
           
(package private) static int WAITCOUNT
           
 
Fields inherited from class java.awt.Canvas
 
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
 
Constructor Summary
SmileyTextAreaArea(SmileyTextArea sta, java.awt.Scrollbar sb, HyperlinkReceiver hr, CopyText cp, ar.com.jkohen.awt.NickInfoPopup np)
           
 
Method Summary
 void addContent(java.lang.String s, boolean interpretUrl, java.lang.String n)
           
 void addNotify()
          Creates the native peer for this object.
 void addTab(int t)
           
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
          This method is called when an adjustable value changes.
 void append(java.lang.String s, boolean interpretUrl)
           
 void append(java.lang.String s, boolean interpretUrl, java.lang.String n)
           
 void changeFont(java.lang.String name, int size)
           
 void clean()
           
 void componentHidden(java.awt.event.ComponentEvent e)
          This method is called when the component is hidden.
 void componentMoved(java.awt.event.ComponentEvent e)
          This method is called when the component is moved.
 void componentResized(java.awt.event.ComponentEvent e)
          This method is called when the component is resized.
 void componentShown(java.awt.event.ComponentEvent e)
          This method is called when the component is made visible.
private  void correctSb()
           
private  void createImageBuffer(int width, int height)
           
private  void deleteFirstLine()
           
private  void dimensionInit()
           
 void focusGained(java.awt.event.FocusEvent e)
          This method is called when a component gains the keyboard focus.
 void focusLost(java.awt.event.FocusEvent e)
          This method is invoked when a component loses the keyboard focus.
 java.awt.Color getBackground()
          Returns this component's background color.
 int getBufferlen()
           
 java.awt.Color getColorPaletteEntry(int n)
           
 java.awt.Container getContainer()
           
private  SmileyTextAreaArea.ContentLine getContentLine(java.awt.Point p)
           
 java.awt.Font getFont()
          Returns the font in use for this component.
 java.awt.Color getForeground()
          Returns this component's foreground color.
private  SmileyTextAreaArea.Run getRun(java.awt.Point p)
           
 int getSubsequentIndent()
           
 void mouseClicked(java.awt.event.MouseEvent ev)
          This method is called when the mouse is clicked (pressed and released in short succession) on a component.
 void mouseDragged(java.awt.event.MouseEvent ev)
          This method is called when the mouse is moved over a component while a button has been pressed.
 void mouseEntered(java.awt.event.MouseEvent ev)
          This method is called when the mouse enters a component.
 void mouseExited(java.awt.event.MouseEvent ev)
          This method is called when the mouse exits a component.
 void mouseMoved(java.awt.event.MouseEvent ev)
          This method is called when the mouse is moved over a component while no button is pressed.
 void mousePressed(java.awt.event.MouseEvent ev)
          This method is called when the mouse is pressed over a component.
 void mouseReleased(java.awt.event.MouseEvent ev)
          This method is called when the mouse is released over a component.
 void paint(java.awt.Graphics g)
          Repaints the canvas window.
private  void paintBorder(java.awt.Graphics g)
           
private  void prepareFont(java.lang.String name, int size)
           
 void setBackground(java.awt.Color c)
          Sets this component's background color to the specified color.
 void setBreaks(boolean canBreak)
           
 void setBufferlen(int bufferlen)
           
static void setColorPalette(java.awt.Color[] palette)
           
 void setColorPaletteEntry(int n, java.awt.Color c)
           
 void setForeground(java.awt.Color c)
          Sets this component's foreground color to the specified color.
 void setMode(int mode)
           
private  void setRawSbValue(int value)
           
 void setSubsequentIndent(int indent)
           
 void update(java.awt.Graphics g)
          Updates the canvas in response to a request to repaint() it.
 
Methods inherited from class java.awt.Canvas
createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFontMetrics, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bufferlen

private int bufferlen

dimx

private int dimx

dimy

private int dimy

borderx

private int borderx

bordery

private int bordery

dimxv

private int dimxv

dimyv

private int dimyv

subsequentindent

int subsequentindent

tabs

java.util.Vector tabs

SMILEY_DEFAULT_SIZE

int SMILEY_DEFAULT_SIZE

INTER

int INTER

paint_i

int paint_i

mode

int mode

oldSbValue

int oldSbValue

SB_WORKAROUND_ENABLED

boolean SB_WORKAROUND_ENABLED

sb

java.awt.Scrollbar sb

sbValue

int sbValue

sbLength

int sbLength

offset

int offset

WAITCOUNT

static int WAITCOUNT

inupdate

boolean inupdate

inappend

boolean inappend

last_action_scrolling

boolean last_action_scrolling

canBreak

boolean canBreak

isSelectable

boolean isSelectable

hyperlinkReceiver

HyperlinkReceiver hyperlinkReceiver

copyText

CopyText copyText

lines

java.util.Vector lines

sta

SmileyTextArea sta

preferreddim

java.awt.Dimension preferreddim

nick_pop

ar.com.jkohen.awt.NickInfoPopup nick_pop

old_coords

java.awt.Point old_coords

fixedColors

static java.awt.Color[] fixedColors

urlColorIndex

private int urlColorIndex

bgColorIndex

private static final int bgColorIndex
See Also:
Constant Field Values

fgColorIndex

private static final int fgColorIndex
See Also:
Constant Field Values

backgroundColor

java.awt.Color backgroundColor

foregroundColor

java.awt.Color foregroundColor

mouseoverColor

java.awt.Color mouseoverColor

selectedColor

java.awt.Color selectedColor

usedFonts

private java.awt.Font[] usedFonts

fmFonts

private java.awt.FontMetrics[] fmFonts

fmSpaceFonts

private int fmSpaceFonts

fmDescentFonts

private int[] fmDescentFonts

fmAscentFonts

private int[] fmAscentFonts

fmDY

private int fmDY

fmDescent

private int fmDescent

fmAscent

private int fmAscent

fmLeading

private int fmLeading

currentCombinedBoldItalic

private int currentCombinedBoldItalic

currentUnderlined

private boolean currentUnderlined

currentColorIndex

private int currentColorIndex

contentLines

private java.util.Vector contentLines

img_buff

private java.awt.Image img_buff

gfx_buff

private java.awt.Graphics gfx_buff

focus_element

private java.awt.Container focus_element
Constructor Detail

SmileyTextAreaArea

public SmileyTextAreaArea(SmileyTextArea sta,
                          java.awt.Scrollbar sb,
                          HyperlinkReceiver hr,
                          CopyText cp,
                          ar.com.jkohen.awt.NickInfoPopup np)
Method Detail

adjustmentValueChanged

public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
Description copied from interface: java.awt.event.AdjustmentListener
This method is called when an adjustable value changes.

Specified by:
adjustmentValueChanged in interface java.awt.event.AdjustmentListener

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Description copied from interface: java.awt.event.FocusListener
This method is called when a component gains the keyboard focus.

Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Description copied from interface: java.awt.event.FocusListener
This method is invoked when a component loses the keyboard focus.

Specified by:
focusLost in interface java.awt.event.FocusListener

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
Description copied from interface: java.awt.event.ComponentListener
This method is called when the component is resized.

Specified by:
componentResized in interface java.awt.event.ComponentListener

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
Description copied from interface: java.awt.event.ComponentListener
This method is called when the component is hidden.

Specified by:
componentHidden in interface java.awt.event.ComponentListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
Description copied from interface: java.awt.event.ComponentListener
This method is called when the component is moved.

Specified by:
componentMoved in interface java.awt.event.ComponentListener

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
Description copied from interface: java.awt.event.ComponentListener
This method is called when the component is made visible.

Specified by:
componentShown in interface java.awt.event.ComponentListener

addNotify

public void addNotify()
Description copied from class: java.awt.Canvas
Creates the native peer for this object.


getContainer

public java.awt.Container getContainer()

correctSb

private void correctSb()

setRawSbValue

private void setRawSbValue(int value)

prepareFont

private void prepareFont(java.lang.String name,
                         int size)

dimensionInit

private void dimensionInit()

getContentLine

private SmileyTextAreaArea.ContentLine getContentLine(java.awt.Point p)

getRun

private SmileyTextAreaArea.Run getRun(java.awt.Point p)

deleteFirstLine

private final void deleteFirstLine()

createImageBuffer

private void createImageBuffer(int width,
                               int height)

update

public void update(java.awt.Graphics g)
Description copied from class: java.awt.Canvas
Updates the canvas in response to a request to repaint() it. The canvas is cleared with the current background colour, before paint() is called to add the new contents. Subclasses which override this method should either call this method via super.update(graphics) or re-implement this behaviour, so as to ensure that the canvas is clear before painting takes place.


paint

public void paint(java.awt.Graphics g)
Description copied from class: java.awt.Canvas
Repaints the canvas window. This method should be overridden by a subclass to do something useful, as this method simply paints the window with the background color.


paintBorder

private void paintBorder(java.awt.Graphics g)

mousePressed

public void mousePressed(java.awt.event.MouseEvent ev)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is pressed over a component.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent ev)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is released over a component.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent ev)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse enters a component.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent ev)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse exits a component.

Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent ev)
Description copied from interface: java.awt.event.MouseListener
This method is called when the mouse is clicked (pressed and released in short succession) on a component.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent ev)
Description copied from interface: java.awt.event.MouseMotionListener
This method is called when the mouse is moved over a component while no button is pressed.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent ev)
Description copied from interface: java.awt.event.MouseMotionListener
This method is called when the mouse is moved over a component while a button has been pressed.

Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

append

public void append(java.lang.String s,
                   boolean interpretUrl)

append

public void append(java.lang.String s,
                   boolean interpretUrl,
                   java.lang.String n)

clean

public void clean()

addContent

public void addContent(java.lang.String s,
                       boolean interpretUrl,
                       java.lang.String n)

setMode

public void setMode(int mode)

setBreaks

public void setBreaks(boolean canBreak)

addTab

public void addTab(int t)

setSubsequentIndent

public void setSubsequentIndent(int indent)

getSubsequentIndent

public int getSubsequentIndent()

setBufferlen

public void setBufferlen(int bufferlen)

getBufferlen

public int getBufferlen()

setBackground

public void setBackground(java.awt.Color c)
Description copied from class: java.awt.Component
Sets this component's background color to the specified color. The parts of the component affected by the background color may by system dependent. This is a bound property.


getBackground

public java.awt.Color getBackground()
Description copied from class: java.awt.Component
Returns this component's background color. If not set, this is inherited from the parent.


setForeground

public void setForeground(java.awt.Color c)
Description copied from class: java.awt.Component
Sets this component's foreground color to the specified color. This is a bound property.


getForeground

public java.awt.Color getForeground()
Description copied from class: java.awt.Component
Returns this component's foreground color. If not set, this is inherited from the parent.


setColorPalette

public static void setColorPalette(java.awt.Color[] palette)

setColorPaletteEntry

public void setColorPaletteEntry(int n,
                                 java.awt.Color c)

getColorPaletteEntry

public java.awt.Color getColorPaletteEntry(int n)

changeFont

public void changeFont(java.lang.String name,
                       int size)

getFont

public java.awt.Font getFont()
Description copied from class: java.awt.Component
Returns the font in use for this component. If not set, this is inherited from the parent.

Specified by:
getFont in interface java.awt.MenuContainer