|
From: Gerry D. <gd...@us...> - 2002-06-17 23:53:23
|
Update of /cvsroot/swapdv/swapdv
In directory usw-pr-cvs1:/tmp/cvs-serv17412
Modified Files:
ReplayTV.form ReplayTV.java SwapDV.form SwapDV.java
Log Message:
Exposed download and throttle controls for entire server.
Aded per-remote device preference in store and added per-device preference
editor.
Allowed download/throttle controls to be adjusted on a per device basis
Index: ReplayTV.form
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ReplayTV.form,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- ReplayTV.form 17 Jun 2002 14:48:47 -0000 1.15
+++ ReplayTV.form 17 Jun 2002 23:53:19 -0000 1.16
@@ -89,7 +89,7 @@
<Property name="text" type="java.lang.String" value="File"/>
</Properties>
<SubComponents>
- <Menu class="javax.swing.JMenu" name="jMenu4">
+ <Menu class="javax.swing.JMenu" name="jAdvancedMenu">
<Properties>
<Property name="mnemonic" type="int" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection type="value" value="'a'" valueType="int"/>
@@ -121,6 +121,15 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItemSaveGuideActionPerformed"/>
</Events>
</MenuItem>
+ <MenuItem class="javax.swing.JMenuItem" name="jMenuItemSettings">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Settings"/>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItemSettingsActionPerformed"/>
+ </Events>
+ </MenuItem>
</SubComponents>
</Menu>
<MenuItem class="javax.swing.JMenuItem" name="jMenuItemClose">
@@ -161,6 +170,16 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItemImport2ActionPerformed"/>
</Events>
</MenuItem>
+ <MenuItem class="javax.swing.JMenuItem" name="jMenuItemSchedule1">
+ <Properties>
+ <Property name="mnemonic" type="int" value="83"/>
+ <Property name="text" type="java.lang.String" value="Schedule show to be copied ..."/>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItemScheduleActionPerformed"/>
+ </Events>
+ </MenuItem>
<Menu class="javax.swing.JMenu" name="jMenuAdv2">
<Properties>
<Property name="mnemonic" type="int" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
@@ -270,8 +289,8 @@
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
- <JTabbedPaneConstraints tabName="Shows & Channels" toolTip="">
- <Property name="tabTitle" type="java.lang.String" value="Shows & Channels"/>
+ <JTabbedPaneConstraints tabName="Shows" toolTip="">
+ <Property name="tabTitle" type="java.lang.String" value="Shows"/>
<Property name="tabToolTip" type="java.lang.String" value=""/>
</JTabbedPaneConstraints>
</Constraint>
Index: ReplayTV.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/ReplayTV.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- ReplayTV.java 17 Jun 2002 14:48:47 -0000 1.33
+++ ReplayTV.java 17 Jun 2002 23:53:19 -0000 1.34
@@ -50,6 +50,7 @@
public class ReplayTV extends javax.swing.JFrame implements LoggerI, Runnable, DragTableCallback {
Hashtable contents = new Hashtable();
public ReplayClient rrs = null;
+ replayPropertyEditor propertyEditor = null;
Guide guide = null;
SwapDV swapDV;
String replayAddr;
@@ -69,7 +70,7 @@
this.swapDV=swapDV;
this.replayAddr = replayAddr;
this.replayPort = replayPort;
- Logger.addLogger(this);
+ Logger.addLogger(this);
thread = new Thread(this);
thread.start();
}
@@ -109,8 +110,16 @@
swapDV.statusChange("Unable to connect to "+replayAddr+":"+replayPort+" - "+ex.getLocalizedMessage());
}
- setIconImage(rrs.isSwapDV() ? swapDV.iconSwapdv32.getImage() : swapDV.iconReplay32);
- cellRenderer.setIcons(rrs.isSwapDV() ? swapDV.iconSwapdv16 : swapDV.iconReplay16, swapDV.iconCategory, null, swapDV.iconShow);
+ if (rrs.isSwapDV()) {
+ jMenuItemSettings.setText("SwapDV Connection Settings ...");
+ setIconImage(swapDV.iconSwapdv32.getImage());
+ cellRenderer.setIcons(swapDV.iconSwapdv16, swapDV.iconCategory, null, swapDV.iconShow);
+ } else {
+ jMenuItemSettings.setText("ReplayTV Connection Settings ...");
+ setIconImage(swapDV.iconReplay32.getImage());
+ cellRenderer.setIcons(swapDV.iconReplay16, swapDV.iconCategory, null, swapDV.iconShow);
+ }
+
treeModel.setGuide(guide);
// select the root
jTree1.addSelectionPath(new TreePath(treeRoot));
@@ -282,12 +291,14 @@
jLabelStatus = new javax.swing.JLabel();
jMenuBar1 = new javax.swing.JMenuBar();
jMenuFile = new javax.swing.JMenu();
- jMenu4 = new javax.swing.JMenu();
+ jAdvancedMenu = new javax.swing.JMenu();
jMenuItemSaveGuideFull = new javax.swing.JMenuItem();
jMenuItemSaveGuide = new javax.swing.JMenuItem();
+ jMenuItemSettings = new javax.swing.JMenuItem();
jMenuItemClose = new javax.swing.JMenuItem();
jMenuShow = new javax.swing.JMenu();
jMenuItemImport2 = new javax.swing.JMenuItem();
+ jMenuItemSchedule1 = new javax.swing.JMenuItem();
jMenuAdv2 = new javax.swing.JMenu();
jMenuItemSaveSwap2 = new javax.swing.JMenuItem();
jMenuItemSaveMPEG2 = new javax.swing.JMenuItem();
@@ -397,7 +408,7 @@
jSplitPaneContentGuide.setRightComponent(jScrollPaneShows);
- jTabbedPane1.addTab("Shows & Channels", null, jSplitPaneContentGuide, "");
+ jTabbedPane1.addTab("Shows", null, jSplitPaneContentGuide, "");
getContentPane().add(jTabbedPane1, java.awt.BorderLayout.CENTER);
@@ -407,8 +418,8 @@
jMenuFile.setMnemonic('F');
jMenuFile.setText("File");
- jMenu4.setMnemonic('a');
- jMenu4.setText("Advanced");
+ jAdvancedMenu.setMnemonic('a');
+ jAdvancedMenu.setText("Advanced");
jMenuItemSaveGuideFull.setMnemonic('g');
jMenuItemSaveGuideFull.setText("Download show & channel guide (full)");
jMenuItemSaveGuideFull.addActionListener(new java.awt.event.ActionListener() {
@@ -417,7 +428,7 @@
}
});
- jMenu4.add(jMenuItemSaveGuideFull);
+ jAdvancedMenu.add(jMenuItemSaveGuideFull);
jMenuItemSaveGuide.setMnemonic('n');
jMenuItemSaveGuide.setText("Download show & channel guide (no header)");
jMenuItemSaveGuide.addActionListener(new java.awt.event.ActionListener() {
@@ -426,8 +437,16 @@
}
});
- jMenu4.add(jMenuItemSaveGuide);
- jMenuFile.add(jMenu4);
+ jAdvancedMenu.add(jMenuItemSaveGuide);
+ jMenuItemSettings.setText("Settings");
+ jMenuItemSettings.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jMenuItemSettingsActionPerformed(evt);
+ }
+ });
+
+ jAdvancedMenu.add(jMenuItemSettings);
+ jMenuFile.add(jAdvancedMenu);
jMenuItemClose.setMnemonic('C');
jMenuItemClose.setText("Close");
jMenuItemClose.addActionListener(new java.awt.event.ActionListener() {
@@ -459,6 +478,15 @@
});
jMenuShow.add(jMenuItemImport2);
+ jMenuItemSchedule1.setMnemonic('S');
+ jMenuItemSchedule1.setText("Schedule show to be copied ...");
+ jMenuItemSchedule1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jMenuItemScheduleActionPerformed(evt);
+ }
+ });
+
+ jMenuShow.add(jMenuItemSchedule1);
jMenuAdv2.setMnemonic('a');
jMenuAdv2.setText("Advanced");
jMenuItemSaveSwap2.setMnemonic('s');
@@ -501,6 +529,15 @@
setLocation((screenSize.width-400)/2,(screenSize.height-300)/2);
}//GEN-END:initComponents
+ private void jMenuItemSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSettingsActionPerformed
+ // Init property editor, if needed
+ if (propertyEditor == null) {
+ propertyEditor = new replayPropertyEditor(this, true);
+ propertyEditor.setClient(rrs);
+ }
+ propertyEditor.editProperties();
+ }//GEN-LAST:event_jMenuItemSettingsActionPerformed
+
private void jMenuItemScheduleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemScheduleActionPerformed
// Make sure they selected no more than one show
if (jTableShows.getSelectedRowCount() > 1) {
@@ -545,7 +582,7 @@
// Install the wizard and start it
theWizard.setEvent(theEvent);
theWizard.setFinishButtonEnabled(true);
- eventWizardFrame.startWizard();
+ eventWizardFrame.startWizard(1);
}//GEN-LAST:event_jMenuItemScheduleActionPerformed
private void jMenuItemShowDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemShowDeleteActionPerformed
@@ -746,6 +783,7 @@
// Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JMenuItem jMenuItemSchedule1;
private javax.swing.JMenuItem jMenuItemSaveMPEG;
private javax.swing.JLabel jLabelStatus;
private javax.swing.JMenuItem jMenuItemClose;
@@ -760,11 +798,12 @@
private javax.swing.JMenuItem jMenuItemImport2;
private javax.swing.JMenuItem jMenuItemShowDelete2;
private javax.swing.JMenuItem jMenuItemSaveSwap;
- private javax.swing.JMenu jMenu4;
+ private javax.swing.JMenu jAdvancedMenu;
private javax.swing.JMenu jMenuAdv2;
private javax.swing.JMenuItem jMenuItemImport;
- private javax.swing.JMenuItem jMenuItemSchedule;
+ private javax.swing.JMenuItem jMenuItemSettings;
private javax.swing.JTabbedPane jTabbedPane1;
+ private javax.swing.JMenuItem jMenuItemSchedule;
private javax.swing.JScrollPane jScrollPaneChannels;
private javax.swing.JMenu jMenuAdv;
private javax.swing.JTree jTree1;
Index: SwapDV.form
===================================================================
RCS file: /cvsroot/swapdv/swapdv/SwapDV.form,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- SwapDV.form 17 Jun 2002 14:48:47 -0000 1.31
+++ SwapDV.form 17 Jun 2002 23:53:19 -0000 1.32
@@ -349,6 +349,20 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItemShowMove2ActionPerformed"/>
</Events>
</MenuItem>
+ <MenuItem class="javax.swing.JSeparator" name="jSeparator11">
+ </MenuItem>
+ <MenuItem class="javax.swing.JMenuItem" name="jMenuItemScheduleCopy1">
+ <Properties>
+ <Property name="mnemonic" type="int" value="83"/>
+ <Property name="text" type="java.lang.String" value="Schedule Similar Shows to be copied ..."/>
+ </Properties>
+
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItemScheduleCopyActionPerformed"/>
+ </Events>
+ </MenuItem>
+ <MenuItem class="javax.swing.JSeparator" name="jSeparator12">
+ </MenuItem>
<Menu class="javax.swing.JMenu" name="jMenuShowAdv2">
<Properties>
<Property name="mnemonic" type="int" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
Index: SwapDV.java
===================================================================
RCS file: /cvsroot/swapdv/swapdv/SwapDV.java,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- SwapDV.java 17 Jun 2002 14:48:47 -0000 1.71
+++ SwapDV.java 17 Jun 2002 23:53:19 -0000 1.72
@@ -84,7 +84,7 @@
static final int CONTENTTAB = 0;
static final int DOWNLOADTAB = 1;
static final int UPLOADTAB = 2;
- public static Image iconReplay32 = null;
+ public static ImageIcon iconReplay32 = null;
public static ImageIcon iconSwapdv32 = null;
public static Image iconSearch32 = null;
public static Icon iconReplay16 = null;
@@ -143,7 +143,7 @@
iconSwapdv16 = new ImageIcon(getClass().getResource("icons/swapdv16x16.gif"));
iconSearch16 = new ImageIcon(getClass().getResource("icons/search16x16.gif"));
iconConfig16 = new ImageIcon(getClass().getResource("icons/config16x16.gif"));
- iconReplay32 = (new ImageIcon(getClass().getResource("icons/replay32x32.gif"))).getImage();
+ iconReplay32 = new ImageIcon(getClass().getResource("icons/replay32x32.gif"));
iconSwapdv32 = new ImageIcon(getClass().getResource("icons/swapdv32x32.gif"));
iconSearch32 = (new ImageIcon(getClass().getResource("icons/search32x32.gif"))).getImage();
iconGo = new ImageIcon(getClass().getResource("icons/go.gif"));
@@ -555,6 +555,15 @@
}
}
+ /*
+ * Return a store for replay/swapDV device specific infomarion
+ */
+ public pStoreNodeI getDeviceStore(String deviceIPAddr) {
+ if ((deviceIPAddr == null) || (deviceIPAddr.equals(""))) return null;
+ return pStore.getDomain("DEVICE_PREFS").getChild("DEVICE_" + deviceIPAddr);
+ }
+
+
private void importShow(ImportInfo info, boolean move) {
if (info.dstMpg.length() == 0)
return;
@@ -988,6 +997,9 @@
jMenuItemShowPlay2 = new javax.swing.JMenuItem();
jMenuItemShowEdit2 = new javax.swing.JMenuItem();
jMenuItemShowMove2 = new javax.swing.JMenuItem();
+ jSeparator11 = new javax.swing.JSeparator();
+ jMenuItemScheduleCopy1 = new javax.swing.JMenuItem();
+ jSeparator12 = new javax.swing.JSeparator();
jMenuShowAdv2 = new javax.swing.JMenu();
jMenuItemShowExport2 = new javax.swing.JMenuItem();
jSeparator1 = new javax.swing.JSeparator();
@@ -1353,6 +1365,17 @@
});
jMenuShow.add(jMenuItemShowMove2);
+ jMenuShow.add(jSeparator11);
+ jMenuItemScheduleCopy1.setMnemonic('S');
+ jMenuItemScheduleCopy1.setText("Schedule Similar Shows to be copied ...");
+ jMenuItemScheduleCopy1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jMenuItemScheduleCopyActionPerformed(evt);
+ }
+ });
+
+ jMenuShow.add(jMenuItemScheduleCopy1);
+ jMenuShow.add(jSeparator12);
jMenuShowAdv2.setMnemonic('A');
jMenuShowAdv2.setText("Advanced");
jMenuItemShowExport2.setMnemonic('x');
@@ -1654,7 +1677,7 @@
// Install the wizard and start it
theWizard.setEvent(theEvent);
theWizard.setFinishButtonEnabled(true);
- eventWizardFrame.startWizard();
+ eventWizardFrame.startWizard(1);
}//GEN-LAST:event_jMenuItemScheduleCopyActionPerformed
private void jMenuItemCatRename2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemCatRename2ActionPerformed
@@ -2177,7 +2200,7 @@
return;
}
details = setup.details;
- jtellaConfig = setup.config;
+ //jtellaConfig = setup.config;
storeValues();
upnp.stopRunning();
upnp = new UPnP(this, details.IP);
@@ -2471,7 +2494,9 @@
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JSeparator jSeparator9;
private javax.swing.JSeparator jSeparator8;
+ private javax.swing.JSeparator jSeparator12;
private javax.swing.JSeparator jSeparator7;
+ private javax.swing.JSeparator jSeparator11;
private javax.swing.JSplitPane jSplitPaneContentGuide;
private javax.swing.JSeparator jSeparator6;
private javax.swing.JSeparator jSeparator10;
@@ -2514,6 +2539,7 @@
private javax.swing.JMenuItem jMenuItemShowExport;
private javax.swing.JScrollPane jScrollPaneDownloads;
private javax.swing.JMenu jMenuHelp;
+ private javax.swing.JMenuItem jMenuItemScheduleCopy1;
private javax.swing.JMenuItem jMenuItemShowMove2;
private javax.swing.JTable jTableDownloads;
private javax.swing.JCheckBoxMenuItem jCheckBoxAutoStart;
|