Commit a4902c8a authored by Stephen's avatar Stephen
Browse files

Merged

parents 8a8d9b00 112c506c
compile.on.save=true
user.properties.file=C:\\Users\\Stephen\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties
user.properties.file=C:\\Users\\susanti_2\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties
......@@ -3,10 +3,8 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/C:/Users/Stephen/Documents/NetBeansProjects/TubesSister/src/client/src/tcpclient/LoginPanel.java</file>
<file>file:/C:/Users/Stephen/Documents/NetBeansProjects/TubesSister/src/client/src/tcpclient/TradeboxTableModel.java</file>
<file>file:/C:/Users/Stephen/Documents/NetBeansProjects/TubesSister/src/client/src/tcpclient/MainPage.java</file>
<file>file:/C:/Users/Stephen/Documents/NetBeansProjects/TubesSister/src/client/src/tcpclient/TCPClient.java</file>
<file>file:/C:/Users/susanti_2/Documents/ITB/IF/netbeans/IF3230-Tugas-Besar-Sister-2015/src/client/src/tcpclient/MainPage.java</file>
<file>file:/C:/Users/susanti_2/Documents/ITB/IF/netbeans/IF3230-Tugas
</group>
</open-files>
</project-private>
......@@ -3,6 +3,7 @@
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
<Properties>
<Property name="defaultCloseOperation" type="int" value="3"/>
<Property name="title" type="java.lang.String" value="Sister"/>
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
......@@ -243,12 +244,12 @@
<Component id="portLabel" linkSize="7" min="-2" max="-2" attributes="0"/>
<Component id="ipaddressLabel" linkSize="7" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="155" max="32767" attributes="0"/>
<EmptySpace pref="167" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="ipaddressTextField" linkSize="6" alignment="1" min="-2" pref="151" max="-2" attributes="0"/>
<Component id="portTextField" linkSize="6" alignment="1" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="299" max="32767" attributes="0"/>
<EmptySpace pref="311" max="32767" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
......@@ -587,15 +588,28 @@
<SubComponents>
<Component class="javax.swing.JTable" name="mapTable">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="99" green="ff" red="99" type="rgb"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
<EmptyBorder/>
</Border>
</Property>
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="mapModel" type="code"/>
</Property>
<Property name="cellSelectionEnabled" type="boolean" value="true"/>
<Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor">
<TableColumnModel selectionModel="0"/>
</Property>
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
<Color id="Default Cursor"/>
</Property>
<Property name="enabled" type="boolean" value="false"/>
<Property name="gridColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="0" type="rgb"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="null"/>
</Property>
......@@ -606,7 +620,6 @@
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="null"/>
</Property>
<Property name="rowSelectionAllowed" type="boolean" value="false"/>
<Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="null" type="code"/>
</Property>
......
......@@ -34,6 +34,7 @@ import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.Timer;
import javax.swing.UIManager;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.JTableHeader;
......@@ -204,6 +205,7 @@ public class MainPage extends javax.swing.JFrame {
FindOfferItemTable = new javax.swing.JTable();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Sister");
MenuPanel.setPreferredSize(new java.awt.Dimension(848, 45));
......@@ -383,11 +385,11 @@ public class MainPage extends javax.swing.JFrame {
.addGroup(settingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(portLabel)
.addComponent(ipaddressLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 155, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 167, Short.MAX_VALUE)
.addGroup(settingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(ipaddressTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(portTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(299, Short.MAX_VALUE))
.addContainerGap(311, Short.MAX_VALUE))
.addGroup(settingPanelLayout.createSequentialGroup()
.addGroup(settingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(settingPanelLayout.createSequentialGroup()
......@@ -559,14 +561,18 @@ public class MainPage extends javax.swing.JFrame {
mapScrollPane.setAutoscrolls(true);
mapTable.setBackground(new java.awt.Color(153, 255, 153));
mapTable.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
mapTable.setModel(mapModel);
mapTable.setCellSelectionEnabled(true);
mapTable.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
mapTable.setEnabled(false);
mapTable.setGridColor(new java.awt.Color(0, 0, 0));
mapTable.setMaximumSize(null);
mapTable.setMinimumSize( mapTable.size()
);
mapTable.setName(""); // NOI18N
mapTable.setPreferredSize(null);
mapTable.setRowSelectionAllowed(false);
mapTable.setTableHeader(null);
mapTable.setUpdateSelectionOnSort(false);
mapTable.setVerifyInputWhenFocusTarget(false);
......@@ -2261,24 +2267,26 @@ public class MainPage extends javax.swing.JFrame {
String name = response.getString("name");
mapLabel.setText("Map: "+name);
System.out.println("map 2 ok");
int dimX=response.getInt("width");
int dimY=response.getInt("height");
int dimX=response.getInt("width")+5;
int dimY=response.getInt("height")+9;
mapModel=new MapTableModel(dimX, dimY);
ImageIcon playerIcon = new ImageIcon(getClass().getResource("images/player.png"));
Image img = playerIcon.getImage();
Image newimg = img.getScaledInstance(125, 125, java.awt.Image.SCALE_SMOOTH);
ImageIcon newPlayerIcon = new ImageIcon(newimg);
System.out.println("map 4 ok");
mapModel.setValueAt(newPlayerIcon, client.x, client.y);
mapTable.setModel(mapModel);
mapTable.setGridColor(Color.LIGHT_GRAY);
mapTable.setRowHeight(125);
for (int i = 0; i < mapTable.getColumnModel().getColumnCount(); i++) {
TableColumn column = mapTable.getColumnModel().getColumn(i);
column.setPreferredWidth(125);
}
mapTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
mapTable.setPreferredScrollableViewportSize(mapTable.getPreferredSize());
......@@ -2378,7 +2386,7 @@ public class MainPage extends javax.swing.JFrame {
tradeboxTable.setModel(tradeboxModel);
tradeboxTable.setRowHeight(100);
Action delete = new AbstractAction()
Action tradeAct = new AbstractAction()
{
public void actionPerformed(ActionEvent e)
{
......@@ -2399,7 +2407,7 @@ public class MainPage extends javax.swing.JFrame {
}
}
};
ButtonColumn buttonColumn = new ButtonColumn(tradeboxTable, delete, 4);
ButtonColumn buttonColumn = new ButtonColumn(tradeboxTable, tradeAct, 4);
buttonColumn.setMnemonic(KeyEvent.VK_D);
} else {
showMessage("Tradebox Error. Try again later..");
......@@ -2507,12 +2515,15 @@ public class MainPage extends javax.swing.JFrame {
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
// for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
// if ("Nimbus".equals(info.getName())) {
// javax.swing.UIManager.setLookAndFeel(info.getClassName());
// break;
// }
// }
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(MainPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
......
<<<<<<< HEAD
#Fri, 24 Apr 2015 15:40:25 +0700
=======
#Fri, 24 Apr 2015 15:40:37 +0700
>>>>>>> e4457f5f5bf18c35d13041513c5e876949f2ae72
C\:\\Users\\Stephen\\Documents\\NetBeansProjects\\TubesSister\\src\\server=
C\:\\Users\\susanti_2\\Documents\\ITB\\IF\\netbeans\\IF3230-Tugas-Besar-Sister-2015\\src\\server=
compile.on.save=true
<<<<<<< HEAD
=======
>>>>>>> e4457f5f5bf18c35d13041513c5e876949f2ae72
do.depend=false
do.jar=true
javac.debug=true
javadoc.preview=true
<<<<<<< HEAD
user.properties.file=C:\\Users\\susanti_2\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties
=======
user.properties.file=C:\\Users\\Stephen\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties
>>>>>>> e4457f5f5bf18c35d13041513c5e876949f2ae72
......@@ -3,8 +3,12 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<<<<<<< HEAD
<file>file:/C:/Users/susanti_2/Documents/ITB/IF/netbeans/IF3230-Tugas-Besar-Sister-2015/src/server/src/tcpserver/TCPServer.java</file>
=======
<file>file:/C:/Users/Stephen/Documents/NetBeansProjects/TubesSister/src/server/src/tcpserver/TCPServer.java</file>
<file>file:/C:/Users/Stephen/Documents/NetBeansProjects/TubesSister/src/server/src/tcpserver/MySQLAccess.java</file>
>>>>>>> e4457f5f5bf18c35d13041513c5e876949f2ae72
</group>
</open-files>
</project-private>
......@@ -40,6 +40,7 @@ public class TCPServer implements Runnable {
serverPort = 6789;
serverClientSocket = new ServerSocket(serverPort);
servers = new ArrayList<Host>();
thisIP = "167.205.34.248";
sql = new MySQLAccess();
findOfferTimes = new String[10];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment