AWTSource (PJIRC project)
Algne fail: vana_veeb/pjirc/doc/javadoc/irc/gui/AWTSource.html.
========== START OF NAVBAR ==========
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
======== START OF CLASS DATA ========
irc.gui
Class AWTSource
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--irc.gui.AWTSource
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, AWTStyleSelectorExListener, java.util.EventListener, java.awt.event.FocusListener, java.awt.image.ImageObserver, java.awt.MenuContainer, MouseWheelPanelListener, PixxScrollBarListener, java.io.Serializable, SourceListener, StyledListListener, java.awt.event.WindowListener
- Direct Known Subclasses:
- AWTChannel, AWTDCCChat, AWTQuery, AWTStatus
- public class AWTSource
- extends java.awt.Panel
- implements SourceListener, java.awt.event.ActionListener, PixxScrollBarListener, java.awt.event.FocusListener, StyledListListener, java.awt.event.WindowListener, MouseWheelPanelListener, AWTStyleSelectorExListener
- extends java.awt.Panel
The AWT source.
- See Also:
- Serialized Form
| Nested Class Summary |
| Nested classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| 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 |
| Field Summary | |
protected IRCConfiguration |
_ircConfiguration
|
protected StyledList |
_list
|
protected java.awt.Panel |
_panel
|
protected PixxScrollBar |
_scroll
|
protected AWTStyleSelectorEx |
_selector
|
protected Source |
_source
|
protected java.lang.String |
_strippedTitle
|
protected FormattedStringDrawer |
_styler
|
protected AWTIrcTextField |
_textField
|
protected java.lang.String |
_title
|
| 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 | |
AWTSource(IRCConfiguration config,
Source source)
Create a new AWTSource. |
|
| Method Summary | |
void |
action(java.lang.String nick,
java.lang.String msg)
A new action has been received. |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
activate()
This source has been activated. |
void |
addAWTSourceListener(AWTSourceListener lis)
Add listener. |
void |
channelEvent(StyledList lis,
java.lang.String chan,
java.awt.event.MouseEvent e)
A mouse event has occured on a channel. |
protected void |
checkSound(java.lang.String msg)
Test wether the specified line should trigger "on word" sounds. |
void |
clear()
Clear this awt source display. |
void |
copyEvent(StyledList lis,
java.lang.String txt,
java.awt.event.MouseEvent e)
A copy event has occured on a channel. |
void |
focusGained(java.awt.event.FocusEvent e)
|
void |
focusLost(java.awt.event.FocusEvent e)
|
void |
fontSelected(java.awt.Font fnt)
A new font has been selected. |
ColorContext |
getColorContext()
Get color context for this awt source. |
java.lang.String |
getFieldText()
Get the current textfield text. |
java.lang.String |
getShortTitle()
Get a shorter title. |
Source |
getSource()
Get the source. |
java.lang.String |
getStrippedTitle()
Get the stripped title. |
java.lang.String |
getText(int code)
Get formatted text associated with the given text code, with no parameter. |
java.lang.String |
getText(int code,
java.lang.String p1)
Get formatted text associated with the given text code, with one parameter. |
java.lang.String |
getText(int code,
java.lang.String p1,
java.lang.String p2)
Get formatted text associated with the given text code, with two parameters. |
java.lang.String |
getText(int code,
java.lang.String p1,
java.lang.String p2,
java.lang.String p3)
Get formatted text associated with the given text code, with three parameters. |
java.lang.String |
getTitle()
Get the title. |
boolean |
isActive()
Return the active state for this awt source. |
void |
leave()
Leave this awt source. |
void |
messageReceived(java.lang.String source,
java.lang.String str)
A new message has been received. |
void |
mouseWheelMoved(java.lang.Integer amount)
The mouse wheel moved. |
protected boolean |
needHighLight(java.lang.String msg)
Test wether the specified line should be highlighted. |
void |
nickEvent(StyledList lis,
java.lang.String nick,
java.awt.event.MouseEvent e)
A nick event has occured on a channel. |
void |
noticeReceived(java.lang.String from,
java.lang.String msg)
A new notice has been received. |
protected void |
print(java.lang.String msg)
Print the given message on the awt source display. |
protected void |
print(java.lang.String msg,
int color)
Print the given message on the awt source display. |
protected void |
print(java.lang.String msg,
int color,
boolean bold,
boolean underline)
Print the given message on the awt source display. |
void |
removeAWTSourceListener(AWTSourceListener lis)
Remove listener. |
void |
reportReceived(java.lang.String msg)
A new report has been received. |
void |
setFieldText(java.lang.String txt)
Set the current textfield text. |
void |
setTitle(java.lang.String title)
Set this source title. |
void |
setVisible(boolean b)
|
java.lang.String |
toString()
|
void |
URLEvent(StyledList lis,
java.lang.String url,
java.awt.event.MouseEvent e)
An url event has occured on a channel. |
void |
validateText()
Validate the current textfield text, as if user pressed return key. |
void |
valueChanged(PixxScrollBar pixScrollBar)
Position has changed. |
void |
virtualSizeChanged(StyledList lis)
The logical width or height of the list has changed. |
void |
windowActivated(java.awt.event.WindowEvent e)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
|
void |
windowDeactivated(java.awt.event.WindowEvent e)
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
|
void |
windowIconified(java.awt.event.WindowEvent e)
|
void |
windowOpened(java.awt.event.WindowEvent e)
|
| Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
_source
protected Source _source
_scroll
protected PixxScrollBar _scroll
_panel
protected java.awt.Panel _panel
_list
protected StyledList _list
_textField
protected AWTIrcTextField _textField
_styler
protected FormattedStringDrawer _styler
_title
protected java.lang.String _title
_strippedTitle
protected java.lang.String _strippedTitle
_ircConfiguration
protected IRCConfiguration _ircConfiguration
_selector
protected AWTStyleSelectorEx _selector
| Constructor Detail |
AWTSource
public AWTSource(IRCConfiguration config, Source source)
- Create a new AWTSource.
- Parameters:
config- the global configuration.source- the source of this awt source.
| Method Detail |
setFieldText
public void setFieldText(java.lang.String txt)
- Set the current textfield text.
getFieldText
public java.lang.String getFieldText()
- Get the current textfield text.
- Returns:
- the current textfield text.
validateText
public void validateText()
- Validate the current textfield text, as if user pressed return key.
getColorContext
public ColorContext getColorContext()
- Get color context for this awt source.
- Returns:
- color context for this awt source.
getText
public java.lang.String getText(int code)
- Get formatted text associated with the given text code, with no parameter.
- Parameters:
code- text code.- Returns:
- formatted text.
getText
public java.lang.String getText(int code,
java.lang.String p1)
- Get formatted text associated with the given text code, with one parameter.
- Parameters:
code- text code.p1- first parameter.- Returns:
- formatted text.
getText
public java.lang.String getText(int code,
java.lang.String p1,
java.lang.String p2)
- Get formatted text associated with the given text code, with two parameters.
- Parameters:
code- text code.p1- first parameter.p2- second parameter.- Returns:
- formatted text.
getText
public java.lang.String getText(int code,
java.lang.String p1,
java.lang.String p2,
java.lang.String p3)
- Get formatted text associated with the given text code, with three parameters.
- Parameters:
code- text code.p1- first parameter.p2- second parameter.p3- third parameter.- Returns:
- formatted text.
addAWTSourceListener
public void addAWTSourceListener(AWTSourceListener lis)
- Add listener.
- Parameters:
lis- the listener to add.
removeAWTSourceListener
public void removeAWTSourceListener(AWTSourceListener lis)
- Remove listener.
- Parameters:
lis- the listener to remove.
setTitle
public void setTitle(java.lang.String title)
- Set this source title.
getStrippedTitle
public java.lang.String getStrippedTitle()
- Get the stripped title.
- Returns:
- the stripped title.
getTitle
public java.lang.String getTitle()
- Get the title.
- Returns:
- the title.
getShortTitle
public java.lang.String getShortTitle()
- Get a shorter title.
- Returns:
- a shorter title.
getSource
public Source getSource()
- Get the source.
- Returns:
- the source.
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
fontSelected
public void fontSelected(java.awt.Font fnt)
- Description copied from interface:
AWTStyleSelectorExListener - A new font has been selected.
- Specified by:
fontSelectedin interfaceAWTStyleSelectorExListener
- Parameters:
fnt- new selected font.
clear
public void clear()
- Clear this awt source display.
- Specified by:
clearin interfaceSourceListener
needHighLight
protected boolean needHighLight(java.lang.String msg)
- Test wether the specified line should be highlighted.
- Parameters:
msg- line to test.- Returns:
- true if msg should be highlighted, false otherwise.
checkSound
protected void checkSound(java.lang.String msg)
- Test wether the specified line should trigger "on word" sounds. Play the
sounds associated with the words.
- Parameters:
msg- line to test.
protected void print(java.lang.String msg,
int color,
boolean bold,
boolean underline)
- Print the given message on the awt source display.
- Parameters:
color- color to use.bold- true if message should be in bold.underline- if message should be underlined.
protected void print(java.lang.String msg,
int color)
- Print the given message on the awt source display.
- Parameters:
color- color to use.
protected void print(java.lang.String msg)
- Print the given message on the awt source display.
- Parameters:
msg- message to print.
messageReceived
public void messageReceived(java.lang.String source,
java.lang.String str)
- Description copied from interface:
SourceListener - A new message has been received.
- Specified by:
messageReceivedin interfaceSourceListener
- Parameters:
source- source nick.str- message.
reportReceived
public void reportReceived(java.lang.String msg)
- Description copied from interface:
SourceListener - A new report has been received.
- Specified by:
reportReceivedin interfaceSourceListener
- Parameters:
msg- report.
noticeReceived
public void noticeReceived(java.lang.String from,
java.lang.String msg)
- Description copied from interface:
SourceListener - A new notice has been received.
- Specified by:
noticeReceivedin interfaceSourceListener
- Parameters:
from- source nick.msg- notice.
action
public void action(java.lang.String nick,
java.lang.String msg)
- Description copied from interface:
SourceListener - A new action has been received.
- Specified by:
actionin interfaceSourceListener
- Parameters:
nick- source nick.msg- message.
activate
public void activate()
- Description copied from interface:
SourceListener - This source has been activated.
- Specified by:
activatein interfaceSourceListener
isActive
public boolean isActive()
- Return the active state for this awt source.
- Returns:
- awt source active state.
leave
public void leave()
- Leave this awt source.
mouseWheelMoved
public void mouseWheelMoved(java.lang.Integer amount)
- Description copied from interface:
MouseWheelPanelListener - The mouse wheel moved.
- Specified by:
mouseWheelMovedin interfaceMouseWheelPanelListener
- Parameters:
amount- wheel move amplitude.
valueChanged
public void valueChanged(PixxScrollBar pixScrollBar)
- Description copied from interface:
PixxScrollBarListener - Position has changed.
- Specified by:
valueChangedin interfacePixxScrollBarListener
- Parameters:
pixScrollBar- scrollbar whose position has changed.
focusGained
public void focusGained(java.awt.event.FocusEvent e)
- Specified by:
focusGainedin interfacejava.awt.event.FocusListener
focusLost
public void focusLost(java.awt.event.FocusEvent e)
- Specified by:
focusLostin interfacejava.awt.event.FocusListener
channelEvent
public void channelEvent(StyledList lis, java.lang.String chan, java.awt.event.MouseEvent e)
- Description copied from interface:
StyledListListener - A mouse event has occured on a channel.
- Specified by:
channelEventin interfaceStyledListListener
- Parameters:
lis- the source list.chan- the channel name.e- the mouse event associated with this event.
URLEvent
public void URLEvent(StyledList lis, java.lang.String url, java.awt.event.MouseEvent e)
- Description copied from interface:
StyledListListener - An url event has occured on a channel.
- Specified by:
URLEventin interfaceStyledListListener
- Parameters:
lis- the source list.url- the url name.e- the mouse event associated with this event.
nickEvent
public void nickEvent(StyledList lis, java.lang.String nick, java.awt.event.MouseEvent e)
- Description copied from interface:
StyledListListener - A nick event has occured on a channel.
- Specified by:
nickEventin interfaceStyledListListener
- Parameters:
lis- the source list.nick- the nick name.e- the mouse event associated with this event.
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.awt.Component
setVisible
public void setVisible(boolean b)
- Overrides:
setVisiblein classjava.awt.Component
copyEvent
public void copyEvent(StyledList lis, java.lang.String txt, java.awt.event.MouseEvent e)
- Description copied from interface:
StyledListListener - A copy event has occured on a channel.
- Specified by:
copyEventin interfaceStyledListListener
- Parameters:
lis- the source list.txt- the copied text.e- the mouse event associated with this event.
virtualSizeChanged
public void virtualSizeChanged(StyledList lis)
- Description copied from interface:
StyledListListener - The logical width or height of the list has changed.
- Specified by:
virtualSizeChangedin interfaceStyledListListener
- Parameters:
lis- the source list.
windowActivated
public void windowActivated(java.awt.event.WindowEvent e)
- Specified by:
windowActivatedin interfacejava.awt.event.WindowListener
windowClosed
public void windowClosed(java.awt.event.WindowEvent e)
- Specified by:
windowClosedin interfacejava.awt.event.WindowListener
windowClosing
public void windowClosing(java.awt.event.WindowEvent e)
- Specified by:
windowClosingin interfacejava.awt.event.WindowListener
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent e)
- Specified by:
windowDeactivatedin interfacejava.awt.event.WindowListener
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent e)
- Specified by:
windowDeiconifiedin interfacejava.awt.event.WindowListener
windowIconified
public void windowIconified(java.awt.event.WindowEvent e)
- Specified by:
windowIconifiedin interfacejava.awt.event.WindowListener
windowOpened
public void windowOpened(java.awt.event.WindowEvent e)
- Specified by:
windowOpenedin interfacejava.awt.event.WindowListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
