Package datasoul.serviceitems

Examples of datasoul.serviceitems.ServiceItem


                    first = false;
                }else{
                sb.append(",");
                }
               
                ServiceItem si = (ServiceItem) o;
                sb.append("{");
                sb.append("\n");
                sb.append(si.getJSon());
                sb.append("\n");
                sb.append("}");
                sb.append("\n");
            }
        }
View Full Code Here


    public void updateStartTimes() {

        int offset = startHour * 60 + startMinute;
        for (Object o : objectList) {
            if (o instanceof ServiceItem) {
                ServiceItem si = (ServiceItem) o;
                si.setStartHour(offset / 60);
                si.setStartMinute(offset % 60);
                offset += si.getDuration();
            }
        }

        tableModelChanged();

View Full Code Here

        }

        public Object getValueAt(int rowIndex, int columnIndex) {
            Object object = ServiceListTable.this.objectList.get(rowIndex);
            if (object instanceof ServiceItem) {
                ServiceItem si = (ServiceItem) object;
                switch (columnIndex) {
                    case COLUMN_TIME:
                        return si.getStartTime();
                    case COLUMN_DURATION:
                        return si.getDuration();
                    case COLUMN_TITLE:
                        return si.getTitle();
                    case COLUMN_NOTES:
                        return si.getNotes();
                    case COLUMN_TEMPLATE:
                        return si.getTemplate();
                }
                return si;
            } else {
                return null;
            }
View Full Code Here

        public void setValueAt(Object aValue, int rowIndex, int columnIndex) {

            Object object = ServiceListTable.this.objectList.get(rowIndex);
            if (object instanceof ServiceItem) {
                ServiceItem si = (ServiceItem) object;
                switch (columnIndex) {
                    case COLUMN_DURATION:
                        try {
                            int i = Integer.parseInt(aValue.toString());
                            si.setDuration(Integer.toString(i));
                            updateStartTimes();
                        } catch (Exception e) {
                            JOptionPane.showMessageDialog(null, java.util.ResourceBundle.getBundle("datasoul/internationalize").getString("INVALID VALUE"));
                        }
                        break;
                    case COLUMN_NOTES:
                        si.setNotes(aValue.toString());
                        break;
                    case COLUMN_TEMPLATE:
                        si.setTemplate(aValue.toString());
                        ObjectManager.getInstance().getDatasoulMainForm().previewItem();
                        break;
                }
            }
View Full Code Here

        try {
            ObjectManager.getInstance().setBusyCursor();

            if (tableServiceList.getSelectedRow() != -1) {
                ServiceItem item = (ServiceItem) ServiceListTable.getActiveInstance().getServiceItem(tableServiceList.getSelectedRow());
                if (ObjectManager.getInstance().getPreviewPanel() != null) {
                    ObjectManager.getInstance().getPreviewPanel().previewItem(item);
                }
            }
        } finally {
View Full Code Here

    private void btnEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditActionPerformed
        if (tableServiceList.getSelectedRow() == -1) {
            return;
        }

        ServiceItem item = (ServiceItem) ServiceListTable.getActiveInstance().getServiceItem(tableServiceList.getSelectedRow());
        item.edit();

    }//GEN-LAST:event_btnEditActionPerformed
View Full Code Here

        t.addCell(createHeaderCell(java.util.ResourceBundle.getBundle("datasoul/internationalize").getString("NOTES")));
       
       
        for (int i=0; i<slt.getRowCount(); i++){
           
            ServiceItem si = (ServiceItem) slt.getServiceItem(i);
            Cell c;

            // Start time
            c = new Cell(si.getStartTime());
            c.setMaxLines(1);
            c.setVerticalAlignment(Cell.ALIGN_MIDDLE);
            c.setHorizontalAlignment(Cell.ALIGN_CENTER);
            t.addCell(c);
           
            // Duration
            c = new Cell(Integer.toString(si.getDuration()));
            c.setMaxLines(1);
            c.setVerticalAlignment(Cell.ALIGN_MIDDLE);
            c.setHorizontalAlignment(Cell.ALIGN_RIGHT);
            t.addCell(c);
           
            // Title
            c = new Cell(si.getTitle());
            c.setVerticalAlignment(Cell.ALIGN_MIDDLE);
            t.addCell(c);

            // Notes
            c = new Cell(si.getNotes());
            c.setVerticalAlignment(Cell.ALIGN_MIDDLE);
            t.addCell(c);

        }
       
View Full Code Here

    }

    @Override
    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
        TemplateComboBox cbRet;
        ServiceItem item = (ServiceItem) ServiceListTable.getActiveInstance().getServiceItem(row);
        if (item instanceof ImageListServiceItem) {
            cbRet = cbImage;
        } else if (item instanceof Song) {
            cbRet = cbSong;
        } else if (item instanceof TextServiceItem) {
View Full Code Here

}//GEN-LAST:event_cbLyricsActionPerformed

    private void exportSlides(String fileName) throws FileNotFoundException, DocumentException, Exception{

        // Determine width and height. Use from the template for the first item
        ServiceItem item = ServiceListTable.getActiveInstance().getServiceItem(0);
        if (item == null)
            return;

        DisplayTemplate firstTemplate = TemplateManager.getInstance().newDisplayTemplate(item.getTemplate());
        int width = firstTemplate.getWidth();
        int height = firstTemplate.getHeight();


        // Create output
View Full Code Here

    }//GEN-LAST:event_btnGoLiveActionPerformed

    public void goLive(boolean startAtLastSlide){
        try{
            ObjectManager.getInstance().setBusyCursor();
            ServiceItem previewItem = ObjectManager.getInstance().getPreviewPanel().serviceItemTable1.getServiceItem();
            ObjectManager.getInstance().getLivePanel().showItem(previewItem, startAtLastSlide);
            ObjectManager.getInstance().getDatasoulMainForm().showDisplayControls();
        }finally{
            ObjectManager.getInstance().setDefaultCursor();
        }       
View Full Code Here

TOP

Related Classes of datasoul.serviceitems.ServiceItem

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.