Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » General (non-technical) » Polish users » [SWT] Minimalizacja tylko do ikony - jak?
[SWT] Minimalizacja tylko do ikony - jak? [message #653401] Wed, 09 February 2011 16:23 Go to next message
Mariusz P. is currently offline Mariusz P.Friend
Messages: 85
Registered: February 2010
Member
Jak w temacie. Potrzebuję zrobić minimalizację minimalizację tylko do ikony (koło zegarka) do tray'a (żeby aplikacja również znikała z paska zadań). Czy ktoś doradzi jak to zrobić w SWT? Z góry dziękuję.
Re: [SWT] Minimalizacja tylko do ikony - jak? [message #653460 is a reply to message #653401] Wed, 09 February 2011 20:30 Go to previous messageGo to next message
Tomasz Zarna is currently offline Tomasz ZarnaFriend
Messages: 172
Registered: July 2009
Senior Member
W takich przypadkach zawsze sprawdzam co ma to powiedzenia w temacie Lars: http://www.vogella.de/articles/EclipseRCP/article.html#syste mtray
Re: [SWT] Minimalizacja tylko do ikony - jak? [message #653498 is a reply to message #653460] Thu, 10 February 2011 00:32 Go to previous messageGo to next message
Mariusz P. is currently offline Mariusz P.Friend
Messages: 85
Registered: February 2010
Member
A bez zaprzęgania RCP nie da się tego zrobić?
Re: [SWT] Minimalizacja tylko do ikony - jak? [message #653568 is a reply to message #653498] Thu, 10 February 2011 09:44 Go to previous messageGo to next message
tomek is currently offline tomekFriend
Messages: 12
Registered: July 2009
Junior Member
Witam
zobacz to
http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Placeanico nwithapopupmenuonthesystemtray.htm
pozdrawiam
Re: [SWT] Minimalizacja tylko do ikony - jak? [message #653582 is a reply to message #653568] Thu, 10 February 2011 10:37 Go to previous messageGo to next message
Mariusz P. is currently offline Mariusz P.Friend
Messages: 85
Registered: February 2010
Member
To standardowy przykładowy snippet. Tak mam właśnie budowany Tray. Dlaczego myślisz, że to mi w czymś pomoże?
Re: [SWT] Minimalizacja tylko do ikony - jak? [message #653583 is a reply to message #653582] Thu, 10 February 2011 10:44 Go to previous messageGo to next message
tomek is currently offline tomekFriend
Messages: 12
Registered: July 2009
Junior Member
Witam
jak masz ten kod to nie rozumiem w czym masz problem
masz aplikacje z try icaon jak zamykasz okno to łapiesz akcje i nie zamykasz aplikacji tylko dajesz shell setVisible(false) i zostaje ci program w tray icon
pozdro
Re: [SWT] Minimalizacja tylko do ikony - jak? [message #653586 is a reply to message #653583] Thu, 10 February 2011 10:52 Go to previous messageGo to next message
Mariusz P. is currently offline Mariusz P.Friend
Messages: 85
Registered: February 2010
Member
Nigdzie nie napisałem, że chcę zamykać program do tray'a. Chcę go tylko tam minimalizować (a więc używać przycisku minimize, a nie close). Probowałem już z setVisible(false). Może coś źle robię, ale u mnie to po prostu nie działa Smile

[Updated on: Thu, 10 February 2011 10:58]

Report message to a moderator

Re: [SWT] Minimalizacja tylko do ikony - jak? [message #653611 is a reply to message #653586] Thu, 10 February 2011 12:09 Go to previous messageGo to next message
tomek is currently offline tomekFriend
Messages: 12
Registered: July 2009
Junior Member
Witam ok
zrób tak
shell.addShellListener(new ShellListener() {

@Override
public void shellIconified(ShellEvent e) {
// TODO Auto-generated method stub

}

@Override
public void shellDeiconified(ShellEvent e) {
// TODO Auto-generated method stub

}

@Override
public void shellDeactivated(ShellEvent e) {
System.out.println(e);
shell.setVisible(false);

}

@Override
public void shellClosed(ShellEvent e) {
// TODO Auto-generated method stub

}

@Override
public void shellActivated(ShellEvent e) {
// TODO Auto-generated method stub

}
});
u mnie to działa
tylko potem po nacisnieciu try icon musisz zrobic shell.setVisible (true)
pozdro
Re: [SWT] Minimalizacja tylko do ikony - jak? [message #653695 is a reply to message #653611] Thu, 10 February 2011 17:50 Go to previous message
Mariusz P. is currently offline Mariusz P.Friend
Messages: 85
Registered: February 2010
Member
Dzięki teraz działa. Po prostu nie wiedziałem, że muszę się dobrać do głównego komponentu typu Shell i tam nasłuchiwać zmian. Uparłem się jakoś, że wszystko powinno dać się załatwić spod Tray i TrayItem. To samo co post wyżej obrazuje przykład: http://www.java2s.com/Tutorial/Java/0280__SWT/ShellEvents.ht m

[Updated on: Thu, 10 February 2011 18:19]

Report message to a moderator

Previous Topic:Fedora 14 Web Page Editor - installation problem
Next Topic:Konfiguracja Run (na Tomcacie)
Goto Forum:
  


Current Time: Tue Mar 19 05:59:15 GMT 2024

Powered by FUDForum. Page generated in 0.01924 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top