Class BuddyPluginViewBetaChat
java.lang.Object
com.biglybt.ui.swt.plugin.net.buddy.swt.BuddyPluginViewBetaChat
- All Implemented Interfaces:
BuddyPluginBeta.ChatListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interface
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Set
<BuddyPluginViewBetaChat> private static boolean
private final BuddyPluginBeta
private org.eclipse.swt.graphics.Font
private org.eclipse.swt.graphics.Font
private int
private BubbleTextBox
private org.eclipse.swt.widgets.Table
private boolean
private boolean
private final BuddyPluginBeta.ChatInstance
private boolean
private String
private int
private SimpleDateFormat
private static final boolean
private org.eclipse.swt.dnd.DropTarget[]
private org.eclipse.swt.graphics.Color
private org.eclipse.swt.graphics.Color
private org.eclipse.swt.graphics.Color
private boolean
private org.eclipse.swt.widgets.Composite
private org.eclipse.swt.widgets.Text
private org.eclipse.swt.graphics.Font
private long
private long
private org.eclipse.swt.custom.StyledText
private org.eclipse.swt.custom.StyleRange[]
private final LocaleUtilities
private static final int
private static final int
private static final int
private org.eclipse.swt.widgets.Text
private List
<BuddyPluginBeta.ChatParticipant> private final BuddyPlugin
private String
private int
private org.eclipse.swt.widgets.Button
private org.eclipse.swt.widgets.Shell
private org.eclipse.swt.graphics.Font
private BufferedLabel
private BufferedLabel
private boolean
private static final boolean
private static final String
private final SimpleDateFormat
private final SimpleDateFormat
private final SimpleDateFormat
private final SimpleDateFormat
private TimerEventPeriodic
private final BuddyPluginView
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
BuddyPluginViewBetaChat
(BuddyPluginView _view, BuddyPlugin _plugin, BuddyPluginBeta.ChatInstance _chat, org.eclipse.swt.widgets.Composite _parent) -
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
protected void
addDisposeListener
(org.eclipse.swt.events.DisposeListener listener) private void
addFriendsMenu
(org.eclipse.swt.widgets.Menu menu) private void
addNickString
(BuddyPluginBeta.ChatParticipant participant) private void
build
(org.eclipse.swt.widgets.Composite parent) private org.eclipse.swt.widgets.Composite
buildFTUX
(org.eclipse.swt.widgets.Composite parent, int style) private org.eclipse.swt.widgets.Composite
buildHelp
(org.eclipse.swt.widgets.Composite rhs) private void
buildParticipantMenu
(org.eclipse.swt.widgets.Menu menu, List<BuddyPluginBeta.ChatParticipant> participants) private void
buildRSSButton
(org.eclipse.swt.widgets.Composite parent) private void
buildStatus
(org.eclipse.swt.widgets.Composite main_component, org.eclipse.swt.widgets.Composite component) private void
buildSupport
(org.eclipse.swt.widgets.Composite parent) private void
buildSupport2
(org.eclipse.swt.widgets.Composite parent) private void
checkSubscriptions
(boolean ftux_change) protected void
close()
protected void
closed()
void
protected static void
createChatWindow
(BuddyPluginView view, BuddyPlugin plugin, BuddyPluginBeta.ChatInstance chat) protected static void
createChatWindow
(BuddyPluginView view, BuddyPlugin plugin, BuddyPluginBeta.ChatInstance chat, boolean force_popout) private void
dropDownload
(Download download, BuddyPluginViewBetaChat.DropAccepter accepter) private void
dropDownloadFile
(DiskManagerFileInfo file, BuddyPluginViewBetaChat.DropAccepter accepter) private void
dropFailed
(String content, Throwable e) private void
dropFile
(File file, BuddyPluginViewBetaChat.DropAccepter accepter) private void
dropURL
(String str, BuddyPluginViewBetaChat.DropAccepter accepter) private String
private static String
private static String
expandEmphasis
(String text) private static String
expandResources
(String text) private BuddyPluginBeta.ChatInstance
getChat()
private String
getChatTimestamp
(long now, long time) private static Pattern
private String
getFriendStatus
(BuddyPluginBeta.ChatParticipant participant) private String
getFriendURI
(boolean is_pub) private org.eclipse.swt.widgets.Shell
getShell()
private void
handleDrop
(Object payload, BuddyPluginViewBetaChat.DropAccepter accepter) void
handleExternalDrop
(String payload) private void
private boolean
isRSSURL
(String url, BuddyPluginBeta.ChatInstance chat) private void
private void
logChatMessages
(BuddyPluginBeta.ChatMessage[] all_messages) void
messageReceived
(BuddyPluginBeta.ChatMessage message, boolean sort_outstanding) void
void
participantAdded
(BuddyPluginBeta.ChatParticipant participant) void
participantChanged
(BuddyPluginBeta.ChatParticipant participant) void
participantRemoved
(BuddyPluginBeta.ChatParticipant participant) private void
protected static String
renderMessage
(BuddyPluginBeta beta, BuddyPluginBeta.ChatInstance chat, BuddyPluginBeta.ChatMessage message, String original_msg, int message_type, int start, List<org.eclipse.swt.custom.StyleRange> new_ranges, org.eclipse.swt.graphics.Font info_font, org.eclipse.swt.graphics.Color info_colour, org.eclipse.swt.graphics.Font bold_font, org.eclipse.swt.graphics.Font italic_font) private String
renderMessage
(String str) private void
private void
protected void
sendMessage
(String text, boolean do_chunking) private void
setInputAvailability
(boolean focus) private BuddyPluginBeta.ChatParticipant
setItemData
(org.eclipse.swt.widgets.TableItem item) private void
private void
setProperties
(org.eclipse.swt.widgets.TableItem item, BuddyPluginBeta.ChatParticipant p) private void
setupShell
(org.eclipse.swt.widgets.Shell _shell) private void
void
stateChanged
(boolean avail) private void
void
updated()
private void
updateItem
(org.eclipse.swt.widgets.TableItem item) protected void
updateTable
(boolean async) private void
-
Field Details
-
TEST_LOOPBACK_CHAT
private static final boolean TEST_LOOPBACK_CHAT -
DEBUG_ENABLED
private static final boolean DEBUG_ENABLED -
MAX_MSG_CHUNK_ENABLE
private static final int MAX_MSG_CHUNK_ENABLE- See Also:
-
MAX_MSG_CHUNK_LENGTH
private static final int MAX_MSG_CHUNK_LENGTH- See Also:
-
MAX_MSG_OVERALL_LENGTH
private static final int MAX_MSG_OVERALL_LENGTH- See Also:
-
TI_MSG_COUNT
- See Also:
-
active_windows
-
auto_ftux_popout_done
private static boolean auto_ftux_popout_done -
text_cache
-
view
-
plugin
-
beta
-
chat
-
chat_available
private boolean chat_available -
lu
-
shell
private org.eclipse.swt.widgets.Shell shell -
ftux_stack
private org.eclipse.swt.widgets.Composite ftux_stack -
log
private org.eclipse.swt.custom.StyledText log -
log_styles
private org.eclipse.swt.custom.StyleRange[] log_styles -
table_header_left
-
buddy_table
private org.eclipse.swt.widgets.Table buddy_table -
bt_col_offset
private int bt_col_offset -
status
-
bubbleTextBox
-
nickname
private org.eclipse.swt.widgets.Text nickname -
input_area
private org.eclipse.swt.widgets.Text input_area -
drop_targets
private org.eclipse.swt.dnd.DropTarget[] drop_targets -
messages
-
participants
-
participant_last_message_map
private Map<BuddyPluginBeta.ChatParticipant,BuddyPluginBeta.ChatMessage> participant_last_message_map -
table_resort_required
private boolean table_resort_required -
italic_font
private org.eclipse.swt.graphics.Font italic_font -
bold_font
private org.eclipse.swt.graphics.Font bold_font -
big_font
private org.eclipse.swt.graphics.Font big_font -
small_font
private org.eclipse.swt.graphics.Font small_font -
ftux_dark_bg
private org.eclipse.swt.graphics.Color ftux_dark_bg -
ftux_dark_fg
private org.eclipse.swt.graphics.Color ftux_dark_fg -
ftux_light_bg
private org.eclipse.swt.graphics.Color ftux_light_bg -
ftux_ok
private boolean ftux_ok -
build_complete
private boolean build_complete -
timer
-
current_search
-
current_search_index
private int current_search_index -
change_pending
private boolean change_pending -
previous_says
-
previous_says_mt
private int previous_says_mt -
last_seen_message
private long last_seen_message -
last_seen_message_pending
private long last_seen_message_pending -
custom_date_format
-
time_format1
-
time_format2a
-
time_format2b
-
time_format3
-
-
Constructor Details
-
BuddyPluginViewBetaChat
protected BuddyPluginViewBetaChat(BuddyPluginView _view, BuddyPlugin _plugin, BuddyPluginBeta.ChatInstance _chat, org.eclipse.swt.widgets.Composite _parent)
-
-
Method Details
-
createChatWindow
protected static void createChatWindow(BuddyPluginView view, BuddyPlugin plugin, BuddyPluginBeta.ChatInstance chat) -
createChatWindow
protected static void createChatWindow(BuddyPluginView view, BuddyPlugin plugin, BuddyPluginBeta.ChatInstance chat, boolean force_popout) -
setupShell
private void setupShell(org.eclipse.swt.widgets.Shell _shell) -
getShell
private org.eclipse.swt.widgets.Shell getShell() -
getChat
-
build
private void build(org.eclipse.swt.widgets.Composite parent) -
buildSupport
private void buildSupport(org.eclipse.swt.widgets.Composite parent) -
buildSupport2
private void buildSupport2(org.eclipse.swt.widgets.Composite parent) -
buildFTUX
private org.eclipse.swt.widgets.Composite buildFTUX(org.eclipse.swt.widgets.Composite parent, int style) -
hookFTUXListener
private void hookFTUXListener() -
buildHelp
private org.eclipse.swt.widgets.Composite buildHelp(org.eclipse.swt.widgets.Composite rhs) -
buildRSSButton
private void buildRSSButton(org.eclipse.swt.widgets.Composite parent) -
buildStatus
private void buildStatus(org.eclipse.swt.widgets.Composite main_component, org.eclipse.swt.widgets.Composite component) -
search
-
addFriendsMenu
private void addFriendsMenu(org.eclipse.swt.widgets.Menu menu) -
getFriendURI
-
buildParticipantMenu
private void buildParticipantMenu(org.eclipse.swt.widgets.Menu menu, List<BuddyPluginBeta.ChatParticipant> participants) -
timerTick
private void timerTick() -
getFriendStatus
-
setItemData
-
updateItem
private void updateItem(org.eclipse.swt.widgets.TableItem item) -
setProperties
-
setProperties
private void setProperties(org.eclipse.swt.widgets.TableItem item, BuddyPluginBeta.ChatParticipant p) -
checkSubscriptions
private void checkSubscriptions(boolean ftux_change) -
encodeRSSURL
-
isRSSURL
-
addDisposeListener
protected void addDisposeListener(org.eclipse.swt.events.DisposeListener listener) -
updateTableHeader
private void updateTableHeader() -
updateTable
protected void updateTable(boolean async) -
handleExternalDrop
-
handleDrop
-
dropURL
-
dropFile
-
dropDownload
-
dropDownloadFile
private void dropDownloadFile(DiskManagerFileInfo file, BuddyPluginViewBetaChat.DropAccepter accepter) -
dropFailed
-
close
protected void close() -
closed
protected void closed() -
setInputAvailability
private void setInputAvailability(boolean focus) -
stateChanged
public void stateChanged(boolean avail) - Specified by:
stateChanged
in interfaceBuddyPluginBeta.ChatListener
-
updated
public void updated()- Specified by:
updated
in interfaceBuddyPluginBeta.ChatListener
-
configChanged
public void configChanged()- Specified by:
configChanged
in interfaceBuddyPluginBeta.ChatListener
-
sortParticipants
private void sortParticipants() -
participantAdded
- Specified by:
participantAdded
in interfaceBuddyPluginBeta.ChatListener
-
participantChanged
- Specified by:
participantChanged
in interfaceBuddyPluginBeta.ChatListener
-
participantRemoved
- Specified by:
participantRemoved
in interfaceBuddyPluginBeta.ChatListener
-
participantsChanged
private void participantsChanged() -
sendMessage
-
expand
-
messageReceived
- Specified by:
messageReceived
in interfaceBuddyPluginBeta.ChatListener
-
messagesChanged
public void messagesChanged()- Specified by:
messagesChanged
in interfaceBuddyPluginBeta.ChatListener
-
resetChatMessages
private void resetChatMessages() -
logChatMessage
-
getChatTimestamp
-
addNickString
-
logChatMessages
-
renderMessage
-
expandResources
-
getEmphasisPattern
-
expandEmphasis
-
renderMessage
protected static String renderMessage(BuddyPluginBeta beta, BuddyPluginBeta.ChatInstance chat, BuddyPluginBeta.ChatMessage message, String original_msg, int message_type, int start, List<org.eclipse.swt.custom.StyleRange> new_ranges, org.eclipse.swt.graphics.Font info_font, org.eclipse.swt.graphics.Color info_colour, org.eclipse.swt.graphics.Font bold_font, org.eclipse.swt.graphics.Font italic_font) -
activate
public void activate()
-