Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #30780 > unrolled thread

Returning to Java - have questions

Started byJerry Stuckle <jstucklex@attglobal.net>
First post2015-01-21 23:06 -0500
Last post2015-01-25 15:33 -0500
Articles 20 on this page of 78 — 6 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-21 23:06 -0500
    Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-22 06:48 -0500
      Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-22 09:07 -0500
        Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-22 09:41 -0500
          Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-22 11:11 -0500
            Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-22 20:06 -0500
              Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-22 20:59 -0500
                Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-22 21:18 -0500
                  Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-22 21:47 -0500
                    Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-23 08:08 -0500
                      Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-23 08:27 -0500
                      Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-23 09:41 -0500
                      Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-23 09:59 -0500
                        Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-23 10:52 -0500
                          Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-23 11:49 -0500
                            Re: Returning to Java - have questions FredK <fred.l.kleinschmidt@gmail.com> - 2015-01-23 14:26 -0800
                              Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-23 19:27 -0500
                                Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-23 19:52 -0500
                                  Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-23 20:12 -0500
                                  Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-23 20:47 -0500
                                    Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 07:28 -0500
                                      Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 07:40 -0500
                                        Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 08:04 -0500
                                          Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 09:05 -0500
                                            Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 09:10 -0500
                                            Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 10:34 -0500
                                              Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 10:34 -0500
                                          Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 10:11 -0500
                                            Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 10:35 -0500
                                              Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 10:56 -0500
                                                Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 11:47 -0500
                                                  Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 11:51 -0500
                                                    Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 11:57 -0500
                                                      Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 12:00 -0500
                                                        Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 15:29 -0500
                                          Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 10:32 -0500
                                            Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 10:57 -0500
                                        Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 10:31 -0500
                                          Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 10:58 -0500
                                      Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 10:31 -0500
                                        Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 10:59 -0500
                                    Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 09:36 -0500
                                      Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 10:38 -0500
                                        Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 10:36 -0500
                                          Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 10:46 -0500
                                            Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 11:49 -0500
                                              Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 11:52 -0500
                                                Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 11:58 -0500
                                                  Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 11:58 -0500
                                                    Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 15:30 -0500
                                          Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 11:49 -0500
                                            Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 11:49 -0500
                                              Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 11:58 -0500
                                                Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 12:01 -0500
                                                  Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 15:30 -0500
                                                    Re: Returning to Java - have questions Gene Wirchenko <genew@telus.net> - 2015-01-26 09:18 -0800
                                                      Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-26 13:09 -0500
                                                        Re: Returning to Java - have questions Gene Wirchenko <genew@telus.net> - 2015-01-26 11:22 -0800
                                                          Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-26 14:44 -0500
                                Re: Returning to Java - have questions FredK <fred.l.kleinschmidt@gmail.com> - 2015-01-26 12:00 -0800
                                  Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-26 15:18 -0500
                Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-22 21:26 -0500
                  Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-22 21:48 -0500
                    Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 11:00 -0500
        Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-22 09:49 -0500
          Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-22 10:11 -0500
          Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-22 11:12 -0500
            Re: Returning to Java - have questions Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 11:01 -0500
              Re: Returning to Java - have questions Brixomatic <brixomatic@yahoo.com> - 2015-01-25 22:49 +0100
                Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 16:58 -0500
                  Re: Returning to Java - have questions Gene Wirchenko <genew@telus.net> - 2015-01-26 09:19 -0800
                    Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-26 13:10 -0500
                      Re: Returning to Java - have questions Gene Wirchenko <genew@telus.net> - 2015-01-26 11:23 -0800
                        Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-26 14:45 -0500
    Re: Returning to Java - have questions Silvio <silvio@internet.com> - 2015-01-22 13:25 +0100
      Re: Returning to Java - have questions Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-22 09:09 -0500
    WORKALIKES (was: Returning to Java - have questions) Jeff Higgins <jeff@invalid.invalid> - 2015-01-25 13:03 -0500
      Re: WORKALIKES Jerry Stuckle <jstucklex@attglobal.net> - 2015-01-25 15:33 -0500

Page 2 of 4 — ← Prev page 1 [2] 3 4  Next page →


#30854

