Ignore:
Timestamp:
05/09/08 09:31:42 (16 years ago)
Author:
ra33
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/FrameUtils.java

    r21 r22  
    580580                                UserSettings.Threading = getBoolean(item,
    581581                                                UserSettings.Threading);
     582                        } else if (ItemUtils.isTag(item, "@ColorWheel")) {
     583                                Item.COLOR_WHEEL = getColorWheel(item);
     584                        } else if (ItemUtils.isTag(item, "@BackgroundColorWheel")) {
     585                                Item.FILL_COLOR_WHEEL = getColorWheel(item);
    582586                        }
    583587                }
     
    586590                        UserSettings.FirstFrame = profile.getFrameName();
    587591
     592        }
     593
     594        private static Color[] getColorWheel(Item item) {
     595                String childName = item.getAbsoluteLink();
     596                if (childName != null) {
     597                        Frame child = FrameIO.LoadFrame(childName);
     598                        if (child != null) {
     599                                List<Text> textItems = child.getBodyTextItems(true);
     600                                Color[] colorList = new Color[textItems.size()];
     601                                for (int i = 0; i < textItems.size(); i++) {
     602                                        colorList[i] = textItems.get(i).getColor();
     603                                }
     604                                return colorList;
     605                        }
     606                }
     607                return new Color[]{Color.black, Color.white};
    588608        }
    589609
Note: See TracChangeset for help on using the changeset viewer.