litesoft
Diff Revisions
949
vs
950
for /trunk/Java/GWT/OldClient/src/org/litesoft/GWT/client/commands/PointToCommandMap.java
|
@@ -1,26 +1,26 @@ |
1 |
|
- |
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
|
- |
package org.litesoft.GWT.client.commands; |
3 |
|
- |
|
4 |
|
- |
import org.litesoft.core.simpletypes.*; |
5 |
|
- |
|
6 |
|
- |
import com.google.gwt.user.client.*; |
7 |
|
- |
|
8 |
|
- |
import java.util.*; |
9 |
|
- |
|
10 |
|
- |
public class PointToCommandMap { |
11 |
|
- |
private Map mPointToCommands = new HashMap(); |
12 |
|
- |
|
13 |
|
- |
public void put( PointXY pPoint, Command pCommand ) { |
14 |
|
- |
if ( pPoint != null ) { |
15 |
|
- |
if ( pCommand != null ) { |
16 |
|
- |
mPointToCommands.put( pPoint, pCommand ); |
17 |
|
- |
} else { |
18 |
|
- |
mPointToCommands.remove( pPoint ); |
19 |
|
- |
} |
20 |
|
- |
} |
21 |
|
- |
} |
22 |
|
- |
|
23 |
|
- |
public Command get( PointXY pPoint ) { |
24 |
|
- |
return (pPoint != null) ? (Command) mPointToCommands.get( pPoint ) : null; |
25 |
|
- |
} |
26 |
|
- |
} |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://unlicense.org |
|
2 |
+ |
package org.litesoft.GWT.client.commands; |
|
3 |
+ |
|
|
4 |
+ |
import org.litesoft.core.simpletypes.*; |
|
5 |
+ |
|
|
6 |
+ |
import com.google.gwt.user.client.*; |
|
7 |
+ |
|
|
8 |
+ |
import java.util.*; |
|
9 |
+ |
|
|
10 |
+ |
public class PointToCommandMap { |
|
11 |
+ |
private Map mPointToCommands = new HashMap(); |
|
12 |
+ |
|
|
13 |
+ |
public void put( PointXY pPoint, Command pCommand ) { |
|
14 |
+ |
if ( pPoint != null ) { |
|
15 |
+ |
if ( pCommand != null ) { |
|
16 |
+ |
mPointToCommands.put( pPoint, pCommand ); |
|
17 |
+ |
} else { |
|
18 |
+ |
mPointToCommands.remove( pPoint ); |
|
19 |
+ |
} |
|
20 |
+ |
} |
|
21 |
+ |
} |
|
22 |
+ |
|
|
23 |
+ |
public Command get( PointXY pPoint ) { |
|
24 |
+ |
return (pPoint != null) ? (Command) mPointToCommands.get( pPoint ) : null; |
|
25 |
+ |
} |
|
26 |
+ |
} |