FromJeff Higgins <jeff@invalid.invalid>
Date2015-01-25 07:28 -0500
Message-ID<ma2nn1$pd4$1@dont-email.me>
In reply to#30832
On 01/23/2015 08:47 PM, Jerry Stuckle wrote:
> On 1/23/2015 7:52 PM, Jeff Higgins wrote:
>> On 01/23/2015 07:27 PM, Jerry Stuckle wrote:
>>> On 1/23/2015 5:26 PM, FredK wrote:
>>>> On Friday, January 23, 2015 at 8:49:33 AM UTC-8, Jerry Stuckle wrote:
>>>>> On 1/23/2015 10:52 AM, Jeff Higgins wrote:
>>>>>> On 01/23/2015 09:59 AM, Jerry Stuckle wrote:
>>>>>>> On 1/23/2015 8:08 AM, Jeff Higgins wrote:
>>>>>>>> On 01/22/2015 09:47 PM, Jerry Stuckle wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Which has nothing to do with the look of a button when it is
>>>>>>>>> pushed.
>>>>>>>>>
>>>>>>>> <http://mail.openjdk.java.net/pipermail/openjfx-dev/2013-February/005874.html>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Maybe future iterations will give you public behaviors?
>>>>>>>>
>>>>>>>
>>>>>>> You really don't understand.  This has NOTHING to do with skins.  In
>>>>>>> swing it was very easy to set both the pressed and released images
>>>>>>> via
>>>>>>> the button's properties.  With JavaFX you can only set the pressed
>>>>>>> image
>>>>>>> via CSS.
>>>>>>
>>>>>> OK, I'm glad you've got it sorted out.
>>>>>> So, you're now convinced there is one way to accomplish what you want.
>>>>>> That is not the way you want to doit.
>>>>>> Maybe file a feature request?
>>>>>> Anyway, happy to help.
>>>>>>
>>>>>
>>>>> No, your updates all along have shown you have no idea what I'm talking
>>>>> about.  I appreciate your attempts to help, but you haven't
>>>>> understood a
>>>>> word I've said.
>>>>>
>>>>> But you can prove me wrong.  Show me how I can change the pressed image
>>>>> if a Button object without using CSS.  It has to work wither using the
>>>>> mouse or keyboard (including accelerator keys - IOW, every way a button
>>>>> may be pressed).
>>>>>
>>>>> In Swing, it's as simple as calling JButton.setPressedIcon(), passing
>>>>> the pressed image (an ImageIcon object).
>>>>>
>>>>>>>
>>>>>>> I see this as a step backwards.
>>>>
>>>> Try this:
>>>> Call button.setOnMousePressed() to register a callback for the press.
>>>> In that callback method, call button.setGraphic() to set the new image.
>>>>
>>>
>>> Fred, unfortunately, that only works for mouse clicks.  It doesn't help
>>> with keyboard entry (which could be the space bar or an accelerator key).
>>>
>> InputEvent.ANY
>
> And how does that help?  How does it indicate whether the input event
> causes the button to be pressed or not, for instance?
>
> How about some code which shows what you're claiming will work?
>
> And then let's see you make it as easy as calling JButton.setPressedIcon().
>

Looking in the CSS reference I see Node CSS Pseudo-class - pressed.
I'm assuming this is the pressed that you refer to when you say,
"It seems with fx the only way you can change the button when
it's pressed/not pressed is via css."

I'm guessing this Node.pressedProperty is what is changed when
you refer to pressed in css.

     Button.pressedProperty().addListener(new ChangeListener<Boolean>() {
       @Override
       public void changed(ObservableValue<? extends Boolean> observable,
           Boolean oldValue, Boolean newValue) {
         // ...
       }
     });
Please correct me if I am wrong.

[toc] | [prev] | [next] | [standalone]


#30855

FromJeff Higgins <jeff@invalid.invalid>
Date2015-01-25 07:40 -0500
Message-ID<ma2ocb$rhj$1@dont-email.me>
In reply to#30854
So it looks like you want Button.armed.
But who really knows.



