cyclus / cyclist2

Cyclist2
Other
1 stars 12 forks source link

Add entry for lifetime on every facility at userlevel > 0 #110

Closed gonuke closed 9 years ago

gonuke commented 9 years ago

my first PR from 30,000 ft!

gonuke commented 9 years ago

The only thing missing is that I don't test that it's an integer, which the schema probably expects?

FlanFlanagan commented 9 years ago

Looks good Paul. We can probably add the integer check after? Or we can use my number only text field for this as well.

gonuke commented 9 years ago

Can you point me to the number only text field?

FlanFlanagan commented 9 years ago

I thought I extended the class but I guess not.

This code should do the trick when building the text field.

        TextField isoWeightFrac = new TextField(){
            @Override public void replaceText(int start, int end, String text) {
                if (!text.matches("[a-z]")){
                    super.replaceText(start, end, text);
                }
            }

            public void replaceSelection(String text) {
                if (!text.matches("[a-z]")){
                    super.replaceSelection(text);
                }
            }
        };
FlanFlanagan commented 9 years ago

sorry that bottom bit of code is superfluous. Just need

    TextField isoWeightFrac = new TextField(){
        @Override public void replaceText(int start, int end, String text) {
            if (!text.matches("[a-z]")){
                super.replaceText(start, end, text);
            }
        }
    };
gonuke commented 9 years ago

hold on whitespace....

gonuke commented 9 years ago

whitespace updated...

FlanFlanagan commented 9 years ago

Is this ready paul?

gonuke commented 9 years ago

one sec... switching to context menus as part of this

gonuke commented 9 years ago

ready now

gonuke commented 9 years ago

crap!! wrong PR hold on

gonuke commented 9 years ago

Nope.. it's OK. You already merged #111. The last few commits are more related to that, so this should be good to go on top of that merge.