Package com.meapsoft.gui.widgets

Examples of com.meapsoft.gui.widgets.ComposerLabel


    {
      //sniff out the composers first
      Vector composers = sniffForClasses("com.meapsoft.composers", "com.meapsoft.composers.Composer");
     
      //save a place for the default label here
      ComposerLabel defaultLabel = null;
     
      //iterate and create our composer labels
        for(int i = 0; i < composers.size(); i++)
        {
          //get the name
          String name = composers.get(i).toString();
         
          //create the composer label here and add it
          ComposerLabel lbl = new ComposerLabel(name, this);

          //if it is the sort composer, select this value
          if(lbl.getName().equals("Simple Sort"))
          {
            defaultLabel = lbl;
          }
         
          //add this to the list model
View Full Code Here


    ////////////////////////////////////////////////////////////////////////
    public void initSettingPanelColors(boolean flag)
    {
      for(int i = 0; i < mListModel.size(); i++)
      {
        ComposerLabel lbl = (ComposerLabel)mListModel.get(i);
       
        Color panelColor = flag ? this.getColor() : null;
        GUIUtils.initContainerColor(lbl.getSettingsPanel(), panelColor);
      }
    }
View Full Code Here

    // valueChanged() - when the value gets changed
    ////////////////////////////////////////////////////////////////////////
  public void valueChanged(ListSelectionEvent e)
  {
    //get the selected value here
    ComposerLabel lbl = (ComposerLabel)mComposerList.getSelectedValue();

    //set the description
    mDescriptionLbl.setText(lbl.getDescription());
   
    //remove all the old settings first
    mSettingsWrapper.removeAll();
   
    //get the settings panel
    ComposerSettingsPanel settingsPanel = lbl.getSettingsPanel();
   
    //try to do all this here
    try
    {
      //make the settings label visible
      mSettingsLbl.setVisible(true);
     
      //add this new panel
      mSettingsWrapper.add(settingsPanel);
     
      //give this panel a size
      settingsPanel.setSize(500, 300);
     
      //if we don't have any components, get rid
      //of the settings label, so the user does
      //not think they made a mistake
      if(settingsPanel.getComponentCount() == 0)
      {
        mSettingsLbl.setVisible(false);
      }
    }
    catch(Exception ex)
    {
      System.out.println("\n\n\nBUMMER!\n\n\n");
      ex.printStackTrace();
      GUIUtils.ShowDialog(ex, lbl.getName() + " does not have a settings panel", GUIUtils.MESSAGE, mMainScreen)
    }
   
    //do all our repainting here
    mSettingsWrapper.validate();
    mSettingsWrapper.invalidate();
View Full Code Here

    // run() - actually does all the work here
    ////////////////////////////////////////////////////////////////////////
    public synchronized int run()
    {
    //get the selected value here
    ComposerLabel lbl = (ComposerLabel)mComposerList.getSelectedValue();
 
    //get the settings panel
    ComposerSettingsPanel settingsPanel = lbl.getSettingsPanel();
   
    //create a composer to work with here
    Composer composer;
   
    //initialize the composer here
    //we should always have a settings panel for each composer
    try
    {
      //initialze the composer here
      int error = settingsPanel.initComposer();
     
      //if we have an error, return
      if(error == -1)
      {
        return -1;
      }
     
      composer = settingsPanel.getComposer();
    }
    catch(Exception e)
    {
      GUIUtils.ShowDialog(e, lbl.getName() + " does not have a settings panel", GUIUtils.MESSAGE, mMainScreen)
      return -1;
    }

    //get the slider value
        double crossfade = (double)mFadeSlider.getValue()/1000;
View Full Code Here

TOP

Related Classes of com.meapsoft.gui.widgets.ComposerLabel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.