전체 글(809)
-
Java Exception에 변수 추가하기
class SpecialValueException extends Exception { private final int specialValue; public SpecialValueException(String message, int specialValue) { super(message); this.specialValue = specialValue; } public int getSpecialValue() { return specialValue; }}public class CustomExceptionExample { public static void main(String[] args) { try { proce..
2024.11.30 -
Java Directory 존재여부 체크 및 생성
File의 exists(), isDirectory() 사용import java.io.File;public class DirectoryCheck { public static void main(String[] args) { // Specify the directory path String directoryPath = "/path/to/directory"; // Create a File object for the specified path File directory = new File(directoryPath); // Check if the path exists and is a directory if (directory.exist..
2024.11.30 -
Sencha chart mouse out 처리
mouse over된 item을 저장하는 변수 선언let lastHighlightedItem = null; // To track the last highlighted item globallymouse over시 처리할 내용 추가 및 hide 이벤트 추가{ xtype: 'cartesian', itemId: 'chart', width: 600, height: 400, store: { fields: ['date', 'DATA', 'value'], data: [ { date: '2024-11-27 12:00', DATA: 'Data1', value: 50 }, { date: '2024-11-27 13:00', DATA: ..
2024.11.27 -
Sencha Chart 마우스 오버 처리
다른 이벤트는 안되서, tooltip에 이벤트 적용: alert('Event');{ xtype: 'cartesian', itemId: 'chart', width: 600, height: 400, store: { fields: ['date', 'DATA', 'value'], data: [ { date: '2024-11-27 12:00', DATA: 'Data1', value: 50 }, { date: '2024-11-27 13:00', DATA: 'Data2', value: 70 }, // Add more records as needed ] }, axes: [ ..
2024.11.27 -
Sencha Grid 자동 바인딩
Store 자동으로 로딩되도록 설정Ext.create('Ext.data.Store', { storeId: 'store', // Assign an ID for easy reference fields: ['DATA1','DATA5','DATA7'], // Define fields proxy: { type: 'ajax', // Use Ajax to fetch data actionMethods: { read: 'POST' // Specify that the "read" operation (load) should use POST }, headers: { 'Content-Type': 'application/js..
2024.11.27 -
Sencha Grid store 업데이트 하기
설정한 값으로 업데이트// New data to update the storelet newData = [ { DATA1: 'A', DATA5: 80, DATA7: 60 }, { DATA1: 'B', DATA5: 70, DATA7: 50 },];// Access the store of the gridlet grid = Ext.ComponentQuery.query('#grid')[0]; // Use itemId to get the gridlet store = grid.getStore(); // Update the store with new datastore.loadData(newData);store를 새로 교체// Create a new storelet newStore = Ext.create('E..
2024.11.27