📄 tddialog.java
字号:
trPanel.setBorder(border2); gridLayout4.setColumns(1); gridLayout4.setRows(2); jLabel20.setText(Local.getString("Align")); jLabel20.setPreferredSize(new Dimension(70, 16)); jLabel20.setMinimumSize(new Dimension(50, 16)); jLabel20.setMaximumSize(new Dimension(70, 16)); tdValignCB.setPreferredSize(new Dimension(63, 25)); tdValignCB.setFont(new java.awt.Font("Dialog", 1, 10)); tdValignCB.setBackground(new Color(230, 230, 230)); flowLayout12.setAlignment(FlowLayout.LEFT); tdBgcolorField.setPreferredSize(new Dimension(70, 25)); tdBgcolorField.setMinimumSize(new Dimension(60, 25)); jPanel14.setLayout(flowLayout12); jLabel21.setText(Local.getString("Fill color")); jLabel21.setPreferredSize(new Dimension(70, 16)); jLabel21.setMinimumSize(new Dimension(50, 16)); jLabel21.setMaximumSize(new Dimension(70, 16)); tdBgcolorB.setMinimumSize(new Dimension(25, 25)); tdBgcolorB.setPreferredSize(new Dimension(25, 25)); tdBgcolorB.setIcon(new ImageIcon(net.sf.memoranda.ui.htmleditor.ImageDialog.class.getResource("resources/icons/color.png"))); tdBgcolorB.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { tdBgcolorB_actionPerformed(e); } }); tdNowrapChB.setText(Local.getString("No text wrapping")); trAlignCB.setPreferredSize(new Dimension(100, 25)); trAlignCB.setFont(new java.awt.Font("Dialog", 1, 10)); trAlignCB.setBackground(new Color(230, 230, 230)); trValignCB.setBackground(new Color(230, 230, 230)); trValignCB.setFont(new java.awt.Font("Dialog", 1, 10)); trValignCB.setPreferredSize(new Dimension(100, 25)); jLabel22.setMaximumSize(new Dimension(50, 16)); jLabel22.setMinimumSize(new Dimension(50, 16)); jLabel22.setPreferredSize(new Dimension(50, 16)); jLabel22.setText(Local.getString("Align")); flowLayout10.setAlignment(FlowLayout.LEFT); jLabel16.setText(Local.getString("Vert. align")); jLabel16.setPreferredSize(new Dimension(80, 16)); jLabel16.setMinimumSize(new Dimension(40, 16)); jLabel16.setMaximumSize(new Dimension(80, 16)); jPanel11.setLayout(flowLayout10); trBgcolorField.setMinimumSize(new Dimension(60, 25)); trBgcolorField.setPreferredSize(new Dimension(70, 25)); jLabel23.setMaximumSize(new Dimension(70, 16)); jLabel23.setMinimumSize(new Dimension(50, 16)); jLabel23.setPreferredSize(new Dimension(50, 16)); jLabel23.setText(Local.getString("Fill color")); jPanel15.setLayout(flowLayout13); flowLayout13.setAlignment(FlowLayout.LEFT); trBgcolorB.setMinimumSize(new Dimension(25, 25)); trBgcolorB.setPreferredSize(new Dimension(25, 25)); trBgcolorB.setIcon(new ImageIcon(net.sf.memoranda.ui.htmleditor.ImageDialog.class.getResource("resources/icons/color.png"))); trBgcolorB.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { trBgcolorB_actionPerformed(e); } }); tdColspan.setBorder(border5); tdColspan.setPreferredSize(new Dimension(50, 24)); tdRowspan.setBorder(border5); tdRowspan.setPreferredSize(new Dimension(50, 24)); jLabel8.setText(Local.getString("Width")); jLabel8.setPreferredSize(new Dimension(70, 16)); jLabel8.setMinimumSize(new Dimension(60, 16)); jLabel8.setMaximumSize(new Dimension(70, 16)); jLabel12.setText(Local.getString("Border")); jLabel12.setPreferredSize(new Dimension(70, 16)); jLabel12.setMinimumSize(new Dimension(60, 16)); jLabel12.setMaximumSize(new Dimension(70, 16)); cellpadding.setBorder(border5); cellpadding.setPreferredSize(new Dimension(50, 24)); flowLayout8.setAlignment(FlowLayout.LEFT); flowLayout4.setAlignment(FlowLayout.LEFT); jLabel24.setMaximumSize(new Dimension(70, 16)); jLabel24.setMinimumSize(new Dimension(60, 16)); jLabel24.setPreferredSize(new Dimension(70, 16)); jLabel24.setText(Local.getString("Align")); tablePanel.setBorder(border2); tablePanel.setLayout(gridLayout3); gridLayout3.setColumns(1); gridLayout3.setRows(4); border.setBorder(border5); border.setPreferredSize(new Dimension(50, 24)); jPanel10.setLayout(flowLayout4); jPanel12.setLayout(flowLayout11); vAlignCB.setPreferredSize(new Dimension(63, 25)); vAlignCB.setFont(new java.awt.Font("Dialog", 1, 10)); vAlignCB.setBackground(new Color(230, 230, 230)); bgcolorField.setPreferredSize(new Dimension(70, 25)); bgcolorField.setMinimumSize(new Dimension(60, 25)); heightField.setMinimumSize(new Dimension(30, 25)); heightField.setPreferredSize(new Dimension(50, 25)); jLabel13.setMaximumSize(new Dimension(70, 16)); jLabel13.setMinimumSize(new Dimension(40, 16)); jLabel13.setPreferredSize(new Dimension(70, 16)); jLabel13.setText(Local.getString("Cell spacing")); cellspacing.setBorder(border5); cellspacing.setPreferredSize(new Dimension(50, 24)); jLabel17.setMaximumSize(new Dimension(70, 16)); jLabel17.setMinimumSize(new Dimension(40, 16)); jLabel17.setPreferredSize(new Dimension(70, 16)); jLabel17.setText(Local.getString("Vert. align")); jLabel25.setMaximumSize(new Dimension(70, 16)); jLabel25.setMinimumSize(new Dimension(70, 16)); jLabel25.setPreferredSize(new Dimension(70, 16)); jLabel25.setText(Local.getString("Fill color")); bgColorB.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { bgColorB_actionPerformed(e); } }); bgColorB.setIcon(new ImageIcon(net.sf.memoranda.ui.htmleditor.ImageDialog.class.getResource("resources/icons/color.png"))); bgColorB.setPreferredSize(new Dimension(25, 25)); bgColorB.setMinimumSize(new Dimension(25, 25)); widthField.setPreferredSize(new Dimension(50, 25)); widthField.setMinimumSize(new Dimension(30, 25)); flowLayout11.setAlignment(FlowLayout.LEFT); jPanel13.setLayout(flowLayout8); alignCB.setBackground(new Color(230, 230, 230)); alignCB.setFont(new java.awt.Font("Dialog", 1, 10)); alignCB.setPreferredSize(new Dimension(63, 25)); jLabel14.setText(Local.getString("Cell padding")); jLabel14.setPreferredSize(new Dimension(70, 16)); jLabel14.setMinimumSize(new Dimension(60, 16)); jLabel14.setMaximumSize(new Dimension(70, 16)); jPanel9.setLayout(flowLayout9); flowLayout9.setAlignment(FlowLayout.LEFT); jLabel15.setMaximumSize(new Dimension(70, 16)); jLabel15.setMinimumSize(new Dimension(40, 16)); jLabel15.setPreferredSize(new Dimension(70, 16)); jLabel15.setText(Local.getString("Height")); jPanel14.add(jLabel21, null); jPanel14.add(tdBgcolorField, null); jPanel14.add(tdBgcolorB, null); jPanel14.add(component11, null); jPanel14.add(tdNowrapChB, null); getContentPane().add(panel1); panel1.add(buttonsPanel, BorderLayout.SOUTH); buttonsPanel.add(okB, null); buttonsPanel.add(cancelB, null); panel1.add(jTabbedPane1, BorderLayout.NORTH); this.getContentPane().add(headerPanel, BorderLayout.NORTH); headerPanel.add(header, null); jPanel5.add(jLabel4, null); jPanel5.add(tdWidthField, null); jPanel5.add(component1, null); jPanel5.add(jLabel5, null); jPanel5.add(tdHeightField, null); tdPanel.add(jPanel5, null); tdPanel.add(jPanel6, null); tdPanel.add(jPanel7, null); jPanel6.add(jLabel6, null); jPanel6.add(tdColspan, null); jPanel6.add(component2, null); jPanel6.add(jLabel7, null); jPanel7.add(jLabel20, null); jPanel7.add(tdAlignCB, null); jPanel7.add(jLabel9, null); jPanel7.add(tdValignCB, null); jTabbedPane1.add(tdPanel, Local.getString("Table cell")); jTabbedPane1.add(trPanel, Local.getString("Table row")); tdPanel.add(jPanel14, null); jPanel11.add(jLabel22, null); jPanel11.add(trAlignCB, null); jPanel11.add(component12, null); jPanel11.add(jLabel16, null); jPanel11.add(trValignCB, null); jPanel11.add(component7, null); jPanel15.add(jLabel23, null); jPanel15.add(trBgcolorField, null); jPanel15.add(trBgcolorB, null); trPanel.add(jPanel11, null); trPanel.add(jPanel15, null); jPanel6.add(tdRowspan, null); Util.setBgcolorField(tdBgcolorField); tablePanel.add(jPanel10, null); jPanel10.add(jLabel8, null); jPanel10.add(widthField, null); jPanel10.add(component5, null); jPanel10.add(jLabel15, null); jPanel10.add(heightField, null); tablePanel.add(jPanel13, null); jPanel13.add(jLabel14, null); jPanel13.add(cellpadding, null); jPanel13.add(component3, null); jPanel13.add(jLabel13, null); jPanel13.add(cellspacing, null); tablePanel.add(jPanel9, null); jPanel9.add(jLabel12, null); jPanel9.add(border, null); jPanel9.add(component6, null); jPanel9.add(jLabel25, null); jPanel9.add(bgcolorField, null); jPanel9.add(bgColorB, null); tablePanel.add(jPanel12, null); jPanel12.add(jLabel24, null); jPanel12.add(alignCB, null); jPanel12.add(jLabel17, null); jPanel12.add(vAlignCB, null); jTabbedPane1.add(tablePanel, Local.getString("Table")); } void okB_actionPerformed(ActionEvent e) { this.dispose(); } void cancelB_actionPerformed(ActionEvent e) { CANCELLED = true; this.dispose(); } void tdBgcolorB_actionPerformed(ActionEvent e) { Color c = JColorChooser.showDialog(this, Local.getString("Table cell background color"), Util.decodeColor(tdBgcolorField.getText())); if (c == null) return; tdBgcolorField.setText(Util.encodeColor(c)); Util.setBgcolorField(tdBgcolorField); } void trBgcolorB_actionPerformed(ActionEvent e) { Color c = JColorChooser.showDialog(this, Local.getString("Table row background color"), Util.decodeColor(trBgcolorField.getText())); if (c == null) return; trBgcolorField.setText(Util.encodeColor(c)); Util.setBgcolorField(trBgcolorField); } void bgColorB_actionPerformed(ActionEvent e) { Color c = JColorChooser.showDialog(this, Local.getString("Table background color"), Util.decodeColor(bgcolorField.getText())); if (c == null) return; bgcolorField.setText(Util.encodeColor(c)); Util.setBgcolorField(bgcolorField); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -