Mercurial > hg > Applications > tvnjviewer
changeset 16:cc9fdda7d22e
add Share botton
author | sugi |
---|---|
date | Sat, 18 Oct 2014 21:51:15 +0900 |
parents | e28c17afa0e9 |
children | 61d95bdc2bdb |
files | build.gradle src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java src/viewer_swing/resources/com/glavsoft/viewer/images/button-share.png |
diffstat | 3 files changed, 26 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/build.gradle Sun Sep 28 11:59:14 2014 +0900 +++ b/build.gradle Sat Oct 18 21:51:15 2014 +0900 @@ -1,5 +1,6 @@ apply plugin:'java' apply plugin: 'eclipse' +apply plugin: 'maven' sourceCompatibility = 1.8 targetCompatibility = 1.8 @@ -7,7 +8,7 @@ project.ext.baseName = 'tightvnc-jviewer' def buildNo = processBuildNo(version) - +group = 'com.glavsoft.viewer' defaultTasks 'clean', 'dist' configurations { @@ -31,6 +32,9 @@ } repositories { + maven(){ + url 'http://www.cr.ie.u-ryukyu.ac.jp/hg/maven/raw-file/cd1aa6cb6d9d/' + } flatDir { dirs 'src/libs/' } @@ -38,7 +42,8 @@ dependencies { compile fileTree(dir: 'src/libs', include: '*.jar') - + compile group: 'cr.ie.u_ryukyu.ac.jp', name: 'Alice', version: '1.0', ext: 'jar' + viewerSwingCompile group: 'cr.ie.u_ryukyu.ac.jp', name: 'Alice', version: '1.0', ext: 'jar' viewerSwingCompile group: 'com.jcraft', name: 'jsch', version: '0.1.+', ext: 'jar' viewerSwingRuntime configurations.viewerSwingCompile } @@ -72,17 +77,20 @@ } artifacts { - archives file('src/web/viewer-applet-example.html') - archives noSshJar + //archives file('src/web/viewer-applet-example.html') + //archives noSshJar +} + +ext { + mavenRepository = System.getenv()['HOME']+'/workspace/maven' } uploadArchives { repositories { - add(new org.apache.ivy.plugins.resolver.FileSystemResolver()) { - addArtifactPattern("$projectDir/dist/${project.baseName}-${project.version}/[artifact].[ext]") + mavenDeployer { + repository(url: uri(mavenRepository)) } } - uploadDescriptor = false } task dist(dependsOn: uploadArchives)
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Sun Sep 28 11:59:14 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Sat Oct 18 21:51:15 2014 +0900 @@ -24,6 +24,8 @@ package com.glavsoft.viewer.swing; +import alice.datasegment.DataSegment; + import com.glavsoft.core.SettingsChangedEvent; import com.glavsoft.rfb.IChangeSettingsListener; import com.glavsoft.rfb.client.KeyEventMessage; @@ -40,6 +42,7 @@ import javax.swing.border.BevelBorder; import javax.swing.border.Border; import javax.swing.border.EmptyBorder; + import java.awt.*; import java.awt.event.*; import java.util.LinkedList; @@ -799,6 +802,14 @@ } }); kbdButtons.add(altButton); + + JButton screenButton = buttonsBar.createButton("share", "Share my screen", new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + DataSegment.getLocal().put("Request", "Request"); + } + }); + kbdButtons.add(screenButton); ModifierButtonEventListener modifierButtonListener = new ModifierButtonEventListener(); modifierButtonListener.addButton(KeyEvent.VK_CONTROL, ctrlButton);