This repository was archived by the owner on Jun 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +49
-4
lines changed
cacio-tta/src/main/java/com/github/caciocavallosilano/cacio/ctc Expand file tree Collapse file tree 3 files changed +49
-4
lines changed Original file line number Diff line number Diff line change 1212 - name : Set up JDK 17
1313 uses : actions/setup-java@v3
1414 with :
15- java-version : 17
15+ distribution : ' temurin'
16+ java-version : ' 17'
17+
1618 - name : Build Maven and copy output
1719 run : bash build_and_out.sh
1820
Original file line number Diff line number Diff line change 1+ package com .github .caciocavallosilano .cacio .ctc ;
2+
3+ import java .awt .peer .DesktopPeer ;
4+ import java .io .File ;
5+ import java .io .IOException ;
6+ import java .net .URI ;
7+ import java .awt .Desktop .Action ;
8+ import java .awt .desktop .AboutHandler ;
9+ import java .awt .desktop .QuitHandler ;
10+
11+ public class CTCDesktopPeer implements DesktopPeer {
12+ public boolean isSupported (Action action ) {
13+ switch (action ) {
14+ case APP_QUIT_HANDLER :
15+ case APP_ABOUT :
16+ return true ;
17+ default :
18+ return false ;
19+ }
20+ }
21+ public void setAboutHandler (final AboutHandler handler ) {
22+ // Stub
23+ }
24+ public void setQuitHandler (final QuitHandler handler ) {
25+ // Stub
26+ }
27+
28+ public void open (File file ) throws IOException {
29+ //openFile(file.getAbsolutePath());
30+ }
31+ public void edit (File file ) throws IOException {
32+ throw new IOException ("Action not supported" );
33+ }
34+ public void print (File file ) throws IOException {
35+ throw new IOException ("Action not supported" );
36+ }
37+ public void mail (URI mailtoURL ) throws IOException {
38+ throw new IOException ("Action not supported" );
39+ }
40+ public void browse (URI uri ) throws IOException {
41+ //openUri(uri.toString());
42+ }
43+ }
Original file line number Diff line number Diff line change @@ -150,14 +150,14 @@ public void ungrab(Window w) {
150150 @ Override
151151 public boolean isDesktopSupported () {
152152 // TODO Auto-generated method stub
153- return false ;
153+ return true ;
154154 }
155155
156156 @ Override
157157 public DesktopPeer createDesktopPeer (Desktop target )
158158 throws HeadlessException {
159159 // TODO Auto-generated method stub
160- return null ;
160+ return new CTCDesktopPeer () ;
161161 }
162162
163163 @ Override
@@ -226,6 +226,6 @@ public boolean isTranslucencyCapable(GraphicsConfiguration gc) {
226226
227227 @ Override
228228 public boolean isTaskbarSupported () {
229- return true ;
229+ return false ;
230230 }
231231}
You can’t perform that action at this time.
0 commit comments