import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class HelloWorld extends Application {

   @Override
   public void start(Stage primaryStage) {
     Button btn = new Button();
     btn.setText("Say 'Hello World'");

     btn.pressedProperty().addListener(new ChangeListener<Boolean>() {
       @Override
       public void changed(ObservableValue<? extends Boolean> observable,
           Boolean oldValue, Boolean newValue) {
         System.out.println("Button Pressed");
       }
     });

     btn.armedProperty().addListener(new ChangeListener<Boolean>() {
       @Override
       public void changed(ObservableValue<? extends Boolean> observable,
           Boolean oldValue, Boolean newValue) {
         System.out.println("Button Armed");
       }
     });

     btn.setOnAction(new EventHandler<ActionEvent>() {

       @Override
       public void handle(ActionEvent event) {
         System.out.println("Hello World!");
       }
     });

     StackPane root = new StackPane();
     root.getChildren().add(btn);

     Scene scene = new Scene(root, 300, 250);

     primaryStage.setTitle("Hello World!");
     primaryStage.setScene(scene);
     primaryStage.show();
   }

   public static void main(String[] args) {
     launch(args);
   }
}

[toc] | [prev] | [next] | [standalone]


#30856

FromJeff Higgins <jeff@invalid.invalid>
Date2015-01-25 08:04 -0500
Message-ID<ma2pq3$nr$1@dont-email.me>
In reply to#30855
On 01/25/2015 07:40 AM, Jeff Higgins wrote:

Works for me.

import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.image.ImageView;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class HelloWorld extends Application {

   @Override
   public void start(Stage primaryStage) {
     Button btn = new Button();
     btn.setText("Say 'Hello World'");

     btn.armedProperty().addListener(new ChangeListener<Boolean>() {
       @Override
       public void changed(ObservableValue<? extends Boolean> observable,
           Boolean oldValue, Boolean newValue) {
         if(oldValue == false && newValue == true) {
           btn.setGraphic(new 
ImageView("file:///home/jeff/32px-Bomb_icon.png"));
         }
         if(oldValue == true && newValue == false){
           btn.setGraphic(null);
         }
       }
     });

     StackPane root = new StackPane();
     root.getChildren().add(btn);

     Scene scene = new Scene(root, 300, 250);

     primaryStage.setTitle("Hello World!");
     primaryStage.setScene(scene);
     primaryStage.show();
   }

   public static void main(String[] args) {
     launch(args);
   }
}

[toc] | [prev] | [next] | [standalone]


#30857

FromJeff Higgins <jeff@invalid.invalid>
Date2015-01-25 09:05 -0500
Message-ID<ma2tbh$eqk$1@dont-email.me>
In reply to#30856
This does not work on this machine.
Must be a lookfeel or platform issue.

So, for at least this machine the JavaFX  solution is better.


import java.awt.EventQueue;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;

public class Scratch extends JFrame {

   public Scratch() {

     JButton btn = new JButton("Hello World");
     btn.setPressedIcon(new ImageIcon("/home/jeff/32px-Bomb_icon.svg.png"));

     add(btn);
     pack();
     setTitle("Scratch");
     setSize(300, 200);
     setDefaultCloseOperation(EXIT_ON_CLOSE);
   }

   public static void main(String[] args) {

     EventQueue.invokeLater(new Runnable() {
       @Override
       public void run() {
         new Scratch().setVisible(true);
       }
     });
   }
}

[toc] | [prev] | [next] | [standalone]


#30858

FromJeff Higgins <jeff@invalid.invalid>
Date2015-01-25 09:10 -0500
Message-ID<ma2tlo$ftd$1@dont-email.me>
In reply to#30857
Plus there is always the javafx.embed.swing.SwingNode solution.
But that doesn't work on this machine either for whatever reason.

[toc] | [prev] | [next] | [standalone]


#30865

FromJerry Stuckle <jstucklex@attglobal.net>
Date2015-01-25 10:34 -0500
Message-ID<ma32d0$44a$4@dont-email.me>
In reply to#30857
On 1/25/2015 9:05 AM, Jeff Higgins wrote:
> This does not work on this machine.
> Must be a lookfeel or platform issue.
> 
> So, for at least this machine the JavaFX  solution is better.
>

It works on every machine I've tested.  No idea what your problem is.

And I have yet to see a JavaFX solution which works *correctly* without
using CSS.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#30867

