This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This test add a changeListener on an ObjectProperty<ObservableList<Integer>> . | |
* When you change is observableList the changeListener isn't called. | |
*/ | |
@Test | |
public void changeListOnObjectProperty() { | |
ChangeListener<ObservableList<Integer>> changeListener = Mockito.mock(ChangeListener.class); | |
ObjectProperty<ObservableList<Integer>> myProperty = new SimpleObjectProperty<ObservableList<Integer>>(FXCollections.<Integer>observableArrayList()); | |
myProperty.addListener(changeListener); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This test add a changeListener on an ObjectProperty<ObservableList<Integer>> . | |
* When you change is observableList the changeListener isn't called. | |
*/ | |
@Test | |
public void changeListOnObjectProperty() { | |
ChangeListener<ObservableList<Integer>> changeListener = Mockito.mock(ChangeListener.class); | |
ObjectProperty<ObservableList<Integer>> myProperty = new SimpleObjectProperty<ObservableList<Integer>>(FXCollections.<Integer>observableArrayList()); | |
myProperty.addListener(changeListener); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void ListChangeListenerOnListProperty() { | |
ListChangeListener<Integer> listChangeListener = Mockito.mock(ListChangeListener.class); | |
ListProperty<Integer> listProperty = new SimpleListProperty<Integer>(FXCollections.<Integer>observableArrayList()); | |
listProperty.addListener(listChangeListener); | |
ArgumentCaptor<ListChangeListener.Change> argumentList = ArgumentCaptor.forClass(ListChangeListener.Change.class); | |
listProperty.add(42); | |
listProperty.setValue(FXCollections.<Integer>observableArrayList()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void ListChangeListenerOnListProperty() { | |
ListChangeListener<Integer> listChangeListener = Mockito.mock(ListChangeListener.class); | |
ListProperty<Integer> listProperty = new SimpleListProperty<Integer>(FXCollections.<Integer>observableArrayList()); | |
listProperty.addListener(listChangeListener); | |
ArgumentCaptor<ListChangeListener.Change> argumentList = ArgumentCaptor.forClass(ListChangeListener.Change.class); | |
listProperty.add(42); | |
listProperty.setValue(FXCollections.<Integer>observableArrayList()); | |
listProperty.add(42); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class App extends Application { | |
private ObjectProperty<ObservableList<Integer>> myProperty = new SimpleObjectProperty<ObservableList<Integer>>(FXCollections.<Integer>observableArrayList()); | |
private ListChangeListener<Integer> listChangeListener = new ListChangeListener<Integer>() { | |
@Override | |
public void onChanged(Change<? extends Integer> change) { | |
System.out.println("Call when you add an element to your list"); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void changeListOnObjectProperty() { | |
ChangeListener<ObservableList<Integer>> changeListener = Mockito.mock(ChangeListener.class); | |
ObjectProperty<ObservableList<Integer>> myProperty = new SimpleObjectProperty<ObservableList<Integer>>(FXCollections.<Integer>observableArrayList()); | |
myProperty.addListener(changeListener); | |
myProperty.set(FXCollections.<Integer>observableArrayList()); | |
ArgumentCaptor<ObservableList> argumentCaptorlistl1 = ArgumentCaptor.forClass(ObservableList.class); | |
ArgumentCaptor<ObservableList> argumentCaptorlistl2 = ArgumentCaptor.forClass(ObservableList.class); | |
ArgumentCaptor<ObservableValue> argumentCaptor3 = ArgumentCaptor.forClass(ObservableValue.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bundler could not find compatible versions for gem "activesupport": | |
In Gemfile: | |
meta_search (~> 1.1.3) ruby depends on | |
activesupport (~> 3.1) ruby | |
rails (= 4.0.2) ruby depends on | |
activesupport (4.0.2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
07-19 14:33:25.358 12035-12035/com.example.billey_b.xmppchat W/System.err﹕ org.jivesoftware.smack.SmackException$ConnectionException | |
07-19 14:33:25.358 12035-12035/com.example.billey_b.xmppchat W/System.err﹕ at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:431) | |
07-19 14:33:25.358 12035-12035/com.example.billey_b.xmppchat W/System.err﹕ at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:799) | |
07-19 14:33:25.358 12035-12035/com.example.billey_b.xmppchat W/System.err﹕ at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:391) | |
07-19 14:33:25.358 12035-12035/com.example.billey_b.xmppchat W/System.err﹕ at com.example.billey_b.xmppchat.MyActivity.connect(MyActivity.java:37) | |
07-19 14:33:25.358 12035-12035/com.example.billey_b.xmppchat W/System.err﹕ at com.example.billey_b.xmppchat.MyActivity.onCreate(MyActivity.java:27) | |
07-19 14:33:25.358 12035-12035/com.example.billey_b.xmppchat W/System.err﹕ at android.app.Activi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component | |
@Instantiate | |
public class ShiroActivator { | |
/** | |
* The famous {@link org.slf4j.Logger} | |
*/ | |
private static final Logger logger = LoggerFactory.getLogger(ShiroActivator.class); | |
/** | |
* initialize shiro, by adding some roles and users |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Route(method = HttpMethod.POST, uri = "/login") | |
public Result login(@Body User user) { | |
Subject currentUser = SecurityUtils.getSubject(); | |
UsernamePasswordToken token = new UsernamePasswordToken(user.getUsername(), user.getPassword()); | |
try { | |
currentUser.login(token); | |
} catch (UnknownAccountException uae) { | |
context().flash().error("Unknown account"); | |
return loginForm(); | |
} catch (IncorrectCredentialsException ice) { |
OlderNewer