List of usage examples for java.awt Color LIGHT_GRAY
Color LIGHT_GRAY
To view the source code for java.awt Color LIGHT_GRAY.
Click Source Link
From source file:paquete.HollywoodUI.java
private void jLabel10MouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel10MouseMoved panel_opaque_delete.setBackground(Color.LIGHT_GRAY); this.panel_delete.setVisible(true); }
From source file:semaforo.Semaforo.java
public void setUp() { this.setTitle("Semaforo"); URL hj = getClass().getResource("resources/semaforo.png"); setIconImage(Toolkit.getDefaultToolkit().getImage(hj)); listener = new UpdateTableListener() { @Override/* w ww. ja v a 2 s. c om*/ public void addTickers() { // Add in Tickers Table Settings settings = Controller.getSettings(); synchronized (updateLock) { update = 1; } CustomRenderer cr = new CustomRenderer(TableTicker.getDefaultRenderer(Object.class), Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY); TableTicker.setDefaultRenderer(Object.class, cr); DefaultTableModel model = (DefaultTableModel) TableTicker.getModel(); Object[] o = new Object[2]; for (int i = model.getRowCount(); i < settings.getTickers().size(); i++) { o[0] = settings.getTickers().get(i).getName(); o[1] = 0; model.addRow(o); } // Resize the vector of values num_positions = Controller.getSettings().getTickers().size(); num_positions++; // Add in Week Tables CustomRenderer cr1 = new CustomRenderer(TableWeek1.getDefaultRenderer(Object.class), Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY); CustomRenderer cr2 = new CustomRenderer(TableWeek2.getDefaultRenderer(Object.class), Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY); CustomRenderer cr3 = new CustomRenderer(TableWeek3.getDefaultRenderer(Object.class), Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY); // Table Week 1 TableWeek1.setDefaultRenderer(Object.class, cr1); DefaultTableModel model1 = (DefaultTableModel) TableWeek1.getModel(); Object[] o1 = new Object[10]; // Table Week 2 TableWeek2.setDefaultRenderer(Object.class, cr2); DefaultTableModel model2 = (DefaultTableModel) TableWeek2.getModel(); Object[] o2 = new Object[10]; // Table Week 3 TableWeek3.setDefaultRenderer(Object.class, cr3); DefaultTableModel model3 = (DefaultTableModel) TableWeek3.getModel(); Object[] o3 = new Object[10]; for (int i = model1.getRowCount(); i < settings.getTickers().size(); i++) { model1.addRow(o1); model2.addRow(o2); model3.addRow(o3); } synchronized (updateLock) { update = 0; } } @Override public boolean canUpdate() { return update == 1; } @Override public void stopThread() { synchronized (updateLock) { update = 2; } } @Override public void updateTickers() { synchronized (updateLock) { Settings settings = Controller.getSettings(); update = 2; CustomRenderer cr = new CustomRenderer(TableTicker.getDefaultRenderer(Object.class), Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY); TableTicker.setDefaultRenderer(Object.class, cr); for (int i = 0; i < settings.getTickers().size(); i++) { TableTicker.setValueAt(settings.getTickers().get(i).getName(), i, 0); } update = 0; } } @Override public void updateVariables() { Settings settings = Controller.getSettings(); validate(); repaint(); timer.setDelay(settings.getVaribable(DDBB.RATIO_REFRESCO)); } @Override public void reomveTicker(int index) { synchronized (updateLock) { // Add in Tickers Table update = 2; DefaultTableModel model = (DefaultTableModel) TableTicker.getModel(); model.removeRow(index); // Remove row in Week Tables // Table Week 1 DefaultTableModel model1 = (DefaultTableModel) TableWeek1.getModel(); // Table Week 2 DefaultTableModel model2 = (DefaultTableModel) TableWeek2.getModel(); // Table Week 3 DefaultTableModel model3 = (DefaultTableModel) TableWeek3.getModel(); // Table Week 1 model1.removeRow(index); // Table Week 2 model2.removeRow(index); // Table Week 3 model3.removeRow(index); num_positions = Controller.getSettings().getTickers().size(); update = 0; } } }; Controller.setup(listener);/* = new Controller();*/ Settings settings = Controller.getSettings(); num_positions = Controller.getSettings().getTickers().size(); loadTableTickers(); loadTableWeek(TableWeek1, WEEK1); loadTableWeek(TableWeek2, WEEK2); loadTableWeek(TableWeek3, WEEK3); String cad = settings.getVaribable(DDBB.RANGO_1) > 1 ? "weeks" : "week"; cad = settings.getVaribable(DDBB.RANGO_2) > 1 ? "weeks" : "week"; cad = settings.getVaribable(DDBB.RANGO_3) > 1 ? "weeks" : "week"; TableTicker.setCellSelectionEnabled(false); TableWeek1.setCellSelectionEnabled(false); TableWeek2.setCellSelectionEnabled(false); TableWeek3.setCellSelectionEnabled(false); /*validate(); repaint();*/ settingsGUI = new SettingsGUI(listener); features = new Features(); features.setBackground(java.awt.Color.BLACK); }
From source file:semaforo.Semaforo.java
public synchronized void loadTableTickers() { Settings settings = Controller.getSettings(); CustomRenderer cr = new CustomRenderer(TableTicker.getDefaultRenderer(Object.class), Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY); TableTicker.setDefaultRenderer(Object.class, cr); DefaultTableModel model = (DefaultTableModel) TableTicker.getModel(); TableTicker.setRowHeight(20); //40 TableTicker.setFont(new Font("Arial", Font.BOLD, 12)); //18 TableTicker.getColumnModel().getColumn(0).setPreferredWidth(10); TableTicker.getColumnModel().getColumn(1).setPreferredWidth(30); JTableHeader header = TableTicker.getTableHeader(); header.setPreferredSize(new Dimension(100, 30)); TableTicker.getTableHeader().setFont(new Font("Arial", Font.BOLD, 15)); Object[] o = new Object[2]; for (int i = 0; i < settings.getTickers().size(); i++) { o[0] = settings.getTickers().get(i).getName(); o[1] = 0;//from www . j av a 2 s . co m model.addRow(o); } }
From source file:paquete.HollywoodUI.java
private void jLabel30MouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel30MouseMoved panel_history.setBackground(Color.LIGHT_GRAY); }
From source file:semaforo.Semaforo.java
public synchronized void loadTableWeek(JTable TableWeek, int index) { Settings settings = Controller.getSettings(); //TableWeek.getColumnModel().getColumn(0).setPreferredWidth(350); //150 TableWeek.setRowHeight(20); //40 //TableWeek.getColumnModel().getColumn(9).setPreferredWidth(350);//150 TableWeek.setFont(new Font("Arial", Font.BOLD, 12));//18 CustomRenderer cr = new CustomRenderer(TableWeek.getDefaultRenderer(Object.class), Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.LIGHT_GRAY); TableWeek.setDefaultRenderer(Object.class, cr); DefaultTableModel model = (DefaultTableModel) TableWeek.getModel(); Object[] o = new Object[10]; JTableHeader header = TableWeek.getTableHeader(); header.setPreferredSize(new Dimension(10, 30)); //100 TableWeek.getTableHeader().setFont(new Font("Arial", Font.BOLD, 15)); /* DefaultTableCellRenderer centerRenderer = new DefaultTableCellRenderer(); centerRenderer.setHorizontalAlignment(SwingConstants.CENTER); TableWeek.getColumnModel().getColumn(0).setCellRenderer(centerRenderer); TableWeek.getColumnModel().getColumn(9).setCellRenderer(centerRenderer); TableWeek.setDefaultRenderer(String.class, centerRenderer);*/ int num = settings.getTickers().size(); /* while(DDBB.loadData) { try {/*ww w . j av a2 s .c o m*/ Thread.sleep(500); } catch (InterruptedException ex) { Logger.getLogger(Semaforo.class.getName()).log(Level.SEVERE, null, ex); } }*/ if (TableWeek.getModel().getRowCount() > 0) { num = Math.min(settings.getTickers().size(), TableWeek.getModel().getRowCount()); } for (int i = 0; i < num; i++) { o[0] = settings.getTickers().get(i).getMinValue(index); o[9] = settings.getTickers().get(i).getMaxValue(index); model.addRow(o); } }
From source file:org.nuclos.client.ui.collect.Chart.java
private void init(int iScrollPane) { contentPane.add(toolbar,//from ww w. ja v a 2s . c o m toolbar.getOrientation() == JToolBar.HORIZONTAL ? BorderLayout.NORTH : BorderLayout.WEST); // Configure table JFreeChart chart = new JFreeChart(new Plot() { @Override public String getPlotType() { return null; } @Override public void draw(Graphics2D arg0, Rectangle2D arg1, Point2D arg2, PlotState arg3, PlotRenderingInfo arg4) { } }); panel = new ChartPanel(chart, false, false, true, false, false); if (bFromProperties) { panel.setPopupMenu(null); } if (iScrollPane == -1) scrollPane.add(panel, BorderLayout.CENTER); else { ((JScrollPane) scrollPane).getViewport().setBackground(panel.getBackground()); JLabel labCorner = new JLabel(); labCorner.setEnabled(false); labCorner.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 1, Color.GRAY)); labCorner.setBackground(Color.LIGHT_GRAY); ((JScrollPane) scrollPane).setCorner(ScrollPaneConstants.UPPER_LEFT_CORNER, labCorner); if (iScrollPane != 2) { //both if (iScrollPane == 0) { // horizontal JPanel pnl = new ScrollPaneHeightTrackingPanel(new BorderLayout()); pnl.add(panel, BorderLayout.CENTER); ((JScrollPane) scrollPane).getViewport().setView(pnl); ((JScrollPane) scrollPane).setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER); ((JScrollPane) scrollPane) .setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); } else if (iScrollPane == 1) { // vertical JPanel pnl = new ScrollPaneWidthTrackingPanel(new BorderLayout()); pnl.add(panel, BorderLayout.CENTER); ((JScrollPane) scrollPane).getViewport().setView(pnl); ((JScrollPane) scrollPane).setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); ((JScrollPane) scrollPane).setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); } else if (iScrollPane == -1) { // none ((JScrollPane) scrollPane).setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER); ((JScrollPane) scrollPane).setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); } } else { ((JScrollPane) scrollPane).getViewport().setView(panel); } } }
From source file:com.peterbochs.PeterBochsDebugger.java
private JLabel getJLabel2() { if (jLabel2 == null) { jLabel2 = new JLabel(); jLabel2.setOpaque(true);/*w w w . j a va2 s .c om*/ jLabel2.setBorder(new LineBorder(Color.LIGHT_GRAY)); jLabel2.setBackground(new java.awt.Color(0, 0, 0)); jLabel2.setMinimumSize(new java.awt.Dimension(2, 15)); jLabel2.setMaximumSize(new java.awt.Dimension(2, 15)); jLabel2.setPreferredSize(new java.awt.Dimension(2, 15)); } return jLabel2; }
From source file:com.peterbochs.PeterBochsDebugger.java
private JLabel getJLabel8() { if (jLabel8 == null) { jLabel8 = new JLabel(); jLabel8.setBackground(new java.awt.Color(0, 0, 0)); jLabel8.setMinimumSize(new java.awt.Dimension(2, 15)); jLabel8.setPreferredSize(new java.awt.Dimension(2, 15)); jLabel8.setMaximumSize(new java.awt.Dimension(2, 15)); jLabel8.setOpaque(true);//w w w . ja v a 2 s .c o m jLabel8.setBorder(new LineBorder(Color.LIGHT_GRAY)); } return jLabel8; }
From source file:ECallCenter21.java
private void imageLinkLabelMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_imageLinkLabelMouseExited imageLinkLabel.setForeground(Color.LIGHT_GRAY); }
From source file:com.afunms.report.abstraction.ExcelReport1.java
public void createReport_networkDoc(String file) throws DocumentException, IOException { String runmodel = PollingEngine.getCollectwebflag(); Hashtable CPU = (Hashtable) reportHash.get("CPU"); String Ping = (String) reportHash.get("Ping"); String ip = (String) reportHash.get("ip"); String newip = doip(ip);/* w w w . j av a2 s . c o m*/ Calendar colTime = (Calendar) reportHash.get("time"); Date cc = colTime.getTime(); Vector netifVector = (Vector) reportHash.get("netifVector"); Hashtable portconfigHash = (Hashtable) reportHash.get("portconfigHash"); List reportports = (List) reportHash.get("reportports"); Vector iprouterVector = (Vector) reportHash.get("iprouterVector"); Hashtable Memory = (Hashtable) reportHash.get("Memory"); Hashtable Disk = (Hashtable) reportHash.get("Disk"); String hostname = (String) reportHash.get("equipname"); Hashtable memMaxHash = (Hashtable) reportHash.get("memmaxhash"); Hashtable maxping = (Hashtable) reportHash.get("ping"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String[] netIfItemch = { "", "", "", "(M)", "", "", "" }; String[] ipRouterItemch = { "", "", "", "", "", "" }; String[] memoryItem = { "Capability", "Utilization" }; String[] diskItem = { "AllSize", "UsedSize", "Utilization", "INodeUsedSize", "INodeUtilization" }; String[] diskItemch = { "", "", "", "i-node", "i-node" }; String[] iproutertype = { "", "", "", "direct(3)", "indirect(4)" }; String[] iprouterproto = { "", "other(1)", "local(2)", "netmgmt(3)", "icmp(4)", "egp(5)", "ggp(6)", "hello(7)", "rip(8)", "is-is(9)", "es-is(10)", "ciscoIgrp(11)", "bbnSpfIgp(12)", "ospf(13)", "bgp(14)" }; // Document document = new Document(PageSize.A4); // (Writer)document(Writer) RtfWriter2.getInstance(document, new FileOutputStream(file)); document.open(); // BaseFont bfChinese = BaseFont.createFont("Times-Roman", "", BaseFont.NOT_EMBEDDED); // Font titleFont = new Font(bfChinese, 12, Font.BOLD); // Font contextFont = new Font(bfChinese, 10, Font.NORMAL); Paragraph title = new Paragraph(hostname + "", titleFont); // title.setAlignment(Element.ALIGN_CENTER); // title.setFont(titleFont); document.add(title); String contextString = ":" + impReport.getTimeStamp() + " \n"// + ":" + sdf.format(cc); Paragraph context = new Paragraph(contextString, titleFont); // context.setAlignment(Element.ALIGN_LEFT); // context.setFont(contextFont); // context.setSpacingBefore(5); // context.setFirstLineIndent(5); document.add(context); // Table Font fontChinese = new Font(bfChinese, 12, Font.NORMAL, Color.black); Table aTable = new Table(4); float[] widths = { 220f, 300f, 220f, 220f }; aTable.setWidths(widths); aTable.setWidth(100); // 90% aTable.setAlignment(Element.ALIGN_CENTER);// aTable.setAutoFillEmptyCells(true); // aTable.setBorderWidth(1); // aTable.setBorderColor(new Color(0, 125, 255)); // aTable.setPadding(2);// aTable.setSpacing(0);// aTable.setBorder(2);// aTable.endHeaders(); Cell cellt0 = new Cell(""); cellt0.setBackgroundColor(Color.LIGHT_GRAY); cellt0.setHorizontalAlignment(Element.ALIGN_CENTER); cellt0.setVerticalAlignment(Element.ALIGN_MIDDLE); cellt0.setRowspan(2); Cell cellt1 = new Cell(""); cellt1.setBackgroundColor(Color.LIGHT_GRAY); Cell cellt2 = new Cell(""); cellt2.setBackgroundColor(Color.LIGHT_GRAY); Cell cellt3 = new Cell(""); cellt3.setBackgroundColor(Color.LIGHT_GRAY); aTable.addCell(cellt0); aTable.addCell(cellt1); aTable.addCell(cellt2); aTable.addCell(cellt3); // aTable.addCell("3.2",Ping+"%"); // Cell cellt4 = new Cell(""); // cellt4.setBackgroundColor(Color.LIGHT_GRAY); // aTable.addCell(cellt4); aTable.addCell(Ping + "%"); aTable.addCell((String) maxping.get("pingmax")); aTable.addCell((String) maxping.get("avgpingcon")); Image img = Image.getInstance(ResourceCenter.getInstance().getSysPath() + "/resource/image/jfreechart/" + newip + "ConnectUtilization" + ".png"); img.setAbsolutePosition(0, 0); img.setAlignment(Image.LEFT);// document.add(aTable); document.add(img); // document.add(new Paragraph("\n")); // document.close(); Table aTable1 = new Table(4); float[] width = { 220f, 300f, 220f, 220f }; aTable1.setWidths(width); aTable1.setWidth(100); // 90% aTable1.setAlignment(Element.ALIGN_CENTER);// aTable1.setAutoFillEmptyCells(true); // aTable1.setBorderWidth(1); // aTable1.setBorderColor(new Color(0, 125, 255)); // aTable1.setPadding(2);// aTable1.setSpacing(0);// aTable1.setBorder(2);// aTable1.endHeaders(); cellt0 = new Cell("CPU"); cellt0.setBackgroundColor(Color.LIGHT_GRAY); cellt0.setHorizontalAlignment(Element.ALIGN_CENTER); cellt0.setVerticalAlignment(Element.ALIGN_MIDDLE); cellt1 = new Cell(""); cellt1.setBackgroundColor(Color.LIGHT_GRAY); cellt2 = new Cell(""); cellt2.setBackgroundColor(Color.LIGHT_GRAY); cellt3 = new Cell(""); cellt3.setBackgroundColor(Color.LIGHT_GRAY); aTable1.addCell(cellt0); aTable1.addCell(cellt1); aTable1.addCell(cellt2); aTable1.addCell(cellt3); // aTable.addCell("3.2",Ping+"%"); aTable1.addCell(""); aTable1.addCell((String) CPU.get("cpu") + "%"); aTable1.addCell((String) CPU.get("cpumax")); aTable1.addCell((String) CPU.get("avgcpu")); cellt0.setRowspan(2); Image img1 = Image.getInstance( ResourceCenter.getInstance().getSysPath() + "/resource/image/jfreechart/" + newip + "cpu" + ".png"); img.setAbsolutePosition(0, 0); img.setAlignment(Image.MIDDLE);// document.add(aTable1); document.add(img1); if (netifVector != null && netifVector.size() > 0) { Table aTable2 = new Table(8); float[] width2 = { 300f, 220f, 220f, 180f, 300f, 180f, 220f, 220f }; aTable2.setWidths(width2); aTable2.setWidth(100); // 100% aTable2.setAlignment(Element.ALIGN_CENTER);// aTable2.setAutoFillEmptyCells(true); // aTable2.setBorderWidth(1); // aTable2.setBorderColor(new Color(0, 125, 255)); // aTable2.setPadding(2);// aTable2.setSpacing(0);// aTable2.setBorder(2);// aTable2.endHeaders(); Cell c = new Cell(""); c.setBackgroundColor(Color.LIGHT_GRAY); c.setRowspan(netifVector.size() + 1); c.setHorizontalAlignment(Element.ALIGN_CENTER); c.setVerticalAlignment(Element.ALIGN_MIDDLE); aTable2.addCell(c); // // allRow = allRow; for (int i = 0; i < netIfItemch.length; i++) { Cell cell = new Cell(netIfItemch[i]); cell.setBackgroundColor(Color.LIGHT_GRAY); aTable2.addCell(cell); } Color color = new Color(204, 204, 255); // for (int i = 0; i < netifVector.size(); i++) { // aTable2.addCell(""); String[] strs = (String[]) netifVector.get(i); String ifname = strs[1]; String index = strs[0]; for (int j = 0; j < strs.length; j++) { if (j == 1) { String linkuse = ""; if (portconfigHash != null && portconfigHash.size() > 0) { if (portconfigHash.get(ip + ":" + index) != null) linkuse = (String) portconfigHash.get(ip + ":" + index); } Cell cell1 = new Cell(strs[j]); Cell cell2 = new Cell(linkuse); if (i % 2 != 0) { cell1.setBackgroundColor(color); cell2.setBackgroundColor(color); } aTable2.addCell(cell1); aTable2.addCell(cell2); } else if (j > 1) { Cell cell3 = new Cell(strs[j]); if (i % 2 != 0) { cell3.setBackgroundColor(color); } aTable2.addCell(cell3); } else { Cell cell4 = new Cell(strs[j]); if (i % 2 != 0) { cell4.setBackgroundColor(color); } aTable2.addCell(cell4); } } // end } document.add(aTable2); } if ("0".equals(runmodel)) { // if (iprouterVector != null && iprouterVector.size() > 0) { Table aTable3 = new Table(7); float[] width2 = { 240f, 200f, 300f, 300f, 220f, 180f, 300f }; aTable3.setWidths(width2); aTable3.setWidth(100); // 100% aTable3.setAlignment(Element.ALIGN_CENTER);// aTable3.setAutoFillEmptyCells(true); // aTable3.setBorderWidth(1); // aTable3.setBorderColor(new Color(0, 125, 255)); // aTable3.setPadding(2);// aTable3.setSpacing(0);// aTable3.setBorder(2);// aTable3.endHeaders(); aTable3.addCell(""); // // allRow = allRow+1; for (int i = 0; i < ipRouterItemch.length; i++) { Cell cell = new Cell(ipRouterItemch[i]); aTable3.addCell(cell); } // for (int i = 0; i < iprouterVector.size(); i++) { aTable3.addCell(""); /* allRow = allRow + 1; */ IpRouter iprouter = (IpRouter) iprouterVector.get(i); Cell cell = new Cell(iprouter.getIfindex()); aTable3.addCell(cell); Cell cell1 = new Cell(iprouter.getDest()); aTable3.addCell(cell1); Cell cell2 = new Cell(iprouter.getNexthop()); aTable3.addCell(cell2); Cell cell3 = new Cell(iproutertype[Integer.parseInt(iprouter.getType().longValue() + "")]); aTable3.addCell(cell3); Cell cell4 = new Cell(iprouterproto[Integer.parseInt(iprouter.getProto().longValue() + "")]); aTable3.addCell(cell4); Cell cell5 = new Cell(iprouter.getMask()); aTable3.addCell(cell5); } document.add(aTable3); } } else { // List routerList = (ArrayList) reportHash.get("routerList"); Table aTable3 = new Table(7); float[] width2 = { 240f, 200f, 300f, 300f, 220f, 180f, 300f }; aTable3.setWidths(width2); aTable3.setWidth(100); // 100% aTable3.setAlignment(Element.ALIGN_CENTER);// aTable3.setAutoFillEmptyCells(true); // aTable3.setBorderWidth(1); // aTable3.setBorderColor(new Color(0, 125, 255)); // aTable3.setPadding(2);// aTable3.setSpacing(0);// aTable3.setBorder(2);// aTable3.endHeaders(); aTable3.addCell(""); // // allRow = allRow+1; for (int i = 0; i < ipRouterItemch.length; i++) { Cell cell = new Cell(ipRouterItemch[i]); aTable3.addCell(cell); } if (routerList != null) { for (int i = 0; i < routerList.size(); i++) { aTable3.addCell(""); RouterNodeTemp iprouter = (RouterNodeTemp) routerList.get(i); Cell cell = new Cell(iprouter.getIfindex()); aTable3.addCell(cell); Cell cell1 = new Cell(iprouter.getDest()); aTable3.addCell(cell1); Cell cell2 = new Cell(iprouter.getNexthop()); aTable3.addCell(cell2); Cell cell3 = new Cell(iprouter.getType()); aTable3.addCell(cell3); Cell cell4 = new Cell(iprouter.getProto()); aTable3.addCell(cell4); Cell cell5 = new Cell(iprouter.getMask()); aTable3.addCell(cell5); } document.add(aTable3); } } // doc if (reportports != null && reportports.size() > 0) { // // aTable4.addCell(""); for (int i = 0; i < reportports.size(); i++) { Table aTable4 = new Table(2); float[] width2 = { 300f, 300f }; aTable4.setWidths(width2); aTable4.setWidth(100); // 100% aTable4.setAlignment(Element.ALIGN_CENTER);// aTable4.setAutoFillEmptyCells(true); // aTable4.setBorderWidth(1); // aTable4.setBorderColor(new Color(0, 125, 255)); // aTable4.setPadding(2);// aTable4.setSpacing(0);// aTable4.setBorder(2);// aTable4.endHeaders(); // SysLogger.info(reportports.get(i).getClass()+"============================================="); com.afunms.config.model.Portconfig portconfig = (com.afunms.config.model.Portconfig) reportports .get(i); /* * tmpLabel = new Label(0, allRow, "" + * portconfig.getPortindex() + "(" + portconfig.getName() + * ")", b_labelFormat); * * sheet.addCell(tmpLabel); */ Cell cell = new Cell("" + portconfig.getPortindex() + "(" + portconfig.getName() + ")"); aTable4.addCell(cell); if (portconfig.getLinkuse() == null) portconfig.setLinkuse(""); Cell cell1 = new Cell(":" + portconfig.getLinkuse()); aTable4.addCell(cell1); document.add(aTable4); // Image img2 = Image.getInstance(ResourceCenter.getInstance().getSysPath() + "/resource/image/jfreechart/" + newip + portconfig.getPortindex() + "ifspeed_day.png"); img2.setAbsolutePosition(0, 0); img2.setAlignment(Image.LEFT);// // sheet,0,0,5,1,,, img2.scalePercent(67); document.add(img2); } } // if (impReport.getChart() != null) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { ChartUtilities.writeChartAsPNG(baos, impReport.getChart().getChart(), impReport.getChart().getWidth(), impReport.getChart().getHeight()); } catch (IOException ioe) { } /* * WritableImage wi = new WritableImage(2, 10000 + 5, 8, 12, baos * .toByteArray()); */ Image img2 = Image.getInstance(baos.toByteArray()); img.setAbsolutePosition(0, 0); img.setAlignment(Image.LEFT);// img.scalePercent(67); document.add(img2); } document.close(); }