FromJeff Higgins <jeff@invalid.invalid>
Date2015-01-25 10:34 -0500
Message-ID<ma32iv$4qm$2@dont-email.me>
In reply to#30865
On 01/25/2015 10:34 AM, Jerry Stuckle wrote:
> On 1/25/2015 9:05 AM, Jeff Higgins wrote:
>> This does not work on this machine.
>> Must be a lookfeel or platform issue.
>>
>> So, for at least this machine the JavaFX  solution is better.
>>
>
> It works on every machine I've tested.  No idea what your problem is.
>
> And I have yet to see a JavaFX solution which works *correctly* without
> using CSS.
>
You haven't provided an example that I can run that demonstrates correct.

[toc] | [prev] | [next] | [standalone]


#30860

FromJeff Higgins <jeff@invalid.invalid>
Date2015-01-25 10:11 -0500
Message-ID<ma3180$vid$1@dont-email.me>
In reply to#30856
On 01/25/2015 08:04 AM, Jeff Higgins wrote:
>
> Works for me.
>
Actually, this is better.

import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.image.ImageView;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class HelloWorld extends Application {

   @Override
   public void start(Stage primaryStage) {
     Button btn = new Button();
     btn.setText("Say 'Hello World'");
     btn.setGraphic(new ImageView("file:///home/jeff/bomb_fuse_unlit.png"));

     btn.armedProperty().addListener(new ChangeListener<Boolean>() {
       @Override
       public void changed(ObservableValue<? extends Boolean> observable,
           Boolean oldValue, Boolean newValue) {
         if(oldValue == false && newValue == true) {
           btn.setGraphic(new 
ImageView("file:///home/jeff/bomb_fuse_lit.png"));
         }
         if(oldValue == true && newValue == false){
           btn.setGraphic(new 
ImageView("file:///home/jeff/bomb_fuse_unlit.png"));
         }
       }
     });

     StackPane root = new StackPane();
     root.getChildren().add(btn);

     Scene scene = new Scene(root, 300, 250);

     primaryStage.setTitle("Hello World!");
     primaryStage.setScene(scene);
     primaryStage.show();
   }

   public static void main(String[] args) {
     launch(args);
   }
}

[toc] | [prev] | [next] | [standalone]


#30866

FromJerry Stuckle <jstucklex@attglobal.net>
Date2015-01-25 10:35 -0500
Message-ID<ma32eo$44a$5@dont-email.me>
In reply to#30860
On 1/25/2015 10:11 AM, Jeff Higgins wrote:
> On 01/25/2015 08:04 AM, Jeff Higgins wrote:
>>
>> Works for me.
>>
> Actually, this is better.
>

You're hung up on "armed" - which is NOT the same as "pressed".  See the
doc.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#30871

FromJeff Higgins <jeff@invalid.invalid>
Date2015-01-25 10:56 -0500
Message-ID<ma33si$b36$1@dont-email.me>
In reply to#30866
On 01/25/2015 10:35 AM, Jerry Stuckle wrote:
> On 1/25/2015 10:11 AM, Jeff Higgins wrote:
>> On 01/25/2015 08:04 AM, Jeff Higgins wrote:
>>>
>>> Works for me.
>>>
>> Actually, this is better.
>>
>
> You're hung up on "armed" - which is NOT the same as "pressed".  See the
> doc.
>
You haven't provided an example that demonstrates the difference.

[toc] | [prev] | [next] | [standalone]


#30877

FromJerry Stuckle <jstucklex@attglobal.net>
Date2015-01-25 11:47 -0500
Message-ID<ma36lr$nqr$1@dont-email.me>
In reply to#30871
On 1/25/2015 10:56 AM, Jeff Higgins wrote:
> On 01/25/2015 10:35 AM, Jerry Stuckle wrote:
>> On 1/25/2015 10:11 AM, Jeff Higgins wrote:
>>> On 01/25/2015 08:04 AM, Jeff Higgins wrote:
>>>>
>>>> Works for me.
>>>>
>>> Actually, this is better.
>>>
>>
>> You're hung up on "armed" - which is NOT the same as "pressed".  See the
>> doc.
>>
> You haven't provided an example that demonstrates the difference.
> 

