Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
vadere
vadere
Commits
fd353205
Commit
fd353205
authored
Dec 13, 2016
by
Jakob Schöttl
Browse files
Fix and simplify code
parent
0ecc2ddd
Changes
4
Hide whitespace changes
Inline
Side-by-side
VadereGui/src/org/vadere/gui/topographycreator/control/ActionInsertCopiedElement.java
View file @
fd353205
...
...
@@ -9,7 +9,6 @@ import javax.swing.undo.UndoableEditSupport;
import
org.vadere.gui.topographycreator.model.AgentWrapper
;
import
org.vadere.gui.topographycreator.model.IDrawPanelModel
;
import
org.vadere.state.attributes.Attributes
;
import
org.vadere.state.scenario.ScenarioElement
;
import
org.vadere.util.geometry.shapes.VCircle
;
import
org.vadere.util.geometry.shapes.VPoint
;
...
...
@@ -24,7 +23,7 @@ public class ActionInsertCopiedElement extends TopographyAction {
private
static
final
long
serialVersionUID
=
5049099647921341318L
;
private
final
UndoableEditSupport
undoSupport
;
public
ActionInsertCopiedElement
(
final
String
name
,
final
IDrawPanelModel
model
,
public
ActionInsertCopiedElement
(
final
String
name
,
final
IDrawPanelModel
<?>
model
,
final
UndoableEditSupport
undoSupport
)
{
super
(
name
,
model
);
this
.
undoSupport
=
undoSupport
;
...
...
@@ -32,7 +31,7 @@ public class ActionInsertCopiedElement extends TopographyAction {
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
IDrawPanelModel
model
=
getScenarioPanelModel
();
IDrawPanelModel
<?>
model
=
getScenarioPanelModel
();
ScenarioElement
elementToCopy
=
model
.
getCopiedElement
();
if
(
elementToCopy
==
null
)
{
...
...
VadereGui/src/org/vadere/gui/topographycreator/control/TopographyAction.java
View file @
fd353205
...
...
@@ -15,19 +15,19 @@ import org.vadere.gui.topographycreator.model.IDrawPanelModel;
public
abstract
class
TopographyAction
extends
AbstractAction
{
private
static
final
long
serialVersionUID
=
7643236418545161283L
;
private
final
IDrawPanelModel
panelModel
;
private
final
IDrawPanelModel
<?>
panelModel
;
public
TopographyAction
(
final
String
name
,
final
ImageIcon
icon
,
final
IDrawPanelModel
panelModel
)
{
public
TopographyAction
(
final
String
name
,
final
ImageIcon
icon
,
final
IDrawPanelModel
<?>
panelModel
)
{
super
(
name
,
icon
);
this
.
panelModel
=
panelModel
;
}
public
TopographyAction
(
final
String
name
,
final
IDrawPanelModel
panelModel
)
{
public
TopographyAction
(
final
String
name
,
final
IDrawPanelModel
<?>
panelModel
)
{
super
(
name
);
this
.
panelModel
=
panelModel
;
}
protected
IDrawPanelModel
getScenarioPanelModel
()
{
protected
IDrawPanelModel
<?>
getScenarioPanelModel
()
{
return
panelModel
;
}
}
VadereGui/src/org/vadere/gui/topographycreator/model/TopographyCreatorModel.java
View file @
fd353205
...
...
@@ -340,8 +340,6 @@ public class TopographyCreatorModel extends DefaultModel implements IDrawPanelMo
return
getSelectedElement
().
getShape
().
translatePrecise
(
alignToGrid
(
vector
));
}
// can return null!
@Override
public
int
getBoundId
()
{
return
boundId
;
...
...
VadereState/src/org/vadere/state/scenario/Agent.java
View file @
fd353205
...
...
@@ -65,9 +65,9 @@ public abstract class Agent extends DynamicElement {
this
.
setTargets
(
new
LinkedList
<>(
other
.
targetIds
));
this
.
setNextTargetListIndex
(
other
.
nextTargetListIndex
);
this
.
setP
osition
(
other
.
position
)
;
this
.
setV
elocity
(
other
.
velocity
)
;
this
.
setF
reeFlowSpeed
(
other
.
freeFlowSpeed
)
;
this
.
p
osition
=
other
.
position
;
this
.
v
elocity
=
other
.
velocity
;
this
.
f
reeFlowSpeed
=
other
.
freeFlowSpeed
;
}
public
LinkedList
<
Integer
>
getTargets
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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