trojanrob
Newbie
Poland
Joined: Apr 17, 2013
Post Count: 6
Status:
Offline
|
|
Re: How to get unique index furniture that is displayed in the panel ?
|
Sorry, but I don't see what you mean by "unique index". By the way, it would be nice to explain also what is your project.
Hi,
I want use SH3D to create simple 2D plan, put on it my objects. Add new atributes to objects. Set added attributes and export all to my application (BMS for small houses) under android.
It's generally.
No problem to add 2D objects. No problem to add additional attributes to objects.
I added two attributes : - Type of function - Number of nod
When the user changes these two attributes (in HomeFurniturePanel)I have to check whether the combination of these two attributes is unique in entire plan of the house.
When checking objects on the plan, I do not know which object is edited
private boolean isNrNoda(Integer typFunkcji, Integer nrNoda) { for (PieceOfFurniture piece : this.home.getFurniture()) { if (piece.getTypFunkcji()!=null) { if (typFunkcji.equals(piece.getTypFunkcji())) { if (nrNoda.equals(piece.getNrNoda())) { JOptionPane.showMessageDialog(null, "In this type of function already is nod nr = "+nrNoda); return true; } } } } return false; }
Sorry for my english.
best regards Robert
|
[May 5, 2013, 5:12:42 PM]
|
|
[Link]
|
|