Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
V
vadere
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
110
Issues
110
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
4
Merge Requests
4
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vadere
vadere
Commits
47471145
Commit
47471145
authored
Oct 26, 2018
by
Stefan Schuhbaeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add copy to clipboard action to outputTable
parent
6c45179a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
0 deletions
+57
-0
VadereGui/resources/messages.properties
VadereGui/resources/messages.properties
+1
-0
VadereGui/resources/messages_de_DE.properties
VadereGui/resources/messages_de_DE.properties
+1
-0
VadereGui/src/org/vadere/gui/projectview/control/ActionToClipboard.java
...org/vadere/gui/projectview/control/ActionToClipboard.java
+25
-0
VadereGui/src/org/vadere/gui/projectview/view/ProjectView.java
...eGui/src/org/vadere/gui/projectview/view/ProjectView.java
+30
-0
No files found.
VadereGui/resources/messages.properties
View file @
47471145
...
...
@@ -199,6 +199,7 @@ AdjustPanel.lblStep.text=Timestep
ProjectView.mntmOutputToSceneario.text
=
Generate scenario
ProjectView.mntmRunOutput.text
=
Run offline again
ProjectView.mntmCopyOutputDir.text
=
Copy output path to clipboard
SettingsDialog.chbShowPedestrianIds.text
=
Show PedestrianIds
PostVis.chShowEvacTimeColor.text
=
Color Pedestrians regarding to Evacuation Times
...
...
VadereGui/resources/messages_de_DE.properties
View file @
47471145
...
...
@@ -200,6 +200,7 @@ AdjustPanel.lblStep.text=Zeitschritt
ProjectView.mntmOutputToSceneario.text
=
Generiere Szenario
ProjectView.mntmRunOutput.text
=
Offline erneut starten
ProjectView.mntmCopyOutputDir.text
=
Kopiere Output Pfad in Zwischenablage
SettingsDialog.chbShowPedestrianIds.text
=
Fu
\u
00dfg
\u
00E4nger-Ids anzeigen
PostVis.additional.border.text
=
PostVis
...
...
VadereGui/src/org/vadere/gui/projectview/control/ActionToClipboard.java
0 → 100644
View file @
47471145
package
org.vadere.gui.projectview.control
;
import
java.awt.*
;
import
java.awt.datatransfer.Clipboard
;
import
java.awt.datatransfer.StringSelection
;
import
java.awt.event.ActionEvent
;
import
javax.swing.*
;
public
class
ActionToClipboard
extends
AbstractAction
{
String
data
;
public
ActionToClipboard
(
String
name
,
String
data
){
super
(
name
);
this
.
data
=
data
;
}
@Override
public
void
actionPerformed
(
ActionEvent
e
)
{
StringSelection
selection
=
new
StringSelection
(
data
);
Clipboard
clipboard
=
Toolkit
.
getDefaultToolkit
().
getSystemClipboard
();
clipboard
.
setContents
(
selection
,
selection
);
}
}
VadereGui/src/org/vadere/gui/projectview/view/ProjectView.java
View file @
47471145
...
...
@@ -28,6 +28,7 @@ import org.vadere.gui.projectview.control.ActionSaveAsProject;
import
org.vadere.gui.projectview.control.ActionSaveProject
;
import
org.vadere.gui.projectview.control.ActionSeeDiscardChanges
;
import
org.vadere.gui.projectview.control.ActionShowAboutDialog
;
import
org.vadere.gui.projectview.control.ActionToClipboard
;
import
org.vadere.gui.projectview.control.IOutputFileRefreshListener
;
import
org.vadere.gui.projectview.control.IProjectChangeListener
;
import
org.vadere.gui.projectview.control.ShowResultDialogAction
;
...
...
@@ -587,6 +588,35 @@ public class ProjectView extends JFrame implements ProjectFinishedListener, Sing
outputListPopupMenu
.
add
(
new
JMenuItem
(
new
ActionRunOutput
(
Messages
.
getString
(
"ProjectView.mntmRunOutput.text"
),
model
)));
JMenu
copyPath
=
new
JMenu
(
Messages
.
getString
(
"ProjectView.mntmCopyOutputDir.text"
));
outputTable
.
getSelectionModel
().
addListSelectionListener
(
new
TableSelectionListener
(
outputTable
)
{
@Override
public
void
onSelect
(
ListSelectionEvent
e
)
{
try
{
OutputBundle
bundle
=
model
.
getSelectedOutputBundle
();
File
outDir
=
bundle
.
getDirectory
();
copyPath
.
removeAll
();
copyPath
.
add
(
new
JMenuItem
(
new
ActionToClipboard
(
outDir
.
getName
()
+
"/"
,
outDir
.
getAbsolutePath
()))
);
File
[]
children
=
outDir
.
listFiles
();
if
(
children
!=
null
){
for
(
File
file
:
children
)
{
String
name
=
file
.
isDirectory
()
?
file
.
getName
()
+
"/"
:
file
.
getName
();
copyPath
.
add
(
new
JMenuItem
(
new
ActionToClipboard
(
name
,
file
.
getAbsolutePath
()))
);
}
}
}
catch
(
IOException
ex
)
{
logger
.
error
(
ex
);
}
}
});
outputListPopupMenu
.
add
(
copyPath
);
JPopupMenu
outputListPopupMenuMultiSelect
=
new
JPopupMenu
();
outputListPopupMenuMultiSelect
.
add
(
new
JMenuItem
(
deleteOutputFileAction
));
...
...
Write
Preview
Markdown
is supported
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