Re: ComboBox: TestEditor to ListView binding

2014-07-04 Thread Kirill Kirichenko

I'm implementing a searchbox.
In the textfield of the combobox I'm typing a search string. 
textProperty of the editor has an onChange listener which forms a list 
of strings that contain the text as a substring. Then I set this list of 
strings as a content of the drop down list of the combobox.
The problem is when I start selecting items in the drop down list the 
editor field gets updated making new substring search and updating the 
list again.
I want to break this dependency. I don't want to update the text 
property when I select an item in the drop down list OR I want to 
distinguish in the textProperty listener what caused that event - real 
editing the field or setting the field trough binding from the list view.


I hope I could make myself clear.
K

On 05.07.2014 01:21, Stephen F Northover wrote:

Hi Kirill,

What exactly are you trying to do?  The following (crap) listens for the
value to change and then sets it back:

 ChangeListener l = new ChangeListener () {
 public void changed(ObservableValue observable, String
oldValue,
 String newValue) {
 System.out.println("attempt to set new value: " +
newValue);
 Platform.runLater(() -> {
 comboBox3.valueProperty().removeListener(this);
 System.out.println("restoring old value: " +
newValue);
 comboBox3.setValue(oldValue);
 comboBox3.valueProperty().addListener(this);
 });
 };
 };
 comboBox3.valueProperty().addListener(l);

This is not good code because it adds and removes a listener to avoid
notification when the value is reset.  It uses runLater() in order to
stop the combo box from getting confused when the value is changed from
within a changed listener.

Steve


On 2014-07-04, 3:09 PM, Kirill Kirichenko wrote:

JavaFX ComboBox has binding between TextEdit field and the ListView
selection such that edit field gets updated when we change the
selected item in the drop down list.
Is there a way to break this binding - when we select an item in the
list the editor field remains untouched. Where should I look at ?


Thanks.
K




Re: ComboBox: TestEditor to ListView binding

2014-07-04 Thread Stephen F Northover

Hi Kirill,

What exactly are you trying to do?  The following (crap) listens for the 
value to change and then sets it back:


ChangeListener l = new ChangeListener () {
public void changed(ObservableValue observable, String 
oldValue,

String newValue) {
System.out.println("attempt to set new value: " + 
newValue);

Platform.runLater(() -> {
comboBox3.valueProperty().removeListener(this);
System.out.println("restoring old value: " + newValue);
comboBox3.setValue(oldValue);
comboBox3.valueProperty().addListener(this);
});
};
};
comboBox3.valueProperty().addListener(l);

This is not good code because it adds and removes a listener to avoid 
notification when the value is reset.  It uses runLater() in order to 
stop the combo box from getting confused when the value is changed from 
within a changed listener.


Steve


On 2014-07-04, 3:09 PM, Kirill Kirichenko wrote:
JavaFX ComboBox has binding between TextEdit field and the ListView 
selection such that edit field gets updated when we change the 
selected item in the drop down list.
Is there a way to break this binding - when we select an item in the 
list the editor field remains untouched. Where should I look at ?



Thanks.
K




ComboBox: TestEditor to ListView binding

2014-07-04 Thread Kirill Kirichenko
JavaFX ComboBox has binding between TextEdit field and the ListView 
selection such that edit field gets updated when we change the selected 
item in the drop down list.
Is there a way to break this binding - when we select an item in the 
list the editor field remains untouched. Where should I look at ?



Thanks.
K


hg: openjfx/8u-dev/rt: 2 new changesets

2014-07-04 Thread yves . joan
Changeset: 1f4a206cca0c
Author:yjoan
Date:  2014-07-04 17:10 +0200
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/1f4a206cca0c

[SCENEBUILDER] DTL-6702 KIT : LibraryPanelController.setDisplayMode() breaks 
and raises an NPE

! 
apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/library/LibraryPanelController.java

Changeset: 26573bfa3a11
Author:yjoan
Date:  2014-07-04 17:12 +0200
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/26573bfa3a11

[SCENEBUILDER] (partial) DTL-6760 Make so that Controller classes of Kit can be 
instantiated while FX is not initialized

! 
apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/css/CssPanelController.java



hg: openjfx/8u-dev/rt: [SCENEBUILDER] Updated Metadata.java so that properties like "prefViewportWidth" land

