List of usage examples for java.awt Cursor TEXT_CURSOR
int TEXT_CURSOR
To view the source code for java.awt Cursor TEXT_CURSOR.
Click Source Link
From source file:src.gui.ItSIMPLE.java
/** * This method initializes planInfoFramePanel * * @return javax.swing.JPanel//from w w w . j a va2s . c o m */ private ItFramePanel getPlanInfoFramePanel() { if (planInfoFramePanel == null) { JPanel planInfoPanel = new JPanel(new BorderLayout()); planInfoPanel.setMinimumSize(new Dimension(100, 40)); planInfoFramePanel = new ItFramePanel(":: Console", ItFramePanel.MINIMIZE_MAXIMIZE); //informationPanel.setMinimumSize(new Dimension(100,25)); //planInfoEditorPane = new JEditorPane(); //planInfoEditorPane.setContentType("text/html"); //planInfoEditorPane.setEditable(false); //planInfoEditorPane.setCursor(new Cursor(Cursor.TEXT_CURSOR)); //planInfoEditorPane.setBackground(Color.WHITE); outputEditorPane = new JTextArea(); //outputEditorPane.setContentType("text/html"); outputEditorPane.setEditable(false); outputEditorPane.setLineWrap(true); outputEditorPane.setWrapStyleWord(true); outputEditorPane.setCursor(new Cursor(Cursor.TEXT_CURSOR)); // tabbed panes with jtrees JTabbedPane outputPane = new JTabbedPane(); outputPane.addTab("Output", new JScrollPane(outputEditorPane)); //outputPane.addTab("Results", new JScrollPane(planInfoEditorPane)); //planInfoFramePanel.setContent(planInfoEditorPane, true); planInfoFramePanel.setContent(outputPane, false); planInfoFramePanel.setParentSplitPane(planInfoSplitPane); planInfoPanel.add(planInfoFramePanel, BorderLayout.CENTER); } return planInfoFramePanel; }
From source file:src.gui.ItSIMPLE.java
private JPanel getTranslatedPddlPanel() { JPanel anPanel = new JPanel(new BorderLayout()); //TOP panel/*from w ww . j av a2 s . co m*/ if (pddlTextSplitPane == null) { pddlTextSplitPane = new JSplitPane(); pddlTextSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT); //Problem Panel ItFramePanel problemPanel = new ItFramePanel(":: Problem", ItFramePanel.MINIMIZE_MAXIMIZE); problemPanel.setContent(getBottomPddlPanel(), false); problemPanel.setParentSplitPane(pddlTextSplitPane); pddlTextSplitPane.setBottomComponent(problemPanel); //Doamin Panel ItFramePanel domainPanel = new ItFramePanel(":: Domain", ItFramePanel.NO_MINIMIZE_MAXIMIZE); domainPanel.setContent(getTopPddlPanel(), false); //domainPanel.setParentSplitPane(pddlTextSplitPane); pddlTextSplitPane.setTopComponent(domainPanel); pddlTextSplitPane.setDividerSize(3); pddlTextSplitPane.setContinuousLayout(true); pddlTextSplitPane.setDividerLocation((int) (screenSize.height * 0.40)); pddlTextSplitPane.setResizeWeight(0.5); } anPanel.add(pddlTextSplitPane, BorderLayout.CENTER); //BOTTOM //Console output ItFramePanel outputPanel = new ItFramePanel(":: Output console", ItFramePanel.NO_MINIMIZE_MAXIMIZE); outputPanel.setPreferredSize(new Dimension(screenSize.width / 4 - 20, 120)); //Results output //Content of the FramePanel JPanel resultsPanel = new JPanel(new BorderLayout()); outputPddlTranslationEditorPane = new JTextArea(); //analysisInfoEditorPane.setContentType("text/html"); outputPddlTranslationEditorPane.setEditable(false); outputPddlTranslationEditorPane.setLineWrap(true); outputPddlTranslationEditorPane.setWrapStyleWord(true); outputPddlTranslationEditorPane.setCursor(new Cursor(Cursor.TEXT_CURSOR)); outputPddlTranslationEditorPane.setBackground(Color.WHITE); resultsPanel.add(new JScrollPane(outputPddlTranslationEditorPane), BorderLayout.CENTER); outputPanel.setContent(resultsPanel, false); anPanel.add(outputPanel, BorderLayout.SOUTH); return anPanel; }
From source file:src.gui.ItSIMPLE.java
/** * This method initializes petriEditorSplitPane * * @return javax.swing.JSplitPane/* ww w. j av a 2 s .c om*/ */ private JSplitPane getPetriEditorSplitPane() { if (petriEditorSplitPane == null) { petriEditorSplitPane = new JSplitPane(); petriEditorSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT); //Analysis Results Panel ItFramePanel analysisPanel = new ItFramePanel(":: Analysis Results", ItFramePanel.MINIMIZE_MAXIMIZE); analysisPanel.setContent(getBottomPetriPanel(), false); analysisPanel.setParentSplitPane(petriEditorSplitPane); petriEditorSplitPane.setBottomComponent(analysisPanel); petriInfoEditorPane = new JEditorPane(); petriInfoEditorPane.setContentType("text/html"); petriInfoEditorPane.setEditable(false); petriInfoEditorPane.setCursor(new Cursor(Cursor.TEXT_CURSOR)); analysisPanel.setContent(petriInfoEditorPane, true); //Editor Panel ItFramePanel editorPanel = new ItFramePanel(":: Petri Net", ItFramePanel.NO_MINIMIZE_MAXIMIZE); editorPanel.setContent(getTopPetriPane(), false); petriDiagramGraph.setInfoPane(petriInfoEditorPane); //domainPanel.setParentSplitPane(pddlTextSplitPane); petriEditorSplitPane.setTopComponent(editorPanel); petriEditorSplitPane.setDividerSize(3); petriEditorSplitPane.setContinuousLayout(true); petriEditorSplitPane.setDividerLocation((int) (screenSize.height * 0.45)); petriEditorSplitPane.setResizeWeight(0.5); } return petriEditorSplitPane; }
From source file:src.gui.ItSIMPLE.java
/** * Creates the main content panel in the main analysis panel * @return /*w ww. j a v a 2s. co m*/ */ private JPanel getAnalysisMainContentPane() { JPanel anPanel = new JPanel(new BorderLayout()); ItFramePanel mainContentPanel = new ItFramePanel(":: Analysis Techniques and Results", ItFramePanel.NO_MINIMIZE_MAXIMIZE); //Content of the FramePanel JPanel resultsPanel = new JPanel(new BorderLayout()); JToolBar analysisToolSetBar = new JToolBar(); analysisToolSetBar.setRollover(true); JButton TorchlightButton = new JButton("TorchLight", new ImageIcon("resources/images/compare.png")); TorchlightButton.setToolTipText( "<html>Run TorchLight system. <br>TorchLight analyzes h+ search space topology without actually running any search</html>"); TorchlightButton.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(ActionEvent e) { new Thread() { public void run() { ItTreeNode selectedNode = (ItTreeNode) projectAnalysisTree.getLastSelectedPathComponent(); if (selectedNode.getData() != null && selectedNode.getData().getName().indexOf("problem") != -1) { appendAnalysisOutputPanelText( "(!) Know more about TorchLight at http://www.loria.fr/~hoffmanj/ \n"); appendAnalysisOutputPanelText(">> Calling TorchLight System... \n"); analysisStatusBar.setText("Status: Running Tourchlight ..."); String pddlVersion = pddlButtonsGroup.getSelection().getActionCommand(); //Call TorchLight TorchLightAnalyzer.getTorchLightAnalysis(selectedNode, pddlVersion); appendAnalysisOutputPanelText(">> TorchLight analysis done!'\n"); appendAnalysisOutputPanelText(" \n"); analysisStatusBar.setText("Status: Tourchlight analysis done!"); } else { JOptionPane.showMessageDialog(ItSIMPLE.this, "<html>Please chose a problem node at the 'Project Selection' tree. </html>"); } } }.start(); } }); analysisToolSetBar.add(TorchlightButton); //Results output outputAnalysisEditorPane = new JTextArea(); //analysisInfoEditorPane.setContentType("text/html"); outputAnalysisEditorPane.setEditable(false); outputAnalysisEditorPane.setLineWrap(true); outputAnalysisEditorPane.setWrapStyleWord(true); outputAnalysisEditorPane.setCursor(new Cursor(Cursor.TEXT_CURSOR)); outputAnalysisEditorPane.setBackground(Color.WHITE); //analysisInfoEditorPane = new JEditorPane(); //analysisInfoEditorPane.setContentType("text/html"); //analysisInfoEditorPane.setEditable(false); //analysisInfoEditorPane.setCursor(new Cursor(Cursor.TEXT_CURSOR)); //analysisInfoEditorPane.setBackground(Color.WHITE); resultsPanel.add(analysisToolSetBar, BorderLayout.NORTH); resultsPanel.add(new JScrollPane(outputAnalysisEditorPane), BorderLayout.CENTER); mainContentPanel.setContent(resultsPanel, false); //mainContentPanel.setParentSplitPane(petriEditorSplitPane); anPanel.add(mainContentPanel, BorderLayout.CENTER); return anPanel; }
From source file:src.gui.ItSIMPLE.java
/** * This method initializes petriEditorPane * * @return javax.swing.JPanel//from ww w .ja va 2s . c o m */ private JEditorPane getPetriEditorPane() { if (petriEditorPane == null) { petriEditorPane = new JEditorPane(); petriEditorPane.setContentType("text/html"); petriEditorPane.setEditable(false); petriEditorPane.setCursor(new Cursor(Cursor.TEXT_CURSOR)); } return petriEditorPane; }
From source file:src.gui.ItSIMPLE.java
/** * This method initializes informationPanel * * @return javax.swing.JPanel//from ww w . j a v a 2 s .co m */ private JPanel getInformationPanel() { if (informationPanel == null) { informationPanel = new JPanel(new BorderLayout()); informationPanel.setMinimumSize(new Dimension(100, 20)); infoPanel = new ItFramePanel(":: Information", ItFramePanel.MINIMIZE_MAXIMIZE); //informationPanel.setMinimumSize(new Dimension(100,25)); infoEditorPane = new JEditorPane(); infoEditorPane.setContentType("text/html"); infoEditorPane.setEditable(false); infoEditorPane.setCursor(new Cursor(Cursor.TEXT_CURSOR)); infoPanel.setContent(infoEditorPane, true); infoPanel.setParentSplitPane(graphSplitPane); informationPanel.add(infoPanel, BorderLayout.CENTER); } return informationPanel; }
From source file:org.p_vcd.ui.VcdDialog.java
public VcdDialog() { setSize(700, 450);/*from w ww. j a v a 2 s .c o m*/ setTitle("P-VCD - Video Copy Detection"); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.currentStep = 1; getContentPane().setLayout(new BorderLayout()); contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); getContentPane().add(contentPanel, BorderLayout.CENTER); contentPanel.setLayout(new CardLayout(0, 0)); { JPanel panel_Step1 = new JPanel(); contentPanel.add(panel_Step1, "card_step1"); panel_Step1.setLayout(new BorderLayout(0, 0)); JLabel lblTitle = new JLabel("STEP 1 - Video Database (the \"known\")"); panel_Step1.add(lblTitle, BorderLayout.NORTH); lblTitle.setHorizontalAlignment(SwingConstants.CENTER); lblTitle.setFont(new Font("Tahoma", Font.PLAIN, 18)); JPanel panel_1 = new JPanel(); panel_Step1.add(panel_1, BorderLayout.CENTER); panel_1.setLayout(new MigLayout("", "[250px,grow][20px][250px,grow]", "[][][230px,grow][][][]")); JLabel lblNewLabel = new JLabel("Please select the video databases to search in:"); panel_1.add(lblNewLabel, "cell 0 0"); panel_1.add(lbl_refDbTitle, "cell 2 1"); JScrollPane scrollPane_1 = new JScrollPane(); panel_1.add(scrollPane_1, "cell 0 1 1 3,grow"); panel_refDatabasesList.setBackground(Color.WHITE); scrollPane_1.setViewportView(panel_refDatabasesList); panel_refDatabasesList.setLayout(new MigLayout("gapy 10", "[200px]", "[][]")); JScrollPane scrollPane = new JScrollPane(); scrollPane.setBorder(null); panel_1.add(scrollPane, "cell 2 2,grow"); scrollPane.setViewportView(lbl_refDbFiles); panel_1.add(lbl_refDbMetadata, "cell 2 3"); JButton btnNewDatabase = new JButton("New database..."); panel_1.add(btnNewDatabase, "cell 0 4"); btnNewDatabase.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { newDatabaseButton(); } }); } { JPanel panel_Step2 = new JPanel(); contentPanel.add(panel_Step2, "card_step2"); panel_Step2.setLayout(new BorderLayout(0, 0)); JLabel lblTitle = new JLabel("STEP 2 - Query (the \"unknown\")"); panel_Step2.add(lblTitle, BorderLayout.NORTH); lblTitle.setHorizontalAlignment(SwingConstants.CENTER); lblTitle.setFont(new Font("Tahoma", Font.PLAIN, 18)); JPanel panel = new JPanel(); panel.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Query", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel_Step2.add(panel, BorderLayout.CENTER); panel.setLayout( new MigLayout("", "[160px][grow]", "[25px][grow,top][25px][grow,top][25px][grow,top][grow]")); ButtonGroup queryButtonGroup = new ButtonGroup(); queryButtonGroup.add(radio_queryFile); radio_queryFile.setFont(new Font("Tahoma", Font.PLAIN, 13)); panel.add(radio_queryFile, "cell 0 0"); lbl_queryFile.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { radio_queryFile.setSelected(true); } }); panel.add(lbl_queryFile, "flowy,cell 1 0"); JButton btnSelectFile = new JButton("Select File..."); btnSelectFile.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { selectFileButton(); } }); panel.add(btnSelectFile, "cell 1 0"); JLabel lblIumageOrVideo = new JLabel("Select an image or video in the local machine."); panel.add(lblIumageOrVideo, "cell 1 1"); queryButtonGroup.add(radio_queryUrl); radio_queryUrl.setFont(new Font("Tahoma", Font.PLAIN, 13)); panel.add(radio_queryUrl, "cell 0 2"); txt_queryUrl.addKeyListener(new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { radio_queryUrl.setSelected(true); } }); txt_queryUrl.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { radio_queryUrl.setSelected(true); } }); txt_queryUrl.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { radio_queryUrl.setSelected(true); } }); txt_queryUrl.setText("http://"); panel.add(txt_queryUrl, "flowy,cell 1 2"); txt_queryUrl.setColumns(50); JLabel lblUrlToA = new JLabel( "<html>Enter the URL to download an image or video.<br>You can use a URL like: http://www.youtube.com/watch?v=... </html>"); panel.add(lblUrlToA, "flowy,cell 1 3"); queryButtonGroup.add(radio_queryDb); radio_queryDb.setFont(new Font("Tahoma", Font.PLAIN, 13)); panel.add(radio_queryDb, "cell 0 4"); comboBox_queryDb.setMaximumRowCount(12); comboBox_queryDb.setPreferredSize(new Dimension(100, 20)); comboBox_queryDb.setMinimumSize(new Dimension(100, 20)); comboBox_queryDb.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { if (comboBox_queryDb.getSelectedIndex() > 0) radio_queryDb.setSelected(true); updateQueryDbDetail(); } }); comboBox_queryDb.addKeyListener(new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { if (comboBox_queryDb.getSelectedIndex() > 0) radio_queryDb.setSelected(true); updateQueryDbDetail(); } }); panel.add(comboBox_queryDb, "flowx,cell 1 4"); panel.add(lbl_queryDb, "cell 1 4"); JLabel lblPleaseNopteThe = new JLabel("<html>A search is run for each video in the database.</html>"); panel.add(lblPleaseNopteThe, "cell 1 5"); } { JPanel panel_Step3 = new JPanel(); contentPanel.add(panel_Step3, "card_step3"); panel_Step3.setLayout(new BorderLayout(0, 0)); JLabel lblTitle = new JLabel("STEP 3 - Search Options"); lblTitle.setFont(new Font("Tahoma", Font.PLAIN, 18)); lblTitle.setHorizontalAlignment(SwingConstants.CENTER); panel_Step3.add(lblTitle, BorderLayout.NORTH); JPanel panel2 = new JPanel(); panel2.setLayout(new FlowLayout()); panel_Step3.add(panel2, BorderLayout.CENTER); JPanel panel = new JPanel(); panel2.add(panel); panel.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Basic Options", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel.setLayout(new MigLayout("gapy 5px", "[30px][101px]", "[][][][][][][20px]")); ButtonGroup buttonGroup = new ButtonGroup(); buttonGroup.add(radio_searchByGlobal); radio_searchByGlobal.setFont(new Font("Tahoma", Font.PLAIN, 13)); radio_searchByGlobal.setSelected(true); panel.add(radio_searchByGlobal, "cell 0 0 2 1,alignx left,aligny top"); JLabel lblNewLabel_2 = new JLabel( "Detects most of the copies that are visually alike to the original."); panel.add(lblNewLabel_2, "cell 1 1"); JButton btnOptions = new JButton("Advanced Options..."); btnOptions.setEnabled(false); panel.add(btnOptions, "cell 1 2"); buttonGroup.add(radio_searchByLocal); radio_searchByLocal.setFont(new Font("Tahoma", Font.PLAIN, 13)); panel.add(radio_searchByLocal, "cell 0 4 2 1,alignx left,aligny top"); JLabel lblNewLabel_3 = new JLabel( "Requires more resources (disk space, search time, memory) but can detect more copies."); panel.add(lblNewLabel_3, "cell 1 5"); JButton btnOptions_1 = new JButton("Advanced Options..."); btnOptions_1.setEnabled(false); panel.add(btnOptions_1, "cell 1 6"); } { JPanel panel_Step4 = new JPanel(); contentPanel.add(panel_Step4, "card_step4"); panel_Step4.setLayout(new BorderLayout(0, 0)); JLabel lblTitle = new JLabel("STEP 4 - Search"); lblTitle.setHorizontalAlignment(SwingConstants.CENTER); lblTitle.setFont(new Font("Tahoma", Font.PLAIN, 18)); panel_Step4.add(lblTitle, BorderLayout.NORTH); JScrollPane scrollPane = new JScrollPane(); panel_Step4.add(scrollPane, BorderLayout.CENTER); textConsole.setFont(new Font("Monospaced", Font.PLAIN, 11)); textConsole.setForeground(Color.WHITE); textConsole.setBackground(Color.BLACK); textConsole.setEditable(false); textConsole.setCursor(new Cursor(Cursor.TEXT_CURSOR)); textConsole.setText( "Press 'Next' button to start the search...\nNote: Depending on the selected options, the search may take up to several hours."); scrollPane.setViewportView(textConsole); JPanel panel = new JPanel(); panel_Step4.add(panel, BorderLayout.SOUTH); panel.setLayout(new GridLayout(0, 1, 0, 0)); JSeparator separator = new JSeparator(); separator.setPreferredSize(new Dimension(0, 1)); panel.add(separator); progressBar.setStringPainted(true); progressBar.setPreferredSize(new Dimension(350, 20)); panel.add(progressBar); lblProgress.setHorizontalAlignment(SwingConstants.CENTER); lblProgress.setFont(new Font("Tahoma", Font.PLAIN, 14)); panel.add(lblProgress); } { JPanel panel_Step5 = new JPanel(); contentPanel.add(panel_Step5, "card_step5"); panel_Step5.setLayout(new BorderLayout(0, 0)); JLabel lblTitle = new JLabel("STEP 5 - Results"); lblTitle.setHorizontalAlignment(SwingConstants.CENTER); lblTitle.setFont(new Font("Tahoma", Font.PLAIN, 18)); panel_Step5.add(lblTitle, BorderLayout.NORTH); JScrollPane scrollPane = new JScrollPane(); panel_Step5.add(scrollPane, BorderLayout.CENTER); scrollPane.setViewportView(panelResults); panelResults.setLayout(new MigLayout("gapy 10, gapx 20", "[120px,center][150px,center,grow][150px,center,grow]", "[25px][]")); } { JPanel buttonPane = new JPanel(); buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane, BorderLayout.SOUTH); { JButton prevButton = new JButton("Previous"); prevButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { previousButton(); } }); prevButton.setActionCommand("Previous"); buttonPane.add(prevButton); } { JButton okButton = new JButton("Next"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { nextButton(); } }); okButton.setActionCommand("OK"); buttonPane.add(okButton); getRootPane().setDefaultButton(okButton); } { JButton cancelButton = new JButton("Cancel"); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { cancelButton(); } }); cancelButton.setActionCommand("Cancel"); buttonPane.add(cancelButton); } } this.addWindowListener(new WindowAdapter() { @Override public void windowClosed(WindowEvent e) { closeWindow(); } }); updateDatabases(null); }