use of net.sf.sdedit.drawable.Fragment in project abstools by abstools.
the class FragmentManager method openFragments.
/**
* Creates {@linkplain Fragment} objects for all pending fragment labels in
* {@linkplain #getFragmentLabels()} and adds them to the list of open
* fragments.
*/
public void openFragments() {
finishFragments();
for (String fragment : fragmentLabels) {
if (fragment.startsWith("[c")) {
fragment = fragment.substring(2, fragment.length() - 1).trim();
}
if (fragment.length() > 0 && fragment.charAt(0) == ':') {
fragment = fragment.substring(1);
int s = fragment.indexOf(' ');
if (s == -1) {
openFragment(fragment, "");
} else {
String type = fragment.substring(0, s);
String name = fragment.substring(s + 1);
openFragment(type, name);
}
} else {
openFragment("", fragment);
}
}
if (fragmentSectionLabel != null) {
Fragment recent = getRecentFragment();
if (recent != null) {
recent.addSection(fragmentSectionLabel);
}
}
}
Aggregations