2014-07-04 Thread eric . le . ponner
Changeset: c369d4c75688
Author:eric.le.pon...@oracle.com
Date:  2014-07-04 15:13 +0200
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/c369d4c75688

[SCENEBUILDER] Updated Metadata.java so that properties like 
"prefViewportWidth" land
in the "Specific" section (in place of the "Size" section).

! 
apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/metadata/Metadata.java



hg: openjfx/8u-dev/rt: [SCENEBUILDER] - removed Font value in ContentPanel.fxml causing occurence of RT-37787

2014-07-04 Thread mo . chicharro
Changeset: 80bf831cecd8
Author:mchicharro
Date:  2014-07-04 13:22 +0100
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/80bf831cecd8

[SCENEBUILDER] - removed Font value in ContentPanel.fxml causing occurence of 
RT-37787

! 
apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/css/ThemeDark.css
! 
apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/css/Theme.css
! 
apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/content/ContentPanel.fxml



hg: openjfx/8u-dev/rt: [SCENEBUILDER] Filx DTL-6731: Improve preferences robustness

2014-07-04 Thread sandra . lions-piron
Changeset: d2b1db134148
Author:slions
Date:  2014-07-04 11:19 +0200
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/d2b1db134148

[SCENEBUILDER] Filx DTL-6731: Improve preferences robustness

! 
apps/scenebuilder/SceneBuilderApp/src/com/oracle/javafx/scenebuilder/app/preferences/PreferencesRecordDocument.java



hg: openjfx/8u-dev/rt: 3 new changesets

2014-07-04 Thread eric . le . ponner
Changeset: 55296da24ffd
Author:eric.le.pon...@oracle.com
Date:  2014-07-03 18:59 +0200
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/55296da24ffd

[SCENEBUILDER] Aligned Metadata.java with JRE 1.8.0_20-ea-b21

! 
apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/metadata/Metadata.java

Changeset: f6fdf541549e
Author:eric.le.ponner 
Date:  2014-07-04 11:03 +0200
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/f6fdf541549e

[SCENEBUILDER] Updated metadata with a better description of SubScene.
SubScene.userAgentStylesheet is now displayed in Inspector.

! 
apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/metadata/Metadata.java

Changeset: ed229384f325
Author:eric.le.pon...@oracle.com
Date:  2014-07-04 11:04 +0200
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/ed229384f325

[SCENEBUILDER] merge (no conflict).




hg: openjfx/8u-dev/rt: [SCENEBUILDER] Fix :

2014-07-04 Thread sandra . lions-piron
Changeset: 7a891475618c
Author:slions
Date:  2014-07-04 10:42 +0200
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/7a891475618c

[SCENEBUILDER] Fix :
DTL-6739: [TreeView] TreeView scrolls when selected in SceneBuilder (regression)
DTL-6711: Vertical spacing of Hierarchy items changes height when different 
nodes are selected.

! 
apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/css/Theme.css
! 
apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/hierarchy/AbstractHierarchyPanelController.java
! 
apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/hierarchy/HierarchyTaskScheduler.java
! 
apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/hierarchy/treeview/HierarchyTreeCell.java
! 
apps/scenebuilder/SceneBuilderKit/src/com/oracle/javafx/scenebuilder/kit/editor/panel/hierarchy/treeview/HierarchyTreeViewController.java



hg: openjfx/8u-dev/rt: RT-37576 “tickLableRotation” property can not work as expected

2014-07-04 Thread martin . sladecek
Changeset: a2afbc47aaea
Author:Martin Sladecek 
Date:  2014-07-04 10:03 +0200
URL:   http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/a2afbc47aaea

RT-37576 “tickLableRotation” property can not work as expected
Reviewed by: dgrieve

! modules/controls/src/main/java/javafx/scene/chart/Axis.java



8u40 API proposal: ScrollPane's minViewportWidth/minViewportHeight

2014-07-04 Thread Martin Sladecek

Hello,
I propose to add 2 additional properties to ScrollPane: 
minViewportHeight and minViewportWidth.
They should work the same way as prefViewportWidth/prefViewportHeight, 
specifying the minimum size for the viewport, not ScrollPane as a whole.


JIRA: https://javafx-jira.kenai.com/browse/RT-37407
webrev: http://cr.openjdk.java.net/~msladecek/rt-37407/webrev.00/

Thanks,
-Martin