Read the documentation on "armed".

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#30881

FromJeff Higgins <jeff@invalid.invalid>
Date2015-01-25 11:51 -0500
Message-ID<ma3740$pg2$2@dont-email.me>
In reply to#30877
On 01/25/2015 11:47 AM, Jerry Stuckle wrote:
> On 1/25/2015 10:56 AM, Jeff Higgins wrote:
>> On 01/25/2015 10:35 AM, Jerry Stuckle wrote:
>>> On 1/25/2015 10:11 AM, Jeff Higgins wrote:
>>>> On 01/25/2015 08:04 AM, Jeff Higgins wrote:
>>>>>
>>>>> Works for me.
>>>>>
>>>> Actually, this is better.
>>>>
>>>
>>> You're hung up on "armed" - which is NOT the same as "pressed".  See the
>>> doc.
>>>
>> You haven't provided an example that demonstrates the difference.
>>
>
> Read the documentation on "armed".
>
It turns out you've misunderstood and now cannot admit it.

[toc] | [prev] | [next] | [standalone]


#30883

FromJerry Stuckle <jstucklex@attglobal.net>
Date2015-01-25 11:57 -0500
Message-ID<ma3795$qm8$1@dont-email.me>
In reply to#30881
On 1/25/2015 11:51 AM, Jeff Higgins wrote:
> On 01/25/2015 11:47 AM, Jerry Stuckle wrote:
>> On 1/25/2015 10:56 AM, Jeff Higgins wrote:
>>> On 01/25/2015 10:35 AM, Jerry Stuckle wrote:
>>>> On 1/25/2015 10:11 AM, Jeff Higgins wrote:
>>>>> On 01/25/2015 08:04 AM, Jeff Higgins wrote:
>>>>>>
>>>>>> Works for me.
>>>>>>
>>>>> Actually, this is better.
>>>>>
>>>>
>>>> You're hung up on "armed" - which is NOT the same as "pressed".  See
>>>> the
>>>> doc.
>>>>
>>> You haven't provided an example that demonstrates the difference.
>>>
>>
>> Read the documentation on "armed".
>>
> It turns out you've misunderstood and now cannot admit it.
> 

Now you're just trolling.  You haven't even looked up the difference in
the doc - or you would understand.

Go away, troll.  Don't bother me any more.


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#30887

FromJeff Higgins <jeff@invalid.invalid>
Date2015-01-25 12:00 -0500
Message-ID<ma37kj$rtg$2@dont-email.me>
In reply to#30883
On 01/25/2015 11:57 AM, Jerry Stuckle wrote:
> On 1/25/2015 11:51 AM, Jeff Higgins wrote:
>> On 01/25/2015 11:47 AM, Jerry Stuckle wrote:
>>> On 1/25/2015 10:56 AM, Jeff Higgins wrote:
>>>> On 01/25/2015 10:35 AM, Jerry Stuckle wrote:
>>>>> On 1/25/2015 10:11 AM, Jeff Higgins wrote:
>>>>>> On 01/25/2015 08:04 AM, Jeff Higgins wrote:
>>>>>>>
>>>>>>> Works for me.
>>>>>>>
>>>>>> Actually, this is better.
>>>>>>
>>>>>
>>>>> You're hung up on "armed" - which is NOT the same as "pressed".  See
>>>>> the
>>>>> doc.
>>>>>
>>>> You haven't provided an example that demonstrates the difference.
>>>>
>>>
>>> Read the documentation on "armed".
>>>
>> It turns out you've misunderstood and now cannot admit it.
>>
>
> Now you're just trolling.  You haven't even looked up the difference in
> the doc - or you would understand.
>
> Go away, troll.  Don't bother me any more.
>
>
Too bad you you will not share you knowledge with the group.
Very unkind.

What is the difference Jerry?

[toc] | [prev] | [next] | [standalone]


#30896

FromJerry Stuckle <jstucklex@attglobal.net>
Date2015-01-25 15:29 -0500
Message-ID<ma3jlu$ivo$1@dont-email.me>
In reply to#30887
On 1/25/2015 12:00 PM, Jeff Higgins wrote:
> On 01/25/2015 11:57 AM, Jerry Stuckle wrote:
>> On 1/25/2015 11:51 AM, Jeff Higgins wrote:
>>> On 01/25/2015 11:47 AM, Jerry Stuckle wrote:
>>>> On 1/25/2015 10:56 AM, Jeff Higgins wrote:
>>>>> On 01/25/2015 10:35 AM, Jerry Stuckle wrote:
>>>>>> On 1/25/2015 10:11 AM, Jeff Higgins wrote:
>>>>>>> On 01/25/2015 08:04 AM, Jeff Higgins wrote:
>>>>>>>>
>>>>>>>> Works for me.
>>>>>>>>
>>>>>>> Actually, this is better.
>>>>>>>
>>>>>>
>>>>>> You're hung up on "armed" - which is NOT the same as "pressed".  See
>>>>>> the
>>>>>> doc.
>>>>>>
>>>>> You haven't provided an example that demonstrates the difference.
>>>>>
>>>>
>>>> Read the documentation on "armed".
>>>>
>>> It turns out you've misunderstood and now cannot admit it.
>>>
>>
>> Now you're just trolling.  You haven't even looked up the difference in
>> the doc - or you would understand.
>>
>> Go away, troll.  Don't bother me any more.
>>
>>
> Too bad you you will not share you knowledge with the group.
> Very unkind.
> 
> What is the difference Jerry?
> 

