Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stephen
IF3230-Tugas-Besar-Sister-2015
Commits
a4902c8a
Commit
a4902c8a
authored
Apr 25, 2015
by
Stephen
Browse files
Merged
parents
8a8d9b00
112c506c
Changes
12
Hide whitespace changes
Inline
Side-by-side
src/client/nbproject/private/private.properties
View file @
a4902c8a
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
src/client/nbproject/private/private.xml
View file @
a4902c8a
...
...
@@ -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>
src/client/src/tcpclient/MainPage.form
View file @
a4902c8a
...
...
@@ -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=
"1
55
"
max=
"32767"
attributes=
"0"
/>
<EmptySpace
pref=
"1
67
"
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>
...
...
src/client/src/tcpclient/MainPage.java
View file @
a4902c8a
...
...
@@ -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
,
1
55
,
Short
.
MAX_VALUE
)
.
addPreferredGap
(
javax
.
swing
.
LayoutStyle
.
ComponentPlacement
.
RELATED
,
1
67
,
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
)
{
...
...
src/client/src/tcpclient/images/player.png
View replaced file @
8a8d9b00
View file @
a4902c8a
32.6 KB
|
W:
|
H:
91 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/server/build/built-jar.properties
View file @
a4902c8a
<<<<<<<
HEAD
#Fri, 24 Apr 2015 15:40:25 +0700
=======
#Fri, 24 Apr 2015 15:40:37 +0700
>>>>>>>
e4457f5f5bf18c35d13041513c5e876949f2ae72
C\:\\Users\\
Stephen
\\Documents\\
N
et
B
eans
Projects\\Tubes
Sister\\src\\
server
=
C\:\\Users\\
susanti_2
\\Documents\\
ITB\\IF\\n
et
b
eans
\\IF3230-Tugas-Besar-
Sister
-2015
\\src\\
server
=
src/server/build/classes/tcpserver/TCPServer.class
View file @
a4902c8a
No preview for this file type
src/server/dist/TCPServer.jar
View file @
a4902c8a
No preview for this file type
src/server/dist/lib/p2psockets-core-1.1.2.jar
0 → 100644
View file @
a4902c8a
File added
src/server/nbproject/private/private.properties
View file @
a4902c8a
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
src/server/nbproject/private/private.xml
View file @
a4902c8a
...
...
@@ -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>
src/server/src/tcpserver/TCPServer.java
View file @
a4902c8a
...
...
@@ -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
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment