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 interfaceprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Set<BuddyPluginViewBetaChat> private static booleanprivate final BuddyPluginBetaprivate org.eclipse.swt.graphics.Fontprivate org.eclipse.swt.graphics.Fontprivate intprivate BubbleTextBoxprivate org.eclipse.swt.widgets.Tableprivate booleanprivate booleanprivate final BuddyPluginBeta.ChatInstanceprivate booleanprivate Stringprivate intprivate SimpleDateFormatprivate static final booleanprivate org.eclipse.swt.dnd.DropTarget[]private org.eclipse.swt.graphics.Colorprivate org.eclipse.swt.graphics.Colorprivate org.eclipse.swt.graphics.Colorprivate booleanprivate org.eclipse.swt.widgets.Compositeprivate org.eclipse.swt.widgets.Textprivate org.eclipse.swt.graphics.Fontprivate longprivate longprivate org.eclipse.swt.custom.StyledTextprivate org.eclipse.swt.custom.StyleRange[]private final LocaleUtilitiesprivate static final intprivate static final intprivate static final intprivate LinkedHashMap<BuddyPluginBeta.ChatMessage, Integer> private org.eclipse.swt.widgets.Textprivate List<BuddyPluginBeta.ChatParticipant> private final BuddyPluginprivate Stringprivate intprivate org.eclipse.swt.widgets.Buttonprivate org.eclipse.swt.widgets.Shellprivate org.eclipse.swt.graphics.Fontprivate BufferedLabelprivate BufferedLabelprivate booleanprivate static final booleanprivate static final Stringprivate final SimpleDateFormatprivate final SimpleDateFormatprivate final SimpleDateFormatprivate final SimpleDateFormatprivate TimerEventPeriodicprivate final BuddyPluginView -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuddyPluginViewBetaChat(BuddyPluginView _view, BuddyPlugin _plugin, BuddyPluginBeta.ChatInstance _chat, org.eclipse.swt.widgets.Composite _parent) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()protected voidaddDisposeListener(org.eclipse.swt.events.DisposeListener listener) private voidaddFriendsMenu(org.eclipse.swt.widgets.Menu menu) private voidaddNickString(BuddyPluginBeta.ChatParticipant participant) private voidbuild(org.eclipse.swt.widgets.Composite parent) private org.eclipse.swt.widgets.CompositebuildFTUX(org.eclipse.swt.widgets.Composite parent, int style) private org.eclipse.swt.widgets.CompositebuildHelp(org.eclipse.swt.widgets.Composite rhs) private voidbuildParticipantMenu(org.eclipse.swt.widgets.Menu menu, List<BuddyPluginBeta.ChatParticipant> participants) private voidbuildRSSButton(org.eclipse.swt.widgets.Composite parent) private voidbuildStatus(org.eclipse.swt.widgets.Composite main_component, org.eclipse.swt.widgets.Composite component) private voidbuildSupport(org.eclipse.swt.widgets.Composite parent) private voidbuildSupport2(org.eclipse.swt.widgets.Composite parent) private voidcheckSubscriptions(boolean ftux_change) protected voidclose()protected voidclosed()voidprotected static voidcreateChatWindow(BuddyPluginView view, BuddyPlugin plugin, BuddyPluginBeta.ChatInstance chat) protected static voidcreateChatWindow(BuddyPluginView view, BuddyPlugin plugin, BuddyPluginBeta.ChatInstance chat, boolean force_popout) private voiddropDownload(Download download, BuddyPluginViewBetaChat.DropAccepter accepter) private voiddropDownloadFile(DiskManagerFileInfo file, BuddyPluginViewBetaChat.DropAccepter accepter) private voiddropFailed(String content, Throwable e) private voiddropFile(File file, BuddyPluginViewBetaChat.DropAccepter accepter) private voiddropURL(String str, BuddyPluginViewBetaChat.DropAccepter accepter) private Stringprivate static Stringprivate static StringexpandEmphasis(String text) private static StringexpandResources(String text) private BuddyPluginBeta.ChatInstancegetChat()private StringgetChatTimestamp(long now, long time) private static Patternprivate StringgetFriendStatus(BuddyPluginBeta.ChatParticipant participant) private StringgetFriendURI(boolean is_pub) private org.eclipse.swt.widgets.ShellgetShell()private voidhandleDrop(Object payload, BuddyPluginViewBetaChat.DropAccepter accepter) voidhandleExternalDrop(String payload) private voidprivate booleanisRSSURL(String url, BuddyPluginBeta.ChatInstance chat) private voidprivate voidlogChatMessages(BuddyPluginBeta.ChatMessage[] all_messages) voidmessageReceived(BuddyPluginBeta.ChatMessage message, boolean sort_outstanding) voidvoidparticipantAdded(BuddyPluginBeta.ChatParticipant participant) voidparticipantChanged(BuddyPluginBeta.ChatParticipant participant) voidparticipantRemoved(BuddyPluginBeta.ChatParticipant participant) private voidprotected static StringrenderMessage(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 StringrenderMessage(String str) private voidprivate voidprotected voidsendMessage(String text, boolean do_chunking) private voidsetInputAvailability(boolean focus) private BuddyPluginBeta.ChatParticipantsetItemData(org.eclipse.swt.widgets.TableItem item) private voidprivate voidsetProperties(org.eclipse.swt.widgets.TableItem item, BuddyPluginBeta.ChatParticipant p) private voidsetupShell(org.eclipse.swt.widgets.Shell _shell) private voidvoidstateChanged(boolean avail) private voidvoidupdated()private voidupdateItem(org.eclipse.swt.widgets.TableItem item) protected voidupdateTable(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:
stateChangedin interfaceBuddyPluginBeta.ChatListener
-
updated
public void updated()- Specified by:
updatedin interfaceBuddyPluginBeta.ChatListener
-
configChanged
public void configChanged()- Specified by:
configChangedin interfaceBuddyPluginBeta.ChatListener
-
sortParticipants
private void sortParticipants() -
participantAdded
- Specified by:
participantAddedin interfaceBuddyPluginBeta.ChatListener
-
participantChanged
- Specified by:
participantChangedin interfaceBuddyPluginBeta.ChatListener
-
participantRemoved
- Specified by:
participantRemovedin interfaceBuddyPluginBeta.ChatListener
-
participantsChanged
private void participantsChanged() -
sendMessage
-
expand
-
messageReceived
- Specified by:
messageReceivedin interfaceBuddyPluginBeta.ChatListener
-
messagesChanged
public void messagesChanged()- Specified by:
messagesChangedin 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()
-