You can read the javadoc as well as anyone, troll.  But since you seem
to be too stoopid to look it up yourself (no surprise there - trolls
generally aren't very smart), here's the URL:

https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/ButtonBase.html#armedProperty

Are you smart enough to click on a link?

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#30863

FromJerry Stuckle <jstucklex@attglobal.net>
Date2015-01-25 10:32 -0500
Message-ID<ma32a2$44a$3@dont-email.me>
In reply to#30856
On 1/25/2015 8:04 AM, Jeff Higgins wrote:
> On 01/25/2015 07:40 AM, Jeff Higgins wrote:
> 
> Works for me.
> 

Except armed is not the same as pressed.  See the doc.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#30872

FromJeff Higgins <jeff@invalid.invalid>
Date2015-01-25 10:57 -0500
Message-ID<ma33ud$b36$2@dont-email.me>
In reply to#30863
On 01/25/2015 10:32 AM, Jerry Stuckle wrote:
> On 1/25/2015 8:04 AM, Jeff Higgins wrote:
>> On 01/25/2015 07:40 AM, Jeff Higgins wrote:
>>
>> Works for me.
>>
>
> Except armed is not the same as pressed.  See the doc.
>
Please provide an example that demonstrates the difference.

[toc] | [prev] | [next] | [standalone]


#30862

FromJerry Stuckle <jstucklex@attglobal.net>
Date2015-01-25 10:31 -0500
Message-ID<ma328h$44a$2@dont-email.me>
In reply to#30855
On 1/25/2015 7:40 AM, Jeff Higgins wrote:
> So it looks like you want Button.armed.

No, armed is not the same as pressed.

> But who really knows.
> 

Anyone who understands how buttons work.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#30873

FromJeff Higgins <jeff@invalid.invalid>
Date2015-01-25 10:58 -0500
Message-ID<ma33vk$b36$3@dont-email.me>
In reply to#30862
On 01/25/2015 10:31 AM, Jerry Stuckle wrote:
> On 1/25/2015 7:40 AM, Jeff Higgins wrote:
>> So it looks like you want Button.armed.
>
> No, armed is not the same as pressed.
>
>> But who really knows.
>>
>
> Anyone who understands how buttons work.
>
Please provide an example that demonstrates the difference.

[toc] | [prev] | [next] | [standalone]


#30861

FromJerry Stuckle <jstucklex@attglobal.net>
Date2015-01-25 10:31 -0500
Message-ID<ma326t$44a$1@dont-email.me>
In reply to#30854
On 1/25/2015 7:28 AM, Jeff Higgins wrote:
> On 01/23/2015 08:47 PM, Jerry Stuckle wrote:
>> On 1/23/2015 7:52 PM, Jeff Higgins wrote:
>>> On 01/23/2015 07:27 PM, Jerry Stuckle wrote:
>>>> On 1/23/2015 5:26 PM, FredK wrote:
>>>>> On Friday, January 23, 2015 at 8:49:33 AM UTC-8, Jerry Stuckle wrote:
>>>>>> On 1/23/2015 10:52 AM, Jeff Higgins wrote:
>>>>>>> On 01/23/2015 09:59 AM, Jerry Stuckle wrote:
>>>>>>>> On 1/23/2015 8:08 AM, Jeff Higgins wrote:
>>>>>>>>> On 01/22/2015 09:47 PM, Jerry Stuckle wrote:
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Which has nothing to do with the look of a button when it is
>>>>>>>>>> pushed.
>>>>>>>>>>
>>>>>>>>> <http://mail.openjdk.java.net/pipermail/openjfx-dev/2013-February/005874.html>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Maybe future iterations will give you public behaviors?
>>>>>>>>>
>>>>>>>>
>>>>>>>> You really don't understand.  This has NOTHING to do with
>>>>>>>> skins.  In
>>>>>>>> swing it was very easy to set both the pressed and released images
>>>>>>>> via
>>>>>>>> the button's properties.  With JavaFX you can only set the pressed
>>>>>>>> image
>>>>>>>> via CSS.
>>>>>>>
>>>>>>> OK, I'm glad you've got it sorted out.
>>>>>>> So, you're now convinced there is one way to accomplish what you
>>>>>>> want.
>>>>>>> That is not the way you want to doit.
>>>>>>> Maybe file a feature request?
>>>>>>> Anyway, happy to help.
>>>>>>>
>>>>>>
>>>>>> No, your updates all along have shown you have no idea what I'm
>>>>>> talking
>>>>>> about.  I appreciate your attempts to help, but you haven't
>>>>>> understood a
>>>>>> word I've said.
>>>>>>
>>>>>> But you can prove me wrong.  Show me how I can change the pressed
>>>>>> image
>>>>>> if a Button object without using CSS.  It has to work wither using
>>>>>> the
>>>>>> mouse or keyboard (including accelerator keys - IOW, every way a
>>>>>> button
>>>>>> may be pressed).
>>>>>>
>>>>>> In Swing, it's as simple as calling JButton.setPressedIcon(), passing
>>>>>> the pressed image (an ImageIcon object).
>>>>>>
>>>>>>>>
>>>>>>>> I see this as a step backwards.
>>>>>
>>>>> Try this:
>>>>> Call button.setOnMousePressed() to register a callback for the press.
>>>>> In that callback method, call button.setGraphic() to set the new
>>>>> image.
>>>>>
>>>>
>>>> Fred, unfortunately, that only works for mouse clicks.  It doesn't help
>>>> with keyboard entry (which could be the space bar or an accelerator
>>>> key).
>>>>
>>> InputEvent.ANY
>>
>> And how does that help?  How does it indicate whether the input event
>> causes the button to be pressed or not, for instance?
>>
>> How about some code which shows what you're claiming will work?
>>
>> And then let's see you make it as easy as calling
>> JButton.setPressedIcon().
>>
> 
> Looking in the CSS reference I see Node CSS Pseudo-class - pressed.
> I'm assuming this is the pressed that you refer to when you say,
> "It seems with fx the only way you can change the button when
> it's pressed/not pressed is via css."
> 
> I'm guessing this Node.pressedProperty is what is changed when
> you refer to pressed in css.
> 
>     Button.pressedProperty().addListener(new ChangeListener<Boolean>() {
>       @Override
>       public void changed(ObservableValue<? extends Boolean> observable,
>           Boolean oldValue, Boolean newValue) {
>         // ...
>       }
>     });
> Please correct me if I am wrong.
> 

Did you look at the doc?

"Whether or not the Node is pressed. Typically this is true when the
primary mouse button is down, though subclasses may define other mouse
button state or key state to cause the node to be "pressed"."

What is not clear is whether the Button class overrides this to include
keys.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


Page 2 of 4 — ← Prev page 1 [2] 3 4  Next page →

Back to top | Article view | comp.lang.java.programmer


csiph-web