Package com.projity.graphic.configuration

Examples of com.projity.graphic.configuration.SpreadSheetFieldArray


  public static void setFieldsAndContext(SpreadSheet ss
      ,NodeModelCache cache
      ,String spreadSheetCategory
      ,String spreadSheetId
      ,boolean leftAssociation) {
    SpreadSheetFieldArray fields = (SpreadSheetFieldArray) Dictionary.get(spreadSheetCategory, Messages.getString(spreadSheetId));
    ss.setCache(cache, fields, fields.getCellStyle(), fields.getActionList());
    FieldContext fieldContext = new FieldContext();
    fieldContext.setLeftAssociation(leftAssociation);
    ((SpreadSheetModel) ss.getModel()).setFieldContext(fieldContext);
    ((SpreadSheetModel) ss.getModel()).getCache().update();
  }
View Full Code Here


    }
   
   
    cache=NodeModelCacheFactory.getInstance().createDefaultCache(assignmentModel,pool,NodeModelCache.ASSIGNMENT_TYPE,"AssignmentEntry",transformerClosure);
    SpreadSheetFieldArray fields=getFields();
    spreadSheet.setCache(cache,fields,fields.getCellStyle(),fields.getActionList());
   
    // set widths of these columns explicitly
    if (!replace) { //TODO width should come from definition in xml, not hard coded here
//      spreadSheet.getColumnModel().getColumn(REQUEST_DEMAND_TYPE_COLUMN).setPreferredWidth(50);
      spreadSheet.getColumnModel().getColumn(UNITS_COLUMN).setPreferredWidth(50);
View Full Code Here

  }


  public void init(){
    if (spreadsheetWorkspace != null) {
      fieldArray = new SpreadSheetFieldArray();
      fieldArray.setCategory(SpreadSheetCategories.taskSpreadsheetCategory);
      fieldArray.restoreWorkspace(spreadsheetWorkspace, SavableToWorkspace.PERSIST);
      fieldArray.setName("PrintSettings");
      //Dictionary.add(fieldArray);
    }
View Full Code Here

         
        };
    spreadSheet.setSpreadSheetCategory(spreadsheetCategory); // for columns - must do first
   
    SpreadSheetFieldArray fields=getFields();
    if (((ResourcePool)document).isMaster()){
      fields=(SpreadSheetFieldArray)fields.clone();
      fields.removeField("Field.userRole"); //$NON-NLS-1$
    }
    spreadSheet.setCache(cache,fields,fields.getCellStyle(),fields.getActionList());
    ((SpreadSheetModel)spreadSheet.getModel()).setFieldContext(fieldContext);
    spreadSheet.setReadOnly(readOnly);
  }
View Full Code Here

      public boolean isNodeDeletable(Node node) {
        return !(node.getImpl() instanceof Resource); // only delete resource on res list
      }};
    spreadSheet.setSpreadSheetCategory((taskUsage)?taskAssignmentSpreadsheetCategory:resourceAssignmentSpreadsheetCategory); // for columns.  must do first
    SpreadSheetFieldArray fields = getFields();
    spreadSheet.setCache(cache, fields, fields.getCellStyle(),fields.getActionList());
    ((SpreadSheetModel) spreadSheet.getModel()).setFieldContext(fieldContext);

    cache.update(); //this is not required by certain views

    if (project.isReadOnly())
View Full Code Here

  }

  protected JScrollPane createRightScrollPane() {
    timeSpreadSheet = new TimeSpreadSheet(project);
    timeSpreadSheet.setSpreadSheetCategory(timeSpreadsheetCategory);
    SpreadSheetFieldArray fields = getDistributionFields();
    timeSpreadSheet.setCache(cache, fields, fields.getCellStyle(),fields.getActionList());
    ((TimeSpreadSheetModel) timeSpreadSheet.getModel()).addFieldArrayListener(this);

    timeScrollPane = new ScaledScrollPane(timeSpreadSheet, coord, documentFrame,timeSpreadSheet.getRowHeight());
    timeSpreadSheet.createDefaultColumnsFromModel();
//    timeSpreadSheet.revalidate();
View Full Code Here

  public void createSpreadsheet(NodeModel model){
        spreadSheet = new SpreadSheet();
    spreadSheet.setSpreadSheetCategory(spreadsheetCategory); // for columns - must do first
   
    cache=NodeModelCacheFactory.getInstance().createDefaultCache(model,document,NodeModelCache.PROJECT_TYPE,getViewName(),null);
    SpreadSheetFieldArray fields=getFields();
    spreadSheet.setCache(cache,fields,fields.getCellStyle(),fields.getActionList());

    JViewport viewport = createViewport();
    viewport.setView(spreadSheet);
    setViewport(viewport);
   
View Full Code Here

    protected JScrollPane createLeftScrollPane() {
        spreadSheet = new SpreadSheet();
        spreadSheet.setName(project.getName());
    spreadSheet.setSpreadSheetCategory(spreadsheetCategory); // for columns.  Must do first
    SpreadSheetFieldArray fields=getFields();
    if (project.getFieldArray() != null) {
      fields = project.getFieldArray();
    }
    spreadSheet.setCache(cache,fields,fields.getCellStyle(),fields.getActionList());
    if (project.getFieldArray() != null)
      spreadSheet.setFieldArrayWithWidths(fields);
    ((SpreadSheetModel)spreadSheet.getModel()).setFieldContext(fieldContext);
    project.removeScheduleListener(this); // in case was already attached and recreating (applet)
    project.addScheduleListener(this);
View Full Code Here

TOP

Related Classes of com.projity.graphic.configuration.SpreadSheetFieldArray

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.