|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.stringer.ui.Stringer
| Nested Class Summary | |
(package private) class |
Stringer.Hyperactive
listen for link selection events in the JEditorPane |
(package private) class |
Stringer.MousePopupListener
Handle mouse clicks in our JTree. |
protected class |
Stringer.MyTreeSelectionListener
Handle selection/deselections in the "subscriptions" TreeView |
(package private) class |
Stringer.TableViewPopupListener
Handle mouse clicks in our JTable |
| Field Summary | |
(package private) static java.util.Hashtable |
actionTable
Map of AbstractActions to Action Keywords |
static int |
ALL_TAB
The TableView that contains the available feeds is tab #1 |
(package private) Feed |
currentFeed
The feed currently displayed in htmlView
This is the feed that is undergoing selection in the tree view. |
(package private) javax.swing.JFrame |
frame
The frame in which we are embedded |
(package private) static javax.swing.JEditorPane |
htmlHeaderView
|
(package private) static javax.swing.JEditorPane |
htmlView
|
(package private) int |
keycode
maintains the current keyboard state (control-key down, etc) |
(package private) Channel |
lastSelectedChannel
The feed previously displayed in htmlView. |
(package private) Item |
lastSelectedItem
|
(package private) static java.util.ResourceBundle |
localStrings
|
(package private) static org.apache.log4j.Logger |
logger
|
(package private) static javax.swing.JLabel |
m_lblMemUsage
|
(package private) static javax.swing.JLabel |
m_lblPressed
|
(package private) static javax.swing.JLabel |
m_lblSize
|
(package private) static javax.swing.JLabel |
m_lblStatus
|
static int |
NEW_TAB
The TableView that contains the newly available feeds is tab #2 |
private TableView |
newFeedsView
The JTable-based view of all newly available feeds |
protected javax.swing.JPopupMenu |
popup
|
(package private) static javax.swing.JProgressBar |
progressBar
|
(package private) static javax.swing.JSplitPane |
splitPane
the splitpane component in which the htmlView and the
tabbedPane are embedded |
static int |
SUBSCRIBED_TAB
The TreeView that contains the hierarchy of feed folders is tab #0 |
(package private) java.util.Hashtable |
subscriptionMap
all subscribed nodes |
(package private) javax.swing.JTabbedPane |
tabbedPane
the tabbed pane in the left-hand window |
private TableView |
tableview
The JTable-based view of all available feeds |
private TreeView |
treeview
The JTree-based view of subscribed feeds and folders |
| Fields inherited from interface org.stringer.StringerConstants |
ABOUT_KEY, BACKUP_DIR, BACKUP_FEEDRC_FILE, BACKUP_SUBSCRIPTION_FILE, COPY_KEY, DELETE_KEY, DOCTYPE, EXIT_KEY, EXPORT_KEY, FEED_DIR, HOME_DIR, IMPORT_KEY, ITEM_PROPERTIES_KEY, KILLALL_KEY, NEWFEED_KEY, NEWFOLDER_KEY, REFRESH_FEEDS_KEY, SUBSCRIPTION_FILE, UPDATE_FEEDS_KEY, UPDATESELECTED_KEY, UPDATESUBSCRIBED_KEY, XMLVERSION |
| Constructor Summary | |
Stringer(javax.swing.JFrame frame)
Create a new Stringer main window embedded within frame |
|
| Method Summary | |
void |
addNewFeed(Item item)
Add a newsfeed to the subscription list |
void |
deleteItem(javax.swing.tree.DefaultMutableTreeNode node)
Delete a node in the TreeView |
void |
deleteItem(Item item)
Delete an item from the tree and remove its cache file. |
void |
displayChannel(Channel channel)
Format a channel as HTML and display it in our JEditorPane |
void |
displayErrorEvent(Item item)
|
javax.swing.AbstractAction |
getAction(java.lang.Integer actionKey)
|
int |
getAvailableNewsFeedCount()
|
javax.swing.JPanel |
getContentPanel()
|
javax.swing.JFrame |
getFrame()
|
javax.swing.JEditorPane |
getHtmlHeaderView()
|
javax.swing.JEditorPane |
getHtmlView()
|
int |
getKeyCode()
|
static java.lang.String |
getLocalString(java.lang.String key)
|
TableView |
getNewFeedsView()
|
int |
getNewNewsFeedCount()
|
java.lang.String |
getNewsFeed()
|
javax.swing.JPopupMenu |
getPopup()
Lazy instantiation of the treeview's popup menu. |
javax.swing.JProgressBar |
getProgressBar()
|
Channel |
getSelectedChannel()
|
int |
getSubscribedFeedCount()
|
java.util.Hashtable |
getSubscriptionMap()
|
javax.swing.JTabbedPane |
getTabbedPane()
|
TableView |
getTableView()
|
javax.swing.JTree |
getTree()
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
Listen for changes to our subscription list |
protected static javax.swing.JComponent |
newLabel(java.lang.String text)
|
void |
saveAll()
Save the screen state and the current subscription tree |
void |
savePreferences()
Save the current window state and component positions to our preferences file |
void |
saveSubscriptions()
Update our subscription file from the tree contents. |
static void |
setActionEnabled(java.lang.Integer actionKey,
boolean b)
Enable/disable an AbstractAction |
void |
setItemCountStatus(int n)
|
void |
setSelection(javax.swing.tree.TreePath path)
Set the current selection in the treeview. |
void |
setStatusText(java.lang.String s)
|
protected void |
showMemoryUsage()
|
protected void |
walk(java.lang.Object o,
java.lang.StringBuffer buf)
Build an XML string representation of the nodes in our JTree by visiting every node in the tree and appending to a StringBuffer. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
static org.apache.log4j.Logger logger
java.util.Hashtable subscriptionMap
private TreeView treeview
private TableView tableview
private TableView newFeedsView
javax.swing.JTabbedPane tabbedPane
static final java.util.ResourceBundle localStrings
static final java.util.Hashtable actionTable
static javax.swing.JLabel m_lblStatus
static javax.swing.JLabel m_lblSize
static javax.swing.JLabel m_lblMemUsage
static javax.swing.JLabel m_lblPressed
static javax.swing.JProgressBar progressBar
protected javax.swing.JPopupMenu popup
static javax.swing.JSplitPane splitPane
htmlView and the
tabbedPane are embedded
javax.swing.JFrame frame
Feed currentFeed
htmlView
This is the feed that is undergoing selection in the tree view.
Channel lastSelectedChannel
htmlView.
This is the feed that is undergoing deselection in the tree view.
Item lastSelectedItem
int keycode
static final javax.swing.JEditorPane htmlView
static final javax.swing.JEditorPane htmlHeaderView
public static final int SUBSCRIBED_TAB
public static final int ALL_TAB
public static final int NEW_TAB
| Constructor Detail |
public Stringer(javax.swing.JFrame frame)
throws java.lang.ClassNotFoundException,
java.lang.Exception
frame
frame - our parent window.| Method Detail |
public java.util.Hashtable getSubscriptionMap()
public javax.swing.JTree getTree()
public TableView getTableView()
public TableView getNewFeedsView()
public javax.swing.JEditorPane getHtmlView()
public javax.swing.JEditorPane getHtmlHeaderView()
public javax.swing.JTabbedPane getTabbedPane()
public int getSubscribedFeedCount()
public int getAvailableNewsFeedCount()
public int getNewNewsFeedCount()
public static java.lang.String getLocalString(java.lang.String key)
public static void setActionEnabled(java.lang.Integer actionKey,
boolean b)
b - true to enable or false to disable the actionpublic javax.swing.AbstractAction getAction(java.lang.Integer actionKey)
public void setStatusText(java.lang.String s)
public void setItemCountStatus(int n)
protected static javax.swing.JComponent newLabel(java.lang.String text)
public Channel getSelectedChannel()
public javax.swing.JProgressBar getProgressBar()
public javax.swing.JFrame getFrame()
public javax.swing.JPanel getContentPanel()
public java.lang.String getNewsFeed()
public int getKeyCode()
public javax.swing.JPopupMenu getPopup()
subscription viewprotected void showMemoryUsage()
public void displayErrorEvent(Item item)
public void displayChannel(Channel channel)
channel - format this channel as HTML and display it.public void savePreferences()
public void saveSubscriptions()
throws java.io.IOException
java.io.IOException
public void saveAll()
throws java.io.IOException
java.io.IOExceptionpublic void deleteItem(javax.swing.tree.DefaultMutableTreeNode node)
node - this TreeNode will be deletedpublic void deleteItem(Item item)
item - The TreeNode that has this item as its UserObject will
be deleted.
protected void walk(java.lang.Object o,
java.lang.StringBuffer buf)
o - the tree branchbuf - xml representation of this branch is written here.public void setSelection(javax.swing.tree.TreePath path)
path - this treepath becomes the current selection in the TreeViewpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenerpublic void addNewFeed(Item item)
item - the newsfeed